Message ID | 1456412174-20162-5-git-send-email-anthony.perard@citrix.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
>>> On 25.02.16 at 15:56, <anthony.perard@citrix.com> wrote: > @@ -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 Would there be anything wrong with leaving this alone and ... > iasl -vs -p $* -tc $*.asl > sed -e 's/AmlCode/$*/g' $*.hex >$@ > echo "int $*_len=sizeof($*);" >>$@ > rm -f $*.aml $*.hex ... simply dropping the deletion of $*.aml here, plus ... > +dsdt_anycpu_qemu_xen.c: dsdt_anycpu_qemu_xen.aml ... an equivalent of this added? > +dsdt_anycpu_qemu_xen.aml: %.aml: iasl %.asl > + iasl -vs -p $* -tc $*.asl Otherwise, if this is the rule to remain long term, then please make use of $< here, which aiui would require flipping around the two dependencies. Whichever route you chose, with a respective adjustment Acked-by: Jan Beulich <jbeulich@suse.com> Jan
On Mon, Feb 29, 2016 at 09:31:11AM -0700, Jan Beulich wrote: > >>> On 25.02.16 at 15:56, <anthony.perard@citrix.com> wrote: > > @@ -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 > > Would there be anything wrong with leaving this alone and ... > > > iasl -vs -p $* -tc $*.asl > > sed -e 's/AmlCode/$*/g' $*.hex >$@ > > echo "int $*_len=sizeof($*);" >>$@ > > rm -f $*.aml $*.hex > > ... simply dropping the deletion of $*.aml here, plus ... > > > +dsdt_anycpu_qemu_xen.c: dsdt_anycpu_qemu_xen.aml > > ... an equivalent of this added? > > > +dsdt_anycpu_qemu_xen.aml: %.aml: iasl %.asl > > + iasl -vs -p $* -tc $*.asl > > Otherwise, if this is the rule to remain long term, then please make > use of $< here, which aiui would require flipping around the two > dependencies. Yes, this rules is here to stay. The dsdt_anycpu_qemu_xen.c won't be needed anymore after the patch series. The rule change in patch #14. I will use $<. > Whichever route you chose, with a respective adjustment > Acked-by: Jan Beulich <jbeulich@suse.com>
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"
... 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@citrix.com> --- 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(-)