From: Ian Campbell <ian.campbell@citrix.com>
To: Anthony PERARD <anthony.perard@citrix.com>, xen-devel@lists.xen.org
Subject: Re: [RFC PATCH v2 04/16] firmware/makefile: install BIOS and ACPI blob ...
Date: Wed, 4 Nov 2015 10:35:50 +0000 [thread overview]
Message-ID: <1446633350.6461.33.camel@citrix.com> (raw)
In-Reply-To: <1445875397-2846-5-git-send-email-anthony.perard@citrix.com>
On Mon, 2015-10-26 at 16:03 +0000, Anthony PERARD wrote:
> ... into the firmware directory, along with hvmloader.
>
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
> ---
> .gitignore | 1 +
> tools/firmware/Makefile | 15 +++++++++++++++
> tools/firmware/hvmloader/acpi/Makefile | 2 +-
> 3 files changed, 17 insertions(+), 1 deletion(-)
>
> diff --git a/.gitignore b/.gitignore
> index 9ead7c4..7c7bb56 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -117,6 +117,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..9c63991 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),)
> + [ ! -e $(SEABIOS_ROM) ] || $(INSTALL_DATA) $(SEABIOS_ROM) $(INST_DIR)/seabios.bin
If $(SEABIOS_ROM) doesn't exist surely that indicates something has gone
wrong prior to this?
The -e $(TARGET) you are (presumably) copying is similarly strange,
although maybe that is to do with it not being inside an ifeq like the
CONFIG_SEABIOS which protects your new one.
IOW I think you can drop the -e check from both, the ifeq is clearer and
less prone to carrying on in the face of other errors AFAICT.
> +endif
> +endif
> +ifeq ($(CONFIG_OVMF),y)
> +ifeq ($(OVMF_PATH),)
> + [ ! -e $(OVMF_ROM) ] || $(INSTALL_DATA) $(OVMF_ROM)
> $(INST_DIR)/ovmf.bin
> +endif
> +endif
> +> > [ ! -e $(ACPI_TABLE_QEMU_PC_I440FX) ] || $(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..3d8dd21 100644
> --- a/tools/firmware/hvmloader/acpi/Makefile
> +++ b/tools/firmware/hvmloader/acpi/Makefile
> @@ -46,7 +46,7 @@ $(filter dsdt_%.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
> + rm -f $*.hex
Is $*.aml an incidental output of iasl? The iasl manpage is not terribly
informative on the issue, but it says that -tc will create C output in a
.hex fix. I suppose the .aml is implied.
./mk_dsdt --debug=$(debug) --maxcpu $* >> $@
I think (but please check, there may be some weird subtlety with this sort
of rule) that it would be correct to change the rule here from:
$(filter dsdt_%.c,$(C_SRC)): %.c: iasl %.asl
into:
$(filter dsdt_%.c,$(C_SRC)): %.c %.aml: iasl %.asl
(my actual preference would be to invoke iasl twice, once for asl->aml and
then again for aml->hex, but that doesn't seem possible).
Oh, maybe the need for .hex file will go away later in this series and so
you can adjust this to only talk about the .aml? In which case after
mentioning that in the commit message you could ignore all the above and
fix up the rules properly at that point
Do you not need to also add this newly left lying around file to
.gitignore.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2015-11-04 10:35 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-26 16:03 [RFC PATCH v2 00/16] Load BIOS via toolstack instead of been embedded in hvmloader Anthony PERARD
2015-10-26 16:03 ` [RFC PATCH v2 01/16] hvmloader: Fix scratch_alloc to avoid overlaps Anthony PERARD
2015-11-03 17:38 ` Ian Campbell
2015-11-10 16:29 ` Jan Beulich
2015-10-26 16:03 ` [RFC PATCH v2 02/16] libxc: Load BIOS and ACPI table into guest memory Anthony PERARD
2015-11-03 17:45 ` Ian Campbell
2015-10-26 16:03 ` [RFC PATCH v2 03/16] configure: #define SEABIOS_PATH and OVMF_PATH Anthony PERARD
2015-11-04 10:24 ` Ian Campbell
2015-10-26 16:03 ` [RFC PATCH v2 04/16] firmware/makefile: install BIOS and ACPI blob Anthony PERARD
2015-11-04 10:35 ` Ian Campbell [this message]
2015-10-26 16:03 ` [RFC PATCH v2 05/16] libxl: Load guest BIOS from file Anthony PERARD
2015-11-04 10:51 ` Ian Campbell
2015-10-26 16:03 ` [RFC PATCH v2 06/16] libxl: Load guest ACPI table " Anthony PERARD
2015-11-04 10:57 ` Ian Campbell
2015-12-18 14:43 ` Anthony PERARD
2015-10-26 16:03 ` [RFC PATCH v2 07/16] hvmloader: Grab the hvmlite info page and parse the cmdline Anthony PERARD
2015-11-04 10:39 ` Andrew Cooper
2015-11-04 11:02 ` Ian Campbell
2015-10-26 16:03 ` [RFC PATCH v2 08/16] hvmloader: Locate the BIOS blob Anthony PERARD
2015-11-04 11:05 ` Ian Campbell
2015-10-26 16:03 ` [RFC PATCH v2 09/16] hvmloader: Load SeaBIOS from hvm_start_info modules Anthony PERARD
2015-11-04 11:11 ` Ian Campbell
2015-10-26 16:03 ` [RFC PATCH v2 10/16] hvmloader: Load OVMF from modules Anthony PERARD
2015-11-04 11:15 ` Ian Campbell
2015-10-26 16:03 ` [RFC PATCH v2 11/16] hvmloader: No BIOS ROM image allowed to be compiled in Anthony PERARD
2015-11-04 11:17 ` Ian Campbell
2015-10-26 16:03 ` [RFC PATCH v2 12/16] hvmloader: Load ACPI tables from hvm_start_info module Anthony PERARD
2015-11-04 11:20 ` Ian Campbell
2015-10-26 16:03 ` [RFC PATCH v2 13/16] hvmloader/makefile: Compile out SeaBIOS and OVMF ROM blob Anthony PERARD
2015-10-26 16:03 ` [RFC PATCH v2 14/16] hvmloader: Always build-in SeaBIOS and OVMF loader Anthony PERARD
2015-10-26 16:03 ` [RFC PATCH v2 15/16] hvmloader: Compile out the qemu-xen ACPI tables Anthony PERARD
2015-10-26 16:03 ` [RFC PATCH v2 16/16] hvmloader: do not depend on SEABIOS_PATH or OVMF_PATH Anthony PERARD
2015-11-03 17:30 ` [RFC PATCH v2 00/16] Load BIOS via toolstack instead of been embedded in hvmloader Ian Campbell
2015-11-03 17:50 ` Anthony PERARD
2015-11-04 10:18 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1446633350.6461.33.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=anthony.perard@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).