samsung:misc: set_board_info: set a proper $partitions at boot 04/25904/2 accepted/tizen/common/20140813.141617 submit/tizen/20140813.065750
authorPrzemyslaw Marczak <p.marczak@samsung.com>
Tue, 12 Aug 2014 11:18:26 +0000 (13:18 +0200)
committerPrzemyslaw Marczak <p.marczak@samsung.com>
Tue, 12 Aug 2014 11:46:22 +0000 (13:46 +0200)
This change adds setting the environment variable: "partitions"
which is required to restore the partition table on the Trats2.

At this moment we are using MSDOS partition table on the Odroid
board, so for this board the above variable contains only a message.

Now the u-boot LCD menu in Trats2 is fully functional and the option:
(PWR+VOLUP) -> GPT restore - works well

Change-Id: Ia118179e98c3e3f4de209ce779e8cb3f81c09829
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
board/samsung/common/misc.c
include/configs/tizen-environment.h

index 3d21ac7..2462ccd 100644 (file)
@@ -93,6 +93,10 @@ void set_board_info(void)
                 CONFIG_SYS_SOC, s5p_cpu_id, bdname, bdtype);
        setenv("fdtfile", info);
 #endif
+       /* Set GPT layout for Trats2 */
+#ifdef CONFIG_OF_MULTI
+       setenv("partitions", board_is_trats2() ? PARTS_TRATS2 : PARTS_ODROID);
+#endif
 }
 #endif /* CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG */
 
index 8f1ae6c..4358ada 100644 (file)
 #define PARTS_DATA             "data"
 #define PARTS_UMS              "ums"
 
-#define PARTS_TIZEN \
+#define PARTS_ODROID \
+       "This board uses MSDOS partition table."
+
+#define PARTS_TRATS2 \
        "uuid_disk=${uuid_gpt_disk};" \
        "name="PARTS_CSA",start=5MiB,size=8MiB,uuid=${uuid_gpt_"PARTS_CSA"};" \
        "name="PARTS_BOOT",size=60MiB,uuid=${uuid_gpt_"PARTS_BOOT"};" \