mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-10-29 16:28:47 +00:00
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:
@@ -45,17 +45,13 @@ update_config:
|
||||
ifeq ($(CONFIG_XML_ENABLED),true)
|
||||
@if [ ! -f $(UPDATE_RESULT) ]; then \
|
||||
mkdir -p $(dir $(UPDATE_RESULT));\
|
||||
if [ "$(TARGET_DIR)" = "" ]; then \
|
||||
python3 ../misc/acrn-config/board_config/board_cfg_gen.py --board $(BOARD_FILE) --scenario $(SCENARIO_FILE) > $(UPDATE_RESULT);\
|
||||
else \
|
||||
python3 ../misc/acrn-config/board_config/board_cfg_gen.py --board $(BOARD_FILE) --scenario $(SCENARIO_FILE) --out $(TARGET_DIR) > $(UPDATE_RESULT);\
|
||||
fi;\
|
||||
python3 ../misc/acrn-config/board_config/board_cfg_gen.py --board $(BOARD_FILE) --scenario $(SCENARIO_FILE) --out $(TARGET_DIR) > $(UPDATE_RESULT);\
|
||||
cat $(UPDATE_RESULT);\
|
||||
if [ "`sed -n /successfully/p $(UPDATE_RESULT)`" = "" ]; then rm -f $(UPDATE_RESULT); exit 1; fi;\
|
||||
if [ "$(TARGET_DIR)" = "" ]; then \
|
||||
python3 ../misc/acrn-config/scenario_config/scenario_cfg_gen.py --board $(BOARD_FILE) --scenario $(SCENARIO_FILE) > $(UPDATE_RESULT);\
|
||||
else \
|
||||
python3 ../misc/acrn-config/scenario_config/scenario_cfg_gen.py --board $(BOARD_FILE) --scenario $(SCENARIO_FILE) --out $(TARGET_DIR) > $(UPDATE_RESULT);\
|
||||
python3 ../misc/acrn-config/scenario_config/scenario_cfg_gen.py --board $(BOARD_FILE) --scenario $(SCENARIO_FILE) --out $(realpath $(TARGET_DIR)) > $(UPDATE_RESULT);\
|
||||
fi;\
|
||||
cat $(UPDATE_RESULT);\
|
||||
if [ "`sed -n /successfully/p $(UPDATE_RESULT)`" = "" ]; then rm -f $(UPDATE_RESULT); exit 1; fi;\
|
||||
|
||||
@@ -36,8 +36,8 @@ ifeq ($(shell [ $(HV_OBJDIR)/$(HV_CONFIG) -nt $(HV_OBJDIR)/$(HV_CONFIG_MK) ] &&
|
||||
# only happens when GNU make checks the prerequisites.
|
||||
-include $(HV_OBJDIR)/$(HV_CONFIG)
|
||||
endif
|
||||
$(eval $(call override_config,BOARD,apl-mrb))
|
||||
$(eval $(call override_config,SCENARIO,))
|
||||
$(eval $(call override_config,BOARD,nuc7i7dnb))
|
||||
$(eval $(call override_config,SCENARIO,industry))
|
||||
$(eval $(call override_config,RELEASE,y))
|
||||
|
||||
override RELEASE := $(CONFIG_RELEASE)
|
||||
@@ -68,18 +68,19 @@ $(HV_OBJDIR)/$(HV_CONFIG_H): $(HV_OBJDIR)/$(HV_CONFIG)
|
||||
.PHONY: defconfig
|
||||
defconfig: $(KCONFIG_DEPS)
|
||||
@mkdir -p $(HV_OBJDIR)
|
||||
@if ([ "$(KCONFIG_FILE)" == "" ] || ([ "$(KCONFIG_FILE)" != "" ] && [ ! -f $(KCONFIG_FILE) ])) && [ "$(CONFIG_XML_ENABLED)" != "true" ]; then \
|
||||
BOARD=$(CONFIG_BOARD) python3 $(KCONFIG_DIR)/defconfig.py Kconfig $(HV_OBJDIR)/$(HV_CONFIG); \
|
||||
@BOARD=$(CONFIG_BOARD) SCENARIO=$(CONFIG_SCENARIO); \
|
||||
if ([ "$(KCONFIG_FILE)" = "" ] || ([ "$(KCONFIG_FILE)" != "" ] && [ ! -f $(KCONFIG_FILE) ])) && [ "$(CONFIG_XML_ENABLED)" != "true" ]; then \
|
||||
python3 $(KCONFIG_DIR)/defconfig.py Kconfig $(HV_OBJDIR)/$(HV_CONFIG); \
|
||||
else \
|
||||
if [ "$(KCONFIG_FILE)" != "" ] && [ -f $(KCONFIG_FILE) ]; then \
|
||||
echo "Writing $(HV_OBJDIR)/$(HV_CONFIG) with $(KCONFIG_FILE)"; \
|
||||
cp $(KCONFIG_FILE) $(HV_OBJDIR)/$(HV_CONFIG); \
|
||||
elif [ "$(TARGET_DIR)" != "" ] && [ -d $(TARGET_DIR) ]; then \
|
||||
if [ ! -f $(TARGET_DIR)/$(BOARD).config ]; then \
|
||||
echo "Board defconfig file $(BOARD).config is not found under $(TARGET_DIR)."; exit 1; \
|
||||
if [ ! -f $(TARGET_DIR)/scenarios/$(SCENARIO)/$(BOARD)/$(BOARD).config ]; then \
|
||||
echo "Board defconfig file $(BOARD).config is not found under $(TARGET_DIR)/scenarios/$(SCENARIO)/$(BOARD)/."; exit 1; \
|
||||
fi; \
|
||||
echo "Writing $(HV_OBJDIR)/$(HV_CONFIG) with $(TARGET_DIR)/$(BOARD).config"; \
|
||||
cp $(TARGET_DIR)/$(BOARD).config $(HV_OBJDIR)/$(HV_CONFIG); \
|
||||
echo "Writing $(HV_OBJDIR)/$(HV_CONFIG) with $(BOARD_CFG_DIR)/$(BOARD).config"; \
|
||||
cp $(TARGET_DIR)/scenarios/$(SCENARIO)/$(BOARD)/$(BOARD).config $(HV_OBJDIR)/$(HV_CONFIG); \
|
||||
fi; \
|
||||
python3 $(KCONFIG_DIR)/silentoldconfig.py Kconfig $(HV_OBJDIR)/$(HV_CONFIG) RELEASE=$(RELEASE); \
|
||||
fi
|
||||
@@ -91,7 +92,7 @@ defconfig: $(KCONFIG_DEPS)
|
||||
.PHONY: oldconfig
|
||||
oldconfig: $(KCONFIG_DEPS)
|
||||
@mkdir -p $(HV_OBJDIR)
|
||||
@BOARD=$(CONFIG_BOARD) \
|
||||
@BOARD=$(CONFIG_BOARD) SCENARIO=$(CONFIG_SCENARIO) \
|
||||
python3 $(KCONFIG_DIR)/silentoldconfig.py Kconfig \
|
||||
$(HV_OBJDIR)/$(HV_CONFIG) \
|
||||
SCENARIO=$(CONFIG_SCENARIO) RELEASE=$(RELEASE)
|
||||
|
||||
Reference in New Issue
Block a user