@@ -191,6 +191,9 @@
#ifndef __init
#define __init
#endif
+#ifndef __iomem
+#define __iomem
+#endif
/* Host-dependent types and defines for user-space ACPICA */
@@ -11,11 +11,17 @@
include ../../scripts/Makefile.include
all: acpidbg acpidump ec
-clean: acpidbg_clean acpidump_clean ec_clean
+clean: acpidbg_clean acpidump_clean include_clean ec_clean
install: acpidbg_install acpidump_install ec_install
uninstall: acpidbg_uninstall acpidump_uninstall ec_uninstall
+include/acpi:
+ mkdir -p include
+ ln -s ../../../../include/acpi include/acpi
+include_clean:
+ rm -f include/acpi
+ rm -rf include
-acpidbg acpidump ec: FORCE
+acpidbg acpidump ec: include/acpi FORCE
$(call descend,tools/$@,all)
acpidbg_clean acpidump_clean ec_clean:
$(call descend,tools/$(@:_clean=),clean)
@@ -19,7 +19,7 @@ vpath %.c \
CFLAGS += -DACPI_APPLICATION -DACPI_SINGLE_THREAD -DACPI_DEBUGGER\
-I.\
-I../../../../../drivers/acpi/acpica\
- -I../../../../../include
+ -I../../include
LDFLAGS += -lpthread
TOOL_OBJS = \
acpidbg.o
@@ -12,10 +12,16 @@
#include <acpi/acpi.h>
/* Headers not included by include/acpi/platform/aclinux.h */
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <error.h>
#include <stdbool.h>
#include <fcntl.h>
#include <assert.h>
-#include <linux/circ_buf.h>
+#include <sys/select.h>
+#include "../../../../../include/linux/circ_buf.h"
#define ACPI_AML_FILE "/sys/kernel/debug/acpi/acpidbg"
#define ACPI_AML_SEC_TICK 1
@@ -21,7 +21,7 @@ vpath %.c \
../../os_specific/service_layers
CFLAGS += -DACPI_DUMP_APP -I.\
-I../../../../../drivers/acpi/acpica\
- -I../../../../../include
+ -I../../include
TOOL_OBJS = \
apdump.o\
apfiles.o\
ACPICA tools trickily uses integer types, and trickily includes kernel include directory directly, which breaks tools build for some cross compilers. This patch fixes this build issue. Reported-and-tested-by: Yisheng Xie <xieyisheng1@huawei.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> --- include/acpi/platform/aclinux.h | 3 +++ tools/power/acpi/Makefile | 10 ++++++++-- tools/power/acpi/tools/acpidbg/Makefile | 2 +- tools/power/acpi/tools/acpidbg/acpidbg.c | 8 +++++++- tools/power/acpi/tools/acpidump/Makefile | 2 +- 5 files changed, 20 insertions(+), 5 deletions(-)