]> code.ossystems Code Review - meta-freescale.git/commitdiff
imx-vpu-hantro: Replace kernel dependence with linux-imx-headers
authorTom Hochstein <tom.hochstein@nxp.com>
Fri, 5 Oct 2018 16:23:29 +0000 (11:23 -0500)
committerOtavio Salvador <otavio@ossystems.com.br>
Fri, 26 Oct 2018 17:23:37 +0000 (14:23 -0300)
Find ion.h and version.h in linux-imx-headers instead of kernel.

Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
recipes-bsp/imx-vpu-hantro/imx-vpu-hantro/0001-Fix-ion.h-header-inclusion-to-be-standard.patch [deleted file]
recipes-bsp/imx-vpu-hantro/imx-vpu-hantro/0001-Get-i.MX-custom-headers-from-usr-include-imx.patch [new file with mode: 0644]
recipes-bsp/imx-vpu-hantro/imx-vpu-hantro/0002-Fix-version.h-inclusion-to-be-from-kernel-build-fold.patch [deleted file]
recipes-bsp/imx-vpu-hantro/imx-vpu-hantro_1.8.0.bb

diff --git a/recipes-bsp/imx-vpu-hantro/imx-vpu-hantro/0001-Fix-ion.h-header-inclusion-to-be-standard.patch b/recipes-bsp/imx-vpu-hantro/imx-vpu-hantro/0001-Fix-ion.h-header-inclusion-to-be-standard.patch
deleted file mode 100644 (file)
index 2773100..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-From cf67cfecc01538e32cd99e3ca00ff0e6145079ce Mon Sep 17 00:00:00 2001
-From: Yuqing Zhu <carol.zhu@nxp.com>
-Date: Thu, 27 Sep 2018 15:34:11 +0800
-Subject: [PATCH] imx-vpu-hantro: Fix ion.h header inclusion to be standard
-
-NXP "solution" was to manually copy the header to include/linux.
-Let's point the Makefile to the proper (mainline) location instead:
-https://elixir.bootlin.com/linux/v4.17/source/drivers/staging/android/uapi/ion.h
-
-Signed-off-by: Yuqing Zhu <carol.zhu@nxp.com>
----
- Makefile_G1G2                                             | 3 +++
- Makefile_H1                                               | 3 +++
- decoder_sw/software/linux/dwl/dwl_linux.c                 | 2 +-
- h1_encoder/software/linux_reference/ewl/ewl_x280_common.c | 2 +-
- 4 files changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/Makefile_G1G2 b/Makefile_G1G2
-index caab40f..29866a4 100755
---- a/Makefile_G1G2
-+++ b/Makefile_G1G2
-@@ -13,6 +13,9 @@ INCLUDE_HEADERS += -I$(SOURCE_ROOT)/linux/memalloc
- #INCLUDE_HEADERS += -I$(SOURCE_ROOT)/linux/ldriver
- INCLUDE_HEADERS += -I$(LINUX_KERNEL_ROOT)/include/uapi -I$(LINUX_KERNEL_ROOT)/include
-+# ION header location
-+INCLUDE_HEADERS += -I$(LINUX_KERNEL_ROOT)/drivers/staging/android/uapi
-+
- CFLAGS += -DDEC_MODULE_PATH=\"/dev/mxc_hantro\" -DUSE_FAKE_RFC_TABLE -DFIFO_DATATYPE=void* -DNDEBUG -DDOWN_SCALER \
-            -DUSE_EXTERNAL_BUFFER -DUSE_FAST_EC -DUSE_VP9_EC -DGET_FREE_BUFFER_NON_BLOCK \
-            -DDEC_X170_OUTPUT_FORMAT=0 -DDEC_X170_TIMEOUT_LENGTH=-1 -DENABLE_HEVC_SUPPORT \
-diff --git a/Makefile_H1 b/Makefile_H1
-index 9ca1aa9..56b4332 100755
---- a/Makefile_H1
-+++ b/Makefile_H1
-@@ -20,6 +20,9 @@ ENV += -DUSE_ION
- ENV += -I$(LINUX_KERNEL_ROOT)/include/uapi -I$(LINUX_KERNEL_ROOT)/include
- ENV += -I$(SDKTARGETSYSROOT)/usr/imx/include
-+# ION header location
-+ENV += -I$(LINUX_KERNEL_ROOT)/drivers/staging/android/uapi
-+
- LIBENCNAME = libcodec_enc
- LIBSENC = -L./ -lhantro_h1 -lpthread
-diff --git a/decoder_sw/software/linux/dwl/dwl_linux.c b/decoder_sw/software/linux/dwl/dwl_linux.c
-index 0899596..f2e1229 100755
---- a/decoder_sw/software/linux/dwl/dwl_linux.c
-+++ b/decoder_sw/software/linux/dwl/dwl_linux.c
-@@ -41,7 +41,7 @@
- #include "dwl.h"
- #include <linux/hantrodec.h>
- #ifdef USE_ION
--#include <linux/ion.h>
-+#include <ion.h>
- #include <linux/dma-buf.h>
- #include <linux/version.h>
- #ifdef ANDROID
-diff --git a/h1_encoder/software/linux_reference/ewl/ewl_x280_common.c b/h1_encoder/software/linux_reference/ewl/ewl_x280_common.c
-index 620c978..82b4836 100755
---- a/h1_encoder/software/linux_reference/ewl/ewl_x280_common.c
-+++ b/h1_encoder/software/linux_reference/ewl/ewl_x280_common.c
-@@ -49,7 +49,7 @@
- #include "linux/hx280enc.h"
- #ifdef USE_ION
--#include <linux/ion.h>
-+#include <ion.h>
- #include <linux/dma-buf.h>
- #include <linux/version.h>
- #ifdef ANDROID
--- 
-1.9.1
-
diff --git a/recipes-bsp/imx-vpu-hantro/imx-vpu-hantro/0001-Get-i.MX-custom-headers-from-usr-include-imx.patch b/recipes-bsp/imx-vpu-hantro/imx-vpu-hantro/0001-Get-i.MX-custom-headers-from-usr-include-imx.patch
new file mode 100644 (file)
index 0000000..a41641d
--- /dev/null
@@ -0,0 +1,49 @@
+From a277191d6e7d775b1c081f8b25734f6f962ade14 Mon Sep 17 00:00:00 2001
+From: Tom Hochstein <tom.hochstein@nxp.com>
+Date: Thu, 4 Oct 2018 10:34:00 -0500
+Subject: [PATCH] Get i.MX custom headers from /usr/include/imx
+
+Upstream-Status: Pending
+
+Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
+---
+ Makefile_G1G2 | 5 ++---
+ Makefile_H1   | 3 +--
+ 2 files changed, 3 insertions(+), 5 deletions(-)
+
+diff --git a/Makefile_G1G2 b/Makefile_G1G2
+index caab40f..5b55a8b 100755
+--- a/Makefile_G1G2
++++ b/Makefile_G1G2
+@@ -6,12 +6,11 @@ SOURCE_ROOT = decoder_sw/software
+ OMX_ROOT = openmax_il
+ INCLUDE_HEADERS = -I./decoder_sw -I$(SOURCE_ROOT)/source/inc -I$(SOURCE_ROOT)/source/hevc \
+-           -I$(SOURCE_ROOT)/source/config -I$(SOURCE_ROOT)/source/dwl -I$(SOURCE_ROOT)/source/common -I$(SOURCE_ROOT)/source/vp9 \
+-           -I$(SDKTARGETSYSROOT)/usr/imx/include
++           -I$(SOURCE_ROOT)/source/config -I$(SOURCE_ROOT)/source/dwl -I$(SOURCE_ROOT)/source/common -I$(SOURCE_ROOT)/source/vp9
+ INCLUDE_HEADERS += -I$(SOURCE_ROOT)/linux/memalloc
+ #INCLUDE_HEADERS += -I$(SOURCE_ROOT)/linux/ldriver
+-INCLUDE_HEADERS += -I$(LINUX_KERNEL_ROOT)/include/uapi -I$(LINUX_KERNEL_ROOT)/include
++INCLUDE_HEADERS += -I$(SDKTARGETSYSROOT)/usr/include/imx
+ CFLAGS += -DDEC_MODULE_PATH=\"/dev/mxc_hantro\" -DUSE_FAKE_RFC_TABLE -DFIFO_DATATYPE=void* -DNDEBUG -DDOWN_SCALER \
+            -DUSE_EXTERNAL_BUFFER -DUSE_FAST_EC -DUSE_VP9_EC -DGET_FREE_BUFFER_NON_BLOCK \
+diff --git a/Makefile_H1 b/Makefile_H1
+index 9ca1aa9..237f53a 100755
+--- a/Makefile_H1
++++ b/Makefile_H1
+@@ -17,8 +17,7 @@ ENV += -DMEMALLOC_MODULE_PATH=\\\"/dev/ion\\\"
+ #ENV += -DSDRAM_LM_BASE=0x00000000
+ ENV += -DEWL_NO_HW_TIMEOUT
+ ENV += -DUSE_ION
+-ENV += -I$(LINUX_KERNEL_ROOT)/include/uapi -I$(LINUX_KERNEL_ROOT)/include
+-ENV += -I$(SDKTARGETSYSROOT)/usr/imx/include
++ENV += -I$(SDKTARGETSYSROOT)/usr/include/imx
+ LIBENCNAME = libcodec_enc
+ LIBSENC = -L./ -lhantro_h1 -lpthread
+-- 
+2.7.4
+
diff --git a/recipes-bsp/imx-vpu-hantro/imx-vpu-hantro/0002-Fix-version.h-inclusion-to-be-from-kernel-build-fold.patch b/recipes-bsp/imx-vpu-hantro/imx-vpu-hantro/0002-Fix-version.h-inclusion-to-be-from-kernel-build-fold.patch
deleted file mode 100644 (file)
index 9d54223..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-From 1d7b7046c8f735e150e92aeace3fe6d0686b9bc9 Mon Sep 17 00:00:00 2001
-From: Gary Bisson <gary.bisson@boundarydevices.com>
-Date: Wed, 3 Oct 2018 10:52:29 +0200
-Subject: [PATCH] Fix version.h inclusion to be from kernel build folder
-
-Instead of relying on Toolchain headers which can be from newer kernel.
-
-Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
----
- Makefile_G1G2 | 3 +++
- Makefile_H1   | 3 +++
- 2 files changed, 6 insertions(+)
-
-diff --git a/Makefile_G1G2 b/Makefile_G1G2
-index 29866a4..c473bcb 100755
---- a/Makefile_G1G2
-+++ b/Makefile_G1G2
-@@ -16,6 +16,9 @@ INCLUDE_HEADERS += -I$(LINUX_KERNEL_ROOT)/include/uapi -I$(LINUX_KERNEL_ROOT)/in
- # ION header location
- INCLUDE_HEADERS += -I$(LINUX_KERNEL_ROOT)/drivers/staging/android/uapi
-+# LINUX_VERSION_CODE from kernel build folder instead of toolchain headers
-+INCLUDE_HEADERS += -I$(LINUX_KERNEL_BUILD)/include/generated/uapi
-+
- CFLAGS += -DDEC_MODULE_PATH=\"/dev/mxc_hantro\" -DUSE_FAKE_RFC_TABLE -DFIFO_DATATYPE=void* -DNDEBUG -DDOWN_SCALER \
-            -DUSE_EXTERNAL_BUFFER -DUSE_FAST_EC -DUSE_VP9_EC -DGET_FREE_BUFFER_NON_BLOCK \
-            -DDEC_X170_OUTPUT_FORMAT=0 -DDEC_X170_TIMEOUT_LENGTH=-1 -DENABLE_HEVC_SUPPORT \
-diff --git a/Makefile_H1 b/Makefile_H1
-index 56b4332..0be43ce 100755
---- a/Makefile_H1
-+++ b/Makefile_H1
-@@ -23,6 +23,9 @@ ENV += -I$(SDKTARGETSYSROOT)/usr/imx/include
- # ION header location
- ENV += -I$(LINUX_KERNEL_ROOT)/drivers/staging/android/uapi
-+# LINUX_VERSION_CODE from kernel build folder instead of toolchain headers
-+ENV += -I$(LINUX_KERNEL_BUILD)/include/generated/uapi
-+
- LIBENCNAME = libcodec_enc
- LIBSENC = -L./ -lhantro_h1 -lpthread
--- 
-2.19.0
-
index b5fc846821224bbb07f90fa27a193397d417c1d1..25ef41ed8134aa2a22de4953ebbda21727e87d95 100644 (file)
@@ -4,15 +4,13 @@ DESCRIPTION = "i.MX Hantro VPU library"
 LICENSE = "Proprietary"
 LIC_FILES_CHKSUM = "file://COPYING;md5=5ab1a30d0cd181e3408077727ea5a2db"
 
-DEPENDS = "virtual/kernel"
-do_configure[depends] += "virtual/kernel:do_shared_workdir"
+DEPENDS = "linux-imx-headers"
 
 PROVIDES = "virtual/imxvpu"
 
 SRC_URI = " \
     ${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true \
-    file://0001-Fix-ion.h-header-inclusion-to-be-standard.patch \
-    file://0002-Fix-version.h-inclusion-to-be-from-kernel-build-fold.patch \
+    file://0001-Get-i.MX-custom-headers-from-usr-include-imx.patch \
 "
 SRC_URI[md5sum] = "140796ddd6f1be47cffb7e5e2bfe0fb6"
 SRC_URI[sha256sum] = "c092a5b0f8897bae54154f58e47b6d2de033da01ee231a8cd779a51bbe962606"
@@ -25,8 +23,8 @@ PLATFORM_mx8mm = "IMX8MM"
 PLATFORM_mx8mq = "IMX8MQ"
 
 do_compile () {
-    oe_runmake CROSS_COMPILE="${HOST_PREFIX}" LINUX_KERNEL_BUILD="${STAGING_KERNEL_BUILDDIR}" \
-        LINUX_KERNEL_ROOT="${STAGING_KERNEL_DIR}" SDKTARGETSYSROOT="${STAGING_DIR_TARGET}" \
+    oe_runmake CROSS_COMPILE="${HOST_PREFIX}" \
+        SDKTARGETSYSROOT="${STAGING_DIR_TARGET}" \
         PLATFORM="${PLATFORM}" all
 }