U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 0/3] arm: am57xx/dra7xx: Boot Android from eMMC
@ 2017-08-16 12:55 Sam Protsenko
  2017-08-16 12:55 ` [U-Boot] [PATCH v2 1/3] arm: omap: Define command for booting " Sam Protsenko
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Sam Protsenko @ 2017-08-16 12:55 UTC (permalink / raw)
  To: u-boot

Provide a way to boot Android from eMMC for AM57xx EVM and DRA7 EVM boards.

Changes in v2:
 - Do not remove the attempt to boot regular Linux from eMMC
   (just add Android boot in the end of the cycle)

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     | 20 +++++++++++++++++++-
 6 files changed, 29 insertions(+), 1 deletion(-)

-- 
2.13.2

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

* [U-Boot] [PATCH v2 1/3] arm: omap: Define command for booting Android from eMMC
  2017-08-16 12:55 [U-Boot] [PATCH v2 0/3] arm: am57xx/dra7xx: Boot Android from eMMC Sam Protsenko
@ 2017-08-16 12:55 ` Sam Protsenko
  2017-08-18 11:42   ` Jaehoon Chung
  2017-08-26 20:46   ` [U-Boot] [U-Boot, v2, " Tom Rini
  2017-08-16 12:55 ` [U-Boot] [PATCH v2 2/3] arm: am57xx: Define Android boot arguments Sam Protsenko
  2017-08-16 12:55 ` [U-Boot] [PATCH v2 3/3] arm: dra7xx: " Sam Protsenko
  2 siblings, 2 replies; 9+ messages in thread
From: Sam Protsenko @ 2017-08-16 12:55 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>
---
Changes in v2:
 - Do not remove the attempt to boot regular Linux from eMMC
   (just add Android boot in the end of the cycle)

 include/environment/ti/boot.h | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/include/environment/ti/boot.h b/include/environment/ti/boot.h
index 1c3ae40a99..a05f5ba9bd 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
 
@@ -76,6 +93,7 @@
 	"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] 9+ messages in thread

* [U-Boot] [PATCH v2 2/3] arm: am57xx: Define Android boot arguments
  2017-08-16 12:55 [U-Boot] [PATCH v2 0/3] arm: am57xx/dra7xx: Boot Android from eMMC Sam Protsenko
  2017-08-16 12:55 ` [U-Boot] [PATCH v2 1/3] arm: omap: Define command for booting " Sam Protsenko
@ 2017-08-16 12:55 ` Sam Protsenko
  2017-08-26 20:46   ` [U-Boot] [U-Boot, v2, " Tom Rini
  2017-08-16 12:55 ` [U-Boot] [PATCH v2 3/3] arm: dra7xx: " Sam Protsenko
  2 siblings, 1 reply; 9+ messages in thread
From: Sam Protsenko @ 2017-08-16 12:55 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
---
Changes in v2:
 - None

 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] 9+ messages in thread

* [U-Boot] [PATCH v2 3/3] arm: dra7xx: Define Android boot arguments
  2017-08-16 12:55 [U-Boot] [PATCH v2 0/3] arm: am57xx/dra7xx: Boot Android from eMMC Sam Protsenko
  2017-08-16 12:55 ` [U-Boot] [PATCH v2 1/3] arm: omap: Define command for booting " Sam Protsenko
  2017-08-16 12:55 ` [U-Boot] [PATCH v2 2/3] arm: am57xx: Define Android boot arguments Sam Protsenko
@ 2017-08-16 12:55 ` Sam Protsenko
  2017-08-26 20:46   ` [U-Boot] [U-Boot, v2, " Tom Rini
  2 siblings, 1 reply; 9+ messages in thread
From: Sam Protsenko @ 2017-08-16 12:55 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
---
Changes in v2:
 - None

 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] 9+ messages in thread

* [U-Boot] [PATCH v2 1/3] arm: omap: Define command for booting Android from eMMC
  2017-08-16 12:55 ` [U-Boot] [PATCH v2 1/3] arm: omap: Define command for booting " Sam Protsenko
@ 2017-08-18 11:42   ` Jaehoon Chung
  2017-08-22 15:06     ` Sam Protsenko
  2017-08-26 20:46   ` [U-Boot] [U-Boot, v2, " Tom Rini
  1 sibling, 1 reply; 9+ messages in thread
From: Jaehoon Chung @ 2017-08-18 11:42 UTC (permalink / raw)
  To: u-boot

On 08/16/2017 09:55 PM, Sam Protsenko wrote:
> If SD card is present -- try to boot from it first. If no -- try to boot
> Android from eMMC.

Well, i didn't know exactly..but is it working?

> 
> Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
> ---
> Changes in v2:
>  - Do not remove the attempt to boot regular Linux from eMMC
>    (just add Android boot in the end of the cycle)
> 
>  include/environment/ti/boot.h | 20 +++++++++++++++++++-
>  1 file changed, 19 insertions(+), 1 deletion(-)
> 
> diff --git a/include/environment/ti/boot.h b/include/environment/ti/boot.h
> index 1c3ae40a99..a05f5ba9bd 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; " \

Need to do "setenv mmcdev 1"? Did it already set before doing "run emmc_android_boot;"?

> +		"setenv fdt_part 3; " \
> +		"setenv boot_part 9; " \
> +		"setenv machid fe6; " \
> +		"mmc dev $mmcdev; " \
> +		"mmc rescan; " \

Why do "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
>  
> @@ -76,6 +93,7 @@
>  	"setenv bootpart 1:2; " \
>  	"setenv mmcroot /dev/mmcblk0p2 rw; " \
>  	"run mmcboot;" \
> +	"run emmc_android_boot; " \
>  	""
>  
>  #endif /* CONFIG_OMAP54XX */
> 

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

* [U-Boot] [PATCH v2 1/3] arm: omap: Define command for booting Android from eMMC
  2017-08-18 11:42   ` Jaehoon Chung
@ 2017-08-22 15:06     ` Sam Protsenko
  0 siblings, 0 replies; 9+ messages in thread
From: Sam Protsenko @ 2017-08-22 15:06 UTC (permalink / raw)
  To: u-boot

On 18 August 2017 at 14:42, Jaehoon Chung <jh80.chung@samsung.com> wrote:
> On 08/16/2017 09:55 PM, Sam Protsenko wrote:
>> If SD card is present -- try to boot from it first. If no -- try to boot
>> Android from eMMC.
>
> Well, i didn't know exactly..but is it working?
>

Yes, I verified it on AM57x EVM, it's working just fine. All my
previous patches were meant exactly for this: booting Android from
eMMC. This patch series just finishes the job.

Do you see anything suspicious about this? If so, please tell.

>>
>> Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
>> ---
>> Changes in v2:
>>  - Do not remove the attempt to boot regular Linux from eMMC
>>    (just add Android boot in the end of the cycle)
>>
>>  include/environment/ti/boot.h | 20 +++++++++++++++++++-
>>  1 file changed, 19 insertions(+), 1 deletion(-)
>>
>> diff --git a/include/environment/ti/boot.h b/include/environment/ti/boot.h
>> index 1c3ae40a99..a05f5ba9bd 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; " \
>
> Need to do "setenv mmcdev 1"? Did it already set before doing "run emmc_android_boot;"?
>

Frankly, I want to keep "emmc_android_boot" command as explicit and
independent as I can. Say, if user changes "mmcdev" variable, I want
to be sure that "emmc_android_boot" will fix it.

>> +             "setenv fdt_part 3; " \
>> +             "setenv boot_part 9; " \
>> +             "setenv machid fe6; " \
>> +             "mmc dev $mmcdev; " \
>> +             "mmc rescan; " \
>
> Why do "mmc rescan"?
>

The same as above. I want to keep this command independent. So that if
user was using SD card, "emmc_android_boot" will switch to eMMC
anyway, before trying to boot.

>> +             "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
>>
>> @@ -76,6 +93,7 @@
>>       "setenv bootpart 1:2; " \
>>       "setenv mmcroot /dev/mmcblk0p2 rw; " \
>>       "run mmcboot;" \
>> +     "run emmc_android_boot; " \
>>       ""
>>
>>  #endif /* CONFIG_OMAP54XX */
>>
>

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

* [U-Boot] [U-Boot, v2, 1/3] arm: omap: Define command for booting Android from eMMC
  2017-08-16 12:55 ` [U-Boot] [PATCH v2 1/3] arm: omap: Define command for booting " Sam Protsenko
  2017-08-18 11:42   ` Jaehoon Chung
@ 2017-08-26 20:46   ` Tom Rini
  1 sibling, 0 replies; 9+ messages in thread
From: Tom Rini @ 2017-08-26 20:46 UTC (permalink / raw)
  To: u-boot

On Wed, Aug 16, 2017 at 03:55:48PM +0300, Semen Protsenko wrote:

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

Applied to u-boot/master, 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/20170826/92f756a5/attachment.sig>

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

* [U-Boot] [U-Boot, v2, 2/3] arm: am57xx: Define Android boot arguments
  2017-08-16 12:55 ` [U-Boot] [PATCH v2 2/3] arm: am57xx: Define Android boot arguments Sam Protsenko
@ 2017-08-26 20:46   ` Tom Rini
  0 siblings, 0 replies; 9+ messages in thread
From: Tom Rini @ 2017-08-26 20:46 UTC (permalink / raw)
  To: u-boot

On Wed, Aug 16, 2017 at 03:55:49PM +0300, Semen Protsenko wrote:

> Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>

Applied to u-boot/master, 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/20170826/94364a3c/attachment.sig>

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

* [U-Boot] [U-Boot, v2, 3/3] arm: dra7xx: Define Android boot arguments
  2017-08-16 12:55 ` [U-Boot] [PATCH v2 3/3] arm: dra7xx: " Sam Protsenko
@ 2017-08-26 20:46   ` Tom Rini
  0 siblings, 0 replies; 9+ messages in thread
From: Tom Rini @ 2017-08-26 20:46 UTC (permalink / raw)
  To: u-boot

On Wed, Aug 16, 2017 at 03:55:50PM +0300, Semen Protsenko wrote:

> Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>

Applied to u-boot/master, 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/20170826/b80c5395/attachment.sig>

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

end of thread, other threads:[~2017-08-26 20:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-16 12:55 [U-Boot] [PATCH v2 0/3] arm: am57xx/dra7xx: Boot Android from eMMC Sam Protsenko
2017-08-16 12:55 ` [U-Boot] [PATCH v2 1/3] arm: omap: Define command for booting " Sam Protsenko
2017-08-18 11:42   ` Jaehoon Chung
2017-08-22 15:06     ` Sam Protsenko
2017-08-26 20:46   ` [U-Boot] [U-Boot, v2, " Tom Rini
2017-08-16 12:55 ` [U-Boot] [PATCH v2 2/3] arm: am57xx: Define Android boot arguments Sam Protsenko
2017-08-26 20:46   ` [U-Boot] [U-Boot, v2, " Tom Rini
2017-08-16 12:55 ` [U-Boot] [PATCH v2 3/3] arm: dra7xx: " Sam Protsenko
2017-08-26 20:46   ` [U-Boot] [U-Boot, v2, " Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox