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

Commit af0276f8 authored by Matt Mower's avatar Matt Mower Committed by Tom Marshall
Browse files

Allow custom bootloader msg offset in block misc

Globally define BOARD_RECOVERY_BLDRMSG_OFFSET with a decimal integer
to offset the read/write location in misc where the bootloader message
should appear. Example:

  BOARD_GLOBAL_CFLAGS := -DBOARD_RECOVERY_BLDRMSG_OFFSET=2048

Edify commands get_stage and set_stage need to be aware of the
custom bootloader msg offset because they write the stage directly
to the BCB.

Change-Id: I6f3de1c2e3745c5535c3b95399abb8b2e2d01446
(cherry picked from commit 171e4bd8)
parent 7d9e8fa6
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -28,8 +28,13 @@
// 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.
#ifdef BOARD_RECOVERY_BLDRMSG_OFFSET
static const size_t BOOTLOADER_MESSAGE_OFFSET_IN_MISC = BOARD_RECOVERY_BLDRMSG_OFFSET;
static const size_t WIPE_PACKAGE_OFFSET_IN_MISC = 16 * 1024 + BOOTLOADER_MESSAGE_OFFSET_IN_MISC;
#else
static const size_t BOOTLOADER_MESSAGE_OFFSET_IN_MISC = 0;
static const size_t WIPE_PACKAGE_OFFSET_IN_MISC = 16 * 1024;
#endif

/* Bootloader Message (2-KiB)
 *