diff --git a/hypervisor/Makefile b/hypervisor/Makefile index 86f68ee18..cd49ae28c 100644 --- a/hypervisor/Makefile +++ b/hypervisor/Makefile @@ -433,7 +433,7 @@ $(HV_ACPI_TABLE_TIMESTAMP): $(HV_CONFIG_TIMESTAMP) python3 ../misc/config_tools/acpi_gen/bin_gen.py --board $(HV_BOARD_XML) --scenario $(HV_SCENARIO_XML) --asl $(HV_CONFIG_DIR) --out $(HV_OBJDIR) --iasl_path $(ASL_COMPILER) --iasl_min_ver $(IASL_MIN_VER) @touch $(HV_ACPI_TABLE_TIMESTAMP) -$(SERIAL_CONF): $(HV_CONFIG_TIMESTAMP) +$(SERIAL_CONF): $(HV_CONFIG_TIMESTAMP) $(HV_ALLOCATION_XML) @echo "generate the serial configuration file for service VM ..." python3 ../misc/config_tools/service_vm_config/serial_config.py --allocation $(HV_ALLOCATION_XML) --scenario $(HV_SCENARIO_XML) --out $(SERIAL_CONF) diff --git a/hypervisor/scripts/genconf.sh b/hypervisor/scripts/genconf.sh index dfdd7a222..c9efbcc93 100644 --- a/hypervisor/scripts/genconf.sh +++ b/hypervisor/scripts/genconf.sh @@ -22,12 +22,11 @@ apply_patch () { tool_dir=${base_dir}/../misc/config_tools diffconfig_list=${out}/.diffconfig -python3 ${tool_dir}/scenario_config/validator.py ${board_xml} ${scenario_xml} && python3 ${tool_dir}/board_config/board_cfg_gen.py --board ${board_xml} --scenario ${scenario_xml} --out ${out} && python3 ${tool_dir}/acpi_gen/asl_gen.py --board ${board_xml} --scenario ${scenario_xml} --out ${out} - -if [ $? -ne 0 ]; then - exit $? +exitcode=$? +if [ $exitcode -ne 0 ]; then + exit $exitcode fi if ! which xsltproc ; then diff --git a/hypervisor/scripts/makefile/config.mk b/hypervisor/scripts/makefile/config.mk index 26854e464..63fb88b12 100644 --- a/hypervisor/scripts/makefile/config.mk +++ b/hypervisor/scripts/makefile/config.mk @@ -127,7 +127,8 @@ HV_ALLOCATION_XML := $(HV_CONFIG_DIR)/allocation.xml HV_UNIFIED_XML := $(HV_CONFIG_DIR)/unified.xml HV_CONFIG_H := $(HV_OBJDIR)/include/config.h HV_CONFIG_MK := $(HV_CONFIG_DIR)/config.mk -HV_CONFIG_TIMESTAMP := $(HV_CONFIG_DIR)/.timestamp +HV_VALIDATION_TIMESTAMP := $(HV_CONFIG_DIR)/.validation.timestamp +HV_CONFIG_TIMESTAMP := $(HV_CONFIG_DIR)/.configfiles.timestamp HV_DIFFCONFIG_LIST := $(HV_CONFIG_DIR)/.diffconfig # Directory containing generated configuration sources for diffconfig @@ -219,7 +220,7 @@ $(HV_SCENARIO_XML): # A unified XML is generated to include board and scenario XML files so that XSLT scripts have access to both for # generating source files. -$(HV_ALLOCATION_XML): $(HV_BOARD_XML) $(HV_SCENARIO_XML) | $(HV_CONFIG_DIR) +$(HV_ALLOCATION_XML): $(HV_BOARD_XML) $(HV_SCENARIO_XML) $(HV_VALIDATION_TIMESTAMP) | $(HV_CONFIG_DIR) @python3 $(HV_CONFIG_TOOL_DIR)/static_allocators/main.py --board $(HV_BOARD_XML) --scenario $(HV_SCENARIO_XML) --output $(HV_ALLOCATION_XML) @echo "$@ generated" @@ -238,7 +239,12 @@ $(HV_CONFIG_H): $(HV_UNIFIED_XML) @xsltproc -o $@ --xinclude --xincludestyle $(HV_CONFIG_XFORM_DIR)/config.h.xsl $< @echo "$@ generated" -$(HV_CONFIG_TIMESTAMP): $(HV_UNIFIED_XML) ${HV_DIFFCONFIG_LIST} | $(HV_CONFIG_DIR) +$(HV_VALIDATION_TIMESTAMP): $(HV_BOARD_XML) $(HV_SCENARIO_XML) | $(HV_CONFIG_DIR) + @echo "Validating scenario configurations..." + @python3 $(HV_CONFIG_TOOL_DIR)/scenario_config/validator.py $(HV_BOARD_XML) $(HV_SCENARIO_XML) + @touch $@ + +$(HV_CONFIG_TIMESTAMP): $(HV_VALIDATION_TIMESTAMP) $(HV_UNIFIED_XML) ${HV_DIFFCONFIG_LIST} | $(HV_CONFIG_DIR) @sh $(BASEDIR)/scripts/genconf.sh $(BASEDIR) $(HV_BOARD_XML) $(HV_SCENARIO_XML) $(HV_CONFIG_DIR) $(HV_UNIFIED_XML) @touch $@ @@ -287,7 +293,7 @@ else endif endif -$(HV_DIFFCONFIG_LIST): +$(HV_DIFFCONFIG_LIST): | $(HV_CONFIG_DIR) @touch $@ menuconfig: