omap: support booting off different mmc devices
authorAndre Heider <a.heider@gmail.com>
Sat, 7 Sep 2019 10:36:52 +0000 (12:36 +0200)
committerAlexander Couzens <lynxis@fe80.eu>
Wed, 20 Nov 2019 09:46:19 +0000 (10:46 +0100)
Tested with installing to/sysupgrading from sd and emmc on boneblack.

Signed-off-by: Andre Heider <a.heider@gmail.com>
package/boot/uboot-omap/files/boot.scr.txt

index 3e6b5c351d1d9935c15b49445f0a4e349476909a..a97684b0e62102028ad629fcdaba1ed45ee2c119 100644 (file)
@@ -1,5 +1,9 @@
-setenv bootargs console=${console} root=/dev/mmcblk0p2 rootwait
+if test -z "${devnum}"; then
+       setenv devnum 0
+fi
 
-load mmc 0:1 ${loadaddr} /zImage \
-&& load mmc 0:1 ${fdtaddr} /dtbs/${fdtfile} \
+setenv bootargs console=${console} root=/dev/mmcblk${devnum}p2 rootwait
+
+load mmc ${devnum}:1 ${loadaddr} /zImage \
+&& load mmc ${devnum}:1 ${fdtaddr} /dtbs/${fdtfile} \
 && bootz ${loadaddr} - ${fdtaddr}