tizen: support recovery and fota mode
authorJaehoon Chung <jh80.chung@samsung.com>
Thu, 7 Jan 2021 07:54:47 +0000 (16:54 +0900)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Tue, 16 Nov 2021 12:00:22 +0000 (13:00 +0100)
Support recovery and fota mode.
It will be entered to recovery or fota mode with value by passed
from reboot command.

Change-Id: Ia7d3c80de2fb28491e6cabfcfb37059e7325f259
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
arch/arm/mach-meson/sm.c
tizen/bootscript/tizen-boot-amlogic-64b.scr

index 0a369b9..5e693a1 100644 (file)
@@ -147,10 +147,11 @@ static const char *reboot_reasons[MAX_REBOOT_REASONS] = {
        [REBOOT_REASON_COLD] = "cold_boot",
        [REBOOT_REASON_NORMAL] = "normal",
        [REBOOT_REASON_RECOVERY] = "recovery",
-       [REBOOT_REASON_UPDATE] = "update",
 #ifdef CONFIG_TIZEN
+       [REBOOT_REASON_UPDATE] = "fota",
        [REBOOT_REASON_DOWNLOAD] = "download",
 #else
+       [REBOOT_REASON_UPDATE] = "update",
        [REBOOT_REASON_FASTBOOT] = "fastboot",
 #endif
        [REBOOT_REASON_SUSPEND_OFF] = "suspend_off",
index ed4dbfc..21790d2 100644 (file)
@@ -72,6 +72,9 @@ setenv tizen_tmp_kernel_addr_r "0x1000000"
 if test "${reason}" = "recovery"; then;
        setenv ramdiskpart 8
        setenv bootmode recovery
+elif test "${reason}" = "fota"; then;
+       setenv ramdiskpart 8
+       setenv bootmode fota
 fi
 
 # boot from ram0 if there is sbin
@@ -92,7 +95,7 @@ echo "console: ${console}"
 kernel=Image.gz
 
 # To use comdline for using serial console. /* Normal mode */
-setenv bootargs \"root=/dev/${rootdev} rootwait rw no_console_suspend fsck.repair=yes net.ifnames=0 elevator=noop hdmimode=${hdmimode} cvbsmode=576cvbs ${cmode} usb-xhci.tablesize=2 logo=osd0,loaded ${console} ${boot_args} ${opts}\"
+setenv bootargs \"root=/dev/${rootdev} rootwait rw bootmode=${bootmode} no_console_suspend fsck.repair=yes net.ifnames=0 elevator=noop hdmimode=${hdmimode} cvbsmode=576cvbs ${cmode} usb-xhci.tablesize=2 logo=osd0,loaded ${console} ${boot_args} ${opts}\"
 
 # Find the ramdisk offset and block count
 part start $bootdev $mmcrootdev $ramdiskpart ramdisk_start