configs: artik530_raptor: support the booting ramdisk-recovery image
authorJaehoon Chung <jh80.chung@samsung.com>
Thu, 19 Oct 2017 03:38:06 +0000 (12:38 +0900)
committerJaehoon Chung <jh80.chung@samsung.com>
Mon, 26 Mar 2018 02:31:18 +0000 (11:31 +0900)
If bootmode is recovery and there is a ramdisk-recovery.img, then it can
be booted to ramdisk-recovery mode.
This patch is for booting ramdisk-recovery image.

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

index c116f1842422d67350603bd59e5ad57e7777ce10..e04efe45417e8605d650ab4da0f779e6747203b9 100644 (file)
        "lcd1_0=s6e8fa0\0"                                              \
        "lcd2_0=gst7d0038\0"                                            \
        "lcd_panel=s6e8fa0\0"                                           \
+       "bootmode=ramdisk\0"                                            \
        "sdrecovery=run boot_cmd_sdboot;"                               \
                "sd_recovery mmc 1:3 $sdrecaddr partmap_emmc.txt\0"     \
        "factory_load=factory_info load mmc 0 "                         \
                        "run load_args; "                               \
                "fi;\0"                                                 \
        "load_initrd=" \
-               "if test -e mmc ${rootdev}:${bootpart} ramdisk.img; then " \
-                       "setenv ramdisk_file ramdisk.img;" \
-               "fi;" \
+               "if test ${bootmode} = recovery; then; "        \
+                       "if test -e mmc ${rootdev}:${bootpart} ramdisk-recovery.img; then " \
+                               "echo ${bootmode} booting.;"    \
+                               "setenv ramdisk_file ramdisk-recovery.img;" \
+                       "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};"                \
+                       "drm_panel=$lcd_panel bootdev=mmcblk${rootdev} "                \
+                       "bootmode=${bootmode};"         \
                "fi;"                                                   \
                "ext4load mmc ${rootdev}:${bootpart} $ramdiskaddr $ramdisk_file\0" \
        "boot_cmd_initrd="                                              \