diff mbox series

[1/3] arm: omap: Define command for booting Android from eMMC

Message ID 20170815133003.17187-2-semen.protsenko@linaro.org
State Superseded
Headers show
Series arm: am57xx/dra7xx: Boot Android from eMMC | expand

Commit Message

Sam Protsenko Aug. 15, 2017, 1:30 p.m. UTC
If SD card is present -- try to boot from it first. If no -- try to boot
Android from eMMC.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
---
 include/environment/ti/boot.h | 24 +++++++++++++++++++-----
 1 file changed, 19 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/include/environment/ti/boot.h b/include/environment/ti/boot.h
index 1c3ae40a99..121a668e78 100644
--- a/include/environment/ti/boot.h
+++ b/include/environment/ti/boot.h
@@ -28,7 +28,24 @@ 
 	"vram=16M\0" \
 	"partitions=" PARTS_DEFAULT "\0" \
 	"optargs=\0" \
-	"dofastboot=0\0"
+	"dofastboot=0\0" \
+	"emmc_android_boot=" \
+		"setenv eval_bootargs setenv bootargs $bootargs; " \
+		"run eval_bootargs; " \
+		"setenv mmcdev 1; " \
+		"setenv fdt_part 3; " \
+		"setenv boot_part 9; " \
+		"setenv machid fe6; " \
+		"mmc dev $mmcdev; " \
+		"mmc rescan; " \
+		"part start mmc ${mmcdev} ${fdt_part} fdt_start; " \
+		"part size mmc ${mmcdev} ${fdt_part} fdt_size; " \
+		"part start mmc ${mmcdev} ${boot_part} boot_start; " \
+		"part size mmc ${mmcdev} ${boot_part} boot_size; " \
+		"mmc read ${fdtaddr} ${fdt_start} ${fdt_size}; " \
+		"mmc read ${loadaddr} ${boot_start} ${boot_size}; " \
+		"echo Booting from eMMC ...; " \
+		"bootm $loadaddr $loadaddr $fdtaddr;\0"
 
 #ifdef CONFIG_OMAP54XX
 
@@ -72,10 +89,7 @@ 
 	"run findfdt; " \
 	"run envboot; " \
 	"run mmcboot;" \
-	"setenv mmcdev 1; " \
-	"setenv bootpart 1:2; " \
-	"setenv mmcroot /dev/mmcblk0p2 rw; " \
-	"run mmcboot;" \
+	"run emmc_android_boot; " \
 	""
 
 #endif /* CONFIG_OMAP54XX */