[U-Boot] [PATCH v3 7/7] gpt: Enable support for GPT partition table restoration at Samsung's Trats

Lukasz Majewski
2012-09-13T08:10:05Z

Enable support for GPT partition table restoration at Samsung's Trats
development board.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>

---
Changes for v2:
- New format for default GPT partitions (key=value pairs)
- replace size definitions with more readable description(1GiB instead of 1G)

Changes for v3:
- None
---
include/configs/trats.h | 23 ++++++++++++++++++++++-
1 files changed, 22 insertions(+), 1 deletions(-)

diff --git a/include/configs/trats.h b/include/configs/trats.h
index f8da9c0..e595b5e 100644
--- a/include/configs/trats.h
+++ b/include/configs/trats.h
@@ -98,6 +98,7 @@
#undef CONFIG_CMD_MTDPARTS
#define CONFIG_CMD_MMC
#define CONFIG_CMD_DFU
+#define CONFIG_CMD_GPT

/* FAT */
#define CONFIG_CMD_FAT
@@ -122,6 +123,24 @@
#define CONFIG_BOOTBLOCK "10"
#define CONFIG_ENV_COMMON_BOOT "${console} ${meminfo}"

+/* Tizen - partitions definitions */
+#define PARTS_CSA "csa-mmc"
+#define PARTS_BOOTLOADER "u-boot"
+#define PARTS_KERNEL "kernel"
+#define PARTS_ROOT "platform"
+#define PARTS_DATA "data"
+#define PARTS_CSC "csc"
+#define PARTS_UMS "ums"
+
+#define PARTS_DEFAULT "name="PARTS_CSA",size=8MiB;"\
+ "name="PARTS_BOOTLOADER",size=60MiB;"\
+ "name="PARTS_KERNEL",size=60MiB;"\
+ "name="PARTS_ROOT",size=1GiB;"\
+ "name="PARTS_DATA",size=3GiB;"\
+ "name="PARTS_CSC",size=150MiB;"\
+ "name="PARTS_UMS",size=-\0"
+#define GPT_PARTS_NUM 7
+
#define CONFIG_DFU_ALT \
"dfu_alt_info=" \
"u-boot mmc 80 400;" \
@@ -171,7 +190,8 @@
"mmcbootpart=2\0" \
"mmcrootpart=3\0" \
"opts=always_resume=1\0" \
- CONFIG_DFU_ALT
+ "partitions=" PARTS_DEFAULT \
+ CONFIG_DFU_ALT \

/* Miscellaneous configurable options */
#define CONFIG_SYS_LONGHELP /* undef to save memory */
@@ -207,6 +227,7 @@
#define CONFIG_ENV_OFFSET ((32 - 4) << 10) /* 32KiB - 4KiB */

#define CONFIG_DOS_PARTITION
+#define CONFIG_EFI_PARTITION

#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR - GENERATED_GBL_DATA_SIZE)
#define CONFIG_SYS_CACHELINE_SIZE 32
--
1.7.2.3