summaryrefslogtreecommitdiff
path: root/Makefile.rules
diff options
context:
space:
mode:
authorSam Hurst <shurst@google.com>2017-03-15 10:36:06 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-05-03 23:17:46 -0700
commite13695c0175dcb7854de74ed7c69e6054b0481dc (patch)
treea66e832c8c080a99172e053b50fb0d9b6ad83427 /Makefile.rules
parent4444702e858a8fa3d51c948f509450e136a9482a (diff)
downloadchrome-ec-e13695c0175dcb7854de74ed7c69e6054b0481dc.tar.gz
pd: Support auto generation of USB Type-C VIF
Create an app to extract relevant information from the EC code base that's used to create Vendor Information Files (VIFs) needed for USB Type-C compliance testing. BUG=chromium:701852 BRANCH=none TEST=make -j buildall Compared generated VIFs to expected values Change-Id: I600ca78b9fb5d2de78aa65a58264c6f79b36ea17 Reviewed-on: https://chromium-review.googlesource.com/455280 Commit-Ready: Sam Hurst <shurst@google.com> Tested-by: Sam Hurst <shurst@google.com> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'Makefile.rules')
-rw-r--r--Makefile.rules10
1 files changed, 9 insertions, 1 deletions
diff --git a/Makefile.rules b/Makefile.rules
index d8bfd68bc7..5ab474ab78 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -12,6 +12,7 @@ BUILD_DIR := $(firstword $(subst /, ,$(out)))
build-utils := $(foreach u,$(build-util-bin),$(out)/util/$(u))
host-utils := $(foreach u,$(host-util-bin),$(out)/util/$(u))
+build-art := $(foreach u,$(build-util-art),$(out)/$(u))
build-srcs := $(foreach u,$(build-util-bin),$(sort $($(u)-objs:%.o=util/%.c) util/$(u).c))
host-srcs := $(foreach u,$(host-util-bin),$(sort $($(u)-objs:%.o=util/%.c) util/$(u).c))
@@ -82,6 +83,7 @@ cmd_cxx_to_host = $(HOSTCXX) -std=c++0x $(COMMON_WARN) $(HOST_CXXFLAGS)\
-I ./$($(notdir $@)_ROOT) -o $@ $(filter %.cc,$^) $($(notdir $@)_LIBS)
cmd_host_test = ./util/run_host_test $* $(silent)
cmd_version = ./util/getversion.sh > $@
+cmd_vif = $(out)/util/genvif -b $(BOARD) -o $(out)
cmd_mv_from_tmp = mv $(out)/$*.bin.tmp $(out)/$*.bin
cmd_extractrw-y = dd if=$(out)/$(PROJECT).bin.tmp of=$(out)/$(PROJECT).RW.bin \
bs=1 count=$(_rw_size) skip=$(_rw_off) $(silent_err)
@@ -172,6 +174,9 @@ hex-y := $(out)/RO/$(PROJECT).RO.hex $(out)/RW/$(PROJECT).RW.hex $(out)/$(PROJEC
hex: $(hex-y)
.PHONY: hex
+.PHONY: utils-art
+utils-art: $(build-art)
+
.PHONY: utils-host
utils-host: $(host-utils)
@@ -179,7 +184,7 @@ utils-host: $(host-utils)
utils-build: $(build-utils)
.PHONY: utils
-utils: utils-host utils-build
+utils: utils-host utils-build utils-art
# On board test binaries
test-targets=$(foreach t,$(test-list-y),test-$(t))
@@ -279,6 +284,9 @@ $(out)/%.bin: $(out)/%.obj
$(call quiet,copyrw-y,COPY_RW))
$(call quiet,mv_from_tmp,MV )
+$(out)/$(BOARD)_vif.txt: $(out)/util/genvif
+ $(call quiet,vif,VIF )
+
flat-y := $(out)/RW/$(PROJECT).RW.flat
flat-$(CONFIG_FW_INCLUDE_RO) += $(out)/RO/$(PROJECT).RO.flat