aboutsummaryrefslogtreecommitdiff
path: root/target/linux/imx/base-files/lib/preinit/79_move_config
diff options
context:
space:
mode:
authorPiotr Dymacz <pepe2k@gmail.com>2021-03-28 16:56:18 +0200
committerPiotr Dymacz <pepe2k@gmail.com>2021-11-03 12:45:40 +0100
commitd1c66eacabe11f8088f2d49e94b80dfa8a0f94f7 (patch)
tree64d43ea3b3eaa8c8780206ee78e4e0b9ea482d56 /target/linux/imx/base-files/lib/preinit/79_move_config
parent7abde5037d572cb28cc8ae41b39c76323eebc4a6 (diff)
imx6: rename target to 'imx'
This is first step in migrating to a generic i.MX target which in the next steps will also get divided into arch-specific subtargets. In the result, this will make it possible to support, within a single target, also other modern NXP i.MX families, like the i.MX 7, i.MX 8 or recently introduced i.MX 9. Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Diffstat (limited to 'target/linux/imx/base-files/lib/preinit/79_move_config')
1 files changed, 21 insertions, 0 deletions
diff --git a/target/linux/imx/base-files/lib/preinit/79_move_config b/target/linux/imx/base-files/lib/preinit/79_move_config
new file mode 100644
index 0000000000..6ed59320ac
--- /dev/null
+++ b/target/linux/imx/base-files/lib/preinit/79_move_config
@@ -0,0 +1,21 @@
+. /lib/imx.sh
+. /lib/functions.sh
+. /lib/upgrade/common.sh
+
+move_config() {
+ local board=$(board_name)
+
+ case "$board" in
+ toradex,apalis_imx6q-eval |\
+ toradex,apalis_imx6q-ixora |\
+ toradex,apalis_imx6q-ixora-v1.1 )
+ if [ -b $(bootpart_from_uuid) ]; then
+ apalis_mount_boot
+ [ -f "/boot/$BACKUP_FILE" ] && mv -f "/boot/$BACKUP_FILE" /
+ umount /boot
+ fi
+ ;;
+ esac
+}
+
+boot_hook_add preinit_mount_root move_config