Yu-Ping Wu has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/79956?usp=email )
Change subject: libpayload/vboot/Makefile.inc: Pass FIRMWARE_ARCH=mock if LP_ARCH_MOCK ......................................................................
libpayload/vboot/Makefile.inc: Pass FIRMWARE_ARCH=mock if LP_ARCH_MOCK
If CONFIG_LP_ARCH_MOCK, pass FIRMWARE_ARCH=mock when building vboot fwlib, so that vboot's Makefile will append the correct flags to CFLAGS.
BUG=none TEST=(depthcharge) make unit-tests -j BRANCH=none
Cq-Depend: chromium:5182247 Change-Id: I9ead7f2f93eac5f5c3887074423fb9aa50a489c0 Signed-off-by: Yu-Ping Wu yupingso@chromium.org --- M payloads/libpayload/vboot/Makefile.inc 1 file changed, 13 insertions(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/56/79956/1
diff --git a/payloads/libpayload/vboot/Makefile.inc b/payloads/libpayload/vboot/Makefile.inc index 9904fff..f06783d 100644 --- a/payloads/libpayload/vboot/Makefile.inc +++ b/payloads/libpayload/vboot/Makefile.inc @@ -13,29 +13,33 @@ $(patsubst include/%.h,$(top)/include/%.h,\ $(filter-out -I$(obj),\ $(filter-out -I$(coreboottop)/%,$(1))))) -ifeq ($(CONFIG_LP_ARCH_MOCK),) -VBOOT_CFLAGS += $(call vboot-fixup-includes,$(CFLAGS)) -VBOOT_CFLAGS += -I$(abspath $(obj)) -endif - -# Enable vboot debug by default -VBOOT_CFLAGS += -DVBOOT_DEBUG
VBOOT_FIRMWARE_ARCH-$(CONFIG_LP_ARCH_ARM) := arm VBOOT_FIRMWARE_ARCH-$(CONFIG_LP_ARCH_X86) := x86 VBOOT_FIRMWARE_ARCH-$(CONFIG_LP_ARCH_ARM64) := arm64
-ifeq ($(CONFIG_LP_ARCH_MOCK)$(VBOOT_FIRMWARE_ARCH-y),) +ifneq ($(CONFIG_LP_ARCH_MOCK),) +VBOOT_FIRMWARE_ARCH := mock +else +VBOOT_FIRMWARE_ARCH := $(VBOOT_FIRMWARE_ARCH-y) +VBOOT_CFLAGS += $(call vboot-fixup-includes,$(CFLAGS)) +VBOOT_CFLAGS += -I$(abspath $(obj)) +endif + +ifeq ($(VBOOT_FIRMWARE_ARCH),) $(error vboot requires architecture to be set in the configuration) endif
+# Enable vboot debug by default +VBOOT_CFLAGS += -DVBOOT_DEBUG + ifeq ($(CONFIG_LP_VBOOT_X86_RSA_ACCELERATION),y) CPPFLAGS_common += -DVB2_X86_RSA_ACCELERATION endif
$(VBOOT_FW_LIB): $(obj)/libpayload-config.h @printf " MAKE $(subst $(obj)/,,$(@))\n" - +$(Q) FIRMWARE_ARCH="$(VBOOT_FIRMWARE_ARCH-y)" \ + +$(Q) FIRMWARE_ARCH="$(VBOOT_FIRMWARE_ARCH)" \ CC="$(CC)" \ CFLAGS="$(VBOOT_CFLAGS)" \ $(MAKE) -C "$(VBOOT_SOURCE)" \