79_move_config 540 B

1234567891011121314151617181920212223242526
  1. . /lib/functions.sh
  2. . /lib/upgrade/common.sh
  3. BOOTPART=/dev/mmcblk0p1
  4. move_config() {
  5. local board=$(board_name)
  6. case "$board" in
  7. fsl,ls1012a-frwy-sdboot | \
  8. fsl,ls1021a-iot-sdboot | \
  9. fsl,ls1021a-twr-sdboot | \
  10. fsl,ls1043a-rdb-sdboot | \
  11. fsl,ls1046a-rdb-sdboot | \
  12. fsl,ls1088a-rdb-sdboot)
  13. if [ -b $BOOTPART ]; then
  14. mkdir -p /boot
  15. mount -t ext4 -o rw,noatime $BOOTPART /boot 2>&1
  16. [ -f "/boot/$BACKUP_FILE" ] && mv -f "/boot/$BACKUP_FILE" /
  17. umount /boot
  18. fi
  19. ;;
  20. esac
  21. }
  22. boot_hook_add preinit_mount_root move_config