aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoug Zongker2013-11-25 15:53:25 -0600
committerDoug Zongker2013-11-26 17:46:57 -0600
commitc87bab101893e8322b49d7c8600e3367b20ab50a (patch)
tree7fb05cb6389b181776b4ae818e2c0883dd1a9a79 /bootloader.h
parentc64e76c75088b951f61a7f7bacf8af6eccd2ccfa (diff)
downloadplatform-bootable-recovery-c87bab101893e8322b49d7c8600e3367b20ab50a.tar.gz
platform-bootable-recovery-c87bab101893e8322b49d7c8600e3367b20ab50a.tar.xz
platform-bootable-recovery-c87bab101893e8322b49d7c8600e3367b20ab50a.zip
add the functions for multi-stage packages to updaterandroid-sdk-4.4.2_r1.0.1android-sdk-4.4.2_r1
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
Diffstat (limited to 'bootloader.h')
-rw-r--r--bootloader.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/bootloader.h b/bootloader.h
index 712aa1a2..c2895dd9 100644
--- a/bootloader.h
+++ b/bootloader.h
@@ -38,11 +38,24 @@ extern "C" {
38 * The recovery field is only written by linux and used 38 * The recovery field is only written by linux and used
39 * for the system to send a message to recovery or the 39 * for the system to send a message to recovery or the
40 * other way around. 40 * other way around.
41 *
42 * The stage field is written by packages which restart themselves
43 * multiple times, so that the UI can reflect which invocation of the
44 * package it is. If the value is of the format "#/#" (eg, "1/3"),
45 * the UI will add a simple indicator of that status.
41 */ 46 */
42struct bootloader_message { 47struct bootloader_message {
43 char command[32]; 48 char command[32];
44 char status[32]; 49 char status[32];
45 char recovery[1024]; 50 char recovery[768];
51
52 // The 'recovery' field used to be 1024 bytes. It has only ever
53 // been used to store the recovery command line, so 768 bytes
54 // should be plenty. We carve off the last 256 bytes to store the
55 // stage string (for multistage packages) and possible future
56 // expansion.
57 char stage[32];
58 char reserved[224];
46}; 59};
47 60
48/* Read and write the bootloader command from the "misc" partition. 61/* Read and write the bootloader command from the "misc" partition.