|
@@ -29,6 +29,16 @@
|
29
|
29
|
#include <android-base/unique_fd.h>
|
30
|
30
|
#include <fs_mgr.h>
|
31
|
31
|
|
|
32
|
+// Spaces used by misc partition are as below:
|
|
33
|
+// 0 - 2K For bootloader_message
|
|
34
|
+// 2K - 16K Used by Vendor's bootloader (the 2K - 4K range may be optionally used
|
|
35
|
+// as bootloader_message_ab struct)
|
|
36
|
+// 16K - 64K Used by uncrypt and recovery to store wipe_package for A/B devices
|
|
37
|
+// Note that these offsets are admitted by bootloader,recovery and uncrypt, so they
|
|
38
|
+// are not configurable without changing all of them.
|
|
39
|
+static const size_t BOOTLOADER_MESSAGE_OFFSET_IN_MISC = BOARD_RECOVERY_BLDRMSG_OFFSET;
|
|
40
|
+static const size_t WIPE_PACKAGE_OFFSET_IN_MISC = 16 * 1024 + BOOTLOADER_MESSAGE_OFFSET_IN_MISC;
|
|
41
|
+
|
32
|
42
|
static std::string get_misc_blk_device(std::string* err) {
|
33
|
43
|
std::unique_ptr<fstab, decltype(&fs_mgr_free_fstab)> fstab(fs_mgr_read_fstab_default(),
|
34
|
44
|
fs_mgr_free_fstab);
|