From c507acb6ab5147b69e46f20d431c7da04e549ceb Mon Sep 17 00:00:00 2001 From: Junjie Mao Date: Sun, 28 Feb 2021 11:21:35 +0800 Subject: [PATCH] Makefile: do not define default BOARD/SCENARIO in top-level Makefile The top-level Makefile should not define any default value as the hypervisor may have its own configurations set by previous builds. This patch also changes the hypervisor default RELEASE to `n`. Tracked-On: #5772 Signed-off-by: Junjie Mao --- Makefile | 10 ---------- hypervisor/scripts/makefile/config.mk | 9 ++++++++- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 942026aa2..e02a5414d 100644 --- a/Makefile +++ b/Makefile @@ -63,16 +63,6 @@ else endif endif -BOARD ?= kbl-nuc-i7 - -ifeq ($(BOARD), apl-nuc) - override BOARD := nuc6cayh -else ifeq ($(BOARD), kbl-nuc-i7) - override BOARD := nuc7i7dnb -endif - -SCENARIO ?= industry - O ?= build ROOT_OUT := $(shell mkdir -p $(O);cd $(O);pwd) HV_OUT := $(ROOT_OUT)/hypervisor diff --git a/hypervisor/scripts/makefile/config.mk b/hypervisor/scripts/makefile/config.mk index 323a3be09..3b08de168 100644 --- a/hypervisor/scripts/makefile/config.mk +++ b/hypervisor/scripts/makefile/config.mk @@ -141,6 +141,13 @@ ifdef RELEASE endif endif +# Backward-compatibility for BOARD=apl-nuc or BOARD=kbl-nuc +ifeq ($(BOARD), apl-nuc) + override BOARD := nuc6cayh +else ifeq ($(BOARD), kbl-nuc-i7) + override BOARD := nuc7i7dnb +endif + ifeq ($(findstring $(MAKECMDGOALS),distclean),) -include $(HV_CONFIG_MK) endif @@ -181,7 +188,7 @@ endif $(eval $(call determine_config,BOARD,nuc7i7dnb)) $(eval $(call determine_config,SCENARIO,industry)) -$(eval $(call determine_build_type,y)) +$(eval $(call determine_build_type,n)) $(HV_BOARD_XML): @if [ ! -f $(HV_BOARD_XML) ]; then \