diff mbox series

[meta-swupdate-boards] raspberry: add u-boot script to support dual-copy

Message ID 20200318113149.10361-1-sbabic@denx.de
State Accepted
Headers show
Series [meta-swupdate-boards] raspberry: add u-boot script to support dual-copy | expand

Commit Message

Stefano Babic March 18, 2020, 11:31 a.m. UTC
Signed-off-by: Stefano Babic <sbabic@denx.de>
---
 raspberrypi/recipes-bsp/rpi-uboot-scr/files/boot.cmd.in | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/raspberrypi/recipes-bsp/rpi-uboot-scr/files/boot.cmd.in b/raspberrypi/recipes-bsp/rpi-uboot-scr/files/boot.cmd.in
index a2986ac..04cbd7b 100644
--- a/raspberrypi/recipes-bsp/rpi-uboot-scr/files/boot.cmd.in
+++ b/raspberrypi/recipes-bsp/rpi-uboot-scr/files/boot.cmd.in
@@ -1,5 +1,6 @@ 
 saveenv
 fdt addr ${fdt_addr} && fdt get value bootargs /chosen bootargs
-fatload mmc 0:1 ${kernel_addr_r} @@KERNEL_IMAGETYPE@@
-if env exists rpipart;then setenv bootargs ${bootargs} root=/dev/mmcblk0p${rpipart}; fi
+if env exists rpipart;then echo Booting from mmcblk0p${rpipart};else setenv rpipart 2;echo rpipart not set, default to ${rpipart};fi
+load mmc 0:${rpipart} ${kernel_addr_r} boot/@@KERNEL_IMAGETYPE@@
+setenv bootargs ${bootargs} root=/dev/mmcblk0p${rpipart}
 @@KERNEL_BOOTCMD@@ ${kernel_addr_r} - ${fdt_addr}