From be4cd40e8b91cb7f90109fb254c5540d57b12b0a Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Tue, 23 May 2017 23:45:01 +0900 Subject: Build: fix assert_boolean implementation The current assert_boolean does not work with variables assigned with '=' flavor instead of ':='. For example, FOO = $(BAR) BAR := 1 Here, $(value FOO) is evaluated to $(BAR), not 1. This is not what we expect. While I am here, I simplified the implementation. Signed-off-by: Masahiro Yamada --- make_helpers/build_macros.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'make_helpers') diff --git a/make_helpers/build_macros.mk b/make_helpers/build_macros.mk index 36f220e0..34d82c9a 100644 --- a/make_helpers/build_macros.mk +++ b/make_helpers/build_macros.mk @@ -54,7 +54,7 @@ endef # Convenience function for verifying option has a boolean value # $(eval $(call assert_boolean,FOO)) will assert FOO is 0 or 1 define assert_boolean - $(and $(patsubst 0,,$(value $(1))),$(patsubst 1,,$(value $(1))),$(error $(1) must be boolean)) + $(if $(filter-out 0 1,$($1)),$(error $1 must be boolean)) endef 0-9 := 0 1 2 3 4 5 6 7 8 9 -- cgit v1.2.3 From bb41eb7a9dc3e3b31df2e20237a2bcf1a3cae72a Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Mon, 22 May 2017 12:11:24 +0900 Subject: cert: move platform_oid.h to include/tools_share for all platforms Platforms aligned with TBBR are supposed to use their own OIDs, but defining the same macros with different OIDs does not provide any value (at least technically). For easier use of TBBR, this commit allows platforms to reuse the OIDs obtained by ARM Ltd. This will be useful for non-ARM vendors that do not need their own extension fields in their certificate files. The OIDs of ARM Ltd. have been moved to include/tools_share/tbbr_oid.h Platforms can include instead of by defining USE_TBBR_DEFS as 1. USE_TBBR_DEFS is 0 by default to keep the backward compatibility. For clarification, I inserted a blank line between headers from the include/ directory (#include <...>) and ones from a local directory (#include "..." ). Signed-off-by: Masahiro Yamada --- make_helpers/defaults.mk | 3 +++ 1 file changed, 3 insertions(+) (limited to 'make_helpers') diff --git a/make_helpers/defaults.mk b/make_helpers/defaults.mk index 18c41e05..a31e59c0 100644 --- a/make_helpers/defaults.mk +++ b/make_helpers/defaults.mk @@ -128,6 +128,9 @@ TRUSTED_BOARD_BOOT := 0 # Build option to choose whether Trusted firmware uses Coherent memory or not. USE_COHERENT_MEM := 1 +# Use tbbr_oid.h instead of platform_oid.h +USE_TBBR_DEFS = $(ERROR_DEPRECATED) + # Build verbosity V := 0 -- cgit v1.2.3