[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH v3 04/16] firmware/makefile: install BIOS and ACPI blob ...



... into the firmware directory, along with hvmloader.

This introduce a rules for dsdt_anycpu_qemu_xen.aml, and change the rule
for dsdt_anycpu_qemu_xen.c to temporarly generate both .c and .aml. The
generation of dsdt_anycpu_qemu_xen.c will go away in a future patch.

Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
---
Change in V3:
- do not check if ROMs file exist before installing, they should exist
- change rules for dsdt_anycpu_qemu_xen.c in oder to generate both .c and
  .aml files without changing temporarly the other dsdt_*.c rules.
---
 .gitignore                             |  1 +
 tools/firmware/Makefile                | 15 +++++++++++++++
 tools/firmware/hvmloader/acpi/Makefile | 11 +++++++++--
 3 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore
index 91f690c..abd0dce 100644
--- a/.gitignore
+++ b/.gitignore
@@ -127,6 +127,7 @@ tools/firmware/hvmloader/acpi/mk_dsdt
 tools/firmware/hvmloader/acpi/dsdt*.c
 tools/firmware/hvmloader/acpi/dsdt_*.asl
 tools/firmware/hvmloader/acpi/ssdt_*.h
+tools/firmware/hvmloader/acpi/dsdt_anycpu_qemu_xen.aml
 tools/firmware/hvmloader/hvmloader
 tools/firmware/hvmloader/roms.h
 tools/firmware/hvmloader/roms.inc
diff --git a/tools/firmware/Makefile b/tools/firmware/Makefile
index 6cc86ce..aa1ab54 100644
--- a/tools/firmware/Makefile
+++ b/tools/firmware/Makefile
@@ -19,6 +19,10 @@ SUBDIRS-y += hvmloader
 
 LD32BIT-$(CONFIG_FreeBSD) := LD32BIT_FLAG=-melf_i386_fbsd
 
+SEABIOS_ROM := seabios-dir/out/bios.bin
+OVMF_ROM := ovmf-dir/ovmf.bin
+ACPI_TABLE_QEMU_PC_I440FX = hvmloader/acpi/dsdt_anycpu_qemu_xen.aml
+
 ovmf-dir:
        GIT=$(GIT) $(XEN_ROOT)/scripts/git-checkout.sh $(OVMF_UPSTREAM_URL) 
$(OVMF_UPSTREAM_REVISION) ovmf-dir
        cp ovmf-makefile ovmf-dir/Makefile;
@@ -45,6 +49,17 @@ endif
 install: all
        [ -d $(INST_DIR) ] || $(INSTALL_DIR) $(INST_DIR)
        [ ! -e $(TARGET) ] || $(INSTALL_DATA) $(TARGET) $(INST_DIR)
+ifeq ($(CONFIG_SEABIOS),y)
+ifeq ($(SEABIOS_PATH),)
+       $(INSTALL_DATA) $(SEABIOS_ROM) $(INST_DIR)/seabios.bin
+endif
+endif
+ifeq ($(CONFIG_OVMF),y)
+ifeq ($(OVMF_PATH),)
+       $(INSTALL_DATA) $(OVMF_ROM) $(INST_DIR)/ovmf.bin
+endif
+endif
+       $(INSTALL_DATA) $(ACPI_TABLE_QEMU_PC_I440FX) $(INST_DIR)
 
 .PHONY: clean
 clean: subdirs-clean
diff --git a/tools/firmware/hvmloader/acpi/Makefile 
b/tools/firmware/hvmloader/acpi/Makefile
index d3e882a..a3041d3 100644
--- a/tools/firmware/hvmloader/acpi/Makefile
+++ b/tools/firmware/hvmloader/acpi/Makefile
@@ -23,7 +23,7 @@ OBJS  = $(patsubst %.c,%.o,$(C_SRC))
 CFLAGS += $(CFLAGS_xeninclude)
 
 vpath iasl $(PATH)
-all: acpi.a
+all: acpi.a dsdt_anycpu_qemu_xen.aml
 
 ssdt_s3.h ssdt_s4.h ssdt_pm.h ssdt_tpm.h: %.h: %.asl iasl
        iasl -vs -p $* -tc $<
@@ -42,12 +42,19 @@ dsdt_%cpu.asl: dsdt.asl mk_dsdt
        awk 'NR > 1 {print s} {s=$$0}' $< > $@
        ./mk_dsdt --debug=$(debug) --maxcpu $*  >> $@
 
-$(filter dsdt_%.c,$(C_SRC)): %.c: iasl %.asl
+$(filter dsdt_%cpu.c,$(C_SRC)): %.c: iasl %.asl
        iasl -vs -p $* -tc $*.asl
        sed -e 's/AmlCode/$*/g' $*.hex >$@
        echo "int $*_len=sizeof($*);" >>$@
        rm -f $*.aml $*.hex
 
+dsdt_anycpu_qemu_xen.c: dsdt_anycpu_qemu_xen.aml
+dsdt_anycpu_qemu_xen.aml: %.aml: iasl %.asl
+       iasl -vs -p $* -tc $*.asl
+       sed -e 's/AmlCode/$*/g' $*.hex >$*.c
+       echo "int $*_len=sizeof($*);" >>$*.c
+       rm -f $*.hex
+
 iasl:
        @echo
        @echo "ACPI ASL compiler (iasl) is needed"
-- 
Anthony PERARD


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.