Skip to content

Commit

Permalink
Makefile: support SBL binary for E2E build
Browse files Browse the repository at this point in the history
Currently, we support SBL on two different boards.
So build and install them all in E2E build.

Tracked-On: projectacrn#2344
Signed-off-by: Tw <wei.tan@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
  • Loading branch information
tw4452852 authored and ZideChen0 committed Jan 18, 2019
1 parent 31749f3 commit b23335b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
11 changes: 7 additions & 4 deletions Makefile
Expand Up @@ -54,9 +54,11 @@ ifeq ($(FIRMWARE),uefi)
endif

sbl-hypervisor:
@mkdir -p $(HV_OUT)-sbl
make -C $(T)/hypervisor HV_OBJDIR=$(HV_OUT)-sbl BOARD=apl-mrb FIRMWARE=sbl RELEASE=$(RELEASE) clean
make -C $(T)/hypervisor HV_OBJDIR=$(HV_OUT)-sbl BOARD=apl-mrb FIRMWARE=sbl RELEASE=$(RELEASE)
@mkdir -p $(HV_OUT)-sbl/apl-mrb $(HV_OUT)-sbl/up2
make -C $(T)/hypervisor HV_OBJDIR=$(HV_OUT)-sbl/apl-mrb BOARD=apl-mrb FIRMWARE=sbl RELEASE=$(RELEASE) clean
make -C $(T)/hypervisor HV_OBJDIR=$(HV_OUT)-sbl/apl-mrb BOARD=apl-mrb FIRMWARE=sbl RELEASE=$(RELEASE)
make -C $(T)/hypervisor HV_OBJDIR=$(HV_OUT)-sbl/up2 BOARD=up2 FIRMWARE=sbl RELEASE=$(RELEASE) clean
make -C $(T)/hypervisor HV_OBJDIR=$(HV_OUT)-sbl/up2 BOARD=up2 FIRMWARE=sbl RELEASE=$(RELEASE)

devicemodel: tools
make -C $(T)/devicemodel DM_OBJDIR=$(DM_OUT) clean
Expand Down Expand Up @@ -88,7 +90,8 @@ ifeq ($(FIRMWARE),uefi)
endif

sbl-hypervisor-install:
make -C $(T)/hypervisor HV_OBJDIR=$(HV_OUT)-sbl BOARD=apl-mrb FIRMWARE=sbl RELEASE=$(RELEASE) install
make -C $(T)/hypervisor HV_OBJDIR=$(HV_OUT)-sbl/apl-mrb BOARD=apl-mrb FIRMWARE=sbl RELEASE=$(RELEASE) install
make -C $(T)/hypervisor HV_OBJDIR=$(HV_OUT)-sbl/up2 BOARD=up2 FIRMWARE=sbl RELEASE=$(RELEASE) install

devicemodel-install:
make -C $(T)/devicemodel DM_OBJDIR=$(DM_OUT) install
Expand Down
2 changes: 1 addition & 1 deletion devicemodel/Makefile
Expand Up @@ -208,7 +208,7 @@ $(DM_OBJDIR)/%.o: %.c $(HEADERS)
[ ! -e $@ ] && mkdir -p $(dir $@); \
$(CC) $(CFLAGS) -c $< -o $@

install: $(DM_OBJDIR)/$(PROGRAM) install-samples-nuc install-samples-mrb install-bios install-vmcfg
install: $(DM_OBJDIR)/$(PROGRAM) install-samples-nuc install-samples-mrb install-bios install-vmcfg install-samples-up2
install -D --mode=0755 $(DM_OBJDIR)/$(PROGRAM) $(DESTDIR)/usr/bin/$(PROGRAM)

install-samples-up2: $(SAMPLES_UP2)
Expand Down
9 changes: 9 additions & 0 deletions hypervisor/Makefile
Expand Up @@ -285,12 +285,21 @@ all: lib $(HV_OBJDIR)/$(HV_FILE).32.out $(HV_OBJDIR)/$(HV_FILE).bin

ifeq ($(CONFIG_PLATFORM_SBL),y)
install: lib $(HV_OBJDIR)/$(HV_FILE).32.out
ifeq ($(BOARD),up2)
install -D $(HV_OBJDIR)/$(HV_FILE).32.out $(DESTDIR)/usr/lib/acrn/$(HV_FILE).up2.sbl
else
install -D $(HV_OBJDIR)/$(HV_FILE).32.out $(DESTDIR)/usr/lib/acrn/$(HV_FILE).sbl
endif

install-debug: $(HV_OBJDIR)/$(HV_FILE).map $(HV_OBJDIR)/$(HV_FILE).out
ifeq ($(BOARD),up2)
install -D $(HV_OBJDIR)/$(HV_FILE).out $(DESTDIR)/usr/lib/acrn/$(HV_FILE).up2.sbl.out
install -D $(HV_OBJDIR)/$(HV_FILE).map $(DESTDIR)/usr/lib/acrn/$(HV_FILE).up2.sbl.map
else
install -D $(HV_OBJDIR)/$(HV_FILE).out $(DESTDIR)/usr/lib/acrn/$(HV_FILE).sbl.out
install -D $(HV_OBJDIR)/$(HV_FILE).map $(DESTDIR)/usr/lib/acrn/$(HV_FILE).sbl.map
endif
endif

.PHONY: header
header: $(VERSION) $(HV_OBJDIR)/$(HV_CONFIG_H) $(TARGET_ACPI_INFO_HEADER)
Expand Down

0 comments on commit b23335b

Please sign in to comment.