configs: artik710_raptor: support the booting ramdisk-recovery image
authorJaehoon Chung <jh80.chung@samsung.com>
Mon, 4 Dec 2017 09:34:34 +0000 (18:34 +0900)
committerJaehoon Chung <jh80.chung@samsung.com>
Mon, 21 Jan 2019 07:23:03 +0000 (16:23 +0900)
If bootmode is recovery and there is a ramdisk-recovery.img, then it can
be booted to ramdisk-recovery or fota mode.

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

index 87fb0b1128f6ceee7f7adf566d9c4374d3cac97f..ff2ed2613f84af7a16dcac489a979fbff829262c 100644 (file)
        "    fi\0"                                                      \
        "load_kernel=ext4load mmc ${rootdev}:${bootpart} $kerneladdr $kernel_file\0" \
        "load_initrd=" \
-               "if test -e mmc ${rootdev}:${bootpart} ramdisk.img; then " \
-                       "setenv ramdisk_file ramdisk.img;" \
-               "fi;" \
+               "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;"                         \
+                       "drm_panel=$lcd_panel bootmode=${bootmode};"    \
                "fi;"                                                   \
                "ext4load mmc ${rootdev}:${bootpart} $ramdiskaddr $ramdisk_file\0" \
        "boot_cmd_initrd=\n"                                            \