x86: Avoid writing temporary asl files into the source tree
PATCH v2 1/1 x86: Avoid writing temporary asl files into the source tree
At present the iasl tool (Intel ACPI (Advanced Configuration and Power Interface) Source Language compiler) is called in such a way that it uses the source directory for its temporary files.
This means we end up with these files when building x86 boards:
board/dfi/dfi-bt700/dsdt.aml
board/dfi/dfi-bt700/dsdt.asl.tmp
Update the code to put temporary files in the target directory instead.
---
Changes in v2:
- Use dsdt.tmp.c as the temporary filename instead of dsdt.c.tmp
- Remove this file with distclean
Makefile | 1 + scripts/Makefile.lib | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-)
Makefile +1 -0
@@ -1846,6 +1846,7 @@ clean: $(clean-dirs) -o -name '*.symtypes' -o -name 'modules.order' \ -o -name modules.builtin -o -name '.tmp_*.o.*' \ -o -name 'dsdt.aml' -o -name 'dsdt.asl.tmp' -o -name 'dsdt.c' \ + -o -name 'dsdt.tmp.c' \ -o -name '*.efi' -o -name '*.gcno' -o -name '*.so' \) \ -type f -print | xargs rm -f \ bl31.c bl31.elf bl31_*.bin image.map
scripts/Makefile.lib +5 -3
@@ -397,9 +397,11 @@ $(obj)/%_efi.so: $(obj)/%.o $(obj)/efi_crt0.o $(obj)/efi_reloc.o $(obj)/efi_free # --------------------------------------------------------------------------- quiet_cmd_acpi_c_asl= ASL $< cmd_acpi_c_asl= \ - $(CPP) -x assembler-with-cpp -D__ASSEMBLY__ -P $(UBOOTINCLUDE) -o $<.tmp $<; \ - iasl -p $< -tc $<.tmp $(if $(KBUILD_VERBOSE:1=), >/dev/null) && \ - mv $(patsubst %.asl,%.hex,$<) $@ + $(CPP) -x assembler-with-cpp -D__ASSEMBLY__ -P $(UBOOTINCLUDE) \ + -o $(patsubst %.c,%.tmp.c,$@) $< && \ + iasl -p $@ -tc $(patsubst %.c,%.tmp.c,$@) \ + $(if $(KBUILD_VERBOSE:1=), >/dev/null) && \ + mv $(patsubst %.c,%.hex,$@) $@ $(obj)/dsdt.c: $(src)/dsdt.asl $(call cmd,acpi_c_asl)
Signature · 1 line
2.22.0.410.gd8fdbe21b5-goog
PATCH v2 1/1 x86: Avoid writing temporary asl files into the source tree
Hi Simon,
Quoted 28 lines · Simon Glass
At present the iasl tool (Intel ACPI (Advanced Configuration and Power Interface) Source Language compiler) is called in such a way that it uses the source directory for its temporary files.
This means we end up with these files when building x86 boards:
board/dfi/dfi-bt700/dsdt.aml board/dfi/dfi-bt700/dsdt.asl.tmpUpdate the code to put temporary files in the target directory instead.
Signed-off-by Simon Glass <[email protected]>---
Changes in v2:
- Usedsdt.tmp.cas the temporary filename instead of dsdt.c.tmp
- Remove this file with distcleanMakefile | 1 + scripts/Makefile.lib | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-)Makefile +0
-0
Makefile clean: $(clean-dirs) · line 1849
Quoted 4 lines
Makefile +1
-0@@ -1846,6 +1846,7 @@ clean: $(clean-dirs) -o -name '*.symtypes' -o -name 'modules.order' \ -o -name modules.builtin -o -name '.tmp_*.o.*' \ -o -name 'dsdt.aml' -o -name 'dsdt.asl.tmp' -o -name 'dsdt.c' \ + -o -name 'dsdt.tmp.c' \
Can we reuse the dsdt.asl.tmp? dsdt.tmp.c still looks weird because it's actually ASL file, not C file. See below.
Quoted 8 lines
Makefile +0
-0-o -name '*.efi' -o -name '*.gcno' -o -name '*.so' \) \ -type f -print | xargs rm -f \ bl31.c bl31.elf bl31_*.bin image.mapscripts/Makefile.lib +0
-0
scripts/Makefile.lib $(obj)/%_efi.so: $(obj)/%.o $(obj)/efi_crt0.o $(obj)/efi_reloc.o $(obj)/efi_free · line 401
Quoted 8 lines
scripts/Makefile.lib +2
-3@@ -397,9 +397,11 @@ $(obj)/%_efi.so: $(obj)/%.o $(obj)/efi_crt0.o $(obj)/efi_reloc.o $(obj)/efi_free # --------------------------------------------------------------------------- quiet_cmd_acpi_c_asl= ASL $< cmd_acpi_c_asl= \ - $(CPP) -x assembler-with-cpp -D__ASSEMBLY__ -P $(UBOOTINCLUDE) -o $<.tmp $<; \ - iasl -p $< -tc $<.tmp $(if $(KBUILD_VERBOSE:1=), >/dev/null) && \ - mv $(patsubst %.asl,%.hex,$<) $@ + $(CPP) -x assembler-with-cpp -D__ASSEMBLY__ -P $(UBOOTINCLUDE) \ + -o $(patsubst %.c,%.tmp.c,$@) $< && \
(patsubst %.c,%.asl.tmp,$@) so we can reuse dsdt.asl.tmp
scripts/Makefile.lib $(obj)/%_efi.so: $(obj)/%.o $(obj)/efi_crt0.o $(obj)/efi_reloc.o $(obj)/efi_free · line 402
Quoted 1 line
scripts/Makefile.lib +1
-0+ iasl -p $@ -tc $(patsubst %.c,%.tmp.c,$@) \
Ditto
scripts/Makefile.lib $(obj)/%_efi.so: $(obj)/%.o $(obj)/efi_crt0.o $(obj)/efi_reloc.o $(obj)/efi_free
Quoted 6 lines
scripts/Makefile.lib +2
-1+ $(if $(KBUILD_VERBOSE:1=), >/dev/null) && \ + mv $(patsubst %.c,%.hex,$@) $@ $(obj)/dsdt.c: $(src)/dsdt.asl $(call cmd,acpi_c_asl) --
Regards,
Bin