x86: Avoid writing temporary asl files into the source tree
PATCH 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.
---
scripts/Makefile.lib | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
scripts/Makefile.lib +4 -3
@@ -397,9 +397,10 @@ $(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 [email protected] $< && \ + iasl -p $@ -tc [email protected] $(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.21.0.1020.gf2820cf01a-goog
PATCH 1/1 x86: Avoid writing temporary asl files into the source tree
Hi Simon,
Quoted 23 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]>---
scripts/Makefile.lib | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)scripts/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,10 @@ $(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 [email protected] $< && \
With the changes here, there is no board/dfi/dfi-bt700/dsdt.asl.tmp anymore, but board/dfi/dfi-bt700/dsdt.c.tmp. This file name looks not correct as it is not a C file. I am not sure if this could confuse anyone else.
Besides, 'make distclean' does not clean the 'dsdt.c.tmp'.
scripts/Makefile.lib $(obj)/%_efi.so: $(obj)/%.o $(obj)/efi_crt0.o $(obj)/efi_reloc.o $(obj)/efi_free · line 404
Quoted 3 lines
scripts/Makefile.lib +2
-0+ iasl -p $@ -tc [email protected] $(if $(KBUILD_VERBOSE:1=), >/dev/null) && \ + mv $(patsubst %.c,%.hex,$@) $@
Regards,
Bin