mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-02 21:25:03 +00:00
make verified boot feature optional
this fixes the build breakage on stm32-based platforms. In the linker script, remove the ASSERT since this macro is not designed to work in that context and this size condition is already verified by the linker by setting the "length" of the "FLASH" memory region. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=None TEST=make BOARD=link && make BOARD=daisy boot on Link and Daisy Change-Id: I08964749d44f47caa0a359bc93c303a9611e5d73
This commit is contained in:
@@ -50,6 +50,7 @@
|
||||
#define CONFIG_ADC
|
||||
#define CONFIG_EEPROM
|
||||
#define CONFIG_FLASH
|
||||
#define CONFIG_VBOOT
|
||||
#define CONFIG_FPU
|
||||
#define CONFIG_I2C
|
||||
#define CONFIG_LPC
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
# Common files build
|
||||
#
|
||||
|
||||
common-y=main.o message.o util.o console.o vboot.o uart_buffering.o
|
||||
common-y=main.o message.o util.o console.o uart_buffering.o
|
||||
common-y+=memory_commands.o shared_mem.o system_common.o hooks.o
|
||||
common-y+=gpio_commands.o version.o fmap.o
|
||||
common-y+=gpio_commands.o version.o
|
||||
common-$(CONFIG_BATTERY_ATL706486)+=battery_atl706486.o
|
||||
common-$(CONFIG_CHARGER_BQ24725)+=charger_bq24725.o
|
||||
common-$(CONFIG_EOPTION)+=eoption.o
|
||||
@@ -27,3 +27,4 @@ common-$(CONFIG_TASK_THERMAL)+=thermal.o thermal_commands.o
|
||||
common-$(CONFIG_TASK_X86POWER)+=x86_power.o
|
||||
common-$(CONFIG_TMP006)+=tmp006.o
|
||||
common-$(CONFIG_USB_CHARGE)+=usb_charge.o usb_charge_commands.o
|
||||
common-$(CONFIG_VBOOT)+=vboot.o fmap.o
|
||||
|
||||
@@ -43,9 +43,11 @@ int main(void)
|
||||
flash_pre_init();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_VBOOT
|
||||
/* Verified boot pre-init. This write-protects flash if necessary.
|
||||
* Flash and GPIOs must be initialized first. */
|
||||
vboot_pre_init();
|
||||
#endif
|
||||
|
||||
/* Initialize the system module. This enables the hibernate clock
|
||||
* source we need to calibrate the internal oscillator. */
|
||||
@@ -87,6 +89,7 @@ int main(void)
|
||||
keyboard_scan_init();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_VBOOT
|
||||
/* Verified boot initialization. This may jump to another image, which
|
||||
* will need to reconfigure / reinitialize the system, so as little as
|
||||
* possible should be done above this step.
|
||||
@@ -94,6 +97,7 @@ int main(void)
|
||||
* Note that steps above here may be done TWICE per boot, once in the
|
||||
* RO image and once in the RW image. */
|
||||
vboot_init();
|
||||
#endif
|
||||
|
||||
/* Initialize other driver modules. These can occur in any order.
|
||||
* Non-driver modules with tasks do their inits from their task
|
||||
|
||||
@@ -78,13 +78,10 @@ SECTIONS
|
||||
. = ALIGN(4);
|
||||
__data_end = .;
|
||||
} > IRAM
|
||||
#ifdef SECTION_IS_RO
|
||||
#if defined(SECTION_IS_RO) && defined(CONFIG_VBOOT)
|
||||
.google CONFIG_FW_RO_GBB_OFF : AT(CONFIG_FW_RO_GBB_OFF) {
|
||||
*(.google)
|
||||
. += 16;
|
||||
} > FLASH
|
||||
ASSERT(SIZEOF(.text) + SIZEOF(.rodata) + SIZEOF(.data) + SIZEOF(.google)
|
||||
<= CONFIG_FW_IMAGE_SIZE, "Too much stuff to fit in the image")
|
||||
#else
|
||||
/DISCARD/ : {
|
||||
*(.google)
|
||||
|
||||
Reference in New Issue
Block a user