From 48847ab8acfbe4b33d61d3d012c72c025cd8f364 Mon Sep 17 00:00:00 2001 From: Vadim Bendebury Date: Wed, 10 Dec 2014 20:11:30 -0800 Subject: [PATCH] storm: prepare to enabling Vboot2 This change adds to makefiles sources necessary for VBOOT2 verstage without actually enabling verstage yet. BRANCH=storm BUG=chrome-os-partner:34161 TEST=not much testing yet, just successful compilation. Change-Id: I1d7944e681f8a4b113a90ac028a0faba4423be89 Signed-off-by: Vadim Bendebury Reviewed-on: https://chromium-review.googlesource.com/234643 --- src/mainboard/google/storm/Kconfig | 1 + src/mainboard/google/storm/Makefile.inc | 3 +++ src/mainboard/google/storm/romstage.c | 9 ++++++--- src/soc/qualcomm/ipq806x/Makefile.inc | 6 ++++++ 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/mainboard/google/storm/Kconfig b/src/mainboard/google/storm/Kconfig index f11b412ac7..fabbf850f5 100644 --- a/src/mainboard/google/storm/Kconfig +++ b/src/mainboard/google/storm/Kconfig @@ -27,6 +27,7 @@ config BOARD_SPECIFIC_OPTIONS select COMMON_CBFS_SPI_WRAPPER select HAVE_HARD_RESET select MAINBOARD_HAS_BOOTBLOCK_INIT + select RETURN_FROM_VERSTAGE select SOC_QC_IPQ806X select SPI_FLASH select SPI_FLASH_SPANSION diff --git a/src/mainboard/google/storm/Makefile.inc b/src/mainboard/google/storm/Makefile.inc index aace929f5f..bcd786865a 100644 --- a/src/mainboard/google/storm/Makefile.inc +++ b/src/mainboard/google/storm/Makefile.inc @@ -20,6 +20,9 @@ bootblock-y += cdp.c bootblock-y += reset.c +verstage-y += cdp.c +verstage-y += chromeos.c +verstage-y += memlayout.ld verstage-y += reset.c romstage-y += romstage.c diff --git a/src/mainboard/google/storm/romstage.c b/src/mainboard/google/storm/romstage.c index c07dccc9a5..37142fd7f1 100644 --- a/src/mainboard/google/storm/romstage.c +++ b/src/mainboard/google/storm/romstage.c @@ -28,12 +28,15 @@ void main(void) { void *entry; - cbmem_initialize_empty(); - + cbmem_initialize(); console_init(); +#if CONFIG_VBOOT2_VERIFY_FIRMWARE + entry = vboot2_load_ramstage(); +#else vboot_verify_firmware(romstage_handoff_find_or_add()); - entry = cbfs_load_stage(CBFS_DEFAULT_MEDIA, "fallback/ramstage"); +#endif + stage_exit(entry); } diff --git a/src/soc/qualcomm/ipq806x/Makefile.inc b/src/soc/qualcomm/ipq806x/Makefile.inc index 21a8d4e8b7..aad4a54944 100644 --- a/src/soc/qualcomm/ipq806x/Makefile.inc +++ b/src/soc/qualcomm/ipq806x/Makefile.inc @@ -23,6 +23,12 @@ bootblock-$(CONFIG_SPI_FLASH) += spi.c bootblock-y += timer.c bootblock-$(CONFIG_CONSOLE_SERIAL_IPQ806X) += uart.c +verstage-y += clock.c +verstage-y += gpio.c +verstage-y += spi.c +verstage-y += timer.c +verstage-$(CONFIG_CONSOLE_SERIAL_IPQ806X) += uart.c + romstage-y += clock.c romstage-y += gpio.c romstage-$(CONFIG_SPI_FLASH) += spi.c