From 4c96e536e1f90b3ec3dbedaf591d6c7cdb95fb49 Mon Sep 17 00:00:00 2001 From: Hyotaek Shim Date: Thu, 6 Jan 2022 20:32:30 +0900 Subject: [PATCH] Add device_board_set_boot_success in booting-done.service /usr/bin/device_board_set_boot_success reports boot success to the bootloader. If boot success is not reported for, e.g., 10-times booting in a row, bootloader recovers the system. -- Bootloader -- If (BOOT_SUCCESS flag is set) { Clear the BOOT_SUCCESS flag BOOT_FAIL_COUNT = 0 } Else { If (++ BOOT_FAIL_COUNT > 10) { BOOT_FAIL_COUNT = 0 Restore to the other partitions (e.g., b -> a) Proceed to the recovery booting (ramdisk-recovery, bootmode="recovery") } } Proceed to the normal booting (ramdisk, bootmode="") Change-Id: I581c5dbcf216806dfcff826bbdf7ca82dc944676 Signed-off-by: Hyotaek Shim --- units/booting-done.service.in | 1 + 1 file changed, 1 insertion(+) diff --git a/units/booting-done.service.in b/units/booting-done.service.in index 41d14ad..42c9a5c 100644 --- a/units/booting-done.service.in +++ b/units/booting-done.service.in @@ -7,5 +7,6 @@ RefuseManualStop=yes User=system_fw Group=system_fw ExecStart=@rootbindir@/wait-delayed-target.sh +ExecStartPost=-/usr/bin/device_board_set_boot_success RemainAfterExit=yes SmackProcessLabel=System -- 2.7.4