summaryrefslogtreecommitdiff
path: root/util/build.mk
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2017-10-03 18:28:57 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-01-18 05:09:30 -0800
commitc62060d9d987285c541c58e752c51d18bd7162a2 (patch)
tree0a7f9d69d003f508d36489c7bef80a143266c0c0 /util/build.mk
parent6e3e0f87b1384b7adaece5d37887b96b0fdf89dd (diff)
downloadchrome-ec-c62060d9d987285c541c58e752c51d18bd7162a2.tar.gz
CBI: Add cbi-util
cbi-util is a build command line tool, which creates a blob containing board information. When invoked with '--show' option, it prints the information stored in a blob and validates the data. BUG=b:70294260 BRANCH=none TEST=Run the command as follows: $ cbi-util --create /path/to/cbi.bin \ --board_version 0xabcd --oem_id 2 --sku_id 3 --size 256 $ cbi-util --show /path/to/cbi.bin CBI blob: /path/to/cbi.bin BOARD_VERSION: 0.1 (0xab.cd) OEM_ID: 2 (0x02) SKU_ID: 3 (0x03) Data validated successfully $ cbi-util --create /path/to/cbi.bin \ --board_version 0xabcd --oem_id 2 --sku_id 3 Missing required arguments $ cbi-util --create /path/to/cbi.bin --board_version 0xabcde Invalid --board_version Change-Id: I7e7b439c50943523039c3cafda3bdf7d08962c61 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/860961 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'util/build.mk')
-rw-r--r--util/build.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/util/build.mk b/util/build.mk
index e92f76a8e7..eccea4f7c9 100644
--- a/util/build.mk
+++ b/util/build.mk
@@ -57,6 +57,12 @@ $(out)/util/gen_touchpad_hash: BUILD_CFLAGS += $(OPENSSL_CFLAGS)
$(out)/util/gen_touchpad_hash: BUILD_LDFLAGS += $(OPENSSL_LDFLAGS)
endif # CONFIG_TOUCHPAD_VIRTUAL_OFF
+build-util-bin += cbi-util
+$(out)/util/cbi-util: $(out)/util/crc8.o
+$(out)/util/cbi-util: BUILD_LDFLAGS=$(out)/util/crc8.o -static
+$(out)/util/crc8.o: common/crc8.c
+ $(call quiet,c_to_vif,BUILDCC)
+
$(out)/util/export_taskinfo.so: $(out)/util/export_taskinfo_ro.o \
$(out)/util/export_taskinfo_rw.o
$(call quiet,link_taskinfo,BUILDLD)