79_move_config 597 B

12345678910111213141516171819202122232425262728
  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,ls1028a-rdb-sdboot | \
  11. fsl,ls1043a-rdb-sdboot | \
  12. fsl,ls1046a-frwy-sdboot | \
  13. fsl,ls1046a-rdb-sdboot | \
  14. fsl,ls1088a-rdb-sdboot)
  15. if [ -b $BOOTPART ]; then
  16. mkdir -p /boot
  17. mount -t ext4 -o rw,noatime $BOOTPART /boot 2>&1
  18. [ -f "/boot/$BACKUP_FILE" ] && mv -f "/boot/$BACKUP_FILE" /
  19. umount /boot
  20. fi
  21. ;;
  22. esac
  23. }
  24. boot_hook_add preinit_mount_root move_config