summaryrefslogtreecommitdiffstats
path: root/bootloader_message/include (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add misc_writer.Tao Bao2019-05-211-2/+11
| | | | | | | | | | | | | | | | | | | | | bootloader_message.h currently divides /misc into four segments. The space between 2K and 16K is reserved for vendor use (e.g. bootloader persists flags). This CL adds a vendor tool "misc_writer", to allow writing data to the vendor space in /misc, before getting a dedicated HAL for accessing /misc partition (b/131775112). Targets need to explicitly include the module, then invoke the executable to write data. For example, the following command will write 3-byte data ("0xABCDEF") to offset 4 in vendor space (i.e. 2048 + 4 in /misc). $ /vendor/bin/misc_writer --vendor-space-offset 4 --hex-string 0xABCDEF Bug: 132906936 Test: Run recovery_unit_test on crosshatch. Test: Call the command via init.hardware.rc on crosshatch. Check that the call finishes successfully. Then check the contents written to /misc (`dd bs=1 skip=2048 if=/dev/block/sda2 count=32 | xxd`). Change-Id: I79548fc63fc79b705a0320868690569c3106949f
* libbootloader_message: write recovery to any deviceYifan Hong2019-05-031-0/+5
| | | | | | | Test: cuttlefish Bug: 79094284 Change-Id: If1a6460a8cbed2e2d22fa9e16e6d7ca84f4592d0
* Add update_channel field to bootloader_message_ab.Sen Jiang2018-01-231-1/+5
| | | | | | | | | | | The update_channel field is used to store the Omaha update channel if update_engine is compiled with Omaha support. We need it to be in misc to persist through factory reset. Bug: 72332119 Test: mma Change-Id: Ied4fecc6e78cc69d33a36ba4d101d675100f9d82
* Switch to bionic gtest in bootable/recoveryTianjie Xu2017-11-031-0/+5
| | | | | | | | | | | | | | | | | We encountered segfaults in Imgdiff host tests due to the failure to reset states of getopt. The problem can be solved by switching to use bionic's gtest where a new process is forked for each test. Also modify the recovery_component_test to make sure it runs in parallel. Changes include: 1. Merge the writes to misc partition into one single test. 2. Change the hard coded location "/cache/saved.file" into a configurable variable. Bug: 67849209 Test: recovery tests pass Change-Id: I165d313f32b83393fb7922c5078636ac40b50bc2
* Boot control HAL based on the A/B headers.Alex Deymo2017-04-031-0/+5
| | | | | | | | | | | | | | 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
* Add update_bootloader_message() to fix two-step OTAs.Tao Bao2016-12-151-1/+6
| | | | | | | | | | | | | | | | | This is a retry of commit 7e31f421a514da09b90e46dbd642a5e9b16e0003. Commit bd56f1590c967205dc45eb2ec298aa8d2aacb740 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
* Remove the obsolete comments for firmware update.Tao Bao2016-12-141-2/+3
| | | | | | | | The corresponding code was removed in commit e08991e02a7d678f2574e85289a34b2a9a537c82 in 2010 (Froyo). Test: N/A Change-Id: I2b296e1b07d54232bade79fda7501387d65a4c37
* Merge "Revert "write_bootloader_message(<options>) should not reset stage field.""Tao Bao2016-12-131-2/+1
|\
| * Revert "write_bootloader_message(<options>) should not reset stage field."Tao Bao2016-12-131-2/+1
| | | | | | | | | | | | | | This reverts commit 7e31f421a514da09b90e46dbd642a5e9b16e0003. Bug: 33534933 Change-Id: Ib173f6b1e36a79deafc3592785195693a6779471
* | Merge "write_bootloader_message(<options>) should not reset stage field."Tao Bao2016-12-091-1/+2
|\|
| * write_bootloader_message(<options>) should not reset stage field.Tao Bao2016-12-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Commit bd56f1590c967205dc45eb2ec298aa8d2aacb740 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
* | Merge "updater: Refactor set_stage() and get_stage() functions."Tao Bao2016-11-201-0/+18
|\| | | | | | | | | | | am: c627cd6486 Change-Id: Ie4ff6fa512c875c6be65b02908eadb498d3f9644
| * updater: Refactor set_stage() and get_stage() functions.Tao Bao2016-11-181-0/+18
| | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Add 'reboot bootloader' to bootloader_message."Vineela Tummalapalli2016-11-101-0/+4
|\| | | | | | | | | | | am: a5538b87e8 Change-Id: I432f48453d2627e165fda7cda1945157ff0e83ae
| * Add 'reboot bootloader' to bootloader_message.Vineela Tummalapalli2016-11-101-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Add 'reboot bootloader' capability to the bootloader_message. BUG: https://issuetracker.google.com/issues/32474515 Change-Id: I01e8b2fad978bf7c8fc96ff6b08ad3e52533f504 Author: Vineela Tummalapalli <vineela.tummalapalli@intel.com> Signed-off-by: Vineela Tummalapalli <vineela.tummalapalli@intel.com> Signed-off-by: Bruce Beare <bruce.j.beare@intel.com> Reviewed-on: https://android.intel.com/548519
| * Create bootloader_message static library.Yabin Cui2016-10-181-0/+198
| | | | | | | | | | | 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 2f272c0551f984e83bc5abaf240e0dddb38a3326)
* resolve merge conflicts of 2f272c0 to nyc-mr1-dev-plus-aospYabin Cui2016-07-011-11/+111
| | | | Change-Id: I889d94a723415ad2e660b8c99e66935142918bc4
* Create bootloader_message static library.Yabin Cui2016-06-301-0/+99
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