From e57ad3fd2fda19896beda186b717d14edde2f93a Mon Sep 17 00:00:00 2001 From: Victor Sun Date: Thu, 16 Apr 2020 09:54:43 +0800 Subject: [PATCH] Makefile: disable KCONFIG_FILE when build from xml The SCENARIO xml file already includes all information of KCONFIG file, use KCONFIG_FILE/SCENARIO_FILE parameter at same time would introduce conflict so this case should be invalid. Tracked-On: #4616 Signed-off-by: Victor Sun --- Makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 0c2ed31eb..9f888c9da 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,6 @@ TARGET_DIR ?= # 2. make KCONFIG_FILE=xxx [TARGET_DIR=xxx] # 3. make BOARD=xxx SCENARIO=xxx [TARGET_DIR=xxx] # 4. make BOARD_FILE=xxx SCENARIO_FILE=xxx [TARGET_DIR=xxx] -# 5. make KCONFIG_FILE=xxx BOARD_FILE=xxx SCENARIO_FILE=xxx [TARGET_DIR=xxx] # # Especially for case 1 that no any parameters are specified: # a. If hypervisor/build/.config file which generated by "make menuconfig" exist, @@ -25,7 +24,7 @@ TARGET_DIR ?= # i.e. equal: make BOARD=$(BOARD) SCENARIO=$(SCENARIO) # # For case 2/3, configurations are imported from TARGET_DIR when TARGET_DIR is specified; -# For case 4/5, configurations are from XML files and saved to TARGET_DIR if it is specified; +# For case 4, configurations are from XML files and saved to TARGET_DIR if it is specified; # # The grep process did not handle corner case when '#' is manually put right after config value as comments, # i.e. it will be failed in the case of "CONFIG_XXX=y # some comments here " @@ -67,7 +66,11 @@ endif ifeq ($(KCONFIG_FILE), $(wildcard $(KCONFIG_FILE))) ifneq ($(BOARD)$(SCENARIO),) - $(error BOARD/SCENARIO parameter could not coexist with KCONFIG_FILE) + $(error BOARD/SCENARIO parameter could not coexist with Kconfig file: $(KCONFIG_FILE)) + endif + + ifneq ($(BOARD_FILE)$(SCENARIO_FILE),) + $(error BOARD_FILE/SCENARIO_FILE parameter could not coexist with Kconfig file: $(KCONFIG_FILE)) endif BOARD_IN_KCONFIG := $(shell grep CONFIG_BOARD= $(KCONFIG_FILE) | grep -v '\#' | awk -F '"' '{print $$2}') @@ -169,6 +172,8 @@ hypervisor: fi #endif @echo -e "\n\033[47;30mACRN Configuration Summary:\033[0m \nBOARD = $(BOARD)\t SCENARIO = $(SCENARIO)" > $(HV_CFG_LOG); \ + echo -e "BUILD type = \c" >> $(HV_CFG_LOG); \ + if [ "$(RELEASE)" = "0" ]; then echo -e "DEBUG" >> $(HV_CFG_LOG); else echo -e "RELEASE" >> $(HV_CFG_LOG); fi; \ if [ -f $(KCONFIG_FILE) ]; then \ echo -e "Hypervisor configuration is based on:\n\tKconfig file:\t$(KCONFIG_FILE);" >> $(HV_CFG_LOG); \ fi; \