diff options
author | Gary Bisson <gary.bisson@boundarydevices.com> | 2018-10-03 12:24:42 +0200 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2018-10-04 12:43:42 -0300 |
commit | 387b285adc25aa244bfe90f4083320304af237c5 (patch) | |
tree | 1b1366e64450778148a834c4d01ab1493a215e92 /recipes-bsp/imx-vpu-hantro | |
parent | b9d5f039c61ee106be048fd31bb2b0531beb7b02 (diff) | |
download | meta-freescale-387b285adc25aa244bfe90f4083320304af237c5.tar.gz |
imx-vpu-hantro: fix build issue
The source code uses LINUX_VERSION_CODE at many places which constraints
the package to be built with a toolchain whose headers match the kernel.
This is a far from ideal solution, especially if one wants to use a
prebuilt toolchain (with unknown kernel header version).
So change the CFLAGS to consider the kernel build folder so that the
Linux version test actually matches the kernel built.
Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'recipes-bsp/imx-vpu-hantro')
-rw-r--r-- | recipes-bsp/imx-vpu-hantro/imx-vpu-hantro/0002-Fix-version.h-inclusion-to-be-from-kernel-build-fold.patch | 44 | ||||
-rw-r--r-- | recipes-bsp/imx-vpu-hantro/imx-vpu-hantro_1.8.0.bb | 5 |
2 files changed, 48 insertions, 1 deletions
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 new file mode 100644 index 00000000..e9bf9257 --- /dev/null +++ b/recipes-bsp/imx-vpu-hantro/imx-vpu-hantro/0002-Fix-version.h-inclusion-to-be-from-kernel-build-fold.patch | |||
@@ -0,0 +1,44 @@ | |||
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 | +INCLUDE_HEADERS += -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 243f1f35..b5fc8468 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 | |||
@@ -12,6 +12,7 @@ PROVIDES = "virtual/imxvpu" | |||
12 | SRC_URI = " \ | 12 | SRC_URI = " \ |
13 | ${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true \ | 13 | ${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true \ |
14 | file://0001-Fix-ion.h-header-inclusion-to-be-standard.patch \ | 14 | file://0001-Fix-ion.h-header-inclusion-to-be-standard.patch \ |
15 | file://0002-Fix-version.h-inclusion-to-be-from-kernel-build-fold.patch \ | ||
15 | " | 16 | " |
16 | SRC_URI[md5sum] = "140796ddd6f1be47cffb7e5e2bfe0fb6" | 17 | SRC_URI[md5sum] = "140796ddd6f1be47cffb7e5e2bfe0fb6" |
17 | SRC_URI[sha256sum] = "c092a5b0f8897bae54154f58e47b6d2de033da01ee231a8cd779a51bbe962606" | 18 | SRC_URI[sha256sum] = "c092a5b0f8897bae54154f58e47b6d2de033da01ee231a8cd779a51bbe962606" |
@@ -24,7 +25,9 @@ PLATFORM_mx8mm = "IMX8MM" | |||
24 | PLATFORM_mx8mq = "IMX8MQ" | 25 | PLATFORM_mx8mq = "IMX8MQ" |
25 | 26 | ||
26 | do_compile () { | 27 | do_compile () { |
27 | oe_runmake CROSS_COMPILE="${HOST_PREFIX}" LINUX_KERNEL_ROOT="${STAGING_KERNEL_DIR}" SDKTARGETSYSROOT="${STAGING_DIR_TARGET}" PLATFORM="${PLATFORM}" all | 28 | oe_runmake CROSS_COMPILE="${HOST_PREFIX}" LINUX_KERNEL_BUILD="${STAGING_KERNEL_BUILDDIR}" \ |
29 | LINUX_KERNEL_ROOT="${STAGING_KERNEL_DIR}" SDKTARGETSYSROOT="${STAGING_DIR_TARGET}" \ | ||
30 | PLATFORM="${PLATFORM}" all | ||
28 | } | 31 | } |
29 | 32 | ||
30 | do_install () { | 33 | do_install () { |