From e369f710195f34159c677b5129da37d9efe13a48 Mon Sep 17 00:00:00 2001 From: Isaac Hermida Date: Thu, 17 Aug 2023 14:25:46 +0200 Subject: [PATCH] u-boot-dey: ccimx93: fix boot from sdcard image When booting from recovery sdcard, in the imx93 the dualboot is yes by default, so the mmcroot variable was not set correctly for the uSD. If we boot from uSD, just assume all the system is in the uSD card, whether it is a recovery system or a prepared uSD card for demo. https://onedigi.atlassian.net/browse/DEL-8461 Signed-off-by: Isaac Hermida --- .../u-boot/u-boot-dey/ccimx93-dvk/boot.txt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx93-dvk/boot.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx93-dvk/boot.txt index 99aa7c59a..e6c3fc76e 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx93-dvk/boot.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx93-dvk/boot.txt @@ -7,8 +7,12 @@ # and save them, while the rest of the script changes variables only temporarily # without saving them. -# Dual boot update verification -if test "${dualboot}" = "yes"; then +# Pre step: check if we boot from uSD. +if test "${mmcbootdev}" = "1"; then + # We are booting from the SD card. + setenv mmcroot /dev/mmcblk${mmcbootdev}p2 +elif test "${dualboot}" = "yes"; then + # Dual boot update verification if test "${upgrade_available}" = "1"; then echo "Update detected; Booting new system in ${active_system} (try ${bootcount})" else @@ -43,9 +47,6 @@ else # We are booting from the eMMC using 'recovery'. setenv boot_initrd true setenv initrd_file uramdisk-recovery.img - else - # We are booting from the SD card. - setenv mmcroot /dev/mmcblk${mmcbootdev}p2 fi fi