[U-Boot] [PATCH 0/3] arm: am57xx/dra7xx: Boot Android from eMMC

Provide a way to boot Android from eMMC for AM57xx EVM and DRA7 EVM boards.
Sam Protsenko (3): arm: omap: Define command for booting Android from eMMC arm: am57xx: Define Android boot arguments arm: dra7xx: Define Android boot arguments
configs/am57xx_evm_defconfig | 2 ++ configs/am57xx_evm_nodt_defconfig | 2 ++ configs/am57xx_hs_evm_defconfig | 2 ++ configs/dra7xx_evm_defconfig | 2 ++ configs/dra7xx_hs_evm_defconfig | 2 ++ include/environment/ti/boot.h | 24 +++++++++++++++++++----- 6 files changed, 29 insertions(+), 5 deletions(-)

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 --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 */

Signed-off-by: Sam Protsenko semen.protsenko@linaro.org --- configs/am57xx_evm_defconfig | 2 ++ configs/am57xx_evm_nodt_defconfig | 2 ++ configs/am57xx_hs_evm_defconfig | 2 ++ 3 files changed, 6 insertions(+)
diff --git a/configs/am57xx_evm_defconfig b/configs/am57xx_evm_defconfig index 11be1ad27f..ad93602c13 100644 --- a/configs/am57xx_evm_defconfig +++ b/configs/am57xx_evm_defconfig @@ -14,6 +14,8 @@ CONFIG_SPL_LOAD_FIT=y CONFIG_OF_BOARD_SETUP=y # CONFIG_ENV_IS_IN_FAT is not set CONFIG_ENV_IS_IN_MMC=y +CONFIG_USE_BOOTARGS=y +CONFIG_BOOTARGS="androidboot.serialno=${serial#} console=ttyS2,115200 androidboot.console=ttyS2 androidboot.hardware=am57xevmboard" CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_VERSION_VARIABLE=y CONFIG_BOARD_EARLY_INIT_F=y diff --git a/configs/am57xx_evm_nodt_defconfig b/configs/am57xx_evm_nodt_defconfig index a6ad0d36e0..e6f71e9133 100644 --- a/configs/am57xx_evm_nodt_defconfig +++ b/configs/am57xx_evm_nodt_defconfig @@ -6,6 +6,8 @@ CONFIG_TARGET_AM57XX_EVM=y CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI_SUPPORT=y CONFIG_ENV_IS_IN_MMC=y +CONFIG_USE_BOOTARGS=y +CONFIG_BOOTARGS="androidboot.serialno=${serial#} console=ttyS2,115200 androidboot.console=ttyS2 androidboot.hardware=am57xevmboard" CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_VERSION_VARIABLE=y CONFIG_BOARD_EARLY_INIT_F=y diff --git a/configs/am57xx_hs_evm_defconfig b/configs/am57xx_hs_evm_defconfig index 91baa2b53e..5cd34561a7 100644 --- a/configs/am57xx_hs_evm_defconfig +++ b/configs/am57xx_hs_evm_defconfig @@ -20,6 +20,8 @@ CONFIG_SPL_FIT_IMAGE_POST_PROCESS=y CONFIG_OF_BOARD_SETUP=y # CONFIG_ENV_IS_IN_FAT is not set CONFIG_ENV_IS_IN_MMC=y +CONFIG_USE_BOOTARGS=y +CONFIG_BOOTARGS="androidboot.serialno=${serial#} console=ttyS2,115200 androidboot.console=ttyS2 androidboot.hardware=am57xevmboard" CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_VERSION_VARIABLE=y CONFIG_BOARD_EARLY_INIT_F=y

Signed-off-by: Sam Protsenko semen.protsenko@linaro.org --- configs/dra7xx_evm_defconfig | 2 ++ configs/dra7xx_hs_evm_defconfig | 2 ++ 2 files changed, 4 insertions(+)
diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig index 4fff0cf734..0357abc6cd 100644 --- a/configs/dra7xx_evm_defconfig +++ b/configs/dra7xx_evm_defconfig @@ -14,6 +14,8 @@ CONFIG_SPL_LOAD_FIT=y CONFIG_OF_BOARD_SETUP=y # CONFIG_ENV_IS_IN_FAT is not set CONFIG_ENV_IS_IN_MMC=y +CONFIG_USE_BOOTARGS=y +CONFIG_BOOTARGS="androidboot.serialno=${serial#} console=ttyS0,115200 androidboot.console=ttyS0 androidboot.hardware=jacinto6evmboard" CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_VERSION_VARIABLE=y CONFIG_BOARD_EARLY_INIT_F=y diff --git a/configs/dra7xx_hs_evm_defconfig b/configs/dra7xx_hs_evm_defconfig index 5572472d01..246de12543 100644 --- a/configs/dra7xx_hs_evm_defconfig +++ b/configs/dra7xx_hs_evm_defconfig @@ -20,6 +20,8 @@ CONFIG_SPL_FIT_IMAGE_POST_PROCESS=y CONFIG_OF_BOARD_SETUP=y # CONFIG_ENV_IS_IN_FAT is not set CONFIG_ENV_IS_IN_MMC=y +CONFIG_USE_BOOTARGS=y +CONFIG_BOOTARGS="androidboot.serialno=${serial#} console=ttyS0,115200 androidboot.console=ttyS0 androidboot.hardware=jacinto6evmboard" CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_VERSION_VARIABLE=y CONFIG_BOARD_EARLY_INIT_F=y

On Tue, Aug 15, 2017 at 04:30:00PM +0300, Sam Protsenko wrote:
Provide a way to boot Android from eMMC for AM57xx EVM and DRA7 EVM boards.
Sam Protsenko (3): arm: omap: Define command for booting Android from eMMC arm: am57xx: Define Android boot arguments arm: dra7xx: Define Android boot arguments
configs/am57xx_evm_defconfig | 2 ++ configs/am57xx_evm_nodt_defconfig | 2 ++ configs/am57xx_hs_evm_defconfig | 2 ++ configs/dra7xx_evm_defconfig | 2 ++ configs/dra7xx_hs_evm_defconfig | 2 ++ include/environment/ti/boot.h | 24 +++++++++++++++++++----- 6 files changed, 29 insertions(+), 5 deletions(-)
This series seems to switch from "standard" Linux boot to Android Linux boot, rather than allowing a fallback from one to the other. Yes? If so, that's a problem. Thanks!

On 16 August 2017 at 05:04, Tom Rini trini@konsulko.com wrote:
On Tue, Aug 15, 2017 at 04:30:00PM +0300, Sam Protsenko wrote:
Provide a way to boot Android from eMMC for AM57xx EVM and DRA7 EVM boards.
Sam Protsenko (3): arm: omap: Define command for booting Android from eMMC arm: am57xx: Define Android boot arguments arm: dra7xx: Define Android boot arguments
configs/am57xx_evm_defconfig | 2 ++ configs/am57xx_evm_nodt_defconfig | 2 ++ configs/am57xx_hs_evm_defconfig | 2 ++ configs/dra7xx_evm_defconfig | 2 ++ configs/dra7xx_hs_evm_defconfig | 2 ++ include/environment/ti/boot.h | 24 +++++++++++++++++++----- 6 files changed, 29 insertions(+), 5 deletions(-)
This series seems to switch from "standard" Linux boot to Android Linux boot, rather than allowing a fallback from one to the other. Yes? If so, that's a problem. Thanks!
It still tries to run Linux boot from SD card first:
"run mmcboot;" \
and if it fails, it tries to run Android from eMMC:
"run emmc_android_boot; " \
If that's a problem for some boards and you want them to run standard Linux from eMMC, I can try to rework that patch to choose automatically, which one to run (Linux or Android), e.g. using $partitions and $partitions_android environment variables. Or we can add some global CONFIG_ANDROID option to choose between distributions. Which one would be better?
-- Tom
participants (2)
-
Sam Protsenko
-
Tom Rini