summaryrefslogtreecommitdiff
path: root/Makefile.toolchain
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2015-08-22 20:23:23 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-08-25 21:31:33 +0000
commit9005ddd4bc79e01206899b31b85fce589dbba0b1 (patch)
treee9918eb83e61a57da574d49a919f312ef8dca58d /Makefile.toolchain
parentd9a614826b524c212b1ce449141a8af047178b38 (diff)
downloadchrome-ec-9005ddd4bc79e01206899b31b85fce589dbba0b1.tar.gz
cr50: add plumbing for signing CR50 RO images
The signer utility needs to be built and the flat image needs to be signed. The signer utility is written in C++, supporting this required adding a new make command to Makefile.rules and a build file for the utility. The signing now needs to be a part of generating the .flat file. To achieve this an alternative set of rules is defined in Makfile.rules for targets where RO image needs to be signed. Rules for converting elf to hex have been consolidated as there is no need to omit the --set-section-flags when it does not apply. BRANCH=none BUG=chrome-os-partner:43025 TEST=as follows: - ran 'rm build/cr50; make BOARD=cr50' - observed that both build/cr50/ec.bin and build/cr50/RO/ec.RO.flat have the required signature header in the first 1024 bytes. - verified that the cr50 board can be booted over SPI using the image in build/cr50/RO/ec.RO.flat Change-Id: Iacc22561de67fadfaf8e049bf9578cbd08cfad86 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/295291 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'Makefile.toolchain')
-rw-r--r--Makefile.toolchain11
1 files changed, 7 insertions, 4 deletions
diff --git a/Makefile.toolchain b/Makefile.toolchain
index 9b317c89e3..9f20faff67 100644
--- a/Makefile.toolchain
+++ b/Makefile.toolchain
@@ -18,11 +18,14 @@ OBJDUMP=$(CROSS_COMPILE)objdump
PKG_CONFIG?=pkg-config
BUILDCC?=gcc
HOSTCC?=$(HOST_CROSS_COMPILE)gcc
+HOSTCXX?=$(HOST_CROSS_COMPILE)g++
-CFLAGS_WARN=-Wall -Werror -Wundef -Wstrict-prototypes -Wno-trigraphs \
- -fno-strict-aliasing -fno-common \
- -Werror-implicit-function-declaration -Wno-format-security \
- -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow
+C_WARN = -Wstrict-prototypes -Wdeclaration-after-statement -Wno-pointer-sign
+COMMON_WARN = -Wall -Werror -Wundef -Wno-trigraphs -fno-strict-aliasing \
+ -fno-common -Werror-implicit-function-declaration \
+ -Wno-format-security -fno-strict-overflow
+CFLAGS_WARN = $(COMMON_WARN) $(C_WARN)
+CXXFLAGS_WARN = $(COMMON_WARN)
CFLAGS_DEBUG= -g
CFLAGS_INCLUDE=$(foreach i,$(includes),-I$(i) ) -I.
CFLAGS_TEST=$(if $(TEST_BUILD),-DTEST_BUILD \