From e4996870081fa1de9dc56b752bf31f5692c3d20d Mon Sep 17 00:00:00 2001 From: Jeremy Bettis Date: Mon, 18 Jul 2022 11:53:25 -0600 Subject: ec: Fix kconfig_check usage in makefile BRANCH=None BUG=b:239199935 TEST=make -j$(nproc) buildall && echo SUCCESS TEST=git commit --allow-empty ./util/compare_build.sh -b dartmonkey ./util/compare_build.sh -b all Signed-off-by: Jeremy Bettis Change-Id: I845ca84920af1ca33457b79fe2a3892867ed693c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3767853 Commit-Queue: Jeremy Bettis Tested-by: Jeremy Bettis Auto-Submit: Jeremy Bettis Commit-Queue: Jack Rosenthal Reviewed-by: Jack Rosenthal --- Makefile.rules | 11 +++++++---- util/compare_build.sh | 2 ++ util/config_allowed.txt | 9 +++++++++ 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/Makefile.rules b/Makefile.rules index ab3281a0b7..0a09f78b45 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -233,6 +233,11 @@ print-boards: $(call cmd_pretty_print_list,\ $(sort $(boards))) +# The zephyr path can be overridden on invocation, as in the following example: +# $ make ZEPHYR_BASE=~/zephyr/main BOARD=dartmonkey +ZEPHYR_BASE ?= $(abspath ../../../src/third_party/zephyr/main) +export ZEPHYR_BASE + ifeq ($(ALLOW_CONFIG),) # These are options defined by both ECOS and Zephyr. We need to tolerate this @@ -254,11 +259,9 @@ conflicting_options := \ SPI \ UART_CONSOLE -cmd_check_allowed = \ - ZEPHYR_BASE=$(abspath ../../../src/third_party/zephyr/main) \ - ./util/kconfig_check.py -c ${config} \ +cmd_check_allowed = ./util/kconfig_check.py -c ${config} \ -a util/config_allowed.txt -p PLATFORM_EC_ -s zephyr/ \ - -I $(abspath ../../../src/third_party/zephyr/main) \ + -I "${ZEPHYR_BASE}" \ $(foreach opt,$(conflicting_options),-i $(opt)) check else cmd_check_allowed = true diff --git a/util/compare_build.sh b/util/compare_build.sh index 1b6030453a..c47a951ea8 100755 --- a/util/compare_build.sh +++ b/util/compare_build.sh @@ -216,6 +216,7 @@ echo "# Preparing Makefile" cat > "${TMP_DIR}/Makefile" <