diff mbox

[v2,1/3] arm: am57xx: Define Android partition table

Message ID 20161031175338.6598-1-semen.protsenko@linaro.org
State Accepted
Commit a42cfa4f82efaff1373d1417c8d85036f1189491
Headers show

Commit Message

Sam Protsenko Oct. 31, 2016, 5:53 p.m. UTC
"fastboot oem format" command reuses "gpt write" command, which in turn
requires correct partitions defined in $partitions variable. This patch
adds such definition of Android partitions for DRA7XX EVM board.

By default $partitions variable contains Linux partition table. In order
to prepare Android environment one can run next commands from U-Boot
shell:

    => env set partitions $partitions_android
    => env save

After those operations one can go to fastboot mode and perform
"fastboot oem format" to create Android partition table.

While at it, enable CONFIG_RANDOM_UUID to spare user from providing
UUIDs for each partition manually.

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

---
Changes in v2:
  - do not wrap PARTS_DEFAULT in #ifndef CONFIG_SPL_BUILD

 include/configs/am57xx_evm.h | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

-- 
2.9.3

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Comments

Tom Rini Nov. 22, 2016, 2:46 a.m. UTC | #1
On Mon, Oct 31, 2016 at 07:53:38PM +0200, Semen Protsenko wrote:

> "fastboot oem format" command reuses "gpt write" command, which in turn

> requires correct partitions defined in $partitions variable. This patch

> adds such definition of Android partitions for DRA7XX EVM board.

> 

> By default $partitions variable contains Linux partition table. In order

> to prepare Android environment one can run next commands from U-Boot

> shell:

> 

>     => env set partitions $partitions_android

>     => env save

> 

> After those operations one can go to fastboot mode and perform

> "fastboot oem format" to create Android partition table.

> 

> While at it, enable CONFIG_RANDOM_UUID to spare user from providing

> UUIDs for each partition manually.

> 

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


Applied to u-boot/master, thanks!

-- 
Tom
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
diff mbox

Patch

diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h
index d865f41..bcbe3cd 100644
--- a/include/configs/am57xx_evm.h
+++ b/include/configs/am57xx_evm.h
@@ -38,14 +38,33 @@ 
 
 /* Define the default GPT table for eMMC */
 #define PARTS_DEFAULT \
+	/* Linux partitions */ \
 	"uuid_disk=${uuid_gpt_disk};" \
-	"name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}"
+	"name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}\0" \
+	/* Android partitions */ \
+	"partitions_android=" \
+	"uuid_disk=${uuid_gpt_disk};" \
+	"name=xloader,start=128K,size=256K,uuid=${uuid_gpt_xloader};" \
+	"name=bootloader,size=768K,uuid=${uuid_gpt_bootloader};" \
+	"name=environment,size=128K,uuid=${uuid_gpt_environment};" \
+	"name=misc,size=128K,uuid=${uuid_gpt_misc};" \
+	"name=reserved,size=256K,uuid=${uuid_gpt_reserved};" \
+	"name=efs,size=16M,uuid=${uuid_gpt_efs};" \
+	"name=crypto,size=16K,uuid=${uuid_gpt_crypto};" \
+	"name=recovery,size=10M,uuid=${uuid_gpt_recovery};" \
+	"name=boot,size=10M,uuid=${uuid_gpt_boot};" \
+	"name=system,size=768M,uuid=${uuid_gpt_system};" \
+	"name=cache,size=256M,uuid=${uuid_gpt_cache};" \
+	"name=ipu1,size=1M,uuid=${uuid_gpt_ipu1};" \
+	"name=ipu2,size=1M,uuid=${uuid_gpt_ipu2};" \
+	"name=userdata,size=-,uuid=${uuid_gpt_userdata}"
 
 #include <configs/ti_omap5_common.h>
 
 /* Enhance our eMMC support / experience. */
 #define CONFIG_CMD_GPT
 #define CONFIG_EFI_PARTITION
+#define CONFIG_RANDOM_UUID
 
 /* CPSW Ethernet */
 #define CONFIG_BOOTP_DNS		/* Configurable parts of CMD_DHCP */