Use VBOOT_SOURCE instead of hardcoding vboot path

This replaces all occurrences of a hardcoded vboot path to the
VBOOT_SOURCE variable, that may be overridden from the command line,
witch fallback to the source from 3rdparty.

Change-Id: Ia57d498d38719cc71e17060b76b0162c4ab363ed
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-on: https://review.coreboot.org/15825
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
This commit is contained in:
Paul Kocialkowski 2016-07-24 12:14:38 +02:00 committed by Patrick Georgi
parent 5d41949782
commit 61486b506d
4 changed files with 14 additions and 11 deletions

View File

@ -8,7 +8,8 @@ project_config_file=$(project_dir)/.config
output_dir=$(project_dir)/build output_dir=$(project_dir)/build
libpayload_dir=$(abspath $(CURDIR)/../../libpayload) libpayload_dir=$(abspath $(CURDIR)/../../libpayload)
libpayload_install_dir=$(output_dir)/lp_$(BOARD) libpayload_install_dir=$(output_dir)/lp_$(BOARD)
vboot_dir=$(abspath $(CURDIR)/../../../3rdparty/vboot)
VBOOT_SOURCE ?= $(abspath $(CURDIR)/../../../3rdparty/vboot)
TAG-$(DEPTHCHARGE_MASTER)=origin/master TAG-$(DEPTHCHARGE_MASTER)=origin/master
TAG-$(DEPTHCHARGE_STABLE)=$(STABLE_COMMIT_ID) TAG-$(DEPTHCHARGE_STABLE)=$(STABLE_COMMIT_ID)
@ -55,12 +56,12 @@ config: $(libpayload_install_dir) checkout
git describe --tags --long --dirty 2>/dev/null || \ git describe --tags --long --dirty 2>/dev/null || \
echo "unknown") ; \ echo "unknown") ; \
cd $(project_dir) && $(MAKE) BOARD=$(BOARD) LIBPAYLOAD_DIR=$(libpayload_install_dir)/libpayload \ cd $(project_dir) && $(MAKE) BOARD=$(BOARD) LIBPAYLOAD_DIR=$(libpayload_install_dir)/libpayload \
VB_SOURCE=$(vboot_dir) defconfig VB_SOURCE=$(VBOOT_SOURCE) defconfig
build: config build: config
echo " MAKE $(project_name) $(TAG-y)" echo " MAKE $(project_name) $(TAG-y)"
cd $(project_dir) && $(MAKE) BOARD=$(BOARD) LIBPAYLOAD_DIR=$(libpayload_install_dir)/libpayload \ cd $(project_dir) && $(MAKE) BOARD=$(BOARD) LIBPAYLOAD_DIR=$(libpayload_install_dir)/libpayload \
VB_SOURCE=$(vboot_dir) PATH="$(abspath ../../../build/util/cbfstool):$$PATH" depthcharge_unified VB_SOURCE=$(VBOOT_SOURCE) PATH="$(abspath ../../../build/util/cbfstool):$$PATH" depthcharge_unified
clean: clean:
test -d $(output_dir) && rm -rf $(output_dir) || exit 0 test -d $(output_dir) && rm -rf $(output_dir) || exit 0

View File

@ -193,23 +193,23 @@ endmenu # GBB
menu "Vboot Keys" menu "Vboot Keys"
config VBOOT_ROOT_KEY config VBOOT_ROOT_KEY
string "Root key (public)" string "Root key (public)"
default "3rdparty/vboot/tests/devkeys/root_key.vbpubk" default "$(VBOOT_SOURCE)/tests/devkeys/root_key.vbpubk"
config VBOOT_RECOVERY_KEY config VBOOT_RECOVERY_KEY
string "Recovery key (public)" string "Recovery key (public)"
default "3rdparty/vboot/tests/devkeys/recovery_key.vbpubk" default "$(VBOOT_SOURCE)/tests/devkeys/recovery_key.vbpubk"
config VBOOT_FIRMWARE_PRIVKEY config VBOOT_FIRMWARE_PRIVKEY
string "Firmware key (private)" string "Firmware key (private)"
default "3rdparty/vboot/tests/devkeys/firmware_data_key.vbprivk" default "$(VBOOT_SOURCE)/tests/devkeys/firmware_data_key.vbprivk"
config VBOOT_KERNEL_KEY config VBOOT_KERNEL_KEY
string "Kernel subkey (public)" string "Kernel subkey (public)"
default "3rdparty/vboot/tests/devkeys/kernel_subkey.vbpubk" default "$(VBOOT_SOURCE)/tests/devkeys/kernel_subkey.vbpubk"
config VBOOT_KEYBLOCK config VBOOT_KEYBLOCK
string "Keyblock to use for the RW regions" string "Keyblock to use for the RW regions"
default "3rdparty/vboot/tests/devkeys/firmware.keyblock" default "$(VBOOT_SOURCE)/tests/devkeys/firmware.keyblock"
config VBOOT_KEYBLOCK_VERSION config VBOOT_KEYBLOCK_VERSION
int "Keyblock version number" int "Keyblock version number"

View File

@ -6,6 +6,8 @@ CONFIG_FMD_GENPARSER ?= n
HOSTCC ?= $(CC) HOSTCC ?= $(CC)
OBJCOPY ?= objcopy OBJCOPY ?= objcopy
VBOOT_SOURCE ?= $(top)/3rdparty/vboot
.PHONY: all .PHONY: all
all: cbfstool fmaptool rmodtool ifwitool all: cbfstool fmaptool rmodtool ifwitool

View File

@ -72,8 +72,8 @@ TOOLCPPFLAGS += -I$(top)/util/cbfstool
TOOLCPPFLAGS += -I$(objutil)/cbfstool TOOLCPPFLAGS += -I$(objutil)/cbfstool
TOOLCPPFLAGS += -I$(top)/src/commonlib/include TOOLCPPFLAGS += -I$(top)/src/commonlib/include
TOOLCPPFLAGS += -DNEED_VB2_SHA_LIBRARY TOOLCPPFLAGS += -DNEED_VB2_SHA_LIBRARY
TOOLCPPFLAGS += -I$(top)/3rdparty/vboot/firmware/include TOOLCPPFLAGS += -I$(VBOOT_SOURCE)/firmware/include
TOOLCPPFLAGS += -I$(top)/3rdparty/vboot/firmware/2lib/include TOOLCPPFLAGS += -I$(VBOOT_SOURCE)/firmware/2lib/include
# UEFI header file support. It's not pretty, but that's what we currently # UEFI header file support. It's not pretty, but that's what we currently
# have right now. # have right now.
TOOLCPPFLAGS += -I$(top)/src TOOLCPPFLAGS += -I$(top)/src
@ -112,7 +112,7 @@ $(objutil)/cbfstool/%.o: $(top)/util/cbfstool/lzma/C/%.c
printf " HOSTCC $(subst $(objutil)/,,$(@))\n" printf " HOSTCC $(subst $(objutil)/,,$(@))\n"
$(HOSTCC) $(TOOLCPPFLAGS) $(TOOLCFLAGS) $(HOSTCFLAGS) -c -o $@ $< $(HOSTCC) $(TOOLCPPFLAGS) $(TOOLCFLAGS) $(HOSTCFLAGS) -c -o $@ $<
$(objutil)/cbfstool/%.o: $(top)/3rdparty/vboot/firmware/2lib/%.c $(objutil)/cbfstool/%.o: $(VBOOT_SOURCE)/firmware/2lib/%.c
printf " HOSTCC $(subst $(objutil)/,,$(@))\n" printf " HOSTCC $(subst $(objutil)/,,$(@))\n"
$(HOSTCC) $(TOOLCPPFLAGS) $(TOOLCFLAGS) $(HOSTCFLAGS) -c -o $@ $< $(HOSTCC) $(TOOLCPPFLAGS) $(TOOLCFLAGS) $(HOSTCFLAGS) -c -o $@ $<