The added bootctrl.bcb module implement the legacy interface for the
bootctrl HAL based on the Boot Control Block (BCB) and the headers
already specified in the booloader_message library.
This serves as a reference implementation of the boot_control HAL.
Bug: 32707546
Test: Tested internally that a device can use this HAL to flip slots and
recovery from a /misc wipe.
Change-Id: Ic02e5aaf4de7d0a1780eac4e8705dae20d0b3e10
This reverts commit 37bd44174b.
The logic here is better to be moved into fs_mgr, not fs_mgr clients.
Bug: 35811655
Bug: 36502022
Change-Id: Iae79bd8f7131516ad223f3323f1bc1d805206d51
Test: normal boot sailfish, go to Settings > System & tap
on "Factory Data reset"
Test: recovery boot sailfish
libbootloader_message is used by both normal boot and recovery boot.
It needs to use different fstab paths, respectively. Otherwise, factory
reset will fail when we move /fstab.{ro.hardware} to /vendor/etc/.
Recovery boot: fs_mgr_read_fstab_with_dt("/etc/recovery.fstab")
Normal boot: fs_mgr_read_fstab_default()
Bug: 35811655
Bug: 36502022
Test: normal boot sailfish, go to Settings > System & tap on
"Factory Data reset"
Test: recovery boot sailfish
Change-Id: I253f5bdfb9be8a01f80856eb1194f85cdf992bbd
The fstab settings of early-mounted partitions (e.g., /vendor) will be in
kernel device tree. Switch to the new API to get the whole settings with
those in device tree:
fs_mgr_read_fstab_with_dt("/etc/recovery.fstab")
The original default /fstab.{ro.hardware} might be moved to
/vendor/etc/. or /odm/etc/. Use another new API to get the default fstab
instead of using the hard-coded /fstab.{ro.hardware}. This API also
includes the settings from device tree:
fs_mgr_read_fstab_default()
Bug: 35811655
Test: boot sailfish recovery
Change-Id: Iaa56ac7f7b4c4dfc7180c65f03e9a37b94f1de09
This is a retry of commit 7e31f421a5.
Commit bd56f1590c switches to calling
write_bootloader_message(<options>) in get_args(), which
unintentionally resets the stage field thus breaks two-step OTAs.
This CL adds update_bootloader_message(<options>), which only sets
the command field (to "boot-recovery") and the recovery field (with
the specified options).
Bug: 33534933
Test: Apply a two-step package.
Test: recovery_component_test passes.
Change-Id: Ie0b1ed4053d2d3c97d9cb84310d616b28fcfc72e
Commit bd56f1590c switches to calling
write_bootloader_message(<options>) in get_args(), which
unintentionally resets the stage field thus breaks two-step OTAs.
This CL changes write_bootloader_message(<options>) to only set the
command field (to "boot-recovery") and the recovery field (with the
specified options).
Test: Apply a two-step package.
Change-Id: I6905918812c7d3402cc1524688079066a4d22d29
Add read_bootloader_message_from() and write_bootloader_message_to() to
allow specifying the BCB device (/misc).
Also add testcases for set_stage() and get_stage().
Test: recovery_component_test passes.
Test: Build a recovery image and apply a two-step OTA package.
Change-Id: If5ab06a1aaaea168d2a9e5dd63c07c0a3190e4ae
bootloader_messages merges bootloader_message_writer
and bootloader.cpp, so we can use the same library to
manage bootloader_message in normal boot and recovery mode.
Bug: 29582118
Change-Id: I9efdf776ef8f02b53911ff43a518e035e0c29618
(cherry picked from commit 2f272c0551)
2016-10-18 11:37:05 -07:00
Renamed from uncrypt/bootloader_message_writer.cpp (Browse further)