]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ACPICA: acpidump: Update Makefile to build acpidump from ACPICA.
authorLv Zheng <lv.zheng@intel.com>
Fri, 4 Apr 2014 04:39:56 +0000 (12:39 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sun, 20 Apr 2014 20:59:40 +0000 (22:59 +0200)
This patch updates tools Makefile to use new acpidump.

ACPICA's acpidump relies on various ACPICA components/common/os_specific
source code.  They are located in various kernel folders, being searched
and compiled using vpath technique in Makefile.  These files include:
1. drivers/acpi/acpica/acapps.h
2. tools/power/acpi/common/getopt.c
3. tools/power/acpi/common/cmfsize.c
4. tools/power/acpi/os_specific/service_layers/oslinuxtbl.c
5. tools/power/acpi/os_specific/service_layers/osunixdir.c
6. tools/power/acpi/os_specific/service_layers/osunixmap.c

This patch has been tested on DELL Inspiron Mini, acpidump output can be
successfully generated by typing the following commands:
# cd tools/power/acpi
# make DEBUG=false
# sudo make install DESTDIR=/opt
# sudo make uninstall DESTDIR=/opt
# make clean
Or
# cd tools
# make acpi
# sudo make acpi_install
# sudo make acpi_uninstall
# make acpi_clean
A kernel build test is also performed on DELL Inspiron Mini to verify that
the changes done to actypes.h and aclinux.h won't affect the kernel
build process.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
[rjw: Subject]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
tools/power/acpi/Makefile

index d9186a2fdf0696f1a319ba6cac0377a66c1fe112..98625fa2baf10a53f7a7a0d0912ce8b452046aa7 100644 (file)
@@ -68,7 +68,8 @@ WARNINGS += $(call cc-supports,-Wstrict-prototypes)
 WARNINGS += $(call cc-supports,-Wdeclaration-after-statement)
 
 KERNEL_INCLUDE := ../../../include
-CFLAGS += -D_LINUX -DDEFINE_ALTERNATE_TYPES -I$(KERNEL_INCLUDE)
+ACPICA_INCLUDE := ../../../drivers/acpi/acpica
+CFLAGS += -D_LINUX -I$(KERNEL_INCLUDE) -I$(ACPICA_INCLUDE)
 CFLAGS += $(WARNINGS)
 
 ifeq ($(strip $(V)),false)
@@ -101,10 +102,29 @@ endif
 # --- ACPIDUMP BEGIN ---
 
 vpath %.c \
-       tools/acpidump
+       ../../../drivers/acpi/acpica\
+       tools/acpidump\
+       common\
+       os_specific/service_layers
+
+CFLAGS += -DACPI_DUMP_APP -Itools/acpidump
 
 DUMP_OBJS = \
-       acpidump.o
+       apdump.o\
+       apfiles.o\
+       apmain.o\
+       osunixdir.o\
+       osunixmap.o\
+       tbprint.o\
+       tbxfroot.o\
+       utbuffer.o\
+       utexcep.o\
+       utmath.o\
+       utstring.o\
+       utxferror.o\
+       oslinuxtbl.o\
+       cmfsize.o\
+       getopt.o
 
 DUMP_OBJS := $(addprefix $(OUTPUT)tools/acpidump/,$(DUMP_OBJS))