HV: Make: enable build for new configs layout

The make command is same as old configs layout:

under acrn-hypervisor folder:
	make hypervisor BOARD=xxx SCENARIO=xxx [TARGET_DIR]=xxx [RELEASE=x]

under hypervisor folder:
	make BOARD=xxx SCENARIO=xxx [TARGET_DIR]=xxx [RELEASE=x]

if BOARD/SCENARIO parameter is not specified, the default will be:
	BOARD=nuc7i7dnb SCENARIO=industry

Tracked-On: #5077

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Victor Sun
2020-07-15 16:40:24 +08:00
committed by wenlingz
parent e792fa3d3c
commit a57a4fd7fb
11 changed files with 69 additions and 59 deletions

View File

@@ -21,6 +21,7 @@ def main():
sys.exit(1)
target_board = os.environ['BOARD']
target_scenario = os.environ['SCENARIO']
kconfig_path = sys.argv[1]
if not os.path.isfile(kconfig_path):
@@ -30,7 +31,7 @@ def main():
kconfig = kconfiglib.Kconfig(kconfig_path)
defconfig_path = kconfig.defconfig_filename
if not defconfig_path or not os.path.isfile(defconfig_path):
sys.stderr.write("No defconfig found for board %s.\n" % target_board)
sys.stderr.write("No defconfig found for BOARD %s on SCENARIO %s.\n" % (target_board, target_scenario))
sys.exit(1)
kconfig.load_config(defconfig_path)

View File

@@ -97,7 +97,8 @@ def main():
need_update = True
else:
# report an error if no known defconfig exists
sys.stderr.write(".config does not exist and no defconfig available for BOARD %s.\n" % os.environ['BOARD'])
sys.stderr.write(".config does not exist and no defconfig available for BOARD %s on SCENARIO %s.\n"
% (os.environ['BOARD'], os.environ['SCENARIO']))
sys.exit(1)
# Update the old .config with those specified on cmdline