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, 21 Jan 2019 05:56:08 +0000 (14:56 +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 ad0e32db900bfde6eeefbdd804ff4b7f19fa746d..8c4d8e37abf6268c8e3043ba5e88923f3bf38b94 100644 (file)
        "lcd1_0=s6e8fa0\0"                                              \
        "lcd2_0=gst7d0038\0"                                            \
        "lcd_panel=s6e8fa0\0"                                           \
-       "sdrecovery=\n"                                                 \
-       "    run boot_cmd_sdboot\n"                                     \
-       "    sd_recovery mmc 1:3 $sdrecaddr partmap_emmc.txt\0"         \
+       "bootmode=ramdisk\0"                                            \
        "factory_load=factory_info load mmc 0 "                         \
                __stringify(CONFIG_FACTORY_INFO_START) " "              \
                __stringify(CONFIG_FACTORY_INFO_SIZE) "\0"              \
        "        run load_args\n"                                       \
        "    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=\n"                                            \