summaryrefslogtreecommitdiffstats
path: root/recipes-bsp
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-bsp')
-rw-r--r--recipes-bsp/imx-vpu-hantro/imx-vpu-hantro/0001-Fix-ion.h-header-inclusion-to-be-standard.patch74
-rw-r--r--recipes-bsp/imx-vpu-hantro/imx-vpu-hantro/0001-Get-i.MX-custom-headers-from-usr-include-imx.patch49
-rw-r--r--recipes-bsp/imx-vpu-hantro/imx-vpu-hantro/0002-Fix-version.h-inclusion-to-be-from-kernel-build-fold.patch44
-rw-r--r--recipes-bsp/imx-vpu-hantro/imx-vpu-hantro_1.8.0.bb10
4 files changed, 53 insertions, 124 deletions
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
index 27731004..00000000
--- a/recipes-bsp/imx-vpu-hantro/imx-vpu-hantro/0001-Fix-ion.h-header-inclusion-to-be-standard.patch
+++ /dev/null
@@ -1,74 +0,0 @@
1From cf67cfecc01538e32cd99e3ca00ff0e6145079ce Mon Sep 17 00:00:00 2001
2From: Yuqing Zhu <carol.zhu@nxp.com>
3Date: Thu, 27 Sep 2018 15:34:11 +0800
4Subject: [PATCH] imx-vpu-hantro: Fix ion.h header inclusion to be standard
5
6NXP "solution" was to manually copy the header to include/linux.
7Let's point the Makefile to the proper (mainline) location instead:
8https://elixir.bootlin.com/linux/v4.17/source/drivers/staging/android/uapi/ion.h
9
10Signed-off-by: Yuqing Zhu <carol.zhu@nxp.com>
11---
12 Makefile_G1G2 | 3 +++
13 Makefile_H1 | 3 +++
14 decoder_sw/software/linux/dwl/dwl_linux.c | 2 +-
15 h1_encoder/software/linux_reference/ewl/ewl_x280_common.c | 2 +-
16 4 files changed, 8 insertions(+), 2 deletions(-)
17
18diff --git a/Makefile_G1G2 b/Makefile_G1G2
19index caab40f..29866a4 100755
20--- a/Makefile_G1G2
21+++ b/Makefile_G1G2
22@@ -13,6 +13,9 @@ INCLUDE_HEADERS += -I$(SOURCE_ROOT)/linux/memalloc
23 #INCLUDE_HEADERS += -I$(SOURCE_ROOT)/linux/ldriver
24 INCLUDE_HEADERS += -I$(LINUX_KERNEL_ROOT)/include/uapi -I$(LINUX_KERNEL_ROOT)/include
25
26+# ION header location
27+INCLUDE_HEADERS += -I$(LINUX_KERNEL_ROOT)/drivers/staging/android/uapi
28+
29 CFLAGS += -DDEC_MODULE_PATH=\"/dev/mxc_hantro\" -DUSE_FAKE_RFC_TABLE -DFIFO_DATATYPE=void* -DNDEBUG -DDOWN_SCALER \
30 -DUSE_EXTERNAL_BUFFER -DUSE_FAST_EC -DUSE_VP9_EC -DGET_FREE_BUFFER_NON_BLOCK \
31 -DDEC_X170_OUTPUT_FORMAT=0 -DDEC_X170_TIMEOUT_LENGTH=-1 -DENABLE_HEVC_SUPPORT \
32diff --git a/Makefile_H1 b/Makefile_H1
33index 9ca1aa9..56b4332 100755
34--- a/Makefile_H1
35+++ b/Makefile_H1
36@@ -20,6 +20,9 @@ ENV += -DUSE_ION
37 ENV += -I$(LINUX_KERNEL_ROOT)/include/uapi -I$(LINUX_KERNEL_ROOT)/include
38 ENV += -I$(SDKTARGETSYSROOT)/usr/imx/include
39
40+# ION header location
41+ENV += -I$(LINUX_KERNEL_ROOT)/drivers/staging/android/uapi
42+
43 LIBENCNAME = libcodec_enc
44 LIBSENC = -L./ -lhantro_h1 -lpthread
45
46diff --git a/decoder_sw/software/linux/dwl/dwl_linux.c b/decoder_sw/software/linux/dwl/dwl_linux.c
47index 0899596..f2e1229 100755
48--- a/decoder_sw/software/linux/dwl/dwl_linux.c
49+++ b/decoder_sw/software/linux/dwl/dwl_linux.c
50@@ -41,7 +41,7 @@
51 #include "dwl.h"
52 #include <linux/hantrodec.h>
53 #ifdef USE_ION
54-#include <linux/ion.h>
55+#include <ion.h>
56 #include <linux/dma-buf.h>
57 #include <linux/version.h>
58 #ifdef ANDROID
59diff --git a/h1_encoder/software/linux_reference/ewl/ewl_x280_common.c b/h1_encoder/software/linux_reference/ewl/ewl_x280_common.c
60index 620c978..82b4836 100755
61--- a/h1_encoder/software/linux_reference/ewl/ewl_x280_common.c
62+++ b/h1_encoder/software/linux_reference/ewl/ewl_x280_common.c
63@@ -49,7 +49,7 @@
64
65 #include "linux/hx280enc.h"
66 #ifdef USE_ION
67-#include <linux/ion.h>
68+#include <ion.h>
69 #include <linux/dma-buf.h>
70 #include <linux/version.h>
71 #ifdef ANDROID
72--
731.9.1
74
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
index 00000000..a41641df
--- /dev/null
+++ b/recipes-bsp/imx-vpu-hantro/imx-vpu-hantro/0001-Get-i.MX-custom-headers-from-usr-include-imx.patch
@@ -0,0 +1,49 @@
1From a277191d6e7d775b1c081f8b25734f6f962ade14 Mon Sep 17 00:00:00 2001
2From: Tom Hochstein <tom.hochstein@nxp.com>
3Date: Thu, 4 Oct 2018 10:34:00 -0500
4Subject: [PATCH] Get i.MX custom headers from /usr/include/imx
5
6Upstream-Status: Pending
7
8Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
9---
10 Makefile_G1G2 | 5 ++---
11 Makefile_H1 | 3 +--
12 2 files changed, 3 insertions(+), 5 deletions(-)
13
14diff --git a/Makefile_G1G2 b/Makefile_G1G2
15index caab40f..5b55a8b 100755
16--- a/Makefile_G1G2
17+++ b/Makefile_G1G2
18@@ -6,12 +6,11 @@ SOURCE_ROOT = decoder_sw/software
19 OMX_ROOT = openmax_il
20
21 INCLUDE_HEADERS = -I./decoder_sw -I$(SOURCE_ROOT)/source/inc -I$(SOURCE_ROOT)/source/hevc \
22- -I$(SOURCE_ROOT)/source/config -I$(SOURCE_ROOT)/source/dwl -I$(SOURCE_ROOT)/source/common -I$(SOURCE_ROOT)/source/vp9 \
23- -I$(SDKTARGETSYSROOT)/usr/imx/include
24+ -I$(SOURCE_ROOT)/source/config -I$(SOURCE_ROOT)/source/dwl -I$(SOURCE_ROOT)/source/common -I$(SOURCE_ROOT)/source/vp9
25
26 INCLUDE_HEADERS += -I$(SOURCE_ROOT)/linux/memalloc
27 #INCLUDE_HEADERS += -I$(SOURCE_ROOT)/linux/ldriver
28-INCLUDE_HEADERS += -I$(LINUX_KERNEL_ROOT)/include/uapi -I$(LINUX_KERNEL_ROOT)/include
29+INCLUDE_HEADERS += -I$(SDKTARGETSYSROOT)/usr/include/imx
30
31 CFLAGS += -DDEC_MODULE_PATH=\"/dev/mxc_hantro\" -DUSE_FAKE_RFC_TABLE -DFIFO_DATATYPE=void* -DNDEBUG -DDOWN_SCALER \
32 -DUSE_EXTERNAL_BUFFER -DUSE_FAST_EC -DUSE_VP9_EC -DGET_FREE_BUFFER_NON_BLOCK \
33diff --git a/Makefile_H1 b/Makefile_H1
34index 9ca1aa9..237f53a 100755
35--- a/Makefile_H1
36+++ b/Makefile_H1
37@@ -17,8 +17,7 @@ ENV += -DMEMALLOC_MODULE_PATH=\\\"/dev/ion\\\"
38 #ENV += -DSDRAM_LM_BASE=0x00000000
39 ENV += -DEWL_NO_HW_TIMEOUT
40 ENV += -DUSE_ION
41-ENV += -I$(LINUX_KERNEL_ROOT)/include/uapi -I$(LINUX_KERNEL_ROOT)/include
42-ENV += -I$(SDKTARGETSYSROOT)/usr/imx/include
43+ENV += -I$(SDKTARGETSYSROOT)/usr/include/imx
44
45 LIBENCNAME = libcodec_enc
46 LIBSENC = -L./ -lhantro_h1 -lpthread
47--
482.7.4
49
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
index 9d542231..00000000
--- a/recipes-bsp/imx-vpu-hantro/imx-vpu-hantro/0002-Fix-version.h-inclusion-to-be-from-kernel-build-fold.patch
+++ /dev/null
@@ -1,44 +0,0 @@
1From 1d7b7046c8f735e150e92aeace3fe6d0686b9bc9 Mon Sep 17 00:00:00 2001
2From: Gary Bisson <gary.bisson@boundarydevices.com>
3Date: Wed, 3 Oct 2018 10:52:29 +0200
4Subject: [PATCH] Fix version.h inclusion to be from kernel build folder
5
6Instead of relying on Toolchain headers which can be from newer kernel.
7
8Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
9---
10 Makefile_G1G2 | 3 +++
11 Makefile_H1 | 3 +++
12 2 files changed, 6 insertions(+)
13
14diff --git a/Makefile_G1G2 b/Makefile_G1G2
15index 29866a4..c473bcb 100755
16--- a/Makefile_G1G2
17+++ b/Makefile_G1G2
18@@ -16,6 +16,9 @@ INCLUDE_HEADERS += -I$(LINUX_KERNEL_ROOT)/include/uapi -I$(LINUX_KERNEL_ROOT)/in
19 # ION header location
20 INCLUDE_HEADERS += -I$(LINUX_KERNEL_ROOT)/drivers/staging/android/uapi
21
22+# LINUX_VERSION_CODE from kernel build folder instead of toolchain headers
23+INCLUDE_HEADERS += -I$(LINUX_KERNEL_BUILD)/include/generated/uapi
24+
25 CFLAGS += -DDEC_MODULE_PATH=\"/dev/mxc_hantro\" -DUSE_FAKE_RFC_TABLE -DFIFO_DATATYPE=void* -DNDEBUG -DDOWN_SCALER \
26 -DUSE_EXTERNAL_BUFFER -DUSE_FAST_EC -DUSE_VP9_EC -DGET_FREE_BUFFER_NON_BLOCK \
27 -DDEC_X170_OUTPUT_FORMAT=0 -DDEC_X170_TIMEOUT_LENGTH=-1 -DENABLE_HEVC_SUPPORT \
28diff --git a/Makefile_H1 b/Makefile_H1
29index 56b4332..0be43ce 100755
30--- a/Makefile_H1
31+++ b/Makefile_H1
32@@ -23,6 +23,9 @@ ENV += -I$(SDKTARGETSYSROOT)/usr/imx/include
33 # ION header location
34 ENV += -I$(LINUX_KERNEL_ROOT)/drivers/staging/android/uapi
35
36+# LINUX_VERSION_CODE from kernel build folder instead of toolchain headers
37+ENV += -I$(LINUX_KERNEL_BUILD)/include/generated/uapi
38+
39 LIBENCNAME = libcodec_enc
40 LIBSENC = -L./ -lhantro_h1 -lpthread
41
42--
432.19.0
44
diff --git a/recipes-bsp/imx-vpu-hantro/imx-vpu-hantro_1.8.0.bb b/recipes-bsp/imx-vpu-hantro/imx-vpu-hantro_1.8.0.bb
index b5fc8468..25ef41ed 100644
--- a/recipes-bsp/imx-vpu-hantro/imx-vpu-hantro_1.8.0.bb
+++ b/recipes-bsp/imx-vpu-hantro/imx-vpu-hantro_1.8.0.bb
@@ -4,15 +4,13 @@ DESCRIPTION = "i.MX Hantro VPU library"
4LICENSE = "Proprietary" 4LICENSE = "Proprietary"
5LIC_FILES_CHKSUM = "file://COPYING;md5=5ab1a30d0cd181e3408077727ea5a2db" 5LIC_FILES_CHKSUM = "file://COPYING;md5=5ab1a30d0cd181e3408077727ea5a2db"
6 6
7DEPENDS = "virtual/kernel" 7DEPENDS = "linux-imx-headers"
8do_configure[depends] += "virtual/kernel:do_shared_workdir"
9 8
10PROVIDES = "virtual/imxvpu" 9PROVIDES = "virtual/imxvpu"
11 10
12SRC_URI = " \ 11SRC_URI = " \
13 ${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true \ 12 ${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true \
14 file://0001-Fix-ion.h-header-inclusion-to-be-standard.patch \ 13 file://0001-Get-i.MX-custom-headers-from-usr-include-imx.patch \
15 file://0002-Fix-version.h-inclusion-to-be-from-kernel-build-fold.patch \
16" 14"
17SRC_URI[md5sum] = "140796ddd6f1be47cffb7e5e2bfe0fb6" 15SRC_URI[md5sum] = "140796ddd6f1be47cffb7e5e2bfe0fb6"
18SRC_URI[sha256sum] = "c092a5b0f8897bae54154f58e47b6d2de033da01ee231a8cd779a51bbe962606" 16SRC_URI[sha256sum] = "c092a5b0f8897bae54154f58e47b6d2de033da01ee231a8cd779a51bbe962606"
@@ -25,8 +23,8 @@ PLATFORM_mx8mm = "IMX8MM"
25PLATFORM_mx8mq = "IMX8MQ" 23PLATFORM_mx8mq = "IMX8MQ"
26 24
27do_compile () { 25do_compile () {
28 oe_runmake CROSS_COMPILE="${HOST_PREFIX}" LINUX_KERNEL_BUILD="${STAGING_KERNEL_BUILDDIR}" \ 26 oe_runmake CROSS_COMPILE="${HOST_PREFIX}" \
29 LINUX_KERNEL_ROOT="${STAGING_KERNEL_DIR}" SDKTARGETSYSROOT="${STAGING_DIR_TARGET}" \ 27 SDKTARGETSYSROOT="${STAGING_DIR_TARGET}" \
30 PLATFORM="${PLATFORM}" all 28 PLATFORM="${PLATFORM}" all
31} 29}
32 30