Commit graph

13 commits

Author SHA1 Message Date
Yabin Cui
8b309f6970 Create bootloader_message static library.
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
Tao Bao
9fb2b592e2 Add bootloader_message_ab struct.
Move A/B-specific fields, effectively slot_suffix as in this CL, out of
bootloader_message struct. Those A/B-specific fields are expected to be
managed by the A/B-bootloader or boot control HAL, which shouldn't be
cleared by recovery or uncrypt.

Round up the bootloader_message struct to 2-KiB. Round up the
bootloader_message_ab struct to 4-KiB.

Bug: 29193360
Change-Id: I5740a612456da6d4d3b00e49a202d8f689d32690
2016-06-09 21:46:13 -07:00
Jeremy Compostella
e77a68f67f slot_metadata: add verity_corrupted field
In rootfs context, the verity mode must be supplied by the bootloader
to the kernel.  This patch creates a new verity_corrupted field in the
slot metadata structure to remind that this slot is corrupted from a
dm-verity point of view.

If the bootloader receives the "dm-verity device corrupted" reboot
target, it should set this bit to 1.  If this bit value is 1, the
bootloader should set the veritymode to "eio".

Change-Id: I9335a39d7d009200318c58c53a3139d542788a9b
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
2016-05-23 13:10:23 +02:00
Jeremy Compostella
b3bf958d4f Define the Bootloader Control A/B structure
Define the A/B structure for implementation using the misc partition
as storage.  The bootloader_control structure is designed to be put in
the bootloader_message slot_suffix field.

Change-Id: I158bdf3e69b3f327a1dde4c6eb1f907dbaf8939c
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
2016-04-06 09:56:10 +02:00
David Zeuthen
d85ae79dc9 Add slot_suffix field to struct bootloader_message.
This is needed by fs_mgr for certain A/B implementations.

Change-Id: I7bb404d61198eb7a962c2b693911f5156745daae
2015-09-02 15:49:58 -04:00
Tao Bao
e6aa3326c1 updater: Clean up char* with std::string.
So we can remove a few free()s. And also replace a few pointers with
references.

Change-Id: I4b6332216704f4f9ea4a044b8d4bb7aa42a7ef26
2015-08-06 13:05:00 -07:00
Doug Zongker
c87bab1018 add the functions for multi-stage packages to updater
In order to support multi-stage recovery packages, we add the
set_stage() and get_stage() functions, which store a short string
somewhere it can be accessed across invocations of recovery.  We also
add reboot_now() which updater can invoke to immediately reboot the
device, without doing normal recovery cleanup.  (It can also choose
whether to boot off the boot or recovery partition.)

If the stage string is of the form "#/#", recovery's UI will be
augmented with a simple indicator of what stage you're in, so it
doesn't look like a reboot loop.

Change-Id: I62f7ff0bc802b549c9bcf3cc154a6bad99f94603
2013-11-26 15:46:57 -08:00
Doug Zongker
28ce47cfa6 turn recovery into a C++ binary
Change-Id: I423a23581048d451d53eef46e5f5eac485b77555
2011-10-31 10:24:09 -07:00
Doug Zongker
e08991e02a bump updater API version to 3; deprecate firmware update command
Remove support for the HTC-specific "firmware" update command and the
corresponding edify function write_firmware_update().  This
functionality is now done by an edify extension library that lives in
vendor/htc.

Change-Id: I80858951ff10ed8dfff98aefb796bef009e05efb
2010-02-03 09:20:07 -08:00
Doug Zongker
687bc12ccf save the recovery log from before HTC firmware updates
When doing a firmware (radio or hboot) update on HTC devices, save the
recovery log in block 1 of the cache partition, before the firmware
image and the UI bitmaps.  When we boot back into recovery after the
firmware update to reformat the cache partition, copy that log out of
cache before reformatting it and dump it into the current invocation's
log.

The practical upshot of all this is that we can see the log output
from radio and hboot updates.

Change-Id: Ie0e89566754c88f4bed6a90d8a0aa04047b01a27
2010-01-21 12:50:04 -08:00
The Android Open Source Project
c24a8e688a auto import from //depot/cupcake/@135843 2009-03-03 19:28:42 -08:00
The Android Open Source Project
ffb48f64fe auto import from //depot/cupcake/@135843 2009-03-03 18:28:14 -08:00
The Android Open Source Project
23580ca27a Initial Contribution 2008-10-21 07:00:00 -07:00