From 9e7c12b74e96ca123865b0ac4ca96b32aad548a7 Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Tue, 13 Sep 2016 12:42:40 -0700 Subject: [PATCH] Cr50: #define CR50_DEV in source when used manually We want the default build to be ready for production use, without any unlocked security features, development-only tests, etc. Running "make buildall" or "make BOARD=cr50" builds the default (production) image. To build a development image, use CR50_DEV=1 make BOARD=cr50 This CL adds "-DCR50_DEV=$(CR50_DEV)" to the CFLAGS for use in compiled code. BUG=chrome-os-partner:55557 BRANCH=none TEST=make buildall Verify that #ifdef CR50_DEV [stuff] #endif works inside C code. Change-Id: Id5e16e9ba0135828f4365fc1ac4a23384f30ba01 Signed-off-by: Bill Richardson Reviewed-on: https://chromium-review.googlesource.com/385059 Reviewed-by: Vadim Bendebury --- chip/g/build.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/chip/g/build.mk b/chip/g/build.mk index ed5c62ccbe..9d34bf0f07 100644 --- a/chip/g/build.mk +++ b/chip/g/build.mk @@ -106,6 +106,7 @@ CR50_RW_KEY = loader-testkey-A.pem SIGNER = $(out)/util/signer SIGNER_EXTRAS = else +CFLAGS += -DCR50_DEV=1 SIGNER = $(HOME)/bin/codesigner CR50_RW_KEY = cr50_rom0-dev-blsign.pem.pub RW_SIGNER_EXTRAS = -x util/signer/fuses.xml