summaryrefslogtreecommitdiffstats
path: root/bootloader_message (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Switch to bionic gtest in bootable/recoveryTianjie Xu2017-11-032-16/+22
| | | | | | | | | | | | | | | | | 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
* Use -Werror in bootable/recoveryChih-Hung Hsieh2017-10-021-1/+1
| | | | | | | | * Move -Werror from cppflags to cflags. Bug: 66996870 Test: build with WITH_TIDY=1 Change-Id: I59147fe24d8b48a0403c67ba07d4d384b8e9c5a3
* Turn on -Wall for recovery modulesTianjie Xu2017-08-291-1/+4
| | | | | | | | | | | | | Turn on -Wall for all modules. Also remove the obsolete file_cmp() in apply_patch test and now() in wear_ui. The only exception is lib_edify due to the unused functions in the intermediate cpp files generated from the lex files. It will be handled in a seperate CL. Bug: 64939312 Test: mma, unit tests pass Change-Id: Ic53f76b60b6401ab20db3d98130d674c08e3702f
* libbootloader_message: convert to Android.bpTom Cherry2017-05-172-25/+26
| | | | | Test: build Change-Id: Ia0c2e141673e37eea29306817d2f4b2c944213b0
* Boot control HAL based on the A/B headers.Alex Deymo2017-04-032-0/+12
| | | | | | | | | | | | | | 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
* Revert "libbootloader_message: use different fstab paths for normal/recovery boot"Bowgo Tsai2017-03-271-8/+2
| | | | | | | | | | | | | | This reverts commit 37bd44174bf2511320961f3f8cd1f698a1c72b66. 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: use different fstab paths for normal/recovery bootBowgo Tsai2017-03-251-2/+8
| | | | | | | | | | | | | | | | | | 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
* recovery: replacing fs_mgr_read_fstab() with new fs_mgr APIsBowgo Tsai2017-03-101-18/+5
| | | | | | | | | | | | | | | | | | | 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
* Add update_bootloader_message() to fix two-step OTAs.Tao Bao2016-12-152-1/+27
| | | | | | | | | | | | | | | | | 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-132-9/+2
|\
| * Revert "write_bootloader_message(<options>) should not reset stage field."Tao Bao2016-12-132-9/+2
| | | | | | | | | | | | | | This reverts commit 7e31f421a514da09b90e46dbd642a5e9b16e0003. Bug: 33534933 Change-Id: Ib173f6b1e36a79deafc3592785195693a6779471
* | Merge "write_bootloader_message(<options>) should not reset stage field."Tao Bao2016-12-092-2/+9
|\|
| * write_bootloader_message(<options>) should not reset stage field.Tao Bao2016-12-062-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-202-23/+63
|\| | | | | | | | | | | am: c627cd6486 Change-Id: Ie4ff6fa512c875c6be65b02908eadb498d3f9644
| * updater: Refactor set_stage() and get_stage() functions.Tao Bao2016-11-182-23/+63
| | | | | | | | | | | | | | | | | | | | | | 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_message: Remove the no-op blank line.Tao Bao2016-11-191-1/+0
| | | | | | | | | | | | | | | | This single blank line was introduced by some cherry-pick, which is causing merge conflicts. Test: N/A Change-Id: Ida527b76fca7cc916499c5f888476c8e51ba3eaa
* | Merge "Add 'reboot bootloader' to bootloader_message."Vineela Tummalapalli2016-11-102-0/+22
|\| | | | | | | | | | | am: a5538b87e8 Change-Id: I432f48453d2627e165fda7cda1945157ff0e83ae
| * Add 'reboot bootloader' to bootloader_message.Vineela Tummalapalli2016-11-102-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | 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
| * Fix bootloader_message.Yabin Cui2016-10-191-1/+1
| | | | | | | | | | | | Bug: 29945717 Change-Id: I934fd6c52b0111937fa75455de2fa4157fb30f6f (cherry picked from commit 9da04d595fe01e4c0ac1baf39186ac090bf234b3)
| * Create bootloader_message static library.Yabin Cui2016-10-183-0/+401
| | | | | | | | | | | 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)
* Turn on -Werror for recoveryTianjie Xu2016-09-301-0/+1
| | | | | | | | | | | Also remove the 0xff comparison when validating the bootloader message fields. As the fields won't be erased to 0xff after we remove the MTD support. Bug: 28202046 Test: The recovery folder compiles for aosp_x86-eng Change-Id: Ibb30ea1b2b28676fb08c7e92a1e5f7b6ef3247ab (cherry picked from commit 7aa88748f6ec4e53333d1a15747bc44826ccc410)
* resolve merge conflicts of d5c7d6b to nyc-mr1-dev-plus-aospElliott Hughes2016-09-261-6/+5
| | | | Change-Id: Ia041044547351a3e65b647bb9913aa18c7d2c97c
* Fix bootloader_message.Yabin Cui2016-07-061-1/+1
|\ | | | | | | | | | | am: 9da04d595f Change-Id: I684c6afa25ce1dccad06920eee8a3bd6b7da96b1
| * Fix bootloader_message.Yabin Cui2016-07-061-1/+1
| | | | | | | | | | Bug: 29945717 Change-Id: I934fd6c52b0111937fa75455de2fa4157fb30f6f
* | 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-303-0/+304
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