[U-Boot,5/6] pico-imx6ul: Add function to create gpt partitions

Message ID 20171114180720.3817-5-otavio@ossystems.com.br
State Changes Requested
Delegated to: Stefano Babic
Headers show
Series
  • [U-Boot,1/6] pico-imx6ul: Move dfu_alt_info to CONFIG_DFU_ENV_SETTINGS variable
Related show

Commit Message

Otavio Salvador Nov. 14, 2017, 6:07 p.m.
From: Fabio Berton <fabio.berton@ossystems.com.br>

Command run setup_emmc will create gpt partitions for mmc 0 device
based on patitions variable.

Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

 configs/pico-imx6ul_defconfig | 1 +
 include/configs/pico-imx6ul.h | 1 +
 2 files changed, 2 insertions(+)

Comments

Fabio Estevam Nov. 14, 2017, 10:41 p.m. | #1
On Tue, Nov 14, 2017 at 4:07 PM, Otavio Salvador
<otavio@ossystems.com.br> wrote:
> From: Fabio Berton <fabio.berton@ossystems.com.br>
>
> Command run setup_emmc will create gpt partitions for mmc 0 device
> based on patitions variable.
>
> Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>

Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>

Patch

diff --git a/configs/pico-imx6ul_defconfig b/configs/pico-imx6ul_defconfig
index e00f9f34a3..f28f9b7a4e 100644
--- a/configs/pico-imx6ul_defconfig
+++ b/configs/pico-imx6ul_defconfig
@@ -12,6 +12,7 @@  CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_DFU=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
+CONFIG_CMD_GPT=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PART=y
 CONFIG_CMD_USB=y
diff --git a/include/configs/pico-imx6ul.h b/include/configs/pico-imx6ul.h
index 43ef3ef6d0..b7469f8031 100644
--- a/include/configs/pico-imx6ul.h
+++ b/include/configs/pico-imx6ul.h
@@ -71,6 +71,7 @@ 
 	"partitions=" \
 		"uuid_disk=${uuid_gpt_disk};" \
 		"name=boot,size=16Mib;name=rootfs,size=0,uuid=${uuid_gpt_rootfs}\0" \
+	"setup_emmc=gpt write mmc 0 $partitions; reset;\0" \
 	"mmcargs=setenv bootargs console=${console},${baudrate} " \
 		"root=PARTUUID=${uuid} rootwait rw\0" \
 	"loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \