[U-Boot] [PATCH v2] x86: Avoid writing temporary asl files into the source tree

Simon Glass sjg at chromium.org
Wed Jul 10 19:40:50 UTC 2019


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.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

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(-)

diff --git a/Makefile b/Makefile
index 516260f46d0..e9ff14f3405 100644
--- a/Makefile
+++ b/Makefile
@@ -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
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index de67677f61a..59c8cf38f94 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -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)
-- 
2.22.0.410.gd8fdbe21b5-goog



More information about the U-Boot mailing list