diff options
author | Yu-Ping Wu <yupingso@chromium.org> | 2024-01-10 15:27:11 +0800 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2024-01-18 14:58:24 +0000 |
commit | c6d25cfe29f174dde4e84767f78845e1d5f552d4 (patch) | |
tree | e484d48e48073e7ba33b95b88ec60df359604282 /payloads/libpayload/vboot | |
parent | 189c576cdc3988c43fc54762a0eee7404f5367dc (diff) |
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>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79956
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'payloads/libpayload/vboot')
-rw-r--r-- | payloads/libpayload/vboot/Makefile.inc | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/payloads/libpayload/vboot/Makefile.inc b/payloads/libpayload/vboot/Makefile.inc index 9904fff7f1..bdc9ad2ad6 100644 --- a/payloads/libpayload/vboot/Makefile.inc +++ b/payloads/libpayload/vboot/Makefile.inc @@ -13,22 +13,25 @@ vboot-fixup-includes = $(filter -I$(coreboottop)/%, $(1)) \ $(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-y := mock +else +VBOOT_CFLAGS += $(call vboot-fixup-includes,$(CFLAGS)) +VBOOT_CFLAGS += -I$(abspath $(obj)) +endif + +ifeq ($(VBOOT_FIRMWARE_ARCH-y),) $(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 |