[U-Boot] [PATCH 1/2] rockchip: use rockchip linux partitions layout

Unify the partitions of each chip then it will be more easy for us to write scripts, tools or guides for rockchip chips.
Those extra partitions mostly are used to be compatible with our internal loaders (such as miniloader which was same as spl, or android loader then we can support dual boot)
Signed-off-by: Jacob Chen jacob2.chen@rock-chips.com ---
include/configs/rk3036_common.h | 7 ++++++- include/configs/rk3288_common.h | 7 ++++++- include/configs/rk3399_common.h | 7 ++++++- 3 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/include/configs/rk3036_common.h b/include/configs/rk3036_common.h index 6ddf0d9..17335f6 100644 --- a/include/configs/rk3036_common.h +++ b/include/configs/rk3036_common.h @@ -94,7 +94,12 @@ #define CONFIG_RANDOM_UUID #define PARTS_DEFAULT \ "uuid_disk=${uuid_gpt_disk};" \ - "name=boot,start=8M,size=64M,bootable,uuid=${uuid_gpt_boot};" \ + "name=loader1,start=32K,size=4000K,uuid=${uuid_gpt_loader1};" \ + "name=reserved1,size=64K,uuid=${uuid_gpt_reserved1};" \ + "name=reserved2,size=4M,uuid=${uuid_gpt_reserved2};" \ + "name=loader2,size=4MB,uuid=${uuid_gpt_loader2};" \ + "name=atf,size=4M,uuid=${uuid_gpt_atf};" \ + "name=boot,size=128M,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 */ diff --git a/include/configs/rk3288_common.h b/include/configs/rk3288_common.h index e8bf987..4b19e9d 100644 --- a/include/configs/rk3288_common.h +++ b/include/configs/rk3288_common.h @@ -111,7 +111,12 @@ #define CONFIG_RANDOM_UUID #define PARTS_DEFAULT \ "uuid_disk=${uuid_gpt_disk};" \ - "name=boot,start=8M,size=64M,bootable,uuid=${uuid_gpt_boot};" \ + "name=loader1,start=32K,size=4000K,uuid=${uuid_gpt_loader1};" \ + "name=reserved1,size=64K,uuid=${uuid_gpt_reserved1};" \ + "name=reserved2,size=4M,uuid=${uuid_gpt_reserved2};" \ + "name=loader2,size=4MB,uuid=${uuid_gpt_loader2};" \ + "name=atf,size=4M,uuid=${uuid_gpt_atf};" \ + "name=boot,size=128M,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 */ diff --git a/include/configs/rk3399_common.h b/include/configs/rk3399_common.h index 93d5856..5a41c93 100644 --- a/include/configs/rk3399_common.h +++ b/include/configs/rk3399_common.h @@ -67,7 +67,12 @@ #define CONFIG_PARTITION_UUIDS #define PARTS_DEFAULT \ "uuid_disk=${uuid_gpt_disk};" \ - "name=boot,start=16M,size=32M,bootable;" \ + "name=loader1,start=32K,size=4000K,uuid=${uuid_gpt_loader1};" \ + "name=reserved1,size=64K,uuid=${uuid_gpt_reserved1};" \ + "name=reserved2,size=4M,uuid=${uuid_gpt_reserved2};" \ + "name=loader2,size=4MB,uuid=${uuid_gpt_loader2};" \ + "name=atf,size=4M,uuid=${uuid_gpt_atf};" \ + "name=boot,size=128M,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) */

A simple introduction.
Signed-off-by: Jacob Chen jacob2.chen@rock-chips.com ---
doc/README.rockchip | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/doc/README.rockchip b/doc/README.rockchip index 69b926c..06ec80e 100644 --- a/doc/README.rockchip +++ b/doc/README.rockchip @@ -149,7 +149,6 @@ Note: rk3036 SDMMC and debug uart use the same iomux, so if you boot from SD, th
Using fastboot on rk3288 ======================== -- Define GPT partition layout like kylin_rk3036(see include/configs/kylin_rk3036.h) - Write GPT partition layout to mmc device which fastboot want to use it to store the image
@@ -212,7 +211,6 @@ When booting you should see something like: Err: serial@ff690000 =>
- Future work ===========
@@ -298,6 +296,15 @@ overhead and in SPL with a 32KB size limit some shortcuts have been taken. In general all Rockchip drivers should use these features, with SPL-specific modifications where required.
+GPT partition layout +---------------------------- + +Rockchip use a unified GPT partition layout in open source support. +With this GPT partition layout, uboot can be compatilbe with other components, +like miniloader, trusted-os, arm-trust-firmware. + +There are some documents about partitions in the links below. +http://rockchip.wikidot.com/partitions
-- Simon Glass sjg@chromium.org

On 28 September 2016 at 02:46, Jacob Chen jacob2.chen@rock-chips.com wrote:
A simple introduction.
Signed-off-by: Jacob Chen jacob2.chen@rock-chips.com
doc/README.rockchip | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
Acked-by: Simon Glass sjg@chromium.org

Hi Jacob,
On 28 September 2016 at 02:46, Jacob Chen jacob2.chen@rock-chips.com wrote:
Unify the partitions of each chip then it will be more easy for us to write scripts, tools or guides for rockchip chips.
Those extra partitions mostly are used to be compatible with our internal loaders (such as miniloader which was same as spl, or android loader then we can support dual boot)
Signed-off-by: Jacob Chen jacob2.chen@rock-chips.com
include/configs/rk3036_common.h | 7 ++++++- include/configs/rk3288_common.h | 7 ++++++- include/configs/rk3399_common.h | 7 ++++++- 3 files changed, 18 insertions(+), 3 deletions(-)
Can you put this in a rockchip_common.h and #include it from here? See the tegra include files for examples of how it is done there.
Regards, Simon
participants (2)
-
Jacob Chen
-
Simon Glass