configs: artik533_raptor: add the ramdisk booting for tizen
authorJaehoon Chung <jh80.chung@samsung.com>
Mon, 26 Mar 2018 06:38:18 +0000 (15:38 +0900)
committerJaehoon Chung <jh80.chung@samsung.com>
Mon, 21 Jan 2019 07:25:19 +0000 (16:25 +0900)
Add the ramdisk booting for tizen specific ramdisk image.

Change-Id: I7d5445b854cfe9e2b8cf889622e6f75df6fb95de
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
include/configs/artik533_raptor.h

index 8831289327df3d0bed195b62e8fbbaa53c744dc9..3256f41f2cf0bf818a77f22949a183571e2ad27f 100644 (file)
 /* refer to common/env_common.c        */
 #define CONFIG_BOOTDELAY                       3
 
+#define CONFIG_SUPPORT_RAW_INITRD
+
 /*-----------------------------------------------------------------------
  * Miscellaneous configurable options
  */
        "fdt_high=0xffffffff\0"                                         \
        "kernel_file=zImage\0"                                          \
        "ramdisk_file=uInitrd\0"                                        \
+       "ramdiskaddr=0x49000000\0"                                      \
+       "ramdisksize=0x800000\0"                                                        \
        "sdram_base=" __stringify(CONFIG_SYS_SDRAM_BASE) "\0"           \
        "kernel_offs=0x00080000\0"                                      \
        "ramdisk_offs=0x09000000\0"                                     \
        "        ext4load mmc ${rootdev}:${bootpart} $kerneladdr $kernel_file\n" \
        "        run load_args\n"                                       \
        "    fi\0"                                                      \
-       "load_initrd=ext4load mmc ${rootdev}:${bootpart} $ramdiskaddr $ramdisk_file\0" \
+       "load_initrd=" \
+               "if test ${bootmode} = recovery || test ${bootmode} = fota; then; "     \
+                       "if test -e mmc ${rootdev}:${bootpart} ramdisk-recovery.img; then " \
+                               "echo ${bootmode} booting.;"    \
+                               "setenv ramdisk_file ramdisk-recovery.img;" \
+                               "setenv ramdisksize 0xc00000;"          \
+                       "else " \
+                               "echo There is no Recovery Image!!!;"   \
+                               "echo Try to do the Normal Ramdisk Booting!!;"  \
+                               "setenv ramdisk_file ramdisk.img;" \
+                               "setenv bootmode ramdisk;"      \
+                       "fi;" \
+               "else " \
+                       "if test -e mmc ${rootdev}:${bootpart} ramdisk.img; then " \
+                               "echo ${bootmode} booting.;"    \
+                               "setenv ramdisk_file ramdisk.img;" \
+                       "fi;" \
+               "fi;"   \
+               "if test -e mmc ${rootdev}:${bootpart} ${ramdisk_file}; then " \
+                       "setenv bootargs ${console} "                   \
+                       "root=/dev/ram0 ${root_rw} "                    \
+                       "${opts} ${recoverymode} "                      \
+                       "drm_panel=$lcd_panel bootdev=mmcblk${rootdev} "                \
+                       "bootmode=${bootmode};"         \
+               "fi;"                                                   \
+               "ext4load mmc ${rootdev}:${bootpart} $ramdiskaddr $ramdisk_file\0" \
        "boot_cmd_initrd=\n"                                            \
        "    run load_kernel\n"                                         \
        "    run load_fdt\n"                                            \
        "    run load_initrd\n"                                         \
-       "    bootz $kerneladdr $ramdiskaddr $fdtaddr\0"                 \
+       "    bootz $kerneladdr ${ramdiskaddr}:${ramdisksize} $fdtaddr\0"        \
        "boot_cmd_mmcboot=\n"                                           \
        "    run load_kernel\n"                                         \
        "    run load_fdt\n"                                            \