From: Inha Song Date: Wed, 5 Nov 2014 07:38:27 +0000 (+0900) Subject: tizen: add new gpt version and add gpt version headers X-Git-Tag: submit/tizen_common/20150115.132736~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f828223ae9aa210e4898936ecba3ce463624ed7c;p=platform%2Fkernel%2Fu-boot.git tizen: add new gpt version and add gpt version headers This patch adds new gpt version and moves gpt data into separated headers. In order to be able to gpt version switch, make gpt_vxx.h files that has the partition information. - include/samsung/gpt_v08.h - include/samsung/gpt_v13.h Change-Id: I33870a54703a07468f17b0f0d7cf43e563409e65 Signed-off-by: Inha Song --- diff --git a/include/configs/tizen-environment.h b/include/configs/tizen-environment.h deleted file mode 100644 index 68de63d8e5..0000000000 --- a/include/configs/tizen-environment.h +++ /dev/null @@ -1,91 +0,0 @@ -#ifndef _TIZEN_ENVIRONMENT_H_ -#define _TIZEN_ENVIRONMENT_H_ - -/* - * Bootable media layout: - * dev: SD eMMC(part boot) - * BL1 1 0 - * BL2 31 30 - * UBOOT 63 62 - * TZSW 2111 2110 - * ENV 2560 2560(part user) - * - * MBR Primary partiions: - * Num Name Size Offset - * 1. BOOT: 32MiB 12MiB - * 2. ROOT: 3GiB - * 3. DATA: 512MiB - * 4. Extd: - * 5. USER: - - * 6. MODULE: 20MiB -*/ - -/* Tizen - partitions definitions */ -#define PARTS_CSA "csa-mmc" -#define PARTS_BOOT "boot" -#define PARTS_QBOOT "qboot" -#define PARTS_CSC "csc" -#define PARTS_ROOT "platform" -#define PARTS_DATA "data" -#define PARTS_UMS "ums" - -#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"};" \ - "name="PARTS_QBOOT",size=100MiB,uuid=${uuid_gpt_"PARTS_QBOOT"};" \ - "name="PARTS_CSC",size=150MiB,uuid=${uuid_gpt_"PARTS_CSC"};" \ - "name="PARTS_ROOT",size=1536MiB,uuid=${uuid_gpt_"PARTS_ROOT"};" \ - "name="PARTS_DATA",size=3000MiB,uuid=${uuid_gpt_"PARTS_DATA"};" \ - "name="PARTS_UMS",size=-,uuid=${uuid_gpt_"PARTS_UMS"}\0" \ - -#define DFU_ALT_SYSTEM_TRATS2 \ - "/uImage ext4 0 2;" \ - "/zImage ext4 0 2;" \ - "/Image.itb ext4 0 2;" \ - "/modem.bin ext4 0 2;" \ - "/exynos4412-trats2.dtb ext4 0 2;" \ - ""PARTS_CSA" part 0 1;" \ - ""PARTS_BOOT" part 0 2;" \ - ""PARTS_QBOOT" part 0 3;" \ - ""PARTS_CSC" part 0 4;" \ - ""PARTS_ROOT" part 0 5;" \ - ""PARTS_DATA" part 0 6;" \ - ""PARTS_UMS" part 0 7;" \ - "params.bin raw 2560 8\0" - -#define DFU_ALT_SYSTEM_ODROID \ - "uImage fat 0 1;" \ - "zImage fat 0 1;" \ - "Image.itb fat 0 1;" \ - "exynos4412-odroidu3.dtb fat 0 1;" \ - "exynos4412-odroidx2.dtb fat 0 1;" \ - ""PARTS_BOOT" part 0 1;" \ - "rootfs part 0 2;" \ - "system-data part 0 3;" \ - "user part 0 5;" \ - "modules part 0 6;" \ - "params.bin raw 2560 8\0" - -#define DFU_ALT_BOOT_EMMC_TRATS2 \ - "u-boot raw 0x80 0x800\0" - -#define DFU_ALT_BOOT_SD_TRATS2 \ - "This boot mode is not used\0" - -#define DFU_ALT_BOOT_EMMC_ODROID \ - "u-boot raw 0x3e 0x800 mmcpart 1;" \ - "bl1 raw 0x0 0x1e mmcpart 1;" \ - "bl2 raw 0x1e 0x1d mmcpart 1;" \ - "tzsw raw 0x83e 0x138 mmcpart 1\0" - -#define DFU_ALT_BOOT_SD_ODROID \ - "u-boot raw 0x3f 0x800;" \ - "bl1 raw 0x1 0x1e;" \ - "bl2 raw 0x1f 0x1d;" \ - "tzsw raw 0x83f 0x138\0" - -#endif /* _TIZEN_ENVIRONMENT_H_ */ diff --git a/include/configs/tizen.h b/include/configs/tizen.h index b7d3d31b3c..512d3b3245 100644 --- a/include/configs/tizen.h +++ b/include/configs/tizen.h @@ -10,7 +10,8 @@ #define __CONFIG_TIZEN_H #include -#include +#include +#include #define CONFIG_SYS_PROMPT "Exynos4412 # " /* Monitor Command Prompt */ @@ -94,12 +95,8 @@ " rootwait ${console} ${opts}\0" \ "checkboard=" \ "if test ${boardname} = trats2; then " \ - "setenv mmcbootpart $bootpart_trats2;" \ - "setenv mmcrootpart $rootpart_trats2;" \ "setenv console" CONFIG_CONSOLE_TTY2";" \ "else " \ - "setenv mmcbootpart $bootpart_odroid;" \ - "setenv mmcrootpart $rootpart_odroid;" \ "setenv console" CONFIG_CONSOLE_TTY1";" \ "fi;\0" \ "boot_fit=" \ @@ -135,14 +132,8 @@ "fi;\0" \ "mmcbootdev=0\0" \ "mmcrootdev=0\0" \ - "bootpart_trats2=2\0" \ - "bootpart_odroid=1\0" \ - "rootpart_trats2=5\0" \ - "rootpart_odroid=2\0" \ "bootdelay=0\0" \ "dfu_alt_info=Please reset the board.\0" \ - "dfu_alt_system_trats2="DFU_ALT_SYSTEM_TRATS2 \ - "dfu_alt_system_odroid="DFU_ALT_SYSTEM_ODROID \ "dfu_usb_con=0\0" \ "dfu_interface=mmc\0" \ "dfu_device=" __stringify(CONFIG_MMC_DEFAULT_DEV) "\0" \ diff --git a/include/samsung/gpt_v08.h b/include/samsung/gpt_v08.h new file mode 100644 index 0000000000..84be5b9b71 --- /dev/null +++ b/include/samsung/gpt_v08.h @@ -0,0 +1,88 @@ +#ifndef _TIZEN_GPT_V08_H_ +#define _TIZEN_GPT_V08_H_ + +/* + * Bootable media layout: + * dev: SD eMMC(part boot) + * BL1 1 0 + * BL2 31 30 + * UBOOT 63 62 + * TZSW 2111 2110 + * ENV 2560 2560(part user) + * + * MBR Primary partiions: + * Num Name Size Offset + * 1. BOOT: 100MiB 2MiB + * 2. ROOT: 3GiB + * 3. DATA: 3GiB + * 4. UMS: - +*/ + +/* Tizen - partitions definitions */ +#define PARTS_V8_CSA "csa-mmc" +#define PARTS_V8_BOOT "boot" +#define PARTS_V8_QBOOT "qboot" +#define PARTS_V8_CSC "csc" +#define PARTS_V8_ROOT "platform" +#define PARTS_V8_DATA "data" +#define PARTS_V8_UMS "ums" + +#define PARTS_TRATS2_GPT_V08 \ + "uuid_disk=${uuid_gpt_disk};" \ + "name="PARTS_V8_CSA",start=5MiB,size=8MiB,uuid=${uuid_gpt_"PARTS_V8_CSA"};" \ + "name="PARTS_V8_BOOT",size=60MiB,uuid=${uuid_gpt_"PARTS_V8_BOOT"};" \ + "name="PARTS_V8_QBOOT",size=100MiB,uuid=${uuid_gpt_"PARTS_V8_QBOOT"};" \ + "name="PARTS_V8_CSC",size=150MiB,uuid=${uuid_gpt_"PARTS_V8_CSC"};" \ + "name="PARTS_V8_ROOT",size=1536MiB,uuid=${uuid_gpt_"PARTS_V8_ROOT"};" \ + "name="PARTS_V8_DATA",size=3000MiB,uuid=${uuid_gpt_"PARTS_V8_DATA"};" \ + "name="PARTS_V8_UMS",size=-,uuid=${uuid_gpt_"PARTS_V8_UMS"}\0" \ + +#define DFU_ALT_SYSTEM_TRATS2_GPT_V08 \ + "/uImage ext4 0 2;" \ + "/zImage ext4 0 2;" \ + "/Image.itb ext4 0 2;" \ + "/modem.bin ext4 0 2;" \ + "/exynos4412-trats2.dtb ext4 0 2;" \ + ""PARTS_V8_CSA" part 0 1;" \ + ""PARTS_V8_BOOT" part 0 2;" \ + ""PARTS_V8_QBOOT" part 0 3;" \ + ""PARTS_V8_CSC" part 0 4;" \ + ""PARTS_V8_ROOT" part 0 5;" \ + ""PARTS_V8_DATA" part 0 6;" \ + ""PARTS_V8_UMS" part 0 7;" \ + "params.bin raw 2560 8\0" + +#define DFU_ALT_SYSTEM_ODROID \ + "uImage fat 0 1;" \ + "zImage fat 0 1;" \ + "Image.itb fat 0 1;" \ + "exynos4412-odroidu3.dtb fat 0 1;" \ + "exynos4412-odroidx2.dtb fat 0 1;" \ + ""PARTS_V8_BOOT" part 0 1;" \ + ""PARTS_V8_ROOT" part 0 2;" \ + ""PARTS_V8_DATA" part 0 3;" \ + ""PARTS_V8_UMS" part 0 4;" \ + "params.bin raw 2560 8\0" + +#define DFU_ALT_BOOT_SD_TRATS2_GPT_V08 \ + "This boot mode is not used\0" + +#define DFU_ALT_BOOT_EMMC_TRATS2_GPT_V08 \ + "u-boot raw 0x80 0x800\0" + +#define PARTS_ODROID \ + "This board uses MSDOS partition table." + +#define DFU_ALT_BOOT_EMMC_ODROID \ + "u-boot raw 0x3e 0x800 mmcpart 1;" \ + "bl1 raw 0x0 0x1e mmcpart 1;" \ + "bl2 raw 0x1e 0x1d mmcpart 1;" \ + "tzsw raw 0x83e 0x138 mmcpart 1\0" + +#define DFU_ALT_BOOT_SD_ODROID \ + "u-boot raw 0x3f 0x800;" \ + "bl1 raw 0x1 0x1e;" \ + "bl2 raw 0x1f 0x1d;" \ + "tzsw raw 0x83f 0x138\0" + +#endif /* _TIZEN_GPT_V08_H_ */ diff --git a/include/samsung/gpt_v13.h b/include/samsung/gpt_v13.h new file mode 100644 index 0000000000..1f4b59e095 --- /dev/null +++ b/include/samsung/gpt_v13.h @@ -0,0 +1,72 @@ +#ifndef _TIZEN_GPT_V13_H_ +#define _TIZEN_GPT_V13_H_ + +/* Tizen - partitions definitions */ +#define PARTS_V13_CSA "csa" +#define PARTS_V13_BOOT "boot" +#define PARTS_V13_QBOOT "qboot" +#define PARTS_V13_CSC "csc" +#define PARTS_V13_ROOT "platform" +#define PARTS_V13_DATA "data" +#define PARTS_V13_UMS "ums" +#define PARTS_V13_EFS "EFS" +#define PARTS_V13_RECOVERY "recovery" +#define PARTS_V13_MODEM "modem" +#define PARTS_V13_RESERVED3 "reserved3" +#define PARTS_V13_RAMDISK1 "ramdisk1" +#define PARTS_V13_RAMDISK2 "ramdisk2" +#define PARTS_V13_MODULE "module" +#define PARTS_V13_FOTA "fota" +#define PARTS_V13_ROOTFS "rootfs" +#define PARTS_V13_SYSDATA "system-data" +#define PARTS_V13_USER "user" + +#define PARTS_TRATS2_GPT_V13 \ + "uuid_disk=${uuid_gpt_disk};" \ + "name="PARTS_V13_EFS",start=12MiB,size=20MiB,uuid=${uuid_gpt_"PARTS_V13_EFS"};" \ + "name="PARTS_V13_BOOT",size=14MiB,uuid=${uuid_gpt_"PARTS_V13_BOOT"};" \ + "name="PARTS_V13_RECOVERY",size=37MiB,uuid=${uuid_gpt_"PARTS_V13_RECOVERY"};" \ + "name="PARTS_V13_CSC",size=14MiB,uuid=${uuid_gpt_"PARTS_V13_CSC"};" \ + "name="PARTS_V13_MODEM",size=86MiB,uuid=${uuid_gpt_"PARTS_V13_MODEM"};" \ + "name="PARTS_V13_RESERVED3",size=14MiB,uuid=${uuid_gpt_"PARTS_V13_RESERVED3"};" \ + "name="PARTS_V13_RAMDISK1",size=20MiB,uuid=${uuid_gpt_"PARTS_V13_RAMDISK1"};" \ + "name="PARTS_V13_RAMDISK2",size=20MiB,uuid=${uuid_gpt_"PARTS_V13_RAMDISK2"};" \ + "name="PARTS_V13_MODULE",size=20MiB,uuid=${uuid_gpt_"PARTS_V13_MODULE"};" \ + "name="PARTS_V13_FOTA",size=10MiB,uuid=${uuid_gpt_"PARTS_V13_FOTA"};" \ + "name="PARTS_V13_ROOTFS",size=3000MiB,uuid=${uuid_gpt_"PARTS_V13_ROOTFS"};" \ + "name="PARTS_V13_SYSDATA",size=512MiB,uuid=${uuid_gpt_"PARTS_V13_SYSDATA"};" \ + "name="PARTS_V13_CSC",size=150MiB,uuid=${uuid_gpt_"PARTS_V13_CSC"};" \ + "name="PARTS_V13_USER",size=-,uuid=${uuid_gpt_"PARTS_V13_USER"}\0" \ + +#define DFU_ALT_SYSTEM_TRATS2_GPT_V13 \ + "s-boot-mmc.bin raw 0x0 0x400 mmcpart 1;" \ + "u-boot-mmc.bin raw 0x80 0x800;" \ + "/uImage ext4 0 2;" \ + "/zImage ext4 0 2;" \ + "/Image.itb ext4 0 2;" \ + "/exynos4412-trats2.dtb ext4 0 2;" \ + "/modem.bin ext4 0 5;" \ + "/modem_cdma.bin ext4 0 5;" \ + ""PARTS_V13_EFS" part 0 1;" \ + ""PARTS_V13_BOOT" part 0 2;" \ + ""PARTS_V13_RECOVERY" part 0 3;" \ + "csa-mmc part 0 4;" \ + ""PARTS_V13_MODEM" part 0 5;" \ + ""PARTS_V13_RESERVED3" part 0 6;" \ + ""PARTS_V13_RAMDISK1" part 0 7;" \ + "ramdisk-recovery part 0 8;" \ + ""PARTS_V13_MODULE" part 0 9;" \ + ""PARTS_V13_FOTA" part 0 10;" \ + ""PARTS_V13_ROOTFS" part 0 11;" \ + ""PARTS_V13_SYSDATA" part 0 12;" \ + ""PARTS_V13_CSC" part 0 13;" \ + ""PARTS_V13_USER" part 0 14;" \ + "params.bin raw 0x1880 0x200\0" + +#define DFU_ALT_BOOT_SD_TRATS2_GPT_V13 \ + "This boot mode is not used\0" + +#define DFU_ALT_BOOT_EMMC_TRATS2_GPT_V13 \ + "u-boot raw 0x80 0x800\0" + +#endif /* _TIZEN_GPT_V13_H_ */