]> code.ossystems Code Review - meta-freescale.git/commitdiff
linux-imx-headers: Add recipe for i.MX custom kernel headers
authorTom Hochstein <tom.hochstein@nxp.com>
Fri, 5 Oct 2018 16:04:24 +0000 (11:04 -0500)
committerOtavio Salvador <otavio@ossystems.com.br>
Fri, 26 Oct 2018 17:23:37 +0000 (14:23 -0300)
Add a separate package for installing custom i.MX kernel headers.
This way packages depending on these headers will need to be rebuilt
only when the headers change instead of for every kernel change.

Headers are installed to ${includedir}/imx, in the expected sub-folder,
and dependents of the headers will need to add this include path.

Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
recipes-kernel/linux/linux-imx-headers-4.9.123/0001-uapi-Install-custom-headers.patch [new file with mode: 0644]
recipes-kernel/linux/linux-imx-headers_4.9.123.bb [new file with mode: 0644]

diff --git a/recipes-kernel/linux/linux-imx-headers-4.9.123/0001-uapi-Install-custom-headers.patch b/recipes-kernel/linux/linux-imx-headers-4.9.123/0001-uapi-Install-custom-headers.patch
new file mode 100644 (file)
index 0000000..fd842bf
--- /dev/null
@@ -0,0 +1,40 @@
+From 33c85073a35e697e080583ca8edb31400b45de60 Mon Sep 17 00:00:00 2001
+From: Tom Hochstein <tom.hochstein@nxp.com>
+Date: Wed, 3 Oct 2018 18:02:43 -0500
+Subject: [PATCH] uapi: Install custom headers
+
+Upstream-Status: Inappropriate [i.MX specific]
+
+Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
+---
+ include/uapi/linux/Kbuild | 2 ++
+ 1 file changed, 2 insertions(+)
+
+Index: git/include/uapi/linux/Kbuild
+===================================================================
+--- git.orig/include/uapi/linux/Kbuild
++++ git/include/uapi/linux/Kbuild
+@@ -104,6 +104,7 @@ header-y += dlm_device.h
+ header-y += dlm.h
+ header-y += dlm_netlink.h
+ header-y += dlm_plock.h
++header-y += dma-buf.h
+ header-y += dm-ioctl.h
+ header-y += dm-log-userspace.h
+ header-y += dn.h
+@@ -144,6 +145,7 @@ header-y += gigaset_dev.h
+ header-y += gpio.h
+ header-y += gsmmux.h
+ header-y += gtp.h
++header-y += hantrodec.h
+ header-y += hdlcdrv.h
+ header-y += hdlc.h
+ header-y += hdreg.h
+@@ -152,6 +154,7 @@ header-y += hid.h
+ header-y += hidraw.h
+ header-y += hpet.h
+ header-y += hsr_netlink.h
++header-y += hx280enc.h
+ header-y += hyperv.h
+ header-y += hysdn_if.h
+ header-y += i2c-dev.h
diff --git a/recipes-kernel/linux/linux-imx-headers_4.9.123.bb b/recipes-kernel/linux/linux-imx-headers_4.9.123.bb
new file mode 100644 (file)
index 0000000..3a5e87e
--- /dev/null
@@ -0,0 +1,49 @@
+# Copyright 2017-2018 NXP
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "Installs i.MX-specific kernel headers"
+DESCRIPTION = "Installs i.MX-specific kernel headers to userspace. \
+New headers are installed in ${includedir}/imx."
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
+
+SRCBRANCH = "imx_4.9.123_imx8mm_ga"
+LOCALVERSION = "-${SRCBRANCH}"
+SRC_URI = "git://source.codeaurora.org/external/imx/linux-imx.git;protocol=https;branch=${SRCBRANCH} \
+    file://0001-uapi-Install-custom-headers.patch"
+SRCREV = "6a71cbc089755afd6a86c005c22a1af6eab24a70"
+S = "${WORKDIR}/git"
+
+do_compile[noexec] = "1"
+
+IMX_UAPI_HEADERS = " \
+    dma-buf.h \
+    hantrodec.h \
+    hx280enc.h \
+    ion.h \
+    ipu.h \
+    isl29023.h \
+    mxc_asrc.h \
+    mxc_dcic.h \
+    mxc_mlb.h \
+    mxc_sim_interface.h \
+    mxc_v4l2.h \
+    mxcfb.h \
+    pxp_device.h \
+    pxp_dma.h \
+    version.h \
+    videodev2.h \
+"
+
+do_install() {
+    oe_runmake headers_install INSTALL_HDR_PATH=${B}${exec_prefix}
+    cp ${S}/drivers/staging/android/uapi/ion.h ${B}${includedir}/linux
+    src=${B}${includedir}/linux
+    dest=${D}${includedir}/imx/linux
+    install -d $dest
+    cd $src
+    install -m 0644 ${IMX_UAPI_HEADERS} $dest
+    cd -
+}
+
+PACKAGE_ARCH = "${MACHINE_SOCARCH}"