diff mbox

[U-Boot,RESEND,1/2] rockchip: add basic partitions support for rk3288

Message ID 20160803035506.19144-1-xzy.xu@rock-chips.com
State Accepted
Delegated to: Simon Glass
Headers show

Commit Message

Xu Ziyuan Aug. 3, 2016, 3:55 a.m. UTC
For compatibility with distro boot, fastboot, and mount the mmc deivce
to PC via usb mass storage feature, GPT partitions are essential.

You should write the partitions to mmc device prior to use above
feature.

=> gpt write mmc 1 $partitions
GPT successfully written to block device!
success!

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
---

 include/configs/rk3288_common.h | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Simon Glass Aug. 4, 2016, 2:27 a.m. UTC | #1
On 2 August 2016 at 21:55, Ziyuan Xu <xzy.xu@rock-chips.com> wrote:
> For compatibility with distro boot, fastboot, and mount the mmc deivce
> to PC via usb mass storage feature, GPT partitions are essential.
>
> You should write the partitions to mmc device prior to use above
> feature.
>
> => gpt write mmc 1 $partitions
> GPT successfully written to block device!
> success!
>
> Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
> ---
>
>  include/configs/rk3288_common.h | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/include/configs/rk3288_common.h b/include/configs/rk3288_common.h
> index 814116c..fa37335 100644
> --- a/include/configs/rk3288_common.h
> +++ b/include/configs/rk3288_common.h
> @@ -113,6 +113,12 @@
>         "kernel_addr_r=0x02000000\0" \
>         "ramdisk_addr_r=0x04000000\0"
>
> +#define CONFIG_RANDOM_UUID
> +#define PARTS_DEFAULT \
> +       "uuid_disk=${uuid_gpt_disk};" \
> +       "name=boot,start=8M,size=64M,bootable,uuid=${uuid_gpt_boot};" \
> +       "name=rootfs,size=-,uuid=${uuid_gpt_rootfs};\0" \
> +
>  /* First try to boot from SD (index 0), then eMMC (index 1 */
>  #define BOOT_TARGET_DEVICES(func) \
>         func(MMC, mmc, 0) \
> @@ -125,6 +131,7 @@
>  #define CONFIG_EXTRA_ENV_SETTINGS \
>         "fdt_high=0x1fffffff\0" \
>         "initrd_high=0x1fffffff\0" \
> +       "partitions=" PARTS_DEFAULT \
>         ENV_MEM_LAYOUT_SETTINGS \
>         ROCKCHIP_DEVICE_SETTINGS \
>         BOOTENV
> --
> 2.9.2
>
>

Acked-by: Simon Glass <sjg@chromium.org>
Simon Glass Aug. 4, 2016, 4:21 a.m. UTC | #2
On 3 August 2016 at 20:27, Simon Glass <sjg@chromium.org> wrote:
> On 2 August 2016 at 21:55, Ziyuan Xu <xzy.xu@rock-chips.com> wrote:
>> For compatibility with distro boot, fastboot, and mount the mmc deivce
>> to PC via usb mass storage feature, GPT partitions are essential.
>>
>> You should write the partitions to mmc device prior to use above
>> feature.
>>
>> => gpt write mmc 1 $partitions
>> GPT successfully written to block device!
>> success!
>>
>> Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
>> ---
>>
>>  include/configs/rk3288_common.h | 7 +++++++
>>  1 file changed, 7 insertions(+)
>>
>> diff --git a/include/configs/rk3288_common.h b/include/configs/rk3288_common.h
>> index 814116c..fa37335 100644
>> --- a/include/configs/rk3288_common.h
>> +++ b/include/configs/rk3288_common.h
>> @@ -113,6 +113,12 @@
>>         "kernel_addr_r=0x02000000\0" \
>>         "ramdisk_addr_r=0x04000000\0"
>>
>> +#define CONFIG_RANDOM_UUID
>> +#define PARTS_DEFAULT \
>> +       "uuid_disk=${uuid_gpt_disk};" \
>> +       "name=boot,start=8M,size=64M,bootable,uuid=${uuid_gpt_boot};" \
>> +       "name=rootfs,size=-,uuid=${uuid_gpt_rootfs};\0" \
>> +
>>  /* First try to boot from SD (index 0), then eMMC (index 1 */
>>  #define BOOT_TARGET_DEVICES(func) \
>>         func(MMC, mmc, 0) \
>> @@ -125,6 +131,7 @@
>>  #define CONFIG_EXTRA_ENV_SETTINGS \
>>         "fdt_high=0x1fffffff\0" \
>>         "initrd_high=0x1fffffff\0" \
>> +       "partitions=" PARTS_DEFAULT \
>>         ENV_MEM_LAYOUT_SETTINGS \
>>         ROCKCHIP_DEVICE_SETTINGS \
>>         BOOTENV
>> --
>> 2.9.2
>>
>>
>
> Acked-by: Simon Glass <sjg@chromium.org>

Applied to u-boot-rockchip, thanks!
diff mbox

Patch

diff --git a/include/configs/rk3288_common.h b/include/configs/rk3288_common.h
index 814116c..fa37335 100644
--- a/include/configs/rk3288_common.h
+++ b/include/configs/rk3288_common.h
@@ -113,6 +113,12 @@ 
 	"kernel_addr_r=0x02000000\0" \
 	"ramdisk_addr_r=0x04000000\0"
 
+#define CONFIG_RANDOM_UUID
+#define PARTS_DEFAULT \
+	"uuid_disk=${uuid_gpt_disk};" \
+	"name=boot,start=8M,size=64M,bootable,uuid=${uuid_gpt_boot};" \
+	"name=rootfs,size=-,uuid=${uuid_gpt_rootfs};\0" \
+
 /* First try to boot from SD (index 0), then eMMC (index 1 */
 #define BOOT_TARGET_DEVICES(func) \
 	func(MMC, mmc, 0) \
@@ -125,6 +131,7 @@ 
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	"fdt_high=0x1fffffff\0" \
 	"initrd_high=0x1fffffff\0" \
+	"partitions=" PARTS_DEFAULT \
 	ENV_MEM_LAYOUT_SETTINGS \
 	ROCKCHIP_DEVICE_SETTINGS \
 	BOOTENV