artik: enable fat boot partition
authorChanho Park <chanho61.park@samsung.com>
Wed, 5 Aug 2015 10:12:49 +0000 (19:12 +0900)
committerChanho Park <chanho61.park@samsung.com>
Wed, 5 Aug 2015 10:12:49 +0000 (19:12 +0900)
This patch enables boot partition is fat file system. The kernel, dtb
and initrd will be in the boot partition. The only difference between
artik5 and artik10 is dtb file name.

Change-Id: I2be882a1a8da79326ba94802a096a290d6194c03
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
include/configs/artik10.h
include/configs/artik5.h
include/configs/artik_common.h

index 323cbf7fa91b07f03e04bd00940736734cf65a6c..b0e697dbf2d32c655130eab9f36c8b15197b6c68 100644 (file)
 
 #define CONFIG_SYS_INIT_SP_ADDR        (CONFIG_SYS_LOAD_ADDR - 0x1000000)
 
+#define CONFIG_FDT_FILE                "exynos5422-artik10.dtb"
+
 /* Base address for secondary boot information */
 #define CONFIG_SECONDARY_BOOT_INFORM_BASE      (CONFIG_SYS_TEXT_BASE - 0x8)
 
index ae5a7c499d6783e4e93e4cda0192b2e31d9bd443..4bb38ec1e26be13f3b06576fa350e0170cfed94e 100755 (executable)
 
 #define CONFIG_SYS_INIT_SP_ADDR        (CONFIG_SYS_LOAD_ADDR - 0x1000000)
 
+#define CONFIG_FDT_FILE                "exynos3250-artik5.dtb"
+
 /* Base address for secondary boot information */
 #define CONFIG_SECONDARY_BOOT_INFORM_BASE      (CONFIG_SYS_TEXT_BASE - 0x8)
 
index 8c16a271ef7dc15b9b28fb8e3862c70fb991eba4..61582a06cb12ce10d17154e280a5253f4abc2c4e 100644 (file)
 #define CONFIG_CMD_MMC
 #define CONFIG_CMD_EXT4
 #define CONFIG_CMD_FAT
+#define CONFIG_FAT_WRITE
 
 /* GPT */
 #define CONFIG_RANDOM_UUID
 #define CONFIG_CMD_MOVINAND
 #define CONFIG_CMD_BOOTZ
 
+#define CONFIG_OF_LIBFDT
+
 #define CONFIG_BOOTDELAY               3
 #define CONFIG_ZERO_BOOTDELAY_CHECK
 
 #define CONFIG_ROOTFS_ATAGS
 #define CONFIG_ROOTFS_LEN              100000
 
-#define CONFIG_KERNEL_PART_SIZE                8
-#define CONFIG_RAMDISK_PART_SIZE       16
+#define CONFIG_BOOT_PART_SIZE          64
 #define CONFIG_ROOTFS_PART_SIZE                3072
-#define CONFIG_RECOVERY_PARTITION
-
-#ifdef CONFIG_RECOVERY_PARTITION
-#define CONFIG_ROOTFS_OFFSET           49
-#else
-#define CONFIG_ROOTFS_OFFSET           25
-#endif
 
 #define CONFIG_ROOT_DEV                0
-#define CONFIG_ROOT_PART       1
-
-#define PARTS_DEFAULT \
-       "uuid_disk=${uuid_gpt_disk};" \
-       "name=rootfs,start=" __stringify(CONFIG_ROOTFS_OFFSET) "MiB,size=" \
-               __stringify(CONFIG_ROOTFS_PART_SIZE) "MiB,uuid=${uuid_gpt_rootfs};" \
+#define CONFIG_BOOT_PART       1
+#define CONFIG_ROOT_PART       2
+
+#define PARTS_DEFAULT                                                  \
+       "uuid_disk=${uuid_gpt_disk};"                                   \
+       "name=boot,start=1MiB,size=" __stringify(CONFIG_BOOT_PART_SIZE) \
+               "MiB,uuid=${uuid_gpt_boot};"                            \
+       "name=rootfs,size=" __stringify(CONFIG_ROOTFS_PART_SIZE)        \
+               "MiB,uuid=${uuid_gpt_rootfs};"                          \
        "name=data,size=-,uuid=${uuid_gpt_data}\0"
 
-#define CONFIG_EXTRA_ENV_SETTINGS      \
-       "console=" CONFIG_DEFAULT_CONSOLE \
-       "consoleon=set console console=" CONFIG_DEFAULT_CONSOLE "; saveenv; reset\0" \
-       "consoleoff=set console console=ram; saveenv; reset\0" \
-       "rootfslen=" __stringify(CONFIG_ROOTFS_LEN) "\0"        \
-       "partitions=" PARTS_DEFAULT \
-       "rootdev=" __stringify(CONFIG_ROOT_DEV) "\0" \
-       "rootpart=" __stringify(CONFIG_ROOT_PART) "\0" \
-       "root_rw=rw\0"  \
-       "opts=loglevel=4\0"     \
-       "boot_cmd=movi read kernel 0 40008000;"                 \
-               "movi read rootfs 0 43000000 1000000;"          \
-               "bootz 40008000 43000000\0"                     \
-       "ramfsboot=setenv bootargs ${console} root=/dev/ram0 "  \
-               "rootfstype=ext2 initrd=0x43000000,"            \
+#define CONFIG_EXTRA_ENV_SETTINGS                                      \
+       "console=" CONFIG_DEFAULT_CONSOLE                               \
+       "consoleon=set console=" CONFIG_DEFAULT_CONSOLE                 \
+               "; saveenv; reset\0"                                    \
+       "consoleoff=set console=ram; saveenv; reset\0"                  \
+       "rootfslen=" __stringify(CONFIG_ROOTFS_LEN) "\0"                \
+       "partitions=" PARTS_DEFAULT                                     \
+       "rootdev=" __stringify(CONFIG_ROOT_DEV) "\0"                    \
+       "rootpart=" __stringify(CONFIG_ROOT_PART) "\0"                  \
+       "bootpart=" __stringify(CONFIG_BOOT_PART) "\0"                  \
+       "root_rw=rw\0"                                                  \
+       "opts=loglevel=4\0"                                             \
+       "fdtfile=" CONFIG_FDT_FILE "\0"                                 \
+       "kernel_file=zImage\0"                                          \
+       "kernel_addr=40008000\0"                                        \
+       "fdtaddr=40800000\0"                                            \
+       "initrd_file=initrd\0"                                          \
+       "initrd_addr=43000000\0"                                        \
+       "boot_cmd=fatload mmc 0:1 $kernel_addr $kernel_file;"           \
+               "fatload mmc 0:1 $fdtaddr $fdtfile;"                    \
+               "fatload mmc 0:1 $initrd_addr $initrd_file;"            \
+               "bootz $kernel_addr $initrd_addr $fdtaddr\0"            \
+       "ramfsboot=setenv bootargs ${console} root=/dev/ram0 "          \
+               "rootfstype=ext2 initrd=0x$initrd_addr,"                \
                __stringify(CONFIG_RAMDISK_PART_SIZE)"M ${opts};"       \
-               "run boot_cmd\0"        \
-       "mmcboot=setenv bootargs ${console} "                   \
+               "run boot_cmd\0"                                        \
+       "mmcboot=setenv bootargs ${console} "                           \
                "root=/dev/mmcblk${rootdev}p${rootpart} ${root_rw} "    \
-               "${opts};run boot_cmd\0"        \
+               "${opts};run boot_cmd\0"                                \
        "bootcmd=run mmcboot\0"
 
 #endif /* __ARTIK_COMMON_H */