modulization:move out efi dir from hypervisor
move acrn-hypervisor/hypervisor/bsp/uefi/efi to arcn-hypervisor/efi-stub move acrn-hypervisor/hypervisor/bsp/uefi/clearlinux to acrn-hypervisor/efi-stub/clearlinux Changes to be committed: modified: Makefile modified: doc/getting-started/apl-nuc.rst renamed: hypervisor/bsp/uefi/efi/Makefile -> efi-stub/Makefile renamed: hypervisor/bsp/uefi/efi/boot.c -> efi-stub/boot.c renamed: hypervisor/bsp/uefi/efi/boot.h -> efi-stub/boot.h renamed: hypervisor/bsp/uefi/clearlinux/acrn.conf -> efi-stub/clearlinux/acrn.conf renamed: hypervisor/bsp/uefi/efi/efilinux.h -> efi-stub/efilinux.h renamed: hypervisor/bsp/uefi/efi/malloc.c -> efi-stub/malloc.c renamed: hypervisor/bsp/uefi/efi/multiboot.h -> efi-stub/multiboot.h renamed: hypervisor/bsp/uefi/efi/pe.c -> efi-stub/pe.c renamed: hypervisor/bsp/uefi/efi/stdlib.h -> efi-stub/stdlib.h modified: hypervisor/Makefile Tracked-On: #1842 Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
parent
59e3f562b8
commit
74849cd983
11
Makefile
11
Makefile
|
@ -33,6 +33,7 @@ RELEASE ?= 0
|
|||
O ?= build
|
||||
ROOT_OUT := $(shell mkdir -p $(O);cd $(O);pwd)
|
||||
HV_OUT := $(ROOT_OUT)/hypervisor
|
||||
EFI_OUT := $(ROOT_OUT)/efi-stub
|
||||
DM_OUT := $(ROOT_OUT)/devicemodel
|
||||
TOOLS_OUT := $(ROOT_OUT)/tools
|
||||
DOC_OUT := $(ROOT_OUT)/doc
|
||||
|
@ -46,6 +47,10 @@ all: hypervisor devicemodel tools
|
|||
hypervisor:
|
||||
make -C $(T)/hypervisor HV_OBJDIR=$(HV_OUT) BOARD=$(BOARD) FIRMWARE=$(FIRMWARE) RELEASE=$(RELEASE) clean
|
||||
make -C $(T)/hypervisor HV_OBJDIR=$(HV_OUT) BOARD=$(BOARD) FIRMWARE=$(FIRMWARE) RELEASE=$(RELEASE)
|
||||
ifeq ($(PLATFORM),uefi)
|
||||
echo "building hypervisor as EFI executable..."
|
||||
make -C $(T)/efi-stub HV_OBJDIR=$(HV_OUT) EFI_OBJDIR=$(EFI_OUT)
|
||||
endif
|
||||
|
||||
sbl-hypervisor:
|
||||
@mkdir -p $(HV_OUT)-sbl
|
||||
|
@ -73,7 +78,13 @@ clean:
|
|||
install: hypervisor-install devicemodel-install tools-install
|
||||
|
||||
hypervisor-install:
|
||||
ifeq ($(PLATFORM),sbl)
|
||||
make -C $(T)/hypervisor HV_OBJDIR=$(HV_OUT) BOARD=$(BOARD) FIRMWARE=$(FIRMWARE) RELEASE=$(RELEASE) install
|
||||
endif
|
||||
ifeq ($(PLATFORM),uefi)
|
||||
make -C $(T)/hypervisor HV_OBJDIR=$(HV_OUT) BOARD=$(BOARD) FIRMWARE=$(FIRMWARE) RELEASE=$(RELEASE)
|
||||
make -C $(T)/efi-stub HV_OBJDIR=$(HV_OUT) EFI_OBJDIR=$(EFI_OUT) all install
|
||||
endif
|
||||
|
||||
sbl-hypervisor-install:
|
||||
make -C $(T)/hypervisor HV_OBJDIR=$(HV_OUT)-sbl BOARD=$(BOARD) FIRMWARE=$(FIRMWARE) RELEASE=$(RELEASE) install
|
||||
|
|
|
@ -205,11 +205,11 @@ partition. Follow these steps:
|
|||
|
||||
A starter acrn.conf configuration file is included in the Clear Linux release and is
|
||||
also available in the acrn-hypervisor/hypervisor GitHub repo as `acrn.conf
|
||||
<https://github.com/projectacrn/acrn-hypervisor/blob/master/hypervisor/bsp/uefi/clearlinux/acrn.conf>`__
|
||||
<https://github.com/projectacrn/acrn-hypervisor/blob/master/efi-stub/clearlinux/acrn.conf>`__
|
||||
as shown here:
|
||||
|
||||
.. literalinclude:: ../../hypervisor/bsp/uefi/clearlinux/acrn.conf
|
||||
:caption: hypervisor/bsp/uefi/clearlinux/acrn.conf
|
||||
.. literalinclude:: ../../efi-stub/clearlinux/acrn.conf
|
||||
:caption: efi-stub/clearlinux/acrn.conf
|
||||
|
||||
On the platform, copy the ``acrn.conf`` file to the EFI partition we mounted earlier:
|
||||
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
|
||||
HV_OBJDIR:=build
|
||||
HV_FILE:=acrn
|
||||
EFI_OBJDIR:=$(HV_OBJDIR)/bsp/uefi/efi
|
||||
C_SRCS = boot.c pe.c malloc.c
|
||||
ACRN_OBJS := $(patsubst %.c,$(EFI_OBJDIR)/%.o,$(C_SRCS))
|
||||
INCLUDE_PATH += $(HV_OBJDIR)/include
|
||||
|
@ -60,8 +59,8 @@ LDSCRIPT := $(GNUEFI_DIR)/elf_$(ARCH)_efi.lds
|
|||
|
||||
INCDIR := $(SYSROOT)/usr/include
|
||||
|
||||
CFLAGS=-I. -I.. -I../../../include/arch/x86/guest -I$(INCDIR)/efi -I$(INCDIR)/efi/$(ARCH) \
|
||||
-I../../../include/public -I../../../include/lib \
|
||||
CFLAGS=-I. -I.. -I../hypervisor/include/arch/x86/guest -I$(INCDIR)/efi -I$(INCDIR)/efi/$(ARCH) \
|
||||
-I../hypervisor/include/public -I../hypervisor/include/lib \
|
||||
-DEFI_FUNCTION_WRAPPER -fPIC -fshort-wchar -ffreestanding \
|
||||
-Wall -I../fs/ -D$(ARCH) -O2 \
|
||||
-include config.h
|
||||
|
@ -82,7 +81,7 @@ LDFLAGS=-T $(LDSCRIPT) -Bsymbolic -shared -nostdlib -znocombreloc \
|
|||
EFIBIN=$(HV_OBJDIR)/$(HV_FILE).efi
|
||||
BOOT=$(EFI_OBJDIR)/boot.efi
|
||||
|
||||
CONF_FILE=$(CURDIR)/../clearlinux/acrn.conf
|
||||
CONF_FILE=$(CURDIR)/clearlinux/acrn.conf
|
||||
|
||||
all: $(EFIBIN)
|
||||
$(OBJCOPY) --add-section .hv="$(HV_OBJDIR)/$(HV_FILE).bin" --change-section-vma .hv=0x6e000 --set-section-flags .hv=alloc,data,contents,load --section-alignment 0x1000 $(EFI_OBJDIR)/boot.efi $(EFIBIN)
|
|
@ -276,19 +276,8 @@ endif
|
|||
.PHONY: all
|
||||
all: lib $(HV_OBJDIR)/$(HV_FILE).32.out $(HV_OBJDIR)/$(HV_FILE).bin
|
||||
|
||||
ifeq ($(CONFIG_PLATFORM_UEFI),y)
|
||||
all: efi
|
||||
.PHONY: efi
|
||||
efi: $(HV_OBJDIR)/$(HV_FILE).bin
|
||||
echo "building hypervisor as EFI executable..."
|
||||
make -C bsp/uefi/efi HV_OBJDIR=$(HV_OBJDIR)
|
||||
|
||||
install: efi
|
||||
make -C bsp/uefi/efi HV_OBJDIR=$(HV_OBJDIR) install
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_PLATFORM_SBL),y)
|
||||
install: $(HV_OBJDIR)/$(HV_FILE).32.out
|
||||
install: lib $(HV_OBJDIR)/$(HV_FILE).32.out
|
||||
install -D $(HV_OBJDIR)/$(HV_FILE).32.out $(DESTDIR)/usr/lib/acrn/$(HV_FILE).sbl
|
||||
endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue