From 512dbb61e3b853458669c0a110316fb25cc9b535 Mon Sep 17 00:00:00 2001 From: Geoffroy Van Cutsem Date: Mon, 19 Nov 2018 14:34:56 +0100 Subject: [PATCH] Kconfig: remove PLATFORM configuration option The PLATFORM configuration option is not used in any unique way. With simple changes, we can directly use CONFIG_PLATFORM_UEFI and CONFIG_PLATFORM_SBL to compile the ACRN hypervisor. This patch removes this config option and adjusts the hypervisor Makefile accordingly. The "old" way of specifying the platform from the command-line is not affected by these changes, e.g.: "make PLATFORM=sbl" Tracked-On: #1588 Signed-off-by: Geoffroy Van Cutsem --- hypervisor/Makefile | 17 +++++++++-------- hypervisor/arch/x86/Kconfig | 9 ++------- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/hypervisor/Makefile b/hypervisor/Makefile index 45a803040..f38c74e66 100644 --- a/hypervisor/Makefile +++ b/hypervisor/Makefile @@ -207,15 +207,17 @@ C_SRCS += dm/vpci/msi.c C_SRCS += dm/vpci/msix.c endif -C_SRCS += bsp/$(CONFIG_PLATFORM)/$(CONFIG_PLATFORM).c - -ifeq ($(CONFIG_PLATFORM),uefi) -C_SRCS += bsp/$(CONFIG_PLATFORM)/cmdline.c +ifeq ($(CONFIG_PLATFORM_UEFI),y) +C_SRCS += bsp/uefi/uefi.c +C_SRCS += bsp/uefi/cmdline.c +TEMPLATE_ACPI_INFO_HEADER := bsp/include/uefi/platform_acpi_info.h else -ifeq ($(CONFIG_PLATFORM), sbl) +ifeq ($(CONFIG_PLATFORM_SBL),y) +C_SRCS += bsp/sbl/sbl.c C_SRCS += boot/sbl/multiboot.c C_SRCS += boot/sbl/sbl_seed_parse.c C_SRCS += boot/sbl/abl_seed_parse.c +TEMPLATE_ACPI_INFO_HEADER := bsp/include/sbl/platform_acpi_info.h endif endif @@ -243,7 +245,6 @@ VERSION := $(HV_OBJDIR)/include/version.h # Create platform_acpi_info.h SOURCE_ACPI_INFO_HEADER := bsp/include/$(CONFIG_BOARD)_acpi_info.h -TEMPLATE_ACPI_INFO_HEADER := bsp/include/$(CONFIG_PLATFORM)/platform_acpi_info.h TARGET_ACPI_INFO_HEADER := $(HV_OBJDIR)/include/platform_acpi_info.h $(TARGET_ACPI_INFO_HEADER): $(HV_OBJDIR)/$(HV_CONFIG) @@ -272,7 +273,7 @@ endif .PHONY: all all: lib $(HV_OBJDIR)/$(HV_FILE).32.out $(HV_OBJDIR)/$(HV_FILE).bin -ifeq ($(CONFIG_PLATFORM), uefi) +ifeq ($(CONFIG_PLATFORM_UEFI),y) all: efi .PHONY: efi efi: $(HV_OBJDIR)/$(HV_FILE).bin @@ -283,7 +284,7 @@ install: efi make -C bsp/uefi/efi HV_OBJDIR=$(HV_OBJDIR) install endif -ifeq ($(CONFIG_PLATFORM), sbl) +ifeq ($(CONFIG_PLATFORM_SBL),y) install: $(HV_OBJDIR)/$(HV_FILE).32.out install -D $(HV_OBJDIR)/$(HV_FILE).32.out $(DESTDIR)/usr/lib/acrn/$(HV_FILE).sbl endif diff --git a/hypervisor/arch/x86/Kconfig b/hypervisor/arch/x86/Kconfig index 6be32bdac..e38d44fa0 100644 --- a/hypervisor/arch/x86/Kconfig +++ b/hypervisor/arch/x86/Kconfig @@ -1,8 +1,8 @@ choice - prompt "Platform" + prompt "Type of boot firmware (BIOS) on the target platform" default PLATFORM_SBL help - The BIOS used on the target board. + The boot firmware (BIOS) used on the target board. config PLATFORM_UEFI bool "UEFI" @@ -62,11 +62,6 @@ config IOREQ_POLLING endchoice -config PLATFORM - string "The type of boot firmware (BIOS) on the target platform" - default "uefi" if PLATFORM_UEFI - default "sbl" if PLATFORM_SBL - config BOARD string "Target board" help