|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 12/23] acpi/hvmloader: Link ACPI object files directly
>>> On 04.08.16 at 23:06, <boris.ostrovsky@xxxxxxxxxx> wrote:
> v2:
> * Reordered .gitignore changes alphabetically
> * Dropped trailing slashes
> * Use relative path for ACPI_PATH
> * Use $(addprefix...)
> * Dropped use of 'cd' in rules and instead add $(ACPI_BUILD_DIR)/ to $*
What about the suggested use of $(CURDIR) e.g. ...
> --- a/tools/firmware/hvmloader/Makefile
> +++ b/tools/firmware/hvmloader/Makefile
> @@ -20,6 +20,7 @@
> XEN_ROOT = $(CURDIR)/../../..
> include $(XEN_ROOT)/tools/firmware/Rules.mk
>
> +export ACPI_BUILD_DIR=$(shell pwd)
... here?
> @@ -72,7 +73,15 @@ all: subdirs-all
> rombios.o: roms.inc
> smbios.o: CFLAGS += -D__SMBIOS_DATE__="\"$(SMBIOS_REL_DATE)\""
>
> -hvmloader: $(OBJS) acpi/acpi.a
> +ACPI_PATH = ./acpi
Is the leading ./ really needed?
> --- a/tools/firmware/hvmloader/acpi/Makefile
> +++ b/tools/firmware/hvmloader/acpi/Makefile
> @@ -15,36 +15,39 @@
> XEN_ROOT = $(CURDIR)/../../../..
> include $(XEN_ROOT)/tools/firmware/Rules.mk
>
> -C_SRC = build.c dsdt_anycpu.c dsdt_15cpu.c static_tables.c
> dsdt_anycpu_qemu_xen.c
> -OBJS = $(patsubst %.c,%.o,$(C_SRC))
> +MK_DSDT = $(ACPI_BUILD_DIR)/mk_dsdt
>
> -CFLAGS += $(CFLAGS_xeninclude)
> +# Sources to be generated
> +C_SRC = $(addprefix $(ACPI_BUILD_DIR)/, dsdt_anycpu.c dsdt_15cpu.c
> dsdt_anycpu_qemu_xen.c)
> +H_SRC = $(addprefix $(ACPI_BUILD_DIR)/, ssdt_s3.h ssdt_s4.h ssdt_pm.h
> ssdt_tpm.h)
>
> vpath iasl $(PATH)
> -all: acpi.a
> +all: $(C_SRC) $(H_SRC)
>
> -ssdt_s3.h ssdt_s4.h ssdt_pm.h ssdt_tpm.h: %.h: %.asl iasl
> +$(H_SRC): $(ACPI_BUILD_DIR)/%.h: %.asl iasl
> + cd $(ACPI_BUILD_DIR)
> iasl -vs -p $* -tc $<
> sed -e 's/AmlCode/$*/g' $*.hex >$@
> rm -f $*.hex $*.aml
> + cd $(CURDIR)
The two "cd" here contradict your list of changes above.
> -mk_dsdt: mk_dsdt.c
> +$(MK_DSDT): mk_dsdt.c
> $(HOSTCC) $(HOSTCFLAGS) $(CFLAGS_xeninclude) -o $@ mk_dsdt.c
>
> -dsdt_anycpu_qemu_xen.asl: dsdt.asl mk_dsdt
> +$(ACPI_BUILD_DIR)/dsdt_anycpu_qemu_xen.asl: dsdt.asl $(MK_DSDT)
> awk 'NR > 1 {print s} {s=$$0}' $< > $@
> - ./mk_dsdt --debug=$(debug) --dm-version qemu-xen >> $@
> + $(MK_DSDT) --debug=$(debug) --dm-version qemu-xen >> $@
>
> # NB. awk invocation is a portable alternative to 'head -n -1'
> -dsdt_%cpu.asl: dsdt.asl mk_dsdt
> +$(ACPI_BUILD_DIR)/dsdt_%cpu.asl: dsdt.asl $(MK_DSDT)
> awk 'NR > 1 {print s} {s=$$0}' $< > $@
> - ./mk_dsdt --debug=$(debug) --maxcpu $* >> $@
> + $(MK_DSDT) --debug=$(debug) --maxcpu $* >> $@
>
> -$(filter dsdt_%.c,$(C_SRC)): %.c: iasl %.asl
> - iasl -vs -p $* -tc $*.asl
> - sed -e 's/AmlCode/$*/g' $*.hex >$@
> +$(C_SRC): $(ACPI_BUILD_DIR)/%.c: iasl $(ACPI_BUILD_DIR)/%.asl
> + iasl -vs -p $(ACPI_BUILD_DIR)/$* -tc $(ACPI_BUILD_DIR)/$*.asl
> + sed -e 's/AmlCode/$*/g' $(ACPI_BUILD_DIR)/$*.hex >$@
> echo "int $*_len=sizeof($*);" >>$@
> - rm -f $*.aml $*.hex
> + rm -f $(ACPI_BUILD_DIR)/$*.aml $(ACPI_BUILD_DIR)/$*.hex
$(addprefix ...) again?
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |