Skip to content

Commit

Permalink
scripts: Makefile.lib: generate dsdt_generated.c instead of dsdt.c
Browse files Browse the repository at this point in the history
There is a conflict between the static file
lib/acpi/dsdt.c and the file dsdt.c generated
dynamicaly by scripts/Makefile.lib. When a
mrproper is done, the static file dsdt.c is
removed. If a build with acpi enabled is
launched after, the following error is raised:

  CC      lib/acpi/acpi_table.o
make[2]: *** No rule to make target 'lib/acpi/dsdt.asl', needed by 'lib/acpi/dsdt.c'.  Stop.
scripts/Makefile.build:394: recipe for target 'lib/acpi' failed

To avoid such error, the generated file is named
dsdt_generated.c instead of dstdt.c.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Tested-by: Heiko Thiery <heiko.thiery@gmail.com>
  • Loading branch information
Philippe Reynes authored and trini committed Feb 25, 2022
1 parent 90de95f commit 5d94cbd
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 13 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2227,7 +2227,8 @@ clean: $(clean-dirs)
-o -name '*.asn1.[ch]' \
-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_generated.aml' -o -name 'dsdt_generated.asl.tmp' \
-o -name 'dsdt_generated.c' \
-o -name '*.efi' -o -name '*.gcno' -o -name '*.so' \) \
-type f -print | xargs rm -f

Expand Down
2 changes: 1 addition & 1 deletion board/advantech/som-db5800-som-6867/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# Copyright (C) 2015, Google, Inc

obj-y += som-db5800-som-6867.o
obj-$(CONFIG_GENERATE_ACPI_TABLE) += dsdt.o
obj-$(CONFIG_GENERATE_ACPI_TABLE) += dsdt_generated.o
2 changes: 1 addition & 1 deletion board/congatec/conga-qeval20-qa3-e3845/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# Copyright (C) 2015, Google, Inc

obj-y += conga-qeval20-qa3.o
obj-$(CONFIG_GENERATE_ACPI_TABLE) += dsdt.o
obj-$(CONFIG_GENERATE_ACPI_TABLE) += dsdt_generated.o
2 changes: 1 addition & 1 deletion board/dfi/dfi-bt700/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# Copyright (C) 2015, Google, Inc

obj-y += dfi-bt700.o
obj-$(CONFIG_GENERATE_ACPI_TABLE) += dsdt.o
obj-$(CONFIG_GENERATE_ACPI_TABLE) += dsdt_generated.o
2 changes: 1 addition & 1 deletion board/google/chromebook_coral/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# Copyright 2019 Google LLC

obj-y += coral.o
obj-$(CONFIG_GENERATE_ACPI_TABLE) += dsdt.o
obj-$(CONFIG_GENERATE_ACPI_TABLE) += dsdt_generated.o
2 changes: 1 addition & 1 deletion board/intel/bayleybay/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com>

obj-y += bayleybay.o
obj-$(CONFIG_GENERATE_ACPI_TABLE) += dsdt.o
obj-$(CONFIG_GENERATE_ACPI_TABLE) += dsdt_generated.o
2 changes: 1 addition & 1 deletion board/intel/edison/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
#

obj-y += edison.o
obj-$(CONFIG_GENERATE_ACPI_TABLE) += dsdt.o
obj-$(CONFIG_GENERATE_ACPI_TABLE) += dsdt_generated.o
2 changes: 1 addition & 1 deletion board/intel/galileo/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com>

obj-y += galileo.o
obj-$(CONFIG_GENERATE_ACPI_TABLE) += dsdt.o
obj-$(CONFIG_GENERATE_ACPI_TABLE) += dsdt_generated.o
2 changes: 1 addition & 1 deletion board/intel/minnowmax/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# Copyright (C) 2015, Google, Inc

obj-y += minnowmax.o
obj-$(CONFIG_GENERATE_ACPI_TABLE) += dsdt.o
obj-$(CONFIG_GENERATE_ACPI_TABLE) += dsdt_generated.o
8 changes: 4 additions & 4 deletions scripts/Makefile.lib
Original file line number Diff line number Diff line change
Expand Up @@ -456,8 +456,8 @@ CFLAGS_REMOVE_efi_freestanding.o := $(LTO_CFLAGS)
# which is pure ASL code. The Intel ASL (ACPI (Advanced Configuration and Power
# Interface) Source Language compiler (iasl) then converts this ASL code into a
# C file containing the hex data to build into U-Boot. This file is called
# dsdt.hex (despite us setting the prefix to .../dsdt.asl.tmp) so must be
# renamed to dsdt.c for consumption by the build system.
# dsdt_generated.hex (despite us setting the prefix to .../dsdt_generated.asl.tmp)
# so must be renamed to dsdt_generated.c for consumption by the build system.
ASL_TMP = $(patsubst %.c,%.asl.tmp,$@)

quiet_cmd_acpi_c_asl= ASL $<
Expand All @@ -468,9 +468,9 @@ cmd_acpi_c_asl= \
$(if $(KBUILD_VERBOSE:1=), >/dev/null) && \
mv $(patsubst %.c,%.hex,$@) $@

$(obj)/dsdt.c: $(src)/dsdt.asl
$(obj)/dsdt_generated.c: $(src)/dsdt.asl
$(call cmd,acpi_c_asl)
$(Q)sed -i -e "s,dsdt_aml_code,AmlCode," $@
$(Q)sed -i -e "s,dsdt_generated_aml_code,AmlCode," $@

# Bzip2
# ---------------------------------------------------------------------------
Expand Down

0 comments on commit 5d94cbd

Please sign in to comment.