[meta-freescale] [meta-fsl-arm][PATCH 2/2] linux-imx: Update include file to include i.MX headers
Lauren Post
lauren.post at nxp.com
Fri Sep 9 11:51:28 PDT 2016
Uapi headers are not installed so applications like imx-test will break
This supports the kernel recipe installing uapi headers into the sysroot
Signed-off-by: Lauren Post <lauren.post at nxp.com>
---
recipes-kernel/linux/linux-imx.inc | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/recipes-kernel/linux/linux-imx.inc b/recipes-kernel/linux/linux-imx.inc
index 4835e78..bbb12be 100644
--- a/recipes-kernel/linux/linux-imx.inc
+++ b/recipes-kernel/linux/linux-imx.inc
@@ -20,3 +20,31 @@ S = "${WORKDIR}/git"
# We need to pass it as param since kernel might support more then one
# machine, with different entry points
KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
+
+IMX_UAPI_HEADERS = "mxc_asrc.h mxc_dcic.h mxcfb.h mxc_mlb.h mxc_sim_interface.h \
+ mxc_v4l2.h ipu.h videodev2.h pxp_device.h pxp_dma.h isl29023.h"
+
+do_install_append () {
+ # Install i.MX specific uapi headers
+ oe_runmake headers_install INSTALL_HDR_PATH=${B}${exec_prefix}
+ install -d ${D}${exec_prefix}/include/linux
+ for UAPI_HDR in ${IMX_UAPI_HEADERS}; do
+ find ${B}${exec_prefix}/include -name ${UAPI_HDR} -exec cp {} ${D}${exec_prefix}/include/linux \;
+ ls ${D}${exec_prefix}/include/linux
+ echo "copy ${UAPI_HDR} done"
+ done
+}
+
+sysroot_stage_all_append () {
+ # FIXME: Remove videodev2.h as conflict with linux-libc-headers
+ find ${D}${exec_prefix}/include -name videodev2.h -exec mv {} ${B} \;
+ # Install SOC related uapi headers to sysroot
+ sysroot_stage_dir ${D}${exec_prefix}/include ${SYSROOT_DESTDIR}${exec_prefix}/include
+ # FIXME: Restore videodev2 back
+ if [ -e ${B}/videodev2.h ]; then
+ mv ${B}/videodev2.h ${D}${exec_prefix}/include/linux/
+ fi
+}
+
+PACKAGES += "${PN}-soc-headers"
+FILES_${PN}-soc-headers = "${exec_prefix}/include"
--
1.9.1
More information about the meta-freescale
mailing list