summaryrefslogtreecommitdiffstats
path: root/bootloader.h
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2016-06-09 23:09:39 +0200
committerYabin Cui <yabinc@google.com>2016-06-21 03:18:02 +0200
commit6faf0265c9b58db2c15b53f6d29025629d52f882 (patch)
treefc2e067205a986071615f936e8ff7040e01520f5 /bootloader.h
parentMerge "recovery: Track the name change for wipe_ab." into nyc-mr1-dev (diff)
downloadandroid_bootable_recovery-6faf0265c9b58db2c15b53f6d29025629d52f882.tar
android_bootable_recovery-6faf0265c9b58db2c15b53f6d29025629d52f882.tar.gz
android_bootable_recovery-6faf0265c9b58db2c15b53f6d29025629d52f882.tar.bz2
android_bootable_recovery-6faf0265c9b58db2c15b53f6d29025629d52f882.tar.lz
android_bootable_recovery-6faf0265c9b58db2c15b53f6d29025629d52f882.tar.xz
android_bootable_recovery-6faf0265c9b58db2c15b53f6d29025629d52f882.tar.zst
android_bootable_recovery-6faf0265c9b58db2c15b53f6d29025629d52f882.zip
Diffstat (limited to '')
-rw-r--r--bootloader.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/bootloader.h b/bootloader.h
index 742a4abfb..88d54a5cb 100644
--- a/bootloader.h
+++ b/bootloader.h
@@ -17,6 +17,17 @@
#ifndef _RECOVERY_BOOTLOADER_H
#define _RECOVERY_BOOTLOADER_H
+#include <stddef.h>
+
+// Spaces used by misc partition are as below:
+// 0 - 2K Bootloader Message
+// 2K - 16K Used by Vendor's bootloader
+// 16K - 64K Used by uncrypt and recovery to store wipe_package for A/B devices
+// Note that these offsets are admitted by bootloader,recovery and uncrypt, so they
+// are not configurable without changing all of them.
+static const size_t BOOTLOADER_MESSAGE_OFFSET_IN_MISC = 0;
+static const size_t WIPE_PACKAGE_OFFSET_IN_MISC = 16 * 1024;
+
/* Bootloader Message
*
* This structure describes the content of a block in flash
@@ -68,4 +79,11 @@ struct bootloader_message {
int get_bootloader_message(struct bootloader_message *out);
int set_bootloader_message(const struct bootloader_message *in);
+#ifdef __cplusplus
+
+#include <string>
+
+bool read_wipe_package(size_t size, std::string* out);
+#endif
+
#endif