diff options
author | Simon Glass <sjg@chromium.org> | 2011-11-18 14:57:08 -0800 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2011-12-14 12:13:34 -0800 |
commit | 776e37efbbb881930332b06cd7e8b44551fda3f7 (patch) | |
tree | c1473b8099eebb6f14d26b0fdadd2efd78baafde /Makefile | |
parent | 4b7e793e368910dd7daaaa55689975e358c08ced (diff) |
Build vboot_reference-firmware library directly from U-Boot
To test this, add
VBOOT_SOURCE=/home/${USER}/trunk/src/platform/vboot_reference
to the make command line. You can also use MAKEFLAGS_VBOOT to pass
flags to the vboot Makefile.
BUG=chromium-os:20453
TEST=build using my script, see that it builds vboot also; emerge on seaboard
Change-Id: Iedf02b5d4601726142db26b5baa2a2792d143735
Reviewed-on: https://gerrit.chromium.org/gerrit/11954
Tested-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Commit-Ready: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 24 |
1 files changed, 23 insertions, 1 deletions
@@ -341,10 +341,31 @@ LDPPFLAGS += \ __OBJS := $(subst $(obj),,$(OBJS)) __LIBS := $(subst $(obj),,$(LIBS)) $(subst $(obj),,$(LIBBOARD)) + +ifdef VBOOT_SOURCE +# Go off and build vboot_reference directory with the same CFLAGS +# This is a eng convenience, not used by ebuilds +# set VBOOT_MAKEFLAGS to required make flags, e.g. MOCK_TPM=1 if no TPM +CFLAGS_VBOOT = $(filter-out -I%, $(CFLAGS)) + +# Always call the vboot Makefile, since we don't have its dependencies +.PHONY : vboot +vboot: + FIRMWARE_ARCH="$(ARCH)" CFLAGS="$(CFLAGS_VBOOT)" \ + $(MAKE) -C $(VBOOT_SOURCE) \ + BUILD=$(OBJTREE)/include/generated/vboot \ + $(MAKEFLAGS_VBOOT) + +__LIBS += $(obj)include/generated/vboot/vboot_fw.a +VBOOT_TARGET := vboot +endif + # Add vboot_reference lib ifdef VBOOT +ifndef VBOOT_SOURCE __LIBS += $(VBOOT)/lib/vboot_fw.a endif +endif ######################################################################### ######################################################################### @@ -449,7 +470,8 @@ GEN_UBOOT = \ --start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \ -Map u-boot.map -o u-boot $(obj)u-boot: depend \ - $(SUBDIRS) $(OBJS) $(LIBBOARD) $(LIBS) $(LDSCRIPT) $(obj)u-boot.lds + $(SUBDIRS) $(OBJS) $(LIBBOARD) $(LIBS) $(LDSCRIPT) \ + $(obj)u-boot.lds $(VBOOT_TARGET) $(GEN_UBOOT) ifeq ($(CONFIG_KALLSYMS),y) smap=`$(call SYSTEM_MAP,u-boot) | \ |