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

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

Enable ums feature for rk3288 boards, so that we can mount the mmc device to PC.
Signed-off-by: Ziyuan Xu xzy.xu@rock-chips.com ---
include/common.h | 4 +++- include/configs/rk3288_common.h | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/include/common.h b/include/common.h index e9f0dea..1866cf3 100644 --- a/include/common.h +++ b/include/common.h @@ -9,7 +9,9 @@ #define __COMMON_H_ 1
#ifndef __ASSEMBLY__ /* put C only stuff in this section */ - +#ifndef CONFIG_SPL_BUILD +#define DEBUG +#endif typedef unsigned char uchar; typedef volatile unsigned long vu_long; typedef volatile unsigned short vu_short; diff --git a/include/configs/rk3288_common.h b/include/configs/rk3288_common.h index fa37335..d3d4c68 100644 --- a/include/configs/rk3288_common.h +++ b/include/configs/rk3288_common.h @@ -96,6 +96,10 @@ #define CONFIG_FASTBOOT_BUF_ADDR CONFIG_SYS_LOAD_ADDR #define CONFIG_FASTBOOT_BUF_SIZE 0x08000000
+/* usb mass storage */ +#define CONFIG_USB_FUNCTION_MASS_STORAGE +#define CONFIG_CMD_USB_MASS_STORAGE + #define CONFIG_USB_GADGET_DOWNLOAD #define CONFIG_G_DNL_MANUFACTURER "Rockchip" #define CONFIG_G_DNL_VENDOR_NUM 0x2207

On 2 August 2016 at 21:50, 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(+)
Acked-by: Simon Glass sjg@chromium.org
participants (2)
-
Simon Glass
-
Ziyuan Xu