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>
21 lines
423 B
Text
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
|