Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 46a39b4b authored by Nishith  Khanna's avatar Nishith Khanna
Browse files

Merge remote-tracking branch 'origin/lineage-20.0' into v1-t

parents 876ecabd 4e4526fc
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ package {

cc_defaults {
    name: "libbootloader_message_defaults",
    defaults: ["bootloader_message_offset_defaults"],
    srcs: ["bootloader_message.cpp"],
    cflags: [
        "-Wall",
+5 −0
Original line number Diff line number Diff line
@@ -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);
}

+5 −5
Original line number Diff line number Diff line
@@ -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)
 *