* [isar-cip-core][PATCH 1/3] linux-cip: Prepare for building from git branches
2025-05-23 13:24 [isar-cip-core][PATCH 0/3] linux-cip: Add support for building branch heads Jan Kiszka
@ 2025-05-23 13:25 ` Jan Kiszka
2025-05-23 13:25 ` [isar-cip-core][PATCH 2/3] linux-cip: Add support for building head of development branches Jan Kiszka
2025-05-23 13:25 ` [isar-cip-core][PATCH 3/3] Expose kernel branch head recipes via kas option and Kconfig Jan Kiszka
2 siblings, 0 replies; 4+ messages in thread
From: Jan Kiszka @ 2025-05-23 13:25 UTC (permalink / raw)
To: cip-dev
From: Jan Kiszka <jan.kiszka@siemens.com>
Split off to common bits that are relevant for all cip kernel builds
from those that are only used when building release tarballs. This
prepares to build from git branches as well.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
recipes-kernel/linux/linux-cip-common.inc | 9 +--------
.../{linux-cip-common.inc => linux-cip-release.inc} | 11 ++---------
.../linux/linux-cip-rt_4.19.325-cip118-rt41.bb | 2 +-
.../linux/linux-cip-rt_4.4.302-cip98-rt55.bb | 2 +-
.../linux/linux-cip-rt_5.10.237-cip60-rt26.bb | 2 +-
.../linux/linux-cip-rt_6.1.134-cip41-rt22.bb | 2 +-
recipes-kernel/linux/linux-cip_4.19.325-cip120.bb | 2 +-
recipes-kernel/linux/linux-cip_4.4.302-cip99.bb | 2 +-
recipes-kernel/linux/linux-cip_5.10.237-cip60.bb | 2 +-
recipes-kernel/linux/linux-cip_6.1.137-cip42.bb | 2 +-
recipes-kernel/linux/linux-cip_6.12.29-cip1.bb | 2 +-
11 files changed, 12 insertions(+), 26 deletions(-)
copy recipes-kernel/linux/{linux-cip-common.inc => linux-cip-release.inc} (50%)
diff --git a/recipes-kernel/linux/linux-cip-common.inc b/recipes-kernel/linux/linux-cip-common.inc
index f20d6a06..aa625674 100644
--- a/recipes-kernel/linux/linux-cip-common.inc
+++ b/recipes-kernel/linux/linux-cip-common.inc
@@ -11,17 +11,10 @@
FILESEXTRAPATHS:prepend := "${FILE_DIRNAME}/files:"
-KERNEL_MAJOR_MINOR = "${@d.getVar('PV').split('.')[0] + '.' + d.getVar('PV').split('.')[1]}"
-
KERNEL_DEFCONFIG_VERSION ?= "${KERNEL_MAJOR_MINOR}.y-cip"
KERNEL_DEFCONFIG ?= "${MACHINE}_defconfig"
require recipes-kernel/linux/linux-custom.inc
require recipes-kernel/linux/cip-kernel-config.inc
-SRC_URI += " \
- https://cdn.kernel.org/pub/linux/kernel/projects/cip/${KERNEL_MAJOR_MINOR}/linux-cip-${PV}.tar.xz \
- ${@'file://preempt-rt.cfg' if d.getVar('KERNEL_NAME') == 'cip-rt' else ''} \
- "
-
-S = "${WORKDIR}/linux-cip-${PV}"
+SRC_URI += "${@'file://preempt-rt.cfg' if d.getVar('KERNEL_NAME') == 'cip-rt' else ''}"
diff --git a/recipes-kernel/linux/linux-cip-common.inc b/recipes-kernel/linux/linux-cip-release.inc
similarity index 50%
copy from recipes-kernel/linux/linux-cip-common.inc
copy to recipes-kernel/linux/linux-cip-release.inc
index f20d6a06..25c2789b 100644
--- a/recipes-kernel/linux/linux-cip-common.inc
+++ b/recipes-kernel/linux/linux-cip-release.inc
@@ -1,7 +1,7 @@
#
# CIP Core, generic profile
#
-# Copyright (c) Siemens AG, 2022-2025
+# Copyright (c) Siemens, 2022-2025
#
# Authors:
# Jan Kiszka <jan.kiszka@siemens.com>
@@ -9,19 +9,12 @@
# SPDX-License-Identifier: MIT
#
-FILESEXTRAPATHS:prepend := "${FILE_DIRNAME}/files:"
+require linux-cip-common.inc
KERNEL_MAJOR_MINOR = "${@d.getVar('PV').split('.')[0] + '.' + d.getVar('PV').split('.')[1]}"
-KERNEL_DEFCONFIG_VERSION ?= "${KERNEL_MAJOR_MINOR}.y-cip"
-KERNEL_DEFCONFIG ?= "${MACHINE}_defconfig"
-
-require recipes-kernel/linux/linux-custom.inc
-require recipes-kernel/linux/cip-kernel-config.inc
-
SRC_URI += " \
https://cdn.kernel.org/pub/linux/kernel/projects/cip/${KERNEL_MAJOR_MINOR}/linux-cip-${PV}.tar.xz \
- ${@'file://preempt-rt.cfg' if d.getVar('KERNEL_NAME') == 'cip-rt' else ''} \
"
S = "${WORKDIR}/linux-cip-${PV}"
diff --git a/recipes-kernel/linux/linux-cip-rt_4.19.325-cip118-rt41.bb b/recipes-kernel/linux/linux-cip-rt_4.19.325-cip118-rt41.bb
index 1d791669..8c32f39c 100644
--- a/recipes-kernel/linux/linux-cip-rt_4.19.325-cip118-rt41.bb
+++ b/recipes-kernel/linux/linux-cip-rt_4.19.325-cip118-rt41.bb
@@ -9,6 +9,6 @@
# SPDX-License-Identifier: MIT
#
-require linux-cip-common.inc
+require linux-cip-release.inc
SRC_URI[sha256sum] = "ac71b31b34e89e7d6daf98a202806037e44203d5d79bc74da5c57f5c24ccf946"
diff --git a/recipes-kernel/linux/linux-cip-rt_4.4.302-cip98-rt55.bb b/recipes-kernel/linux/linux-cip-rt_4.4.302-cip98-rt55.bb
index e5bfca91..8c88eb5e 100644
--- a/recipes-kernel/linux/linux-cip-rt_4.4.302-cip98-rt55.bb
+++ b/recipes-kernel/linux/linux-cip-rt_4.4.302-cip98-rt55.bb
@@ -9,6 +9,6 @@
# SPDX-License-Identifier: MIT
#
-require linux-cip-common.inc
+require linux-cip-release.inc
SRC_URI[sha256sum] = "70e223852d3a7f711dd511524243df512dcc7799010004b4d99e0acf1f95866a"
diff --git a/recipes-kernel/linux/linux-cip-rt_5.10.237-cip60-rt26.bb b/recipes-kernel/linux/linux-cip-rt_5.10.237-cip60-rt26.bb
index 5440ae62..8edf6e85 100644
--- a/recipes-kernel/linux/linux-cip-rt_5.10.237-cip60-rt26.bb
+++ b/recipes-kernel/linux/linux-cip-rt_5.10.237-cip60-rt26.bb
@@ -9,6 +9,6 @@
# SPDX-License-Identifier: MIT
#
-require linux-cip-common.inc
+require linux-cip-release.inc
SRC_URI[sha256sum] = "e2d8fae539c6429e1680b9875b6b6c16792ee20a85d47b6f8c8227ef679c9886"
diff --git a/recipes-kernel/linux/linux-cip-rt_6.1.134-cip41-rt22.bb b/recipes-kernel/linux/linux-cip-rt_6.1.134-cip41-rt22.bb
index eafe09b8..f4cc8d2a 100644
--- a/recipes-kernel/linux/linux-cip-rt_6.1.134-cip41-rt22.bb
+++ b/recipes-kernel/linux/linux-cip-rt_6.1.134-cip41-rt22.bb
@@ -5,6 +5,6 @@
#
# SPDX-License-Identifier: MIT
-require linux-cip-common.inc
+require linux-cip-release.inc
SRC_URI[sha256sum] = "8582da7b30925237cf4905988aefe0a8de23bb4e7546e6ebb998419ee121fa7e"
diff --git a/recipes-kernel/linux/linux-cip_4.19.325-cip120.bb b/recipes-kernel/linux/linux-cip_4.19.325-cip120.bb
index 9bdf79c0..cbeef699 100644
--- a/recipes-kernel/linux/linux-cip_4.19.325-cip120.bb
+++ b/recipes-kernel/linux/linux-cip_4.19.325-cip120.bb
@@ -9,6 +9,6 @@
# SPDX-License-Identifier: MIT
#
-require linux-cip-common.inc
+require linux-cip-release.inc
SRC_URI[sha256sum] = "9149d5ce9bd1a27ebb67358db8c81ef5c3e960c196007d501b731295ce8f7f69"
diff --git a/recipes-kernel/linux/linux-cip_4.4.302-cip99.bb b/recipes-kernel/linux/linux-cip_4.4.302-cip99.bb
index 4eea2e79..bb307304 100644
--- a/recipes-kernel/linux/linux-cip_4.4.302-cip99.bb
+++ b/recipes-kernel/linux/linux-cip_4.4.302-cip99.bb
@@ -9,6 +9,6 @@
# SPDX-License-Identifier: MIT
#
-require linux-cip-common.inc
+require linux-cip-release.inc
SRC_URI[sha256sum] = "ecc90814484dff84dae3f25ac2da7eb9156dc43c18acf2e806dc71ed4800b558"
diff --git a/recipes-kernel/linux/linux-cip_5.10.237-cip60.bb b/recipes-kernel/linux/linux-cip_5.10.237-cip60.bb
index 7cad5613..81e21268 100644
--- a/recipes-kernel/linux/linux-cip_5.10.237-cip60.bb
+++ b/recipes-kernel/linux/linux-cip_5.10.237-cip60.bb
@@ -9,6 +9,6 @@
# SPDX-License-Identifier: MIT
#
-require linux-cip-common.inc
+require linux-cip-release.inc
SRC_URI[sha256sum] = "be99dae17d2989965dc6dae2092067332f9965df0dcee8b7d517b823aac67990"
diff --git a/recipes-kernel/linux/linux-cip_6.1.137-cip42.bb b/recipes-kernel/linux/linux-cip_6.1.137-cip42.bb
index 124c205d..125fbe49 100644
--- a/recipes-kernel/linux/linux-cip_6.1.137-cip42.bb
+++ b/recipes-kernel/linux/linux-cip_6.1.137-cip42.bb
@@ -5,6 +5,6 @@
#
# SPDX-License-Identifier: MIT
-require linux-cip-common.inc
+require linux-cip-release.inc
SRC_URI[sha256sum] = "05e279c5e955e96c85be7f8b19b3cd7aba109343d7837bbfa9b9a1b6362ecf2b"
diff --git a/recipes-kernel/linux/linux-cip_6.12.29-cip1.bb b/recipes-kernel/linux/linux-cip_6.12.29-cip1.bb
index 5b8fbdbc..40a3a702 100644
--- a/recipes-kernel/linux/linux-cip_6.12.29-cip1.bb
+++ b/recipes-kernel/linux/linux-cip_6.12.29-cip1.bb
@@ -5,6 +5,6 @@
#
# SPDX-License-Identifier: MIT
-require linux-cip-common.inc
+require linux-cip-release.inc
SRC_URI[sha256sum] = "27bf5750e3ac4ed50b3cca0eb910e330eb3b24ec3d078af3d7d626123ba7b819"
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* [isar-cip-core][PATCH 2/3] linux-cip: Add support for building head of development branches
2025-05-23 13:24 [isar-cip-core][PATCH 0/3] linux-cip: Add support for building branch heads Jan Kiszka
2025-05-23 13:25 ` [isar-cip-core][PATCH 1/3] linux-cip: Prepare for building from git branches Jan Kiszka
@ 2025-05-23 13:25 ` Jan Kiszka
2025-05-23 13:25 ` [isar-cip-core][PATCH 3/3] Expose kernel branch head recipes via kas option and Kconfig Jan Kiszka
2 siblings, 0 replies; 4+ messages in thread
From: Jan Kiszka @ 2025-05-23 13:25 UTC (permalink / raw)
To: cip-dev
From: Jan Kiszka <jan.kiszka@siemens.com>
Add a recipe for each CIP kernel version series that selects via AUTOREV
the head of the related git branch and builds the kernel from it. This
enables earlier testing via isar-cip-core.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
recipes-kernel/linux/linux-cip-head.inc | 34 +++++++++++++++++++
.../linux/linux-cip-rt_4.19-cip-head.bb | 1 +
.../linux/linux-cip-rt_4.4-cip-head.bb | 1 +
.../linux/linux-cip-rt_5.10-cip-head.bb | 1 +
.../linux/linux-cip-rt_6.1-cip-head.bb | 1 +
.../linux/linux-cip-rt_6.12-cip-head.bb | 1 +
.../linux/linux-cip_4.19-cip-head.bb | 1 +
.../linux/linux-cip_4.4-cip-head.bb | 1 +
.../linux/linux-cip_5.10-cip-head.bb | 1 +
.../linux/linux-cip_6.1-cip-head.bb | 1 +
.../linux/linux-cip_6.12-cip-head.bb | 1 +
11 files changed, 44 insertions(+)
create mode 100644 recipes-kernel/linux/linux-cip-head.inc
create mode 120000 recipes-kernel/linux/linux-cip-rt_4.19-cip-head.bb
create mode 120000 recipes-kernel/linux/linux-cip-rt_4.4-cip-head.bb
create mode 120000 recipes-kernel/linux/linux-cip-rt_5.10-cip-head.bb
create mode 120000 recipes-kernel/linux/linux-cip-rt_6.1-cip-head.bb
create mode 120000 recipes-kernel/linux/linux-cip-rt_6.12-cip-head.bb
create mode 120000 recipes-kernel/linux/linux-cip_4.19-cip-head.bb
create mode 120000 recipes-kernel/linux/linux-cip_4.4-cip-head.bb
create mode 120000 recipes-kernel/linux/linux-cip_5.10-cip-head.bb
create mode 120000 recipes-kernel/linux/linux-cip_6.1-cip-head.bb
create mode 120000 recipes-kernel/linux/linux-cip_6.12-cip-head.bb
diff --git a/recipes-kernel/linux/linux-cip-head.inc b/recipes-kernel/linux/linux-cip-head.inc
new file mode 100644
index 00000000..df604db0
--- /dev/null
+++ b/recipes-kernel/linux/linux-cip-head.inc
@@ -0,0 +1,34 @@
+#
+# CIP Core, generic profile
+#
+# Copyright (c) Siemens, 2025
+#
+# Authors:
+# Jan Kiszka <jan.kiszka@siemens.com>
+#
+# SPDX-License-Identifier: MIT
+#
+
+require linux-cip-common.inc
+
+def get_commit(d):
+ try:
+ return bb.fetch2.get_srcrev(d).replace('AUTOINC+', '')
+ except bb.fetch2.FetchError:
+ return ""
+
+KERNEL_MAJOR_MINOR := "${@d.getVar('PV').split('-')[0]}"
+
+BRANCH := "${@ \
+ 'linux-' + d.getVar('PV').split('-')[0] + '.y-cip' + \
+ ('-rt' if d.getVar('KERNEL_NAME') == 'cip-rt' and \
+ d.getVar('KERNEL_MAJOR_MINOR') in ['4.4', '4.19', '5.10', '6.1'] else '') \
+ }"
+
+PV .= "${@'-g' + get_commit(d)}"
+
+SRC_URI += "git://git.kernel.org/pub/scm/linux/kernel/git/cip/linux-cip.git;protocol=https;branch=${BRANCH};name=cip-kernel"
+SRCREV_FORMAT = "cip-kernel"
+SRCREV_cip-kernel = "${AUTOREV}"
+
+S = "${WORKDIR}/git"
diff --git a/recipes-kernel/linux/linux-cip-rt_4.19-cip-head.bb b/recipes-kernel/linux/linux-cip-rt_4.19-cip-head.bb
new file mode 120000
index 00000000..8f99b54e
--- /dev/null
+++ b/recipes-kernel/linux/linux-cip-rt_4.19-cip-head.bb
@@ -0,0 +1 @@
+linux-cip-head.inc
\ No newline at end of file
diff --git a/recipes-kernel/linux/linux-cip-rt_4.4-cip-head.bb b/recipes-kernel/linux/linux-cip-rt_4.4-cip-head.bb
new file mode 120000
index 00000000..8f99b54e
--- /dev/null
+++ b/recipes-kernel/linux/linux-cip-rt_4.4-cip-head.bb
@@ -0,0 +1 @@
+linux-cip-head.inc
\ No newline at end of file
diff --git a/recipes-kernel/linux/linux-cip-rt_5.10-cip-head.bb b/recipes-kernel/linux/linux-cip-rt_5.10-cip-head.bb
new file mode 120000
index 00000000..8f99b54e
--- /dev/null
+++ b/recipes-kernel/linux/linux-cip-rt_5.10-cip-head.bb
@@ -0,0 +1 @@
+linux-cip-head.inc
\ No newline at end of file
diff --git a/recipes-kernel/linux/linux-cip-rt_6.1-cip-head.bb b/recipes-kernel/linux/linux-cip-rt_6.1-cip-head.bb
new file mode 120000
index 00000000..8f99b54e
--- /dev/null
+++ b/recipes-kernel/linux/linux-cip-rt_6.1-cip-head.bb
@@ -0,0 +1 @@
+linux-cip-head.inc
\ No newline at end of file
diff --git a/recipes-kernel/linux/linux-cip-rt_6.12-cip-head.bb b/recipes-kernel/linux/linux-cip-rt_6.12-cip-head.bb
new file mode 120000
index 00000000..8f99b54e
--- /dev/null
+++ b/recipes-kernel/linux/linux-cip-rt_6.12-cip-head.bb
@@ -0,0 +1 @@
+linux-cip-head.inc
\ No newline at end of file
diff --git a/recipes-kernel/linux/linux-cip_4.19-cip-head.bb b/recipes-kernel/linux/linux-cip_4.19-cip-head.bb
new file mode 120000
index 00000000..8f99b54e
--- /dev/null
+++ b/recipes-kernel/linux/linux-cip_4.19-cip-head.bb
@@ -0,0 +1 @@
+linux-cip-head.inc
\ No newline at end of file
diff --git a/recipes-kernel/linux/linux-cip_4.4-cip-head.bb b/recipes-kernel/linux/linux-cip_4.4-cip-head.bb
new file mode 120000
index 00000000..8f99b54e
--- /dev/null
+++ b/recipes-kernel/linux/linux-cip_4.4-cip-head.bb
@@ -0,0 +1 @@
+linux-cip-head.inc
\ No newline at end of file
diff --git a/recipes-kernel/linux/linux-cip_5.10-cip-head.bb b/recipes-kernel/linux/linux-cip_5.10-cip-head.bb
new file mode 120000
index 00000000..8f99b54e
--- /dev/null
+++ b/recipes-kernel/linux/linux-cip_5.10-cip-head.bb
@@ -0,0 +1 @@
+linux-cip-head.inc
\ No newline at end of file
diff --git a/recipes-kernel/linux/linux-cip_6.1-cip-head.bb b/recipes-kernel/linux/linux-cip_6.1-cip-head.bb
new file mode 120000
index 00000000..8f99b54e
--- /dev/null
+++ b/recipes-kernel/linux/linux-cip_6.1-cip-head.bb
@@ -0,0 +1 @@
+linux-cip-head.inc
\ No newline at end of file
diff --git a/recipes-kernel/linux/linux-cip_6.12-cip-head.bb b/recipes-kernel/linux/linux-cip_6.12-cip-head.bb
new file mode 120000
index 00000000..8f99b54e
--- /dev/null
+++ b/recipes-kernel/linux/linux-cip_6.12-cip-head.bb
@@ -0,0 +1 @@
+linux-cip-head.inc
\ No newline at end of file
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* [isar-cip-core][PATCH 3/3] Expose kernel branch head recipes via kas option and Kconfig
2025-05-23 13:24 [isar-cip-core][PATCH 0/3] linux-cip: Add support for building branch heads Jan Kiszka
2025-05-23 13:25 ` [isar-cip-core][PATCH 1/3] linux-cip: Prepare for building from git branches Jan Kiszka
2025-05-23 13:25 ` [isar-cip-core][PATCH 2/3] linux-cip: Add support for building head of development branches Jan Kiszka
@ 2025-05-23 13:25 ` Jan Kiszka
2 siblings, 0 replies; 4+ messages in thread
From: Jan Kiszka @ 2025-05-23 13:25 UTC (permalink / raw)
To: cip-dev
From: Jan Kiszka <jan.kiszka@siemens.com>
The kas option file adjusts the PREFERRED_VERSION for the CIP kernel so
that the corresponding head recipe is selected. This avoids having to
define an option for each kernel version series.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
Kconfig | 11 +++++++++++
kas/opt/kernel-head.yml | 18 ++++++++++++++++++
2 files changed, 29 insertions(+)
create mode 100644 kas/opt/kernel-head.yml
diff --git a/Kconfig b/Kconfig
index 0887125a..18560292 100644
--- a/Kconfig
+++ b/Kconfig
@@ -113,6 +113,17 @@ config KAS_INCLUDE_KERNEL
default "kas/opt/6.1.yml" if KERNEL_6_1
default "kas/opt/6.12.yml" if KERNEL_6_12
+config KERNEL_HEAD
+ bool "Head of selected CIP kernel branch"
+ help
+ Build head of the git branch that corresponds to the selected CIP
+ kernel. May point to an unreleased state.
+
+config KAS_INCLUDE_KERNEL_HEAD
+ string
+ default "kas/opt/kernel-head.yml"
+ depends on KERNEL_HEAD
+
config KERNEL_RT
bool "Real-time CIP kernel"
depends on !ARCH_RISCV64 || KERNEL_6_12
diff --git a/kas/opt/kernel-head.yml b/kas/opt/kernel-head.yml
new file mode 100644
index 00000000..abb4d624
--- /dev/null
+++ b/kas/opt/kernel-head.yml
@@ -0,0 +1,18 @@
+#
+# CIP Core, generic profile
+#
+# Copyright (c) Siemens, 2025
+#
+# Authors:
+# Jan Kiszka <jan.kiszka@siemens.com>
+#
+# SPDX-License-Identifier: MIT
+#
+
+header:
+ version: 14
+
+local_conf_header:
+ kernel-version-head: |
+ PREFERRED_VERSION_linux-cip := "${@d.getVar('PREFERRED_VERSION_linux-cip').rsplit('.', 1)[0] + '-cip-head%'}"
+ PREFERRED_VERSION_linux-cip-rt := "${@d.getVar('PREFERRED_VERSION_linux-cip-rt').rsplit('.', 1)[0] + '-cip-head%'}"
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread