All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/3] arm: am57xx/dra7xx: Boot Android from eMMC
@ 2017-08-15 13:30 Sam Protsenko
  2017-08-15 13:30 ` [U-Boot] [PATCH 1/3] arm: omap: Define command for booting " Sam Protsenko
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Sam Protsenko @ 2017-08-15 13:30 UTC (permalink / raw)
  To: u-boot

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(-)

-- 
2.13.2

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 1/3] arm: omap: Define command for booting Android from eMMC
  2017-08-15 13:30 [U-Boot] [PATCH 0/3] arm: am57xx/dra7xx: Boot Android from eMMC Sam Protsenko
@ 2017-08-15 13:30 ` Sam Protsenko
  2017-08-15 13:30 ` [U-Boot] [PATCH 2/3] arm: am57xx: Define Android boot arguments Sam Protsenko
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Sam Protsenko @ 2017-08-15 13:30 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 2/3] arm: am57xx: Define Android boot arguments
  2017-08-15 13:30 [U-Boot] [PATCH 0/3] arm: am57xx/dra7xx: Boot Android from eMMC Sam Protsenko
  2017-08-15 13:30 ` [U-Boot] [PATCH 1/3] arm: omap: Define command for booting " Sam Protsenko
@ 2017-08-15 13:30 ` Sam Protsenko
  2017-08-15 13:30 ` [U-Boot] [PATCH 3/3] arm: dra7xx: " Sam Protsenko
  2017-08-16  2:04 ` [U-Boot] [PATCH 0/3] arm: am57xx/dra7xx: Boot Android from eMMC Tom Rini
  3 siblings, 0 replies; 6+ messages in thread
From: Sam Protsenko @ 2017-08-15 13:30 UTC (permalink / raw)
  To: u-boot

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
-- 
2.13.2

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 3/3] arm: dra7xx: Define Android boot arguments
  2017-08-15 13:30 [U-Boot] [PATCH 0/3] arm: am57xx/dra7xx: Boot Android from eMMC Sam Protsenko
  2017-08-15 13:30 ` [U-Boot] [PATCH 1/3] arm: omap: Define command for booting " Sam Protsenko
  2017-08-15 13:30 ` [U-Boot] [PATCH 2/3] arm: am57xx: Define Android boot arguments Sam Protsenko
@ 2017-08-15 13:30 ` Sam Protsenko
  2017-08-16  2:04 ` [U-Boot] [PATCH 0/3] arm: am57xx/dra7xx: Boot Android from eMMC Tom Rini
  3 siblings, 0 replies; 6+ messages in thread
From: Sam Protsenko @ 2017-08-15 13:30 UTC (permalink / raw)
  To: u-boot

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
-- 
2.13.2

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 0/3] arm: am57xx/dra7xx: Boot Android from eMMC
  2017-08-15 13:30 [U-Boot] [PATCH 0/3] arm: am57xx/dra7xx: Boot Android from eMMC Sam Protsenko
                   ` (2 preceding siblings ...)
  2017-08-15 13:30 ` [U-Boot] [PATCH 3/3] arm: dra7xx: " Sam Protsenko
@ 2017-08-16  2:04 ` Tom Rini
  2017-08-16  8:51   ` Sam Protsenko
  3 siblings, 1 reply; 6+ messages in thread
From: Tom Rini @ 2017-08-16  2:04 UTC (permalink / raw)
  To: u-boot

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!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170815/85446d3a/attachment.sig>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 0/3] arm: am57xx/dra7xx: Boot Android from eMMC
  2017-08-16  2:04 ` [U-Boot] [PATCH 0/3] arm: am57xx/dra7xx: Boot Android from eMMC Tom Rini
@ 2017-08-16  8:51   ` Sam Protsenko
  0 siblings, 0 replies; 6+ messages in thread
From: Sam Protsenko @ 2017-08-16  8:51 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-08-16  8:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-15 13:30 [U-Boot] [PATCH 0/3] arm: am57xx/dra7xx: Boot Android from eMMC Sam Protsenko
2017-08-15 13:30 ` [U-Boot] [PATCH 1/3] arm: omap: Define command for booting " Sam Protsenko
2017-08-15 13:30 ` [U-Boot] [PATCH 2/3] arm: am57xx: Define Android boot arguments Sam Protsenko
2017-08-15 13:30 ` [U-Boot] [PATCH 3/3] arm: dra7xx: " Sam Protsenko
2017-08-16  2:04 ` [U-Boot] [PATCH 0/3] arm: am57xx/dra7xx: Boot Android from eMMC Tom Rini
2017-08-16  8:51   ` Sam Protsenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.