Paul Kocialkowski (contact@paulk.fr) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15825
-gerrit
commit bd23a14aa5a4a7ec4464b39df5ba2d5f6d5fcf60 Author: Paul Kocialkowski contact@paulk.fr Date: Sun Jul 24 12:14:38 2016 +0200
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 --- payloads/external/depthcharge/Makefile | 7 ++++--- src/vendorcode/google/chromeos/Kconfig | 10 +++++----- util/cbfstool/Makefile | 2 ++ util/cbfstool/Makefile.inc | 6 +++--- 4 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/payloads/external/depthcharge/Makefile b/payloads/external/depthcharge/Makefile index cf2d0a1..edc48f8 100644 --- a/payloads/external/depthcharge/Makefile +++ b/payloads/external/depthcharge/Makefile @@ -8,7 +8,8 @@ project_config_file=$(project_dir)/.config output_dir=$(project_dir)/build libpayload_dir=$(abspath $(CURDIR)/../../libpayload) 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_STABLE)=$(STABLE_COMMIT_ID) @@ -55,12 +56,12 @@ config: $(libpayload_install_dir) checkout git describe --tags --long --dirty 2>/dev/null || \ echo "unknown") ; \ cd $(project_dir) && $(MAKE) BOARD=$(BOARD) LIBPAYLOAD_DIR=$(libpayload_install_dir)/libpayload \ - VB_SOURCE=$(vboot_dir) defconfig + VB_SOURCE=$(VBOOT_SOURCE) defconfig
build: config echo " MAKE $(project_name) $(TAG-y)" 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: test -d $(output_dir) && rm -rf $(output_dir) || exit 0 diff --git a/src/vendorcode/google/chromeos/Kconfig b/src/vendorcode/google/chromeos/Kconfig index 1b71553..c3f9094 100644 --- a/src/vendorcode/google/chromeos/Kconfig +++ b/src/vendorcode/google/chromeos/Kconfig @@ -193,23 +193,23 @@ endmenu # GBB menu "Vboot Keys" config VBOOT_ROOT_KEY string "Root key (public)" - default "3rdparty/vboot/tests/devkeys/root_key.vbpubk" + default "$(VBOOT_SOURCE)/tests/devkeys/root_key.vbpubk"
config VBOOT_RECOVERY_KEY string "Recovery key (public)" - default "3rdparty/vboot/tests/devkeys/recovery_key.vbpubk" + default "$(VBOOT_SOURCE)/tests/devkeys/recovery_key.vbpubk"
config VBOOT_FIRMWARE_PRIVKEY 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 string "Kernel subkey (public)" - default "3rdparty/vboot/tests/devkeys/kernel_subkey.vbpubk" + default "$(VBOOT_SOURCE)/tests/devkeys/kernel_subkey.vbpubk"
config VBOOT_KEYBLOCK 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 int "Keyblock version number" diff --git a/util/cbfstool/Makefile b/util/cbfstool/Makefile index 3204857..d6249bc 100644 --- a/util/cbfstool/Makefile +++ b/util/cbfstool/Makefile @@ -6,6 +6,8 @@ CONFIG_FMD_GENPARSER ?= n HOSTCC ?= $(CC) OBJCOPY ?= objcopy
+VBOOT_SOURCE ?= $(top)/3rdparty/vboot + .PHONY: all all: cbfstool fmaptool rmodtool ifwitool
diff --git a/util/cbfstool/Makefile.inc b/util/cbfstool/Makefile.inc index 8c9a2c0..d666f6a 100644 --- a/util/cbfstool/Makefile.inc +++ b/util/cbfstool/Makefile.inc @@ -72,8 +72,8 @@ TOOLCPPFLAGS += -I$(top)/util/cbfstool TOOLCPPFLAGS += -I$(objutil)/cbfstool TOOLCPPFLAGS += -I$(top)/src/commonlib/include TOOLCPPFLAGS += -DNEED_VB2_SHA_LIBRARY -TOOLCPPFLAGS += -I$(top)/3rdparty/vboot/firmware/include -TOOLCPPFLAGS += -I$(top)/3rdparty/vboot/firmware/2lib/include +TOOLCPPFLAGS += -I$(VBOOT_SOURCE)/firmware/include +TOOLCPPFLAGS += -I$(VBOOT_SOURCE)/firmware/2lib/include # UEFI header file support. It's not pretty, but that's what we currently # have right now. TOOLCPPFLAGS += -I$(top)/src @@ -112,7 +112,7 @@ $(objutil)/cbfstool/%.o: $(top)/util/cbfstool/lzma/C/%.c printf " HOSTCC $(subst $(objutil)/,,$(@))\n" $(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" $(HOSTCC) $(TOOLCPPFLAGS) $(TOOLCFLAGS) $(HOSTCFLAGS) -c -o $@ $<