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>
This commit is contained in:
Adrian Schmutzler
2020-07-18 14:59:48 +02:00
parent 0f3c3a5fb2
commit 8126e572dd
6 changed files with 127 additions and 139 deletions

View File

@@ -1,7 +0,0 @@
do_sysinfo_imx6() {
. /lib/imx6.sh
imx6_board_detect
}
boot_hook_add preinit_main do_sysinfo_imx6

View File

@@ -6,7 +6,9 @@ move_config() {
local board=$(board_name)
case "$board" in
apalis*)
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" /