diff mbox series

[isar-cip-core] linux: Factor out cip-kernel-config and use it for 6.1 mainline as well

Message ID f1be8d8c-d58d-715f-b6c0-39d76826450e@siemens.com (mailing list archive)
State Superseded
Headers show
Series [isar-cip-core] linux: Factor out cip-kernel-config and use it for 6.1 mainline as well | expand

Commit Message

Jan Kiszka May 17, 2023, 6:19 a.m. UTC
From: Jan Kiszka <jan.kiszka@siemens.com>

This fixes the build of linux-mainline for targets that have
USE_CIP_KERNEL_CONFIG set.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 recipes-kernel/linux/cip-kernel-config.inc    | 17 +++++++++++++++++
 recipes-kernel/linux/linux-cip-common.inc     |  9 ++-------
 recipes-kernel/linux/linux-mainline_6.1.15.bb |  3 +++
 3 files changed, 22 insertions(+), 7 deletions(-)
 create mode 100644 recipes-kernel/linux/cip-kernel-config.inc
diff mbox series

Patch

diff --git a/recipes-kernel/linux/cip-kernel-config.inc b/recipes-kernel/linux/cip-kernel-config.inc
new file mode 100644
index 00000000..329b9f7e
--- /dev/null
+++ b/recipes-kernel/linux/cip-kernel-config.inc
@@ -0,0 +1,17 @@ 
+#
+# CIP Core, generic profile
+#
+# Copyright (c) Siemens AG, 2022-2023
+#
+# Authors:
+#  Jan Kiszka <jan.kiszka@siemens.com>
+#
+# SPDX-License-Identifier: MIT
+#
+
+SRC_URI:append = " ${@ \
+    'git://gitlab.com/cip-project/cip-kernel/cip-kernel-config.git;protocol=https;branch=master;destsuffix=cip-kernel-config;name=cip-kernel-config' \
+    if d.getVar('USE_CIP_KERNEL_CONFIG') == '1' else '' \
+    }"
+
+SRCREV_cip-kernel-config ?= "d1efa37258380c7f4f39a8dee1bdb4d85f1c0199"
diff --git a/recipes-kernel/linux/linux-cip-common.inc b/recipes-kernel/linux/linux-cip-common.inc
index a700d30e..c0f076a9 100644
--- a/recipes-kernel/linux/linux-cip-common.inc
+++ b/recipes-kernel/linux/linux-cip-common.inc
@@ -1,7 +1,7 @@ 
 #
 # CIP Core, generic profile
 #
-# Copyright (c) Siemens AG, 2022
+# Copyright (c) Siemens AG, 2022-2023
 #
 # Authors:
 #  Jan Kiszka <jan.kiszka@siemens.com>
@@ -14,15 +14,10 @@  FILESEXTRAPATHS:prepend := "${FILE_DIRNAME}/files:"
 KERNEL_DEFCONFIG ?= "${MACHINE}_defconfig"
 
 require recipes-kernel/linux/linux-custom.inc
+require recipes-kernel/linux/cip-kernel-config.inc
 
 SRC_URI += " \
     https://git.kernel.org/pub/scm/linux/kernel/git/cip/linux-cip.git/snapshot/linux-cip-${PV}.tar.gz \
     "
 
-SRC_URI:append = " ${@ "git://gitlab.com/cip-project/cip-kernel/cip-kernel-config.git;protocol=https;branch=master;destsuffix=cip-kernel-config;name=cip-kernel-config" \
-    if d.getVar('USE_CIP_KERNEL_CONFIG') == '1' else '' \
-    }"
-
-SRCREV_cip-kernel-config ?= "d1efa37258380c7f4f39a8dee1bdb4d85f1c0199"
-
 S = "${WORKDIR}/linux-cip-${PV}"
diff --git a/recipes-kernel/linux/linux-mainline_6.1.15.bb b/recipes-kernel/linux/linux-mainline_6.1.15.bb
index f6cd7b8b..690f6dd0 100644
--- a/recipes-kernel/linux/linux-mainline_6.1.15.bb
+++ b/recipes-kernel/linux/linux-mainline_6.1.15.bb
@@ -5,9 +5,12 @@ 
 # SPDX-License-Identifier: MIT
 
 require recipes-kernel/linux/linux-custom.inc
+require recipes-kernel/linux/cip-kernel-config.inc
 
 ARCHIVE_VERSION = "${@ d.getVar('PV')[:-2] if d.getVar('PV').endswith('.0') else d.getVar('PV') }"
 
+KERNEL_DEFCONFIG_VERSION ?= "6.1.y-cip"
+
 SRC_URI += " \
     https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-${ARCHIVE_VERSION}.tar.xz \
     file://squashfs.cfg"