difos/target/linux/imx6/base-files/lib/preinit/79_move_config
Adrian Schmutzler 8126e572dd imx6: use device-tree compatible for board name
In imx6, we currently use the model from DTS to derive a board name
manually in /lib/imx6.sh.

However, if we have individual DTS files anyway, we can exploit
generic 02_sysinfo and use the compatible as board name directly.

While at it, remove the wildcards from /lib/upgrade/platform.sh as
these might make code shorter, but are quite unpleasant when grepping
for a specific device.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-07-27 12:10:45 +02:00

21 lines
423 B
Text

. /lib/imx6.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