From a9bdd84705dcdd96d35216b2f3c646e98c44663c Mon Sep 17 00:00:00 2001 From: Jan-Simon Möller Date: Mon, 9 Jul 2018 23:52:49 +0200 Subject: most: apply conditional backport patch for kernels older than 4.13 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch makes the recipe apply a backport patch on systems running a kernel older than 4.13. It is needed to avoid build errors due to API changes. v2 (jsmoeller): rewrite as KERNEL_VERSION is not available at parsing stage This requires quite some plumbing and the maxkver (and minkver) should probably go upstream. For now we draft this up here as a bbappend. Change-Id: I48f75f6e98c7b6b4e92b6e43bc3743a5ec3fbbf7 Signed-off-by: Christian Gromm Signed-off-by: Jan-Simon Möller --- .../recipes-kernel/most/most.bbappend | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'meta-agl-profile-core/recipes-kernel/most/most.bbappend') diff --git a/meta-agl-profile-core/recipes-kernel/most/most.bbappend b/meta-agl-profile-core/recipes-kernel/most/most.bbappend index d85565fc2..4ebcba88d 100644 --- a/meta-agl-profile-core/recipes-kernel/most/most.bbappend +++ b/meta-agl-profile-core/recipes-kernel/most/most.bbappend @@ -1,7 +1,21 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +def prep_version (d) : + KV = d.getVar('KERNEL_VERSION', True) + if not KV : + return "4.12" + else: + return KV + +ORIG_KERN_VER = "${@prep_version(d)}" + +VANILLA_KERNEL_VERSION = "${@str(ORIG_KERN_VER.split("-")[0].split(".")[0]+ORIG_KERN_VER.split("-")[0].split(".")[1])}" + +APPLY = "${@str('no' if ${VANILLA_KERNEL_VERSION} > 412 else 'yes')}" + SRC_URI_append = " \ - file://0002-src-most-add-auto-conf-feature.patch \ + file://0001-most-aim-network-backport-Kernel-API.patch;apply=${APPLY} \ + file://0002-src-most-add-auto-conf-feature.patch \ file://0003-core-remove-kernel-log-for-MBO-status.patch \ file://0004-most-video-set-device_caps.patch \ file://0005-most-video-set-V4L2_CAP_DEVICE_CAPS-flag.patch \ @@ -10,3 +24,5 @@ SRC_URI_append = " \ file://0008-dim2-read-clock-speed-from-the-device-tree.patch \ file://0009-dim2-use-device-for-coherent-memory-allocation.patch \ " +# Make sure we can expose KERNEL_VERSION ... +do_patch[depends] = "virtual/kernel:do_populate_sysroot" -- cgit 1.2.3-korg