* [U-Boot] [PATCH] configs: rk3399: add gpt and fs support
@ 2016-08-02 2:29 Kever Yang
2016-08-02 2:50 ` Kever Yang
2016-08-02 2:56 ` Ziyuan Xu
0 siblings, 2 replies; 6+ messages in thread
From: Kever Yang @ 2016-08-02 2:29 UTC (permalink / raw)
To: u-boot
To compatible with distro boot, we need to add gpt and fs support,
including gpt table and vfat, ext2, ext4 support.
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
---
include/configs/rk3399_common.h | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/include/configs/rk3399_common.h b/include/configs/rk3399_common.h
index a9c9d29..12327d5 100644
--- a/include/configs/rk3399_common.h
+++ b/include/configs/rk3399_common.h
@@ -35,6 +35,15 @@
#define CONFIG_BOUNCE_BUFFER
#define CONFIG_ROCKCHIP_SDHCI_MAX_FREQ 200000000
+#define CONFIG_DOS_PARTITION
+#define CONFIG_PARTITION_UUIDS
+#define CONFIG_SUPPORT_VFAT
+#define CONFIG_FS_FAT
+#define CONFIG_FAT_WRITE
+#define CONFIG_CMD_PART
+
+/* EXT4 FS */
+#define CONFIG_FS_EXT4
#define CONFIG_FAT_WRITE
/* RAW SD card / eMMC locations. */
@@ -60,6 +69,14 @@
"kernel_addr_r=0x02000000\0" \
"ramdisk_addr_r=0x04000000\0"
+#define CONFIG_CMD_GPT
+#define CONFIG_RANDOM_UUID
+#define CONFIG_EFI_PARTITION
+#define PARTS_DEFAULT \
+ "uuid_disk=${uuid_gpt_disk};" \
+ "name=boot,start=16M,size=32M,bootable;" \
+ "name=rootfs,size=-,uuid=${uuid_gpt_rootfs};" \
+
/* First try to boot from SD (index 0), then eMMC (index 1) */
#define BOOT_TARGET_DEVICES(func) \
func(MMC, mmc, 0) \
@@ -67,6 +84,8 @@
#include <config_distro_bootcmd.h>
#define CONFIG_EXTRA_ENV_SETTINGS \
+ ENV_MEM_LAYOUT_SETTINGS \
+ "partitions=" PARTS_DEFAULT \
BOOTENV
#endif
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] configs: rk3399: add gpt and fs support
2016-08-02 2:29 [U-Boot] [PATCH] configs: rk3399: add gpt and fs support Kever Yang
@ 2016-08-02 2:50 ` Kever Yang
2016-08-02 2:56 ` Ziyuan Xu
1 sibling, 0 replies; 6+ messages in thread
From: Kever Yang @ 2016-08-02 2:50 UTC (permalink / raw)
To: u-boot
On 08/02/2016 10:29 AM, Kever Yang wrote:
> To compatible with distro boot, we need to add gpt and fs support,
> including gpt table and vfat, ext2, ext4 support.
>
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> ---
>
> include/configs/rk3399_common.h | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
> diff --git a/include/configs/rk3399_common.h b/include/configs/rk3399_common.h
> index a9c9d29..12327d5 100644
> --- a/include/configs/rk3399_common.h
> +++ b/include/configs/rk3399_common.h
> @@ -35,6 +35,15 @@
> #define CONFIG_BOUNCE_BUFFER
> #define CONFIG_ROCKCHIP_SDHCI_MAX_FREQ 200000000
>
> +#define CONFIG_DOS_PARTITION
> +#define CONFIG_PARTITION_UUIDS
> +#define CONFIG_SUPPORT_VFAT
> +#define CONFIG_FS_FAT
> +#define CONFIG_FAT_WRITE
Sorry, this MACRO CONFIG_FAT_WRITE is duplicated, will fix in next version,
I will waiting for other comments before send out V2 tomorrow.
Thanks,
- Kever
> +#define CONFIG_CMD_PART
> +
> +/* EXT4 FS */
> +#define CONFIG_FS_EXT4
> #define CONFIG_FAT_WRITE
>
> /* RAW SD card / eMMC locations. */
> @@ -60,6 +69,14 @@
> "kernel_addr_r=0x02000000\0" \
> "ramdisk_addr_r=0x04000000\0"
>
> +#define CONFIG_CMD_GPT
> +#define CONFIG_RANDOM_UUID
> +#define CONFIG_EFI_PARTITION
> +#define PARTS_DEFAULT \
> + "uuid_disk=${uuid_gpt_disk};" \
> + "name=boot,start=16M,size=32M,bootable;" \
> + "name=rootfs,size=-,uuid=${uuid_gpt_rootfs};" \
> +
> /* First try to boot from SD (index 0), then eMMC (index 1) */
> #define BOOT_TARGET_DEVICES(func) \
> func(MMC, mmc, 0) \
> @@ -67,6 +84,8 @@
>
> #include <config_distro_bootcmd.h>
> #define CONFIG_EXTRA_ENV_SETTINGS \
> + ENV_MEM_LAYOUT_SETTINGS \
> + "partitions=" PARTS_DEFAULT \
> BOOTENV
>
> #endif
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] configs: rk3399: add gpt and fs support
2016-08-02 2:29 [U-Boot] [PATCH] configs: rk3399: add gpt and fs support Kever Yang
2016-08-02 2:50 ` Kever Yang
@ 2016-08-02 2:56 ` Ziyuan Xu
2016-08-02 3:03 ` Ziyuan Xu
2016-08-02 3:03 ` Ziyuan Xu
1 sibling, 2 replies; 6+ messages in thread
From: Ziyuan Xu @ 2016-08-02 2:56 UTC (permalink / raw)
To: u-boot
Hi kever,
On 2016?08?02? 10:29, Kever Yang wrote:
> To compatible with distro boot, we need to add gpt and fs support,
> including gpt table and vfat, ext2, ext4 support.
>
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> ---
>
> include/configs/rk3399_common.h | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
> diff --git a/include/configs/rk3399_common.h b/include/configs/rk3399_common.h
> index a9c9d29..12327d5 100644
> --- a/include/configs/rk3399_common.h
> +++ b/include/configs/rk3399_common.h
> @@ -35,6 +35,15 @@
> #define CONFIG_BOUNCE_BUFFER
> #define CONFIG_ROCKCHIP_SDHCI_MAX_FREQ 200000000
>
> +#define CONFIG_DOS_PARTITION
CONFIG_DOS_PARTITION and CONFIG_EFI_PARTITION are already included in
config_distro_defaults.h, you not need to define it.
See 77337c1 rockchip: remove the duplicated macro config
> +#define CONFIG_PARTITION_UUIDS
> +#define CONFIG_SUPPORT_VFAT
> +#define CONFIG_FS_FAT
> +#define CONFIG_FAT_WRITE
> +#define CONFIG_CMD_PART
> +
> +/* EXT4 FS */
> +#define CONFIG_FS_EXT4
> #define CONFIG_FAT_WRITE
>
> /* RAW SD card / eMMC locations. */
> @@ -60,6 +69,14 @@
> "kernel_addr_r=0x02000000\0" \
> "ramdisk_addr_r=0x04000000\0"
>
> +#define CONFIG_CMD_GPT
> +#define CONFIG_RANDOM_UUID
> +#define CONFIG_EFI_PARTITION
> +#define PARTS_DEFAULT \
> + "uuid_disk=${uuid_gpt_disk};" \
> + "name=boot,start=16M,size=32M,bootable;" \
> + "name=rootfs,size=-,uuid=${uuid_gpt_rootfs};" \
miss '\0'.
should be "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) \
> @@ -67,6 +84,8 @@
>
> #include <config_distro_bootcmd.h>
> #define CONFIG_EXTRA_ENV_SETTINGS \
> + ENV_MEM_LAYOUT_SETTINGS \
> + "partitions=" PARTS_DEFAULT \
> BOOTENV
>
> #endif
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] configs: rk3399: add gpt and fs support
2016-08-02 2:56 ` Ziyuan Xu
@ 2016-08-02 3:03 ` Ziyuan Xu
2016-08-04 2:27 ` Simon Glass
2016-08-02 3:03 ` Ziyuan Xu
1 sibling, 1 reply; 6+ messages in thread
From: Ziyuan Xu @ 2016-08-02 3:03 UTC (permalink / raw)
To: u-boot
On 2016?08?02? 10:56, Ziyuan Xu wrote:
> Hi kever,
>
>
> On 2016?08?02? 10:29, Kever Yang wrote:
>> To compatible with distro boot, we need to add gpt and fs support,
>> including gpt table and vfat, ext2, ext4 support.
>>
>> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
>> ---
>>
>> include/configs/rk3399_common.h | 19 +++++++++++++++++++
>> 1 file changed, 19 insertions(+)
>>
>> diff --git a/include/configs/rk3399_common.h
>> b/include/configs/rk3399_common.h
>> index a9c9d29..12327d5 100644
>> --- a/include/configs/rk3399_common.h
>> +++ b/include/configs/rk3399_common.h
>> @@ -35,6 +35,15 @@
>> #define CONFIG_BOUNCE_BUFFER
>> #define CONFIG_ROCKCHIP_SDHCI_MAX_FREQ 200000000
>> +#define CONFIG_DOS_PARTITION
> CONFIG_DOS_PARTITION and CONFIG_EFI_PARTITION are already included in
> config_distro_defaults.h, you not need to define it.
> See 77337c1 rockchip: remove the duplicated macro config
>> +#define CONFIG_PARTITION_UUIDS
>> +#define CONFIG_SUPPORT_VFAT
>> +#define CONFIG_FS_FAT
>> +#define CONFIG_FAT_WRITE
>> +#define CONFIG_CMD_PART
>> +
>> +/* EXT4 FS */
>> +#define CONFIG_FS_EXT4
>> #define CONFIG_FAT_WRITE
>> /* RAW SD card / eMMC locations. */
>> @@ -60,6 +69,14 @@
>> "kernel_addr_r=0x02000000\0" \
>> "ramdisk_addr_r=0x04000000\0"
>> +#define CONFIG_CMD_GPT
>> +#define CONFIG_RANDOM_UUID
>> +#define CONFIG_EFI_PARTITION
>> +#define PARTS_DEFAULT \
>> + "uuid_disk=${uuid_gpt_disk};" \
>> + "name=boot,start=16M,size=32M,bootable;" \
>> + "name=rootfs,size=-,uuid=${uuid_gpt_rootfs};" \
I think partitions table should be defined in includes/configs/${board}.h
> miss '\0'.
> should be "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) \
>> @@ -67,6 +84,8 @@
>> #include <config_distro_bootcmd.h>
>> #define CONFIG_EXTRA_ENV_SETTINGS \
>> + ENV_MEM_LAYOUT_SETTINGS \
>> + "partitions=" PARTS_DEFAULT \
>> BOOTENV
>> #endif
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] configs: rk3399: add gpt and fs support
2016-08-02 2:56 ` Ziyuan Xu
2016-08-02 3:03 ` Ziyuan Xu
@ 2016-08-02 3:03 ` Ziyuan Xu
1 sibling, 0 replies; 6+ messages in thread
From: Ziyuan Xu @ 2016-08-02 3:03 UTC (permalink / raw)
To: u-boot
On 2016?08?02? 10:56, Ziyuan Xu wrote:
> Hi kever,
>
>
> On 2016?08?02? 10:29, Kever Yang wrote:
>> To compatible with distro boot, we need to add gpt and fs support,
>> including gpt table and vfat, ext2, ext4 support.
>>
>> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
>> ---
>>
>> include/configs/rk3399_common.h | 19 +++++++++++++++++++
>> 1 file changed, 19 insertions(+)
>>
>> diff --git a/include/configs/rk3399_common.h
>> b/include/configs/rk3399_common.h
>> index a9c9d29..12327d5 100644
>> --- a/include/configs/rk3399_common.h
>> +++ b/include/configs/rk3399_common.h
>> @@ -35,6 +35,15 @@
>> #define CONFIG_BOUNCE_BUFFER
>> #define CONFIG_ROCKCHIP_SDHCI_MAX_FREQ 200000000
>> +#define CONFIG_DOS_PARTITION
> CONFIG_DOS_PARTITION and CONFIG_EFI_PARTITION are already included in
> config_distro_defaults.h, you not need to define it.
> See 77337c1 rockchip: remove the duplicated macro config
>> +#define CONFIG_PARTITION_UUIDS
>> +#define CONFIG_SUPPORT_VFAT
>> +#define CONFIG_FS_FAT
>> +#define CONFIG_FAT_WRITE
>> +#define CONFIG_CMD_PART
>> +
>> +/* EXT4 FS */
>> +#define CONFIG_FS_EXT4
>> #define CONFIG_FAT_WRITE
>> /* RAW SD card / eMMC locations. */
>> @@ -60,6 +69,14 @@
>> "kernel_addr_r=0x02000000\0" \
>> "ramdisk_addr_r=0x04000000\0"
>> +#define CONFIG_CMD_GPT
>> +#define CONFIG_RANDOM_UUID
>> +#define CONFIG_EFI_PARTITION
>> +#define PARTS_DEFAULT \
>> + "uuid_disk=${uuid_gpt_disk};" \
>> + "name=boot,start=16M,size=32M,bootable;" \
>> + "name=rootfs,size=-,uuid=${uuid_gpt_rootfs};" \
I think partitions table should be defined in includes/configs/${board}.h.
> miss '\0'.
> should be "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) \
>> @@ -67,6 +84,8 @@
>> #include <config_distro_bootcmd.h>
>> #define CONFIG_EXTRA_ENV_SETTINGS \
>> + ENV_MEM_LAYOUT_SETTINGS \
>> + "partitions=" PARTS_DEFAULT \
>> BOOTENV
>> #endif
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] configs: rk3399: add gpt and fs support
2016-08-02 3:03 ` Ziyuan Xu
@ 2016-08-04 2:27 ` Simon Glass
0 siblings, 0 replies; 6+ messages in thread
From: Simon Glass @ 2016-08-04 2:27 UTC (permalink / raw)
To: u-boot
On 1 August 2016 at 21:03, Ziyuan Xu <xzy.xu@rock-chips.com> wrote:
>
> On 2016?08?02? 10:56, Ziyuan Xu wrote:
>>
>> Hi kever,
>>
>>
>> On 2016?08?02? 10:29, Kever Yang wrote:
>>>
>>> To compatible with distro boot, we need to add gpt and fs support,
>>> including gpt table and vfat, ext2, ext4 support.
>>>
>>> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
>>> ---
>>>
>>> include/configs/rk3399_common.h | 19 +++++++++++++++++++
>>> 1 file changed, 19 insertions(+)
Apart from the comments mentioned:
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-08-04 2:27 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-02 2:29 [U-Boot] [PATCH] configs: rk3399: add gpt and fs support Kever Yang
2016-08-02 2:50 ` Kever Yang
2016-08-02 2:56 ` Ziyuan Xu
2016-08-02 3:03 ` Ziyuan Xu
2016-08-04 2:27 ` Simon Glass
2016-08-02 3:03 ` Ziyuan Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox