Add device_board_set_boot_success in booting-done.service
authorHyotaek Shim <hyotaek.shim@samsung.com>
Thu, 6 Jan 2022 11:32:30 +0000 (20:32 +0900)
committerŁukasz Stelmach <l.stelmach@samsung.com>
Mon, 25 Mar 2024 11:49:10 +0000 (12:49 +0100)
commit0d82eb542a3a02a19e8fc251cb269608e6fa1518
treec4a3a9b2c936958a0b212dbfb80a2f5bf412eb84
parenta8da36e54710561ca6d7757b1dc1f6a8bba438b3
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 <hyotaek.shim@samsung.com>
units/booting-done.service