Loading bootloader_message/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ package { cc_defaults { name: "libbootloader_message_defaults", defaults: ["bootloader_message_offset_defaults"], srcs: ["bootloader_message.cpp"], cflags: [ "-Wall", Loading bootloader_message/bootloader_message.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -174,6 +174,11 @@ bool write_bootloader_message(const bootloader_message& boot, std::string* err) bool clear_bootloader_message(std::string* err) { bootloader_message boot = {}; if (BOOTLOADER_MESSAGE_OFFSET_IN_MISC < sizeof(bootloader_message)) { std::string misc_blk_device = get_misc_blk_device(err); if (misc_blk_device.empty()) return false; return write_misc_partition(&boot, sizeof(boot), misc_blk_device, 0 /* offset */, err); } return write_bootloader_message(boot, err); } Loading bootloader_message/include/bootloader_message/bootloader_message.h +5 −5 Original line number Diff line number Diff line Loading @@ -29,11 +29,11 @@ // 32K - 64K System space, used for miscellanious AOSP features. See below. // Note that these offsets are admitted by bootloader,recovery and uncrypt, so they // are not configurable without changing all of them. constexpr size_t BOOTLOADER_MESSAGE_OFFSET_IN_MISC = 0; constexpr size_t VENDOR_SPACE_OFFSET_IN_MISC = 2 * 1024; constexpr size_t WIPE_PACKAGE_OFFSET_IN_MISC = 16 * 1024; constexpr size_t SYSTEM_SPACE_OFFSET_IN_MISC = 32 * 1024; constexpr size_t SYSTEM_SPACE_SIZE_IN_MISC = 32 * 1024; constexpr size_t BOOTLOADER_MESSAGE_OFFSET_IN_MISC = BOARD_RECOVERY_BLDRMSG_OFFSET; constexpr size_t VENDOR_SPACE_OFFSET_IN_MISC = 2 * 1024 + BOARD_RECOVERY_BLDRMSG_OFFSET; constexpr size_t WIPE_PACKAGE_OFFSET_IN_MISC = 16 * 1024 + BOARD_RECOVERY_BLDRMSG_OFFSET; constexpr size_t SYSTEM_SPACE_OFFSET_IN_MISC = 32 * 1024 + BOARD_RECOVERY_BLDRMSG_OFFSET; constexpr size_t SYSTEM_SPACE_SIZE_IN_MISC = 32 * 1024 + BOARD_RECOVERY_BLDRMSG_OFFSET; /* Bootloader Message (2-KiB) * Loading Loading
bootloader_message/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ package { cc_defaults { name: "libbootloader_message_defaults", defaults: ["bootloader_message_offset_defaults"], srcs: ["bootloader_message.cpp"], cflags: [ "-Wall", Loading
bootloader_message/bootloader_message.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -174,6 +174,11 @@ bool write_bootloader_message(const bootloader_message& boot, std::string* err) bool clear_bootloader_message(std::string* err) { bootloader_message boot = {}; if (BOOTLOADER_MESSAGE_OFFSET_IN_MISC < sizeof(bootloader_message)) { std::string misc_blk_device = get_misc_blk_device(err); if (misc_blk_device.empty()) return false; return write_misc_partition(&boot, sizeof(boot), misc_blk_device, 0 /* offset */, err); } return write_bootloader_message(boot, err); } Loading
bootloader_message/include/bootloader_message/bootloader_message.h +5 −5 Original line number Diff line number Diff line Loading @@ -29,11 +29,11 @@ // 32K - 64K System space, used for miscellanious AOSP features. See below. // Note that these offsets are admitted by bootloader,recovery and uncrypt, so they // are not configurable without changing all of them. constexpr size_t BOOTLOADER_MESSAGE_OFFSET_IN_MISC = 0; constexpr size_t VENDOR_SPACE_OFFSET_IN_MISC = 2 * 1024; constexpr size_t WIPE_PACKAGE_OFFSET_IN_MISC = 16 * 1024; constexpr size_t SYSTEM_SPACE_OFFSET_IN_MISC = 32 * 1024; constexpr size_t SYSTEM_SPACE_SIZE_IN_MISC = 32 * 1024; constexpr size_t BOOTLOADER_MESSAGE_OFFSET_IN_MISC = BOARD_RECOVERY_BLDRMSG_OFFSET; constexpr size_t VENDOR_SPACE_OFFSET_IN_MISC = 2 * 1024 + BOARD_RECOVERY_BLDRMSG_OFFSET; constexpr size_t WIPE_PACKAGE_OFFSET_IN_MISC = 16 * 1024 + BOARD_RECOVERY_BLDRMSG_OFFSET; constexpr size_t SYSTEM_SPACE_OFFSET_IN_MISC = 32 * 1024 + BOARD_RECOVERY_BLDRMSG_OFFSET; constexpr size_t SYSTEM_SPACE_SIZE_IN_MISC = 32 * 1024 + BOARD_RECOVERY_BLDRMSG_OFFSET; /* Bootloader Message (2-KiB) * Loading