mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-11 13:49:39 +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:
46
Makefile
46
Makefile
@@ -3,7 +3,6 @@
|
|||||||
# global helper variables
|
# global helper variables
|
||||||
T := $(CURDIR)
|
T := $(CURDIR)
|
||||||
|
|
||||||
# $(TARGET_DIR) must be relative path under $(T)
|
|
||||||
TARGET_DIR ?=
|
TARGET_DIR ?=
|
||||||
|
|
||||||
# BOARD/SCENARIO/BOARD_FILE/SCENARIO_FILE/KCONFIG_FILE parameters sanity check:
|
# BOARD/SCENARIO/BOARD_FILE/SCENARIO_FILE/KCONFIG_FILE parameters sanity check:
|
||||||
@@ -44,12 +43,15 @@ ifneq ($(BOARD)$(SCENARIO),)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(BOARD_FILE)$(SCENARIO_FILE),)
|
|
||||||
ifneq ($(TARGET_DIR),)
|
ifneq ($(TARGET_DIR),)
|
||||||
ifneq ($(TARGET_DIR), $(wildcard $(TARGET_DIR)))
|
CFG_DIR := $(realpath $(TARGET_DIR))
|
||||||
|
ifeq ($(CFG_DIR),)
|
||||||
|
ifeq ($(BOARD_FILE)$(SCENARIO_FILE),)
|
||||||
$(error TARGET_DIR $(TARGET_DIR) does not exist)
|
$(error TARGET_DIR $(TARGET_DIR) does not exist)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
override TARGET_DIR := $(abspath $(TARGET_DIR))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(BOARD_FILE)$(SCENARIO_FILE),)
|
ifneq ($(BOARD_FILE)$(SCENARIO_FILE),)
|
||||||
@@ -95,6 +97,12 @@ endif
|
|||||||
|
|
||||||
BOARD ?= kbl-nuc-i7
|
BOARD ?= kbl-nuc-i7
|
||||||
|
|
||||||
|
ifeq ($(BOARD), apl-nuc)
|
||||||
|
override BOARD := nuc6cayh
|
||||||
|
else ifeq ($(BOARD), kbl-nuc-i7)
|
||||||
|
override BOARD := nuc7i7dnb
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq (,$(filter $(BOARD),apl-mrb))
|
ifneq (,$(filter $(BOARD),apl-mrb))
|
||||||
FIRMWARE ?= sbl
|
FIRMWARE ?= sbl
|
||||||
else
|
else
|
||||||
@@ -112,9 +120,10 @@ TOOLS_OUT := $(ROOT_OUT)/misc/tools
|
|||||||
DOC_OUT := $(ROOT_OUT)/doc
|
DOC_OUT := $(ROOT_OUT)/doc
|
||||||
BUILD_VERSION ?=
|
BUILD_VERSION ?=
|
||||||
BUILD_TAG ?=
|
BUILD_TAG ?=
|
||||||
GENED_ACPI_INFO_HEADER = $(T)/hypervisor/arch/x86/configs/$(BOARD)/$(BOARD)_acpi_info.h
|
|
||||||
HV_CFG_LOG = $(HV_OUT)/cfg.log
|
HV_CFG_LOG = $(HV_OUT)/cfg.log
|
||||||
DEFAULT_DEFCONFIG_DIR = $(T)/hypervisor/arch/x86/configs
|
VM_CONFIGS_DIR = $(T)/misc/vm_configs
|
||||||
|
DEFCONFIG_FILE = scenarios/$(SCENARIO)/$(BOARD)/$(BOARD).config
|
||||||
|
GENED_ACPI_INFO_HEADER = $(VM_CONFIGS_DIR)/boards/$(BOARD)/$(BOARD)_acpi_info.h
|
||||||
|
|
||||||
export TOOLS_OUT BOARD SCENARIO FIRMWARE RELEASE
|
export TOOLS_OUT BOARD SCENARIO FIRMWARE RELEASE
|
||||||
|
|
||||||
@@ -122,12 +131,6 @@ export TOOLS_OUT BOARD SCENARIO FIRMWARE RELEASE
|
|||||||
all: hypervisor devicemodel tools
|
all: hypervisor devicemodel tools
|
||||||
@cat $(HV_CFG_LOG)
|
@cat $(HV_CFG_LOG)
|
||||||
|
|
||||||
ifeq ($(BOARD), apl-nuc)
|
|
||||||
override BOARD := nuc6cayh
|
|
||||||
else ifeq ($(BOARD), kbl-nuc-i7)
|
|
||||||
override BOARD := nuc7i7dnb
|
|
||||||
endif
|
|
||||||
|
|
||||||
include $(T)/hypervisor/scripts/makefile/cfg_update.mk
|
include $(T)/hypervisor/scripts/makefile/cfg_update.mk
|
||||||
|
|
||||||
#help functions to build acrn and install acrn/acrn symbols
|
#help functions to build acrn and install acrn/acrn symbols
|
||||||
@@ -160,9 +163,9 @@ hypervisor:
|
|||||||
@if [ "$(BOARD_FILE)" != "" ] && [ -f $(BOARD_FILE) ] && [ "$(SCENARIO_FILE)" != "" ] && [ -f $(SCENARIO_FILE) ] && [ "$(TARGET_DIR)" = "" ]; then \
|
@if [ "$(BOARD_FILE)" != "" ] && [ -f $(BOARD_FILE) ] && [ "$(SCENARIO_FILE)" != "" ] && [ -f $(SCENARIO_FILE) ] && [ "$(TARGET_DIR)" = "" ]; then \
|
||||||
echo "No TARGET_DIR parameter is specified, the original configuration source is overwritten!";\
|
echo "No TARGET_DIR parameter is specified, the original configuration source is overwritten!";\
|
||||||
fi
|
fi
|
||||||
$(MAKE) -C $(T)/hypervisor HV_OBJDIR=$(HV_OUT) BOARD_FILE=$(BOARD_FILE) SCENARIO_FILE=$(SCENARIO_FILE) TARGET_DIR=$(abspath $(TARGET_DIR)) defconfig;
|
$(MAKE) -C $(T)/hypervisor BOARD=$(BOARD) HV_OBJDIR=$(HV_OUT) BOARD_FILE=$(BOARD_FILE) SCENARIO_FILE=$(SCENARIO_FILE) TARGET_DIR=$(TARGET_DIR) defconfig;
|
||||||
$(MAKE) -C $(T)/hypervisor HV_OBJDIR=$(HV_OUT) BOARD_FILE=$(BOARD_FILE) SCENARIO_FILE=$(SCENARIO_FILE) TARGET_DIR=$(abspath $(TARGET_DIR)) oldconfig;
|
$(MAKE) -C $(T)/hypervisor BOARD=$(BOARD) HV_OBJDIR=$(HV_OUT) BOARD_FILE=$(BOARD_FILE) SCENARIO_FILE=$(SCENARIO_FILE) TARGET_DIR=$(TARGET_DIR) oldconfig;
|
||||||
$(MAKE) -C $(T)/hypervisor HV_OBJDIR=$(HV_OUT) BOARD_FILE=$(BOARD_FILE) SCENARIO_FILE=$(SCENARIO_FILE) TARGET_DIR=$(abspath $(TARGET_DIR))
|
$(MAKE) -C $(T)/hypervisor BOARD=$(BOARD) HV_OBJDIR=$(HV_OUT) BOARD_FILE=$(BOARD_FILE) SCENARIO_FILE=$(SCENARIO_FILE) TARGET_DIR=$(TARGET_DIR)
|
||||||
#ifeq ($(FIRMWARE),uefi)
|
#ifeq ($(FIRMWARE),uefi)
|
||||||
@if [ "$(SCENARIO)" != "logical_partition" ] && [ "$(SCENARIO)" != "hybrid" ]; then \
|
@if [ "$(SCENARIO)" != "logical_partition" ] && [ "$(SCENARIO)" != "hybrid" ]; then \
|
||||||
echo "building hypervisor as EFI executable..."; \
|
echo "building hypervisor as EFI executable..."; \
|
||||||
@@ -175,21 +178,22 @@ hypervisor:
|
|||||||
if [ -f $(KCONFIG_FILE) ]; then \
|
if [ -f $(KCONFIG_FILE) ]; then \
|
||||||
echo -e "Hypervisor configuration is based on:\n\tKconfig file:\t$(KCONFIG_FILE);" >> $(HV_CFG_LOG); \
|
echo -e "Hypervisor configuration is based on:\n\tKconfig file:\t$(KCONFIG_FILE);" >> $(HV_CFG_LOG); \
|
||||||
fi; \
|
fi; \
|
||||||
|
echo -e "Hypervisor configuration is based on:" >> $(HV_CFG_LOG); \
|
||||||
if [ "$(TARGET_DIR)" = "" ]; then \
|
if [ "$(TARGET_DIR)" = "" ]; then \
|
||||||
if [ ! -f $(KCONFIG_FILE) ]; then \
|
if [ ! -f $(KCONFIG_FILE) ]; then \
|
||||||
echo -e "Hypervisor configuration is based on:\n\t$(BOARD) " \
|
echo -e "\tdefconfig file:\t\t\t$(VM_CONFIGS_DIR)/$(DEFCONFIG_FILE);" >> $(HV_CFG_LOG); \
|
||||||
"defconfig file:\t$(DEFAULT_DEFCONFIG_DIR)/$(BOARD).config;" >> $(HV_CFG_LOG); \
|
|
||||||
fi; \
|
fi; \
|
||||||
elif [ ! -f $(KCONFIG_FILE) ]; then \
|
elif [ ! -f $(KCONFIG_FILE) ]; then \
|
||||||
echo -e "Hypervisor configuration is based on:\n\t$(BOARD) " \
|
echo -e "\tdefconfig file:\t\t\t$(TARGET_DIR)/$(DEFCONFIG_FILE);" >> $(HV_CFG_LOG); \
|
||||||
"defconfig file:\t$(abspath $(TARGET_DIR))/$(BOARD).config;" >> $(HV_CFG_LOG); \
|
|
||||||
fi; \
|
fi; \
|
||||||
echo -e "\tOthers are set by default in:\t$(T)/hypervisor/arch/x86/Kconfig;" >> $(HV_CFG_LOG); \
|
echo -e "\tOthers are set by default in:\t$(T)/hypervisor/arch/x86/Kconfig;" >> $(HV_CFG_LOG); \
|
||||||
|
echo -e "VM configuration is based on:" >> $(HV_CFG_LOG); \
|
||||||
if [ "$(CONFIG_XML_ENABLED)" = "true" ]; then \
|
if [ "$(CONFIG_XML_ENABLED)" = "true" ]; then \
|
||||||
echo -e "VM configuration is based on:\n\tBOARD File:\t$(BOARD_FILE);" \
|
echo -e "\tBOARD File:\t\t$(BOARD_FILE);\n\t\tSCENARIO File:\t$(SCENARIO_FILE);" >> $(HV_CFG_LOG); \
|
||||||
"\n\tSCENARIO File:\t$(SCENARIO_FILE);" >> $(HV_CFG_LOG); \
|
elif [ "$(TARGET_DIR)" = "" ]; then \
|
||||||
|
echo -e "\tSource code at:\t\t\t$(VM_CONFIGS_DIR)" >> $(HV_CFG_LOG); \
|
||||||
else \
|
else \
|
||||||
echo "VM configuration is based on current code base;" >> $(HV_CFG_LOG); \
|
echo -e "\tSource code at:\t\t\t$(TARGET_DIR)" >> $(HV_CFG_LOG); \
|
||||||
fi; \
|
fi; \
|
||||||
if [ -f $(GENED_ACPI_INFO_HEADER) ] && [ "$(CONFIG_XML_ENABLED)" != "true" ] && [ "TARGET_DIR" = "" ]; then \
|
if [ -f $(GENED_ACPI_INFO_HEADER) ] && [ "$(CONFIG_XML_ENABLED)" != "true" ] && [ "TARGET_DIR" = "" ]; then \
|
||||||
echo -e "\033[33mWarning: The platform ACPI info is based on acrn-config generated $(GENED_ACPI_INFO_HEADER), please make sure its validity.\033[0m" >> $(HV_CFG_LOG); \
|
echo -e "\033[33mWarning: The platform ACPI info is based on acrn-config generated $(GENED_ACPI_INFO_HEADER), please make sure its validity.\033[0m" >> $(HV_CFG_LOG); \
|
||||||
|
@@ -19,6 +19,10 @@ HV_OBJDIR ?= $(CURDIR)/build
|
|||||||
HV_MODDIR ?= $(HV_OBJDIR)/modules
|
HV_MODDIR ?= $(HV_OBJDIR)/modules
|
||||||
HV_FILE := acrn
|
HV_FILE := acrn
|
||||||
|
|
||||||
|
ifeq ($(TARGET_DIR),)
|
||||||
|
override TARGET_DIR := $(realpath ../misc/vm_configs)
|
||||||
|
endif
|
||||||
|
|
||||||
LIB_MOD = $(HV_MODDIR)/lib_mod.a
|
LIB_MOD = $(HV_MODDIR)/lib_mod.a
|
||||||
BOOT_MOD = $(HV_MODDIR)/boot_mod.a
|
BOOT_MOD = $(HV_MODDIR)/boot_mod.a
|
||||||
HW_MOD = $(HV_MODDIR)/hw_mod.a
|
HW_MOD = $(HV_MODDIR)/hw_mod.a
|
||||||
@@ -55,13 +59,9 @@ override BOARD := $(shell echo $(CONFIG_BOARD) |sed 's/"//g')
|
|||||||
#override SCENARIO from CONFIG_SCENARIO, which is specified in kconfig.mk
|
#override SCENARIO from CONFIG_SCENARIO, which is specified in kconfig.mk
|
||||||
override SCENARIO := $(shell echo $(CONFIG_SCENARIO) |sed 's/"//g')
|
override SCENARIO := $(shell echo $(CONFIG_SCENARIO) |sed 's/"//g')
|
||||||
|
|
||||||
ifeq ($(TARGET_DIR),)
|
BOARD_INFO_DIR := $(TARGET_DIR)/boards/$(BOARD)
|
||||||
BOARD_CFG_DIR := arch/x86/configs/$(BOARD)
|
SCENARIO_CFG_DIR := $(TARGET_DIR)/scenarios/$(SCENARIO)
|
||||||
SCENARIO_CFG_DIR := scenarios/$(SCENARIO)
|
BOARD_CFG_DIR := $(SCENARIO_CFG_DIR)/$(BOARD)
|
||||||
else
|
|
||||||
BOARD_CFG_DIR := $(TARGET_DIR)/$(BOARD)
|
|
||||||
SCENARIO_CFG_DIR := $(TARGET_DIR)/$(SCENARIO)
|
|
||||||
endif
|
|
||||||
|
|
||||||
include ../paths.make
|
include ../paths.make
|
||||||
|
|
||||||
@@ -162,6 +162,7 @@ INCLUDE_PATH += include/hw
|
|||||||
INCLUDE_PATH += boot/include
|
INCLUDE_PATH += boot/include
|
||||||
INCLUDE_PATH += boot/include/guest
|
INCLUDE_PATH += boot/include/guest
|
||||||
INCLUDE_PATH += $(HV_OBJDIR)/include
|
INCLUDE_PATH += $(HV_OBJDIR)/include
|
||||||
|
INCLUDE_PATH += $(BOARD_INFO_DIR)
|
||||||
INCLUDE_PATH += $(BOARD_CFG_DIR)
|
INCLUDE_PATH += $(BOARD_CFG_DIR)
|
||||||
INCLUDE_PATH += $(SCENARIO_CFG_DIR)
|
INCLUDE_PATH += $(SCENARIO_CFG_DIR)
|
||||||
|
|
||||||
@@ -250,11 +251,6 @@ HW_C_SRCS += common/sched_bvt.c
|
|||||||
endif
|
endif
|
||||||
HW_C_SRCS += hw/pci.c
|
HW_C_SRCS += hw/pci.c
|
||||||
HW_C_SRCS += arch/x86/configs/vm_config.c
|
HW_C_SRCS += arch/x86/configs/vm_config.c
|
||||||
HW_C_SRCS += $(BOARD_CFG_DIR)/board.c
|
|
||||||
HW_C_SRCS += $(SCENARIO_CFG_DIR)/vm_configurations.c
|
|
||||||
ifneq (,$(wildcard $(SCENARIO_CFG_DIR)/pci_dev.c))
|
|
||||||
HW_C_SRCS += $(SCENARIO_CFG_DIR)/pci_dev.c
|
|
||||||
endif
|
|
||||||
HW_C_SRCS += boot/acpi_base.c
|
HW_C_SRCS += boot/acpi_base.c
|
||||||
HW_C_SRCS += boot/cmdline.c
|
HW_C_SRCS += boot/cmdline.c
|
||||||
# ACPI parsing component
|
# ACPI parsing component
|
||||||
@@ -267,6 +263,13 @@ HW_C_SRCS += boot/guest/vboot_wrapper.c
|
|||||||
HW_C_SRCS += boot/guest/deprivilege_boot.c
|
HW_C_SRCS += boot/guest/deprivilege_boot.c
|
||||||
HW_C_SRCS += boot/guest/direct_boot.c
|
HW_C_SRCS += boot/guest/direct_boot.c
|
||||||
|
|
||||||
|
# VM Configuration
|
||||||
|
VM_CFG_C_SRCS += $(BOARD_INFO_DIR)/board.c
|
||||||
|
VM_CFG_C_SRCS += $(SCENARIO_CFG_DIR)/vm_configurations.c
|
||||||
|
ifneq (,$(wildcard $(BOARD_CFG_DIR)/pci_dev.c))
|
||||||
|
VM_CFG_C_SRCS += $(BOARD_CFG_DIR)/pci_dev.c
|
||||||
|
endif
|
||||||
|
|
||||||
# virtual platform base component
|
# virtual platform base component
|
||||||
VP_BASE_C_SRCS += arch/x86/guest/vcpuid.c
|
VP_BASE_C_SRCS += arch/x86/guest/vcpuid.c
|
||||||
VP_BASE_C_SRCS += arch/x86/guest/vcpu.c
|
VP_BASE_C_SRCS += arch/x86/guest/vcpu.c
|
||||||
@@ -335,6 +338,7 @@ BOOT_C_OBJS := $(patsubst %.c,$(HV_OBJDIR)/%.o,$(BOOT_C_SRCS))
|
|||||||
BOOT_S_OBJS := $(patsubst %.S,$(HV_OBJDIR)/%.o,$(BOOT_S_SRCS))
|
BOOT_S_OBJS := $(patsubst %.S,$(HV_OBJDIR)/%.o,$(BOOT_S_SRCS))
|
||||||
HW_C_OBJS := $(patsubst %.c,$(HV_OBJDIR)/%.o,$(HW_C_SRCS))
|
HW_C_OBJS := $(patsubst %.c,$(HV_OBJDIR)/%.o,$(HW_C_SRCS))
|
||||||
HW_S_OBJS := $(patsubst %.S,$(HV_OBJDIR)/%.o,$(HW_S_SRCS))
|
HW_S_OBJS := $(patsubst %.S,$(HV_OBJDIR)/%.o,$(HW_S_SRCS))
|
||||||
|
VM_CFG_C_OBJS := $(patsubst %.c,$(HV_OBJDIR)/%.o,$(realpath $(VM_CFG_C_SRCS)))
|
||||||
VP_BASE_C_OBJS := $(patsubst %.c,$(HV_OBJDIR)/%.o,$(VP_BASE_C_SRCS))
|
VP_BASE_C_OBJS := $(patsubst %.c,$(HV_OBJDIR)/%.o,$(VP_BASE_C_SRCS))
|
||||||
VP_BASE_S_OBJS := $(patsubst %.S,$(HV_OBJDIR)/%.o,$(VP_BASE_S_SRCS))
|
VP_BASE_S_OBJS := $(patsubst %.S,$(HV_OBJDIR)/%.o,$(VP_BASE_S_SRCS))
|
||||||
VP_DM_C_OBJS := $(patsubst %.c,$(HV_OBJDIR)/%.o,$(VP_DM_C_SRCS))
|
VP_DM_C_OBJS := $(patsubst %.c,$(HV_OBJDIR)/%.o,$(VP_DM_C_SRCS))
|
||||||
@@ -374,8 +378,8 @@ VERSION := $(HV_OBJDIR)/include/version.h
|
|||||||
|
|
||||||
# Create platform_acpi_info.h
|
# Create platform_acpi_info.h
|
||||||
TEMPLATE_ACPI_INFO_HEADER := arch/x86/configs/platform_acpi_info.h
|
TEMPLATE_ACPI_INFO_HEADER := arch/x86/configs/platform_acpi_info.h
|
||||||
BOARDTEMPLATE_ACPI_INFO_HEADER := arch/x86/configs/$(BOARD)/platform_acpi_info.h
|
BOARDTEMPLATE_ACPI_INFO_HEADER := $(BOARD_INFO_DIR)/platform_acpi_info.h
|
||||||
SOURCE_ACPI_INFO_HEADER := $(BOARD_CFG_DIR)/$(BOARD)_acpi_info.h
|
SOURCE_ACPI_INFO_HEADER := $(BOARD_INFO_DIR)/$(BOARD)_acpi_info.h
|
||||||
TARGET_ACPI_INFO_HEADER := $(HV_OBJDIR)/include/platform_acpi_info.h
|
TARGET_ACPI_INFO_HEADER := $(HV_OBJDIR)/include/platform_acpi_info.h
|
||||||
|
|
||||||
$(TARGET_ACPI_INFO_HEADER): $(HV_OBJDIR)/$(HV_CONFIG)
|
$(TARGET_ACPI_INFO_HEADER): $(HV_OBJDIR)/$(HV_CONFIG)
|
||||||
@@ -434,8 +438,8 @@ $(BOOT_MOD): $(BOOT_S_OBJS) $(BOOT_C_OBJS)
|
|||||||
|
|
||||||
boot-mod: $(BOOT_MOD)
|
boot-mod: $(BOOT_MOD)
|
||||||
|
|
||||||
$(HW_MOD): $(HW_S_OBJS) $(HW_C_OBJS)
|
$(HW_MOD): $(HW_S_OBJS) $(HW_C_OBJS) $(VM_CFG_C_OBJS)
|
||||||
$(AR) $(ARFLAGS) $(HW_MOD) $(HW_S_OBJS) $(HW_C_OBJS)
|
$(AR) $(ARFLAGS) $(HW_MOD) $(HW_S_OBJS) $(HW_C_OBJS) $(VM_CFG_C_OBJS)
|
||||||
|
|
||||||
hw-mod: $(HW_MOD)
|
hw-mod: $(HW_MOD)
|
||||||
|
|
||||||
|
@@ -59,7 +59,7 @@ config BOARD
|
|||||||
config DEFCONFIG_LIST
|
config DEFCONFIG_LIST
|
||||||
string
|
string
|
||||||
option defconfig_list
|
option defconfig_list
|
||||||
default "arch/x86/configs/$BOARD.config"
|
default "../misc/vm_configs/scenarios/$SCENARIO/$(BOARD)/$BOARD.config"
|
||||||
|
|
||||||
config RELEASE
|
config RELEASE
|
||||||
bool "Release build"
|
bool "Release build"
|
||||||
|
@@ -7,8 +7,7 @@
|
|||||||
#ifndef ACPI_H
|
#ifndef ACPI_H
|
||||||
#define ACPI_H
|
#define ACPI_H
|
||||||
|
|
||||||
#include <vm_configurations.h>
|
#include <board_info.h>
|
||||||
|
|
||||||
|
|
||||||
#define ACPI_RSDP_CHECKSUM_LENGTH 20U
|
#define ACPI_RSDP_CHECKSUM_LENGTH 20U
|
||||||
#define ACPI_RSDP_XCHECKSUM_LENGTH 36U
|
#define ACPI_RSDP_XCHECKSUM_LENGTH 36U
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
#define BOARD_H
|
#define BOARD_H
|
||||||
|
|
||||||
#include <types.h>
|
#include <types.h>
|
||||||
#include <misc_cfg.h>
|
#include <board_info.h>
|
||||||
#include <host_pm.h>
|
#include <host_pm.h>
|
||||||
#include <pci.h>
|
#include <pci.h>
|
||||||
|
|
||||||
|
@@ -10,6 +10,7 @@
|
|||||||
#include <types.h>
|
#include <types.h>
|
||||||
#include <pci.h>
|
#include <pci.h>
|
||||||
#include <boot.h>
|
#include <boot.h>
|
||||||
|
#include <board_info.h>
|
||||||
#include <acrn_common.h>
|
#include <acrn_common.h>
|
||||||
#include <vm_uuids.h>
|
#include <vm_uuids.h>
|
||||||
#include <vm_configurations.h>
|
#include <vm_configurations.h>
|
||||||
|
@@ -45,17 +45,13 @@ update_config:
|
|||||||
ifeq ($(CONFIG_XML_ENABLED),true)
|
ifeq ($(CONFIG_XML_ENABLED),true)
|
||||||
@if [ ! -f $(UPDATE_RESULT) ]; then \
|
@if [ ! -f $(UPDATE_RESULT) ]; then \
|
||||||
mkdir -p $(dir $(UPDATE_RESULT));\
|
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);\
|
python3 ../misc/acrn-config/board_config/board_cfg_gen.py --board $(BOARD_FILE) --scenario $(SCENARIO_FILE) --out $(TARGET_DIR) > $(UPDATE_RESULT);\
|
||||||
fi;\
|
|
||||||
cat $(UPDATE_RESULT);\
|
cat $(UPDATE_RESULT);\
|
||||||
if [ "`sed -n /successfully/p $(UPDATE_RESULT)`" = "" ]; then rm -f $(UPDATE_RESULT); exit 1; fi;\
|
if [ "`sed -n /successfully/p $(UPDATE_RESULT)`" = "" ]; then rm -f $(UPDATE_RESULT); exit 1; fi;\
|
||||||
if [ "$(TARGET_DIR)" = "" ]; then \
|
if [ "$(TARGET_DIR)" = "" ]; then \
|
||||||
python3 ../misc/acrn-config/scenario_config/scenario_cfg_gen.py --board $(BOARD_FILE) --scenario $(SCENARIO_FILE) > $(UPDATE_RESULT);\
|
python3 ../misc/acrn-config/scenario_config/scenario_cfg_gen.py --board $(BOARD_FILE) --scenario $(SCENARIO_FILE) > $(UPDATE_RESULT);\
|
||||||
else \
|
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;\
|
fi;\
|
||||||
cat $(UPDATE_RESULT);\
|
cat $(UPDATE_RESULT);\
|
||||||
if [ "`sed -n /successfully/p $(UPDATE_RESULT)`" = "" ]; then rm -f $(UPDATE_RESULT); exit 1; fi;\
|
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.
|
# only happens when GNU make checks the prerequisites.
|
||||||
-include $(HV_OBJDIR)/$(HV_CONFIG)
|
-include $(HV_OBJDIR)/$(HV_CONFIG)
|
||||||
endif
|
endif
|
||||||
$(eval $(call override_config,BOARD,apl-mrb))
|
$(eval $(call override_config,BOARD,nuc7i7dnb))
|
||||||
$(eval $(call override_config,SCENARIO,))
|
$(eval $(call override_config,SCENARIO,industry))
|
||||||
$(eval $(call override_config,RELEASE,y))
|
$(eval $(call override_config,RELEASE,y))
|
||||||
|
|
||||||
override RELEASE := $(CONFIG_RELEASE)
|
override RELEASE := $(CONFIG_RELEASE)
|
||||||
@@ -68,18 +68,19 @@ $(HV_OBJDIR)/$(HV_CONFIG_H): $(HV_OBJDIR)/$(HV_CONFIG)
|
|||||||
.PHONY: defconfig
|
.PHONY: defconfig
|
||||||
defconfig: $(KCONFIG_DEPS)
|
defconfig: $(KCONFIG_DEPS)
|
||||||
@mkdir -p $(HV_OBJDIR)
|
@mkdir -p $(HV_OBJDIR)
|
||||||
@if ([ "$(KCONFIG_FILE)" == "" ] || ([ "$(KCONFIG_FILE)" != "" ] && [ ! -f $(KCONFIG_FILE) ])) && [ "$(CONFIG_XML_ENABLED)" != "true" ]; then \
|
@BOARD=$(CONFIG_BOARD) SCENARIO=$(CONFIG_SCENARIO); \
|
||||||
BOARD=$(CONFIG_BOARD) python3 $(KCONFIG_DIR)/defconfig.py Kconfig $(HV_OBJDIR)/$(HV_CONFIG); \
|
if ([ "$(KCONFIG_FILE)" = "" ] || ([ "$(KCONFIG_FILE)" != "" ] && [ ! -f $(KCONFIG_FILE) ])) && [ "$(CONFIG_XML_ENABLED)" != "true" ]; then \
|
||||||
|
python3 $(KCONFIG_DIR)/defconfig.py Kconfig $(HV_OBJDIR)/$(HV_CONFIG); \
|
||||||
else \
|
else \
|
||||||
if [ "$(KCONFIG_FILE)" != "" ] && [ -f $(KCONFIG_FILE) ]; then \
|
if [ "$(KCONFIG_FILE)" != "" ] && [ -f $(KCONFIG_FILE) ]; then \
|
||||||
echo "Writing $(HV_OBJDIR)/$(HV_CONFIG) with $(KCONFIG_FILE)"; \
|
echo "Writing $(HV_OBJDIR)/$(HV_CONFIG) with $(KCONFIG_FILE)"; \
|
||||||
cp $(KCONFIG_FILE) $(HV_OBJDIR)/$(HV_CONFIG); \
|
cp $(KCONFIG_FILE) $(HV_OBJDIR)/$(HV_CONFIG); \
|
||||||
elif [ "$(TARGET_DIR)" != "" ] && [ -d $(TARGET_DIR) ]; then \
|
elif [ "$(TARGET_DIR)" != "" ] && [ -d $(TARGET_DIR) ]; then \
|
||||||
if [ ! -f $(TARGET_DIR)/$(BOARD).config ]; then \
|
if [ ! -f $(TARGET_DIR)/scenarios/$(SCENARIO)/$(BOARD)/$(BOARD).config ]; then \
|
||||||
echo "Board defconfig file $(BOARD).config is not found under $(TARGET_DIR)."; exit 1; \
|
echo "Board defconfig file $(BOARD).config is not found under $(TARGET_DIR)/scenarios/$(SCENARIO)/$(BOARD)/."; exit 1; \
|
||||||
fi; \
|
fi; \
|
||||||
echo "Writing $(HV_OBJDIR)/$(HV_CONFIG) with $(TARGET_DIR)/$(BOARD).config"; \
|
echo "Writing $(HV_OBJDIR)/$(HV_CONFIG) with $(BOARD_CFG_DIR)/$(BOARD).config"; \
|
||||||
cp $(TARGET_DIR)/$(BOARD).config $(HV_OBJDIR)/$(HV_CONFIG); \
|
cp $(TARGET_DIR)/scenarios/$(SCENARIO)/$(BOARD)/$(BOARD).config $(HV_OBJDIR)/$(HV_CONFIG); \
|
||||||
fi; \
|
fi; \
|
||||||
python3 $(KCONFIG_DIR)/silentoldconfig.py Kconfig $(HV_OBJDIR)/$(HV_CONFIG) RELEASE=$(RELEASE); \
|
python3 $(KCONFIG_DIR)/silentoldconfig.py Kconfig $(HV_OBJDIR)/$(HV_CONFIG) RELEASE=$(RELEASE); \
|
||||||
fi
|
fi
|
||||||
@@ -91,7 +92,7 @@ defconfig: $(KCONFIG_DEPS)
|
|||||||
.PHONY: oldconfig
|
.PHONY: oldconfig
|
||||||
oldconfig: $(KCONFIG_DEPS)
|
oldconfig: $(KCONFIG_DEPS)
|
||||||
@mkdir -p $(HV_OBJDIR)
|
@mkdir -p $(HV_OBJDIR)
|
||||||
@BOARD=$(CONFIG_BOARD) \
|
@BOARD=$(CONFIG_BOARD) SCENARIO=$(CONFIG_SCENARIO) \
|
||||||
python3 $(KCONFIG_DIR)/silentoldconfig.py Kconfig \
|
python3 $(KCONFIG_DIR)/silentoldconfig.py Kconfig \
|
||||||
$(HV_OBJDIR)/$(HV_CONFIG) \
|
$(HV_OBJDIR)/$(HV_CONFIG) \
|
||||||
SCENARIO=$(CONFIG_SCENARIO) RELEASE=$(RELEASE)
|
SCENARIO=$(CONFIG_SCENARIO) RELEASE=$(RELEASE)
|
||||||
|
@@ -21,6 +21,7 @@ def main():
|
|||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
target_board = os.environ['BOARD']
|
target_board = os.environ['BOARD']
|
||||||
|
target_scenario = os.environ['SCENARIO']
|
||||||
|
|
||||||
kconfig_path = sys.argv[1]
|
kconfig_path = sys.argv[1]
|
||||||
if not os.path.isfile(kconfig_path):
|
if not os.path.isfile(kconfig_path):
|
||||||
@@ -30,7 +31,7 @@ def main():
|
|||||||
kconfig = kconfiglib.Kconfig(kconfig_path)
|
kconfig = kconfiglib.Kconfig(kconfig_path)
|
||||||
defconfig_path = kconfig.defconfig_filename
|
defconfig_path = kconfig.defconfig_filename
|
||||||
if not defconfig_path or not os.path.isfile(defconfig_path):
|
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)
|
sys.exit(1)
|
||||||
|
|
||||||
kconfig.load_config(defconfig_path)
|
kconfig.load_config(defconfig_path)
|
||||||
|
@@ -97,7 +97,8 @@ def main():
|
|||||||
need_update = True
|
need_update = True
|
||||||
else:
|
else:
|
||||||
# report an error if no known defconfig exists
|
# 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)
|
sys.exit(1)
|
||||||
|
|
||||||
# Update the old .config with those specified on cmdline
|
# Update the old .config with those specified on cmdline
|
||||||
|
@@ -7,4 +7,7 @@
|
|||||||
#ifndef MISC_CFG_H
|
#ifndef MISC_CFG_H
|
||||||
#define MISC_CFG_H
|
#define MISC_CFG_H
|
||||||
|
|
||||||
|
#define ROOTFS_0 "root=/dev/sda3 "
|
||||||
|
#define ROOTFS_1 "root=/dev/nvme0n1p3 "
|
||||||
|
|
||||||
#endif /* MISC_CFG_H */
|
#endif /* MISC_CFG_H */
|
||||||
|
Reference in New Issue
Block a user