From dbf1db98cf4e3708cb09fdfb46779e6ccd6a2c8a Mon Sep 17 00:00:00 2001 From: Hector Palacios Date: Fri, 8 Sep 2023 09:57:44 +0200 Subject: [PATCH] ccmp1: boot script: add support for booting from microSD When booting from a microSD, the variable 'boot_device' is set to "mmc". Check this to fall back to booting Linux from the microSD partitions. Signed-off-by: Hector Palacios --- .../recipes-bsp/u-boot/u-boot-dey/ccmp13-dvk/boot.txt | 9 +++++---- .../recipes-bsp/u-boot/u-boot-dey/ccmp15-dvk/boot.txt | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp13-dvk/boot.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp13-dvk/boot.txt index 94fed3c6d..f960f2118 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp13-dvk/boot.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp13-dvk/boot.txt @@ -37,9 +37,6 @@ else # We are booting from the NAND 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 setenv rootfsvol rootfs fi @@ -64,7 +61,11 @@ if test "${module_has_wifi}" = "1" && test -z "${disable_wifi}"; then setenv overlays _ov_som_wifi_ccmp13.dtbo,${overlays} fi -dboot linux nand ${mtdbootpart} +if test "${boot_device}" = "mmc"; then + dboot linux mmc +else + dboot linux nand ${mtdbootpart} +fi diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp15-dvk/boot.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp15-dvk/boot.txt index 632feb7aa..05216ff2d 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp15-dvk/boot.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp15-dvk/boot.txt @@ -37,9 +37,6 @@ else # We are booting from the NAND 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 setenv rootfsvol rootfs fi @@ -75,7 +72,11 @@ if test -z "${board_version}" || test "${board_version}" -eq "1"; then setenv overlays _ov_board_v1_ccmp15-dvk.dtbo,${overlays} fi -dboot linux nand ${mtdbootpart} +if test "${boot_device}" = "mmc"; then + dboot linux mmc +else + dboot linux nand ${mtdbootpart} +fi