Skip to content

Commit

Permalink
hv:build virtual platform trusty to vp_trusty_mod.a
Browse files Browse the repository at this point in the history
support compiling virtual platform trusty to vp_trusty_mod.a

Tracked-On: projectacrn#1842
Signed-off-by: Mingqiang Chi <[email protected]>
Reviewed-by: Jason Chen CJ <[email protected]>
	modified:   Makefile
  • Loading branch information
mingqiangchi authored and acrnsi committed Jun 14, 2019
1 parent e67f0ea commit 02bf362
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions hypervisor/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ BOOT_MOD = $(HV_MODDIR)/boot_mod.a
HW_MOD = $(HV_MODDIR)/hw_mod.a
VP_BASE_MOD = $(HV_MODDIR)/vp_base_mod.a
VP_DM_MOD = $(HV_MODDIR)/vp_dm_mod.a
VP_TRUSTY_MOD = $(HV_MODDIR)/vp_trusty_mod.a
LIB_DEBUG = $(HV_MODDIR)/libdebug.a
LIB_RELEASE = $(HV_MODDIR)/librelease.a

Expand Down Expand Up @@ -259,17 +260,18 @@ VP_DM_C_SRCS += arch/x86/guest/instr_emul.c
VP_DM_C_SRCS += arch/x86/guest/vm_reset.c
VP_DM_C_SRCS += common/ptdev.c

# virtual platform trusty
VP_TRUSTY_C_SRCS += arch/x86/guest/trusty.c
VP_TRUSTY_C_SRCS += common/trusty_hypercall.c
VP_TRUSTY_C_SRCS += arch/x86/seed/seed.c
VP_TRUSTY_C_SRCS += arch/x86/seed/seed_abl.c
VP_TRUSTY_C_SRCS += arch/x86/seed/seed_sbl.c

# initilization component
C_SRCS += arch/x86/init.c

C_SRCS += arch/x86/seed/seed.c
C_SRCS += arch/x86/seed/seed_abl.c
C_SRCS += arch/x86/seed/seed_sbl.c

C_SRCS += arch/x86/guest/vmcall.c
C_SRCS += arch/x86/guest/trusty.c
C_SRCS += common/hypercall.c
C_SRCS += common/trusty_hypercall.c

LIB_C_OBJS := $(patsubst %.c,$(HV_OBJDIR)/%.o,$(LIB_C_SRCS))
LIB_S_OBJS := $(patsubst %.S,$(HV_OBJDIR)/%.o,$(LIB_S_SRCS))
Expand All @@ -280,6 +282,7 @@ HW_S_OBJS := $(patsubst %.S,$(HV_OBJDIR)/%.o,$(HW_S_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_DM_C_OBJS := $(patsubst %.c,$(HV_OBJDIR)/%.o,$(VP_DM_C_SRCS))
VP_TRUSTY_C_OBJS := $(patsubst %.c,$(HV_OBJDIR)/%.o,$(VP_TRUSTY_C_SRCS))
C_OBJS := $(patsubst %.c,$(HV_OBJDIR)/%.o,$(C_SRCS))

ifneq ($(CONFIG_RELEASE),y)
Expand All @@ -294,12 +297,14 @@ MOD_DEPS += boot-mod
MOD_DEPS += hw-mod
MOD_DEPS += vp-base-mod
MOD_DEPS += vp-dm-mod
MOD_DEPS += vp-trusty-mod
MOD_DEPS += lib
MODULES += $(LIB_MOD)
MODULES += $(BOOT_MOD)
MODULES += $(HW_MOD)
MODULES += $(VP_BASE_MOD)
MODULES += $(VP_DM_MOD)
MODULES += $(VP_TRUSTY_MOD)
ifeq ($(CONFIG_RELEASE),y)
MODULES += $(LIB_RELEASE)
else
Expand Down Expand Up @@ -372,7 +377,7 @@ pre_build: $(PRE_BUILD_OBJS)
.PHONY: header
header: $(VERSION) $(HV_OBJDIR)/$(HV_CONFIG_H) $(TARGET_ACPI_INFO_HEADER)

.PHONY: lib-mod boot-mod hw-mod vp-base-mod vp-dm-mod
.PHONY: lib-mod boot-mod hw-mod vp-base-mod vp-dm-mod vp-trusty-mod
lib-mod: $(LIB_C_OBJS) $(LIB_S_OBJS)
$(AR) $(ARFLAGS) $(LIB_MOD) $(LIB_C_OBJS) $(LIB_S_OBJS)
boot-mod: $(BOOT_S_OBJS) $(BOOT_C_OBJS)
Expand All @@ -383,6 +388,8 @@ vp-base-mod: $(VP_BASE_S_OBJS) $(VP_BASE_C_OBJS)
$(AR) $(ARFLAGS) $(VP_BASE_MOD) $(VP_BASE_S_OBJS) $(VP_BASE_C_OBJS)
vp-dm-mod: $(VP_DM_C_OBJS)
$(AR) $(ARFLAGS) $(VP_DM_MOD) $(VP_DM_C_OBJS)
vp-trusty-mod: $(VP_TRUSTY_C_OBJS)
$(AR) $(ARFLAGS) $(VP_TRUSTY_MOD) $(VP_TRUSTY_C_OBJS)

.PHONY: lib
lib: $(SUB_MAKEFILES)
Expand Down

0 comments on commit 02bf362

Please sign in to comment.