Skip to contentSkip to conversation

tools/Android.mk: Fix compile error in intel_reg.c

PATCH Superseded Derek Morton 2 participants 3 messages Sep 9, 2015

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/Android.mk: Fix compile error in intel_reg.c

The patch "tools: install the register definition files" caused a build error on android as it added 'PKGDATADIR' which was not defined in the Android build environment. This patch adds that define to tools/Android.mk. It also copies the files it points to so they are actually in the target file system.

---
 tools/Android.mk | 7 +++++++
 1 file changed, 7 insertions(+)
tools/Android.mk +7 -0
index 0a196e4..aae7db5 100644
@@ -34,11 +34,18 @@ define add_tool
                               libdrm        \
                               libdrm_intel
 
+    LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/intel/validation/core/igt/tools
+    LOCAL_CFLAGS += -DPKGDATADIR=\"/system/vendor/intel/validation/core/igt/tools\"
     include $(BUILD_EXECUTABLE)
 endef
 
 #================#
 
+# Copy the register files
+$(shell mkdir -p $(TARGET_OUT_VENDOR)/intel/validation/core/igt/tools/registers)
+$(shell cp $(LOCAL_PATH)/registers/* $(TARGET_OUT_VENDOR)/intel/validation/core/igt/tools/registers)
+
+
 skip_tools_list := \
     intel_framebuffer_dump \
     intel_reg_dumper \
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw
Quoted 5 lines · Derek Morton

The patch "tools: install the register definition files" caused a build error on android as it added 'PKGDATADIR' which was not defined in the Android build environment. This patch adds that define to tools/Android.mk. It also copies the files it points to so they are actually in the target file system.

Missing Signed-off-by line.

tools/Android.mk define add_tool · line 37

Quoted 13 lines
---
 tools/Android.mk | 7 +++++++
 1 file changed, 7 insertions(+)
tools/Android.mk +1 -0
index 0a196e4..aae7db5 100644
@@ -34,11 +34,18 @@ define add_tool
                               libdrm        \
                               libdrm_intel
 
+    LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/intel/validation/core/igt/tools

Is this part of the same fix?

tools/Android.mk define add_tool · line 38

Quoted 1 line
tools/Android.mk +1 -0
+    LOCAL_CFLAGS += -DPKGDATADIR=\"/system/vendor/intel/validation/core/igt/tools\"

This should have /registers on the end. Might be worth having a local variable to avoid specifying the path explicitly each time.

Quoted 14 lines
tools/Android.mk +5 -1
     include $(BUILD_EXECUTABLE)
 endef
 
 #================#
 
+# Copy the register files
+$(shell mkdir -p $(TARGET_OUT_VENDOR)/intel/validation/core/igt/tools/registers)
+$(shell cp $(LOCAL_PATH)/registers/* $(TARGET_OUT_VENDOR)/intel/validation/core/igt/tools/registers)
+
+
 skip_tools_list := \
     intel_framebuffer_dump \
     intel_reg_dumper \
--
Quoted 2 lines

1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw

-----Original Message-----
From: Thomas Wood [mailto:[email protected]]
Sent: Wednesday, September 9, 2015 2:48 PM
To: Morton, Derek J
Cc: Intel Graphics Development
Subject: Re: [PATCH i-g-t] tools/Android.mk: Fix compile error in intel_reg.c

Quoted 9 lines · Derek Morton
Quoted 5 lines

The patch "tools: install the register definition files" caused a build error on android as it added 'PKGDATADIR' which was not defined in the Android build environment. This patch adds that define to tools/Android.mk. It also copies the files it points to so they are actually in the target file system.

Missing Signed-off-by line.

Will add.

Quoted 13 lines
Quoted 13 lines
---
 tools/Android.mk | 7 +++++++
 1 file changed, 7 insertions(+)
tools/Android.mk index renamed from tools/Android.mk +0 -0

0a196e4..aae7db5 100644

tools/Android.mk +0 -0
@@ -34,11 +34,18 @@ define add_tool
                               libdrm        \
                               libdrm_intel
 
Quoted 4 lines

tools/Android.mk define add_tool · line 38

Quoted 2 lines
tools/Android.mk +2 -0
+    LOCAL_MODULE_PATH := 
+ $(TARGET_OUT_VENDOR)/intel/validation/core/igt/tools

Is this part of the same fix?

This is putting all the tools with the other igt binaries so the register files then have somewhere logical to also be put.

Quoted 5 lines

tools/Android.mk define add_tool · line 38

Quoted 3 lines
tools/Android.mk +1 -0
+    LOCAL_CFLAGS += -DPKGDATADIR=\"/system/vendor/intel/validation/core/igt/tools\"

This should have /registers on the end. Might be worth having a local variable to avoid specifying the path explicitly each time.

I don’t think it should. /registers is added in intel_reg.c

    path = PKGDATADIR"/registers";

I can create a local variable.

Quoted 7 lines
Quoted 7 lines
tools/Android.mk +0 -0
     include $(BUILD_EXECUTABLE)
 endef
 
 #================#
 
Quoted 14 lines
Quoted 11 lines
tools/Android.mk +7 -1
+# Copy the register files
+$(shell mkdir -p 
+$(TARGET_OUT_VENDOR)/intel/validation/core/igt/tools/registers)
+$(shell cp $(LOCAL_PATH)/registers/* 
+$(TARGET_OUT_VENDOR)/intel/validation/core/igt/tools/registers)
+
+
 skip_tools_list := \
     intel_framebuffer_dump \
     intel_reg_dumper \
--
Quoted 2 lines

1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx