summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2023-05-01 16:06:57 +0200
committerMax Krummenacher <max.krummenacher@toradex.com>2023-08-06 13:44:02 +0200
commit718e9b380f06d7bd76a3d0087909693db4f421c7 (patch)
treed4f3d9a1995ab8801b72030f8aaaaf20bcacb590
parent2d52291e53d1113c6bc0ab05bc17250ce7807e70 (diff)
linux-imx-headers: provide 5.15 version
meta-freescale master moved to the 6.1 downstream fork which no longer provides all headers needed with our 5.15 fork. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
-rw-r--r--conf/machine/apalis-imx8.conf1
-rw-r--r--conf/machine/colibri-imx8x.conf1
-rw-r--r--conf/machine/verdin-imx8mm.conf2
-rw-r--r--conf/machine/verdin-imx8mp.conf1
-rw-r--r--recipes-kernel/linux/linux-imx-headers_5.15.bb79
5 files changed, 84 insertions, 0 deletions
diff --git a/conf/machine/apalis-imx8.conf b/conf/machine/apalis-imx8.conf
index 4d494ea..031442a 100644
--- a/conf/machine/apalis-imx8.conf
+++ b/conf/machine/apalis-imx8.conf
@@ -59,6 +59,7 @@ PREFERRED_PROVIDER_u-boot-default-script = "u-boot-distro-boot"
PREFERRED_PROVIDER_virtual/kernel = "linux-toradex"
PREFERRED_PROVIDER_virtual/kernel:preempt-rt = "linux-toradex"
+PREFERRED_VERSION_linux-imx-headers = "5.15"
PREFERRED_PROVIDER_virtual/bootloader = "u-boot-toradex"
PREFERRED_PROVIDER_u-boot = "u-boot-toradex"
# Currently we use the nxp 2022.04 downstream for mx8
diff --git a/conf/machine/colibri-imx8x.conf b/conf/machine/colibri-imx8x.conf
index 01e0b78..212a5e0 100644
--- a/conf/machine/colibri-imx8x.conf
+++ b/conf/machine/colibri-imx8x.conf
@@ -61,6 +61,7 @@ PREFERRED_PROVIDER_virtual/kernel:preempt-rt = "linux-toradex"
PREFERRED_PROVIDER_virtual/kernel:use-mainline-bsp = "linux-toradex-mainline"
PREFERRED_PROVIDER_virtual/kernel:use-mainline-bsp:preempt-rt = "linux-toradex-mainline-rt"
PREFERRED_PROVIDER_virtual/dtb:use-mainline-bsp = "device-tree-overlays-mainline"
+PREFERRED_VERSION_linux-imx-headers = "5.15"
PREFERRED_PROVIDER_virtual/bootloader = "u-boot-toradex"
PREFERRED_PROVIDER_u-boot = "u-boot-toradex"
diff --git a/conf/machine/verdin-imx8mm.conf b/conf/machine/verdin-imx8mm.conf
index b2a48dd..2ee78c2 100644
--- a/conf/machine/verdin-imx8mm.conf
+++ b/conf/machine/verdin-imx8mm.conf
@@ -78,6 +78,8 @@ PREFERRED_PROVIDER_virtual/kernel:preempt-rt = "linux-toradex"
PREFERRED_PROVIDER_virtual/kernel:use-mainline-bsp = "linux-toradex-mainline"
PREFERRED_PROVIDER_virtual/kernel:use-mainline-bsp:preempt-rt = "linux-toradex-mainline-rt"
PREFERRED_PROVIDER_virtual/dtb:use-mainline-bsp = "device-tree-overlays-mainline"
+PREFERRED_VERSION_linux-imx-headers = "5.15"
+MACHINE_EXTRA_RRECOMMENDS:append:use-mainline-bsp = " modprobe-conf"
IMX_DEFAULT_BOOTLOADER = "u-boot-toradex"
# Currently we use the nxp 2022.04 downstream for mx8
diff --git a/conf/machine/verdin-imx8mp.conf b/conf/machine/verdin-imx8mp.conf
index 25e09f6..2f8adb7 100644
--- a/conf/machine/verdin-imx8mp.conf
+++ b/conf/machine/verdin-imx8mp.conf
@@ -80,6 +80,7 @@ PREFERRED_PROVIDER_virtual/kernel:preempt-rt = "linux-toradex"
PREFERRED_PROVIDER_virtual/kernel:use-mainline-bsp = "linux-toradex-mainline"
PREFERRED_PROVIDER_virtual/kernel:use-mainline-bsp:preempt-rt = "linux-toradex-mainline-rt"
PREFERRED_PROVIDER_virtual/dtb:use-mainline-bsp = "device-tree-overlays-mainline"
+PREFERRED_VERSION_linux-imx-headers = "5.15"
IMX_DEFAULT_BOOTLOADER = "u-boot-toradex"
# Currently we use the nxp 2022.04 downstream for mx8
diff --git a/recipes-kernel/linux/linux-imx-headers_5.15.bb b/recipes-kernel/linux/linux-imx-headers_5.15.bb
new file mode 100644
index 0000000..ae15190
--- /dev/null
+++ b/recipes-kernel/linux/linux-imx-headers_5.15.bb
@@ -0,0 +1,79 @@
+# Copyright 2017-2021 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 = "GPL-2.0-only"
+LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
+
+SRC_URI = "git://github.com/nxp-imx/linux-imx.git;protocol=https;branch=${SRCBRANCH}"
+SRCBRANCH = "lf-5.15.y"
+LOCALVERSION = "-5.15.71-2.2.0"
+SRCREV = "3313732e9984cb8a6b10a9085c7e18d58e770d56"
+
+S = "${WORKDIR}/git"
+
+do_configure[noexec] = "1"
+
+do_compile[noexec] = "1"
+
+IMX_UAPI_HEADERS = " \
+ dma-buf.h \
+ hantrodec.h \
+ hx280enc.h \
+ ipu.h \
+ isl29023.h \
+ imx_vpu.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() {
+ # We install all headers inside of B so we can copy only the
+ # i.MX-specific ones, and there is no risk of a new header to be
+ # installed by mistake.
+ oe_runmake headers_install INSTALL_HDR_PATH=${B}${exec_prefix}
+
+ ################################################
+ # BEGIN Copy of exceptional logic from linux-libc-headers
+ # Kernel should not be exporting this header
+ rm -f ${B}${exec_prefix}/include/scsi/scsi.h
+
+ # The ..install.cmd conflicts between various configure runs
+ find ${B}${includedir} -name ..install.cmd | xargs rm -f
+ # END Copy from linux-libc-headers
+ ################################################
+
+ # Install i.MX-specific headers only
+ for h in ${IMX_UAPI_HEADERS}; do
+ install -D -m 0644 ${B}${includedir}/linux/$h \
+ ${D}${includedir}/imx/linux/$h
+ done
+}
+
+# Allow to build empty main package, this is required in order for -dev package
+# to be propagated into the SDK
+#
+# Without this setting the RDEPENDS in other recipes fails to find this
+# package, therefore causing the -dev package also to be skipped effectively not
+# populating it into SDK
+ALLOW_EMPTY:${PN} = "1"
+
+INHIBIT_DEFAULT_DEPS = "1"
+DEPENDS += "unifdef-native bison-native rsync-native"
+
+PACKAGE_ARCH = "${MACHINE_SOCARCH}"
+
+# Restrict this recipe to NXP BSP only, this recipe is not compatible
+# with mainline BSP
+COMPATIBLE_HOST = '(null)'
+COMPATIBLE_HOST:use-nxp-bsp = '.*'