diff options
Diffstat (limited to 'recipes-bsp')
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 @@ | |||
1 | From cf67cfecc01538e32cd99e3ca00ff0e6145079ce Mon Sep 17 00:00:00 2001 | ||
2 | From: Yuqing Zhu <carol.zhu@nxp.com> | ||
3 | Date: Thu, 27 Sep 2018 15:34:11 +0800 | ||
4 | Subject: [PATCH] imx-vpu-hantro: Fix ion.h header inclusion to be standard | ||
5 | |||
6 | NXP "solution" was to manually copy the header to include/linux. | ||
7 | Let's point the Makefile to the proper (mainline) location instead: | ||
8 | https://elixir.bootlin.com/linux/v4.17/source/drivers/staging/android/uapi/ion.h | ||
9 | |||
10 | Signed-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 | |||
18 | diff --git a/Makefile_G1G2 b/Makefile_G1G2 | ||
19 | index 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 \ | ||
32 | diff --git a/Makefile_H1 b/Makefile_H1 | ||
33 | index 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 | |||
46 | diff --git a/decoder_sw/software/linux/dwl/dwl_linux.c b/decoder_sw/software/linux/dwl/dwl_linux.c | ||
47 | index 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 | ||
59 | diff --git a/h1_encoder/software/linux_reference/ewl/ewl_x280_common.c b/h1_encoder/software/linux_reference/ewl/ewl_x280_common.c | ||
60 | index 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 | -- | ||
73 | 1.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 @@ | |||
1 | From a277191d6e7d775b1c081f8b25734f6f962ade14 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tom Hochstein <tom.hochstein@nxp.com> | ||
3 | Date: Thu, 4 Oct 2018 10:34:00 -0500 | ||
4 | Subject: [PATCH] Get i.MX custom headers from /usr/include/imx | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-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 | |||
14 | diff --git a/Makefile_G1G2 b/Makefile_G1G2 | ||
15 | index 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 \ | ||
33 | diff --git a/Makefile_H1 b/Makefile_H1 | ||
34 | index 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 | -- | ||
48 | 2.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 @@ | |||
1 | From 1d7b7046c8f735e150e92aeace3fe6d0686b9bc9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Gary Bisson <gary.bisson@boundarydevices.com> | ||
3 | Date: Wed, 3 Oct 2018 10:52:29 +0200 | ||
4 | Subject: [PATCH] Fix version.h inclusion to be from kernel build folder | ||
5 | |||
6 | Instead of relying on Toolchain headers which can be from newer kernel. | ||
7 | |||
8 | Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com> | ||
9 | --- | ||
10 | Makefile_G1G2 | 3 +++ | ||
11 | Makefile_H1 | 3 +++ | ||
12 | 2 files changed, 6 insertions(+) | ||
13 | |||
14 | diff --git a/Makefile_G1G2 b/Makefile_G1G2 | ||
15 | index 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 \ | ||
28 | diff --git a/Makefile_H1 b/Makefile_H1 | ||
29 | index 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 | -- | ||
43 | 2.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" | |||
4 | LICENSE = "Proprietary" | 4 | LICENSE = "Proprietary" |
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=5ab1a30d0cd181e3408077727ea5a2db" | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=5ab1a30d0cd181e3408077727ea5a2db" |
6 | 6 | ||
7 | DEPENDS = "virtual/kernel" | 7 | DEPENDS = "linux-imx-headers" |
8 | do_configure[depends] += "virtual/kernel:do_shared_workdir" | ||
9 | 8 | ||
10 | PROVIDES = "virtual/imxvpu" | 9 | PROVIDES = "virtual/imxvpu" |
11 | 10 | ||
12 | SRC_URI = " \ | 11 | SRC_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 | " |
17 | SRC_URI[md5sum] = "140796ddd6f1be47cffb7e5e2bfe0fb6" | 15 | SRC_URI[md5sum] = "140796ddd6f1be47cffb7e5e2bfe0fb6" |
18 | SRC_URI[sha256sum] = "c092a5b0f8897bae54154f58e47b6d2de033da01ee231a8cd779a51bbe962606" | 16 | SRC_URI[sha256sum] = "c092a5b0f8897bae54154f58e47b6d2de033da01ee231a8cd779a51bbe962606" |
@@ -25,8 +23,8 @@ PLATFORM_mx8mm = "IMX8MM" | |||
25 | PLATFORM_mx8mq = "IMX8MQ" | 23 | PLATFORM_mx8mq = "IMX8MQ" |
26 | 24 | ||
27 | do_compile () { | 25 | do_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 | ||