linux-cip: Add support for building branch heads, cleanups
v2 cover linux-cip: Add support for building branch heads, cleanups
Changes in v2:
- fix update-linux-cip.sh script
- shellcheck cleanups for the latter
- 4.19.325-cip120-rt42 kernel recipe update
This turned out to be trickier than I thought, but now it seems to work fine. Please check.
Jan
Jan Kiszka (5):
linux-cip: Prepare for building from git branches
linux-cip: Add support for building head of development branches Expose kernel branch head recipes via kas option and Kconfig scripts/update-linux-cip.sh: Address shellcheck findings
linux-cip: Update to 4.19.325-cip120-rt42
Kconfig | 11 ++++++
kas/opt/kernel-head.yml | 18 ++++++++++
recipes-kernel/linux/linux-cip-common.inc | 9 +----
recipes-kernel/linux/linux-cip-head.inc | 34 +++++++++++++++++++
...x-cip-common.inc => linux-cip-release.inc} | 11 ++----
.../linux/linux-cip-rt_4.19-cip-head.bb | 1 +
...b => linux-cip-rt_4.19.325-cip120-rt42.bb} | 4 +--
.../linux/linux-cip-rt_4.4-cip-head.bb | 1 +
.../linux/linux-cip-rt_4.4.302-cip98-rt55.bb | 2 +-
.../linux/linux-cip-rt_5.10-cip-head.bb | 1 +
.../linux/linux-cip-rt_5.10.237-cip60-rt26.bb | 2 +-
.../linux/linux-cip-rt_6.1-cip-head.bb | 1 +
.../linux/linux-cip-rt_6.1.134-cip41-rt22.bb | 2 +-
.../linux/linux-cip-rt_6.12-cip-head.bb | 1 +
.../linux/linux-cip_4.19-cip-head.bb | 1 +
.../linux/linux-cip_4.19.325-cip120.bb | 2 +-
.../linux/linux-cip_4.4-cip-head.bb | 1 +
.../linux/linux-cip_4.4.302-cip99.bb | 2 +-
.../linux/linux-cip_5.10-cip-head.bb | 1 +
.../linux/linux-cip_5.10.237-cip60.bb | 2 +-
.../linux/linux-cip_6.1-cip-head.bb | 1 +
.../linux/linux-cip_6.1.137-cip42.bb | 2 +-
.../linux/linux-cip_6.12-cip-head.bb | 1 +
.../linux/linux-cip_6.12.29-cip1.bb | 2 +-
scripts/update-linux-cip.sh | 26 +++++++-------
25 files changed, 99 insertions(+), 40 deletions(-)
create mode 100644 kas/opt/kernel-head.yml
create mode 100644 recipes-kernel/linux/linux-cip-head.inc
copy recipes-kernel/linux/{linux-cip-common.inc => linux-cip-release.inc} (50%)
create mode 120000 recipes-kernel/linux/linux-cip-rt_4.19-cip-head.bb
rename recipes-kernel/linux/{linux-cip-rt_4.19.325-cip118-rt41.bb => linux-cip-rt_4.19.325-cip120-rt42.bb} (57%)
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.bbSignature · 1 line
2.43.0
PATCH v2 1/5 linux-cip: Prepare for building from git branches
From: Jan Kiszka <[email protected]>
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.
---
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%)recipes-kernel/linux/linux-cip-common.inc +1 -8
@@ -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 ''}"
recipes-kernel/linux/linux-cip-release.inc renamed from recipes-kernel/linux/linux-cip-common.inc +2 -9
@@ -1,7 +1,7 @@ # # CIP Core, generic profile # -# Copyright (c) Siemens AG, 2022-2025 +# Copyright (c) Siemens, 2022-2025 # # Authors: # Jan Kiszka <[email protected]>
@@ -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}"
recipes-kernel/linux/linux-cip-rt_4.19.325-cip118-rt41.bb +1 -1
@@ -9,6 +9,6 @@ # SPDX-License-Identifier: MIT # -require linux-cip-common.inc +require linux-cip-release.inc SRC_URI[sha256sum] = "ac71b31b34e89e7d6daf98a202806037e44203d5d79bc74da5c57f5c24ccf946"
recipes-kernel/linux/linux-cip-rt_4.4.302-cip98-rt55.bb +1 -1
@@ -9,6 +9,6 @@ # SPDX-License-Identifier: MIT # -require linux-cip-common.inc +require linux-cip-release.inc SRC_URI[sha256sum] = "70e223852d3a7f711dd511524243df512dcc7799010004b4d99e0acf1f95866a"
recipes-kernel/linux/linux-cip-rt_5.10.237-cip60-rt26.bb +1 -1
@@ -9,6 +9,6 @@ # SPDX-License-Identifier: MIT # -require linux-cip-common.inc +require linux-cip-release.inc SRC_URI[sha256sum] = "e2d8fae539c6429e1680b9875b6b6c16792ee20a85d47b6f8c8227ef679c9886"
recipes-kernel/linux/linux-cip-rt_6.1.134-cip41-rt22.bb +1 -1
@@ -5,6 +5,6 @@ # # SPDX-License-Identifier: MIT -require linux-cip-common.inc +require linux-cip-release.inc SRC_URI[sha256sum] = "8582da7b30925237cf4905988aefe0a8de23bb4e7546e6ebb998419ee121fa7e"
recipes-kernel/linux/linux-cip_4.19.325-cip120.bb +1 -1
@@ -9,6 +9,6 @@ # SPDX-License-Identifier: MIT # -require linux-cip-common.inc +require linux-cip-release.inc SRC_URI[sha256sum] = "9149d5ce9bd1a27ebb67358db8c81ef5c3e960c196007d501b731295ce8f7f69"
recipes-kernel/linux/linux-cip_4.4.302-cip99.bb +1 -1
@@ -9,6 +9,6 @@ # SPDX-License-Identifier: MIT # -require linux-cip-common.inc +require linux-cip-release.inc SRC_URI[sha256sum] = "ecc90814484dff84dae3f25ac2da7eb9156dc43c18acf2e806dc71ed4800b558"
recipes-kernel/linux/linux-cip_5.10.237-cip60.bb +1 -1
@@ -9,6 +9,6 @@ # SPDX-License-Identifier: MIT # -require linux-cip-common.inc +require linux-cip-release.inc SRC_URI[sha256sum] = "be99dae17d2989965dc6dae2092067332f9965df0dcee8b7d517b823aac67990"
recipes-kernel/linux/linux-cip_6.1.137-cip42.bb +1 -1
@@ -5,6 +5,6 @@ # # SPDX-License-Identifier: MIT -require linux-cip-common.inc +require linux-cip-release.inc SRC_URI[sha256sum] = "05e279c5e955e96c85be7f8b19b3cd7aba109343d7837bbfa9b9a1b6362ecf2b"
recipes-kernel/linux/linux-cip_6.12.29-cip1.bb +1 -1
@@ -5,6 +5,6 @@ # # SPDX-License-Identifier: MIT -require linux-cip-common.inc +require linux-cip-release.inc SRC_URI[sha256sum] = "27bf5750e3ac4ed50b3cca0eb910e330eb3b24ec3d078af3d7d626123ba7b819"
Signature · 1 line
2.43.0
Re: [isar-cip-core][PATCH v2 1/5] linux-cip: Prepare for building from git branches
Quoted 7 lines · Jan Kiszka
From: Jan Kiszka <[email protected]>
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 <[email protected]>
Quoted 183 lines
--- 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%)
recipes-kernel/linux/linux-cip-common.inc +1
-8@@ -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 ''}"recipes-kernel/linux/linux-cip-release.inc renamed from recipes-kernel/linux/linux-cip-common.inc +2
-9@@ -1,7 +1,7 @@ # # CIP Core, generic profile # -# Copyright (c) Siemens AG, 2022-2025 +# Copyright (c) Siemens, 2022-2025 # # Authors: # Jan Kiszka <[email protected]>@@ -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}"recipes-kernel/linux/linux-cip-rt_4.19.325-cip118-rt41.bb +1
-1@@ -9,6 +9,6 @@ # SPDX-License-Identifier: MIT # -require linux-cip-common.inc +require linux-cip-release.inc SRC_URI[sha256sum] = "ac71b31b34e89e7d6daf98a202806037e44203d5d79bc74da5c57f5c24ccf946"recipes-kernel/linux/linux-cip-rt_4.4.302-cip98-rt55.bb +1
-1@@ -9,6 +9,6 @@ # SPDX-License-Identifier: MIT # -require linux-cip-common.inc +require linux-cip-release.inc SRC_URI[sha256sum] = "70e223852d3a7f711dd511524243df512dcc7799010004b4d99e0acf1f95866a"recipes-kernel/linux/linux-cip-rt_5.10.237-cip60-rt26.bb +1
-1@@ -9,6 +9,6 @@ # SPDX-License-Identifier: MIT # -require linux-cip-common.inc +require linux-cip-release.inc SRC_URI[sha256sum] = "e2d8fae539c6429e1680b9875b6b6c16792ee20a85d47b6f8c8227ef679c9886"recipes-kernel/linux/linux-cip-rt_6.1.134-cip41-rt22.bb +1
-1@@ -5,6 +5,6 @@ # # SPDX-License-Identifier: MIT -require linux-cip-common.inc +require linux-cip-release.inc SRC_URI[sha256sum] = "8582da7b30925237cf4905988aefe0a8de23bb4e7546e6ebb998419ee121fa7e"recipes-kernel/linux/linux-cip_4.19.325-cip120.bb +1
-1@@ -9,6 +9,6 @@ # SPDX-License-Identifier: MIT # -require linux-cip-common.inc +require linux-cip-release.inc SRC_URI[sha256sum] = "9149d5ce9bd1a27ebb67358db8c81ef5c3e960c196007d501b731295ce8f7f69"recipes-kernel/linux/linux-cip_4.4.302-cip99.bb +1
-1@@ -9,6 +9,6 @@ # SPDX-License-Identifier: MIT # -require linux-cip-common.inc +require linux-cip-release.inc SRC_URI[sha256sum] = "ecc90814484dff84dae3f25ac2da7eb9156dc43c18acf2e806dc71ed4800b558"recipes-kernel/linux/linux-cip_5.10.237-cip60.bb +1
-1@@ -9,6 +9,6 @@ # SPDX-License-Identifier: MIT # -require linux-cip-common.inc +require linux-cip-release.inc SRC_URI[sha256sum] = "be99dae17d2989965dc6dae2092067332f9965df0dcee8b7d517b823aac67990"recipes-kernel/linux/linux-cip_6.1.137-cip42.bb +1
-1@@ -5,6 +5,6 @@ # # SPDX-License-Identifier: MIT -require linux-cip-common.inc +require linux-cip-release.inc SRC_URI[sha256sum] = "05e279c5e955e96c85be7f8b19b3cd7aba109343d7837bbfa9b9a1b6362ecf2b"recipes-kernel/linux/linux-cip_6.12.29-cip1.bb +1
-1@@ -5,6 +5,6 @@ # # SPDX-License-Identifier: MIT -require linux-cip-common.inc +require linux-cip-release.inc SRC_URI[sha256sum] = "27bf5750e3ac4ed50b3cca0eb910e330eb3b24ec3d078af3d7d626123ba7b819"
PATCH v2 2/5 linux-cip: Add support for building head of development branches
In reply to Jan KiszkaFrom: Jan Kiszka <[email protected]>
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.
--- 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 + scripts/update-linux-cip.sh | 6 ++-- 12 files changed, 47 insertions(+), 3 deletions(-) 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
recipes-kernel/linux/linux-cip-head.inc new file +34 -0
@@ -0,0 +1,34 @@ +# +# CIP Core, generic profile +# +# Copyright (c) Siemens, 2025 +# +# Authors: +# Jan Kiszka <[email protected]> +# +# 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"
recipes-kernel/linux/linux-cip-rt_4.19-cip-head.bb new file +1 -0
@@ -0,0 +1 @@ +linux-cip-head.inc
recipes-kernel/linux/linux-cip-rt_4.4-cip-head.bb new file +1 -0
@@ -0,0 +1 @@ +linux-cip-head.inc
recipes-kernel/linux/linux-cip-rt_5.10-cip-head.bb new file +1 -0
@@ -0,0 +1 @@ +linux-cip-head.inc
recipes-kernel/linux/linux-cip-rt_6.1-cip-head.bb new file +1 -0
@@ -0,0 +1 @@ +linux-cip-head.inc
recipes-kernel/linux/linux-cip-rt_6.12-cip-head.bb new file +1 -0
@@ -0,0 +1 @@ +linux-cip-head.inc
recipes-kernel/linux/linux-cip_4.19-cip-head.bb new file +1 -0
@@ -0,0 +1 @@ +linux-cip-head.inc
recipes-kernel/linux/linux-cip_4.4-cip-head.bb new file +1 -0
@@ -0,0 +1 @@ +linux-cip-head.inc
recipes-kernel/linux/linux-cip_5.10-cip-head.bb new file +1 -0
@@ -0,0 +1 @@ +linux-cip-head.inc
recipes-kernel/linux/linux-cip_6.1-cip-head.bb new file +1 -0
@@ -0,0 +1 @@ +linux-cip-head.inc
recipes-kernel/linux/linux-cip_6.12-cip-head.bb new file +1 -0
@@ -0,0 +1 @@ +linux-cip-head.inc
scripts/update-linux-cip.sh +3 -3
@@ -16,12 +16,12 @@ for MAJOR_VERSION in 4.4 4.19 5.10 6.1 6.12; do RECIPE_FILE=linux-cip_${VERSION}.bb if [ ! -f ${RECIPE_FILE} ]; then echo "Updating recipe to ${VERSION}" - git mv linux-cip_${MAJOR_VERSION}*.bb ${RECIPE_FILE} + git mv linux-cip_${MAJOR_VERSION}.*.bb ${RECIPE_FILE} SHASUM=${LAST_ENTRY/ */} sed -i 's/\(SRC_URI\[sha256sum\] = "\).*/\1'${SHASUM}'"'/ ${RECIPE_FILE} git add ${RECIPE_FILE} if [ "${MAJOR_VERSION}" == "6.12" ]; then - git rm linux-cip-rt_${MAJOR_VERSION}*.bb + git rm linux-cip-rt_${MAJOR_VERSION}.*.bb ln -s ${RECIPE_FILE} linux-cip-rt_${VERSION}.bb git add linux-cip-rt_${VERSION}.bb fi
@@ -34,7 +34,7 @@ for MAJOR_VERSION in 4.4 4.19 5.10 6.1 6.12; do RECIPE_FILE=linux-cip-rt_${VERSION}.bb if [ ! -f "${RECIPE_FILE}" ]; then echo "Updating recipe to ${VERSION}" - git mv linux-cip-rt_${MAJOR_VERSION}*.bb ${RECIPE_FILE} + git mv linux-cip-rt_${MAJOR_VERSION}.*.bb ${RECIPE_FILE} SHASUM=${LAST_ENTRY/ */} sed -i 's/\(SRC_URI\[sha256sum\] = "\).*/\1'${SHASUM}'"'/ ${RECIPE_FILE} git add ${RECIPE_FILE}
Signature · 1 line
2.43.0
Re: [isar-cip-core][PATCH v2 2/5] linux-cip: Add support for building head of development branches
Quoted 7 lines · Jan Kiszka
From: Jan Kiszka <[email protected]>
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 <[email protected]>
Quoted 174 lines
--- 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 + scripts/update-linux-cip.sh | 6 ++-- 12 files changed, 47 insertions(+), 3 deletions(-)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
recipes-kernel/linux/linux-cip-head.inc new file +34
-0@@ -0,0 +1,34 @@ +# +# CIP Core, generic profile +# +# Copyright (c) Siemens, 2025 +# +# Authors: +# Jan Kiszka <[email protected]> +# +# 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"recipes-kernel/linux/linux-cip-rt_4.19-cip-head.bb new file +1
-0@@ -0,0 +1 @@ +linux-cip-head.increcipes-kernel/linux/linux-cip-rt_4.4-cip-head.bb new file +1
-0@@ -0,0 +1 @@ +linux-cip-head.increcipes-kernel/linux/linux-cip-rt_5.10-cip-head.bb new file +1
-0@@ -0,0 +1 @@ +linux-cip-head.increcipes-kernel/linux/linux-cip-rt_6.1-cip-head.bb new file +1
-0@@ -0,0 +1 @@ +linux-cip-head.increcipes-kernel/linux/linux-cip-rt_6.12-cip-head.bb new file +1
-0@@ -0,0 +1 @@ +linux-cip-head.increcipes-kernel/linux/linux-cip_4.19-cip-head.bb new file +1
-0@@ -0,0 +1 @@ +linux-cip-head.increcipes-kernel/linux/linux-cip_4.4-cip-head.bb new file +1
-0@@ -0,0 +1 @@ +linux-cip-head.increcipes-kernel/linux/linux-cip_5.10-cip-head.bb new file +1
-0@@ -0,0 +1 @@ +linux-cip-head.increcipes-kernel/linux/linux-cip_6.1-cip-head.bb new file +1
-0@@ -0,0 +1 @@ +linux-cip-head.increcipes-kernel/linux/linux-cip_6.12-cip-head.bb new file +1
-0@@ -0,0 +1 @@ +linux-cip-head.incscripts/update-linux-cip.sh +3
-3@@ -16,12 +16,12 @@ for MAJOR_VERSION in 4.4 4.19 5.10 6.1 6.12; do RECIPE_FILE=linux-cip_${VERSION}.bb if [ ! -f ${RECIPE_FILE} ]; then echo "Updating recipe to ${VERSION}" - git mv linux-cip_${MAJOR_VERSION}*.bb ${RECIPE_FILE} + git mv linux-cip_${MAJOR_VERSION}.*.bb ${RECIPE_FILE} SHASUM=${LAST_ENTRY/ */} sed -i 's/\(SRC_URI\[sha256sum\] = "\).*/\1'${SHASUM}'"'/ ${RECIPE_FILE} git add ${RECIPE_FILE} if [ "${MAJOR_VERSION}" == "6.12" ]; then - git rm linux-cip-rt_${MAJOR_VERSION}*.bb + git rm linux-cip-rt_${MAJOR_VERSION}.*.bb ln -s ${RECIPE_FILE} linux-cip-rt_${VERSION}.bb git add linux-cip-rt_${VERSION}.bb fi@@ -34,7 +34,7 @@ for MAJOR_VERSION in 4.4 4.19 5.10 6.1 6.12; do RECIPE_FILE=linux-cip-rt_${VERSION}.bb if [ ! -f "${RECIPE_FILE}" ]; then echo "Updating recipe to ${VERSION}" - git mv linux-cip-rt_${MAJOR_VERSION}*.bb ${RECIPE_FILE} + git mv linux-cip-rt_${MAJOR_VERSION}.*.bb ${RECIPE_FILE} SHASUM=${LAST_ENTRY/ */} sed -i 's/\(SRC_URI\[sha256sum\] = "\).*/\1'${SHASUM}'"'/ ${RECIPE_FILE} git add ${RECIPE_FILE}
PATCH v2 3/5 Expose kernel branch head recipes via kas option and Kconfig
In reply to Jan KiszkaFrom: Jan Kiszka <[email protected]>
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.
--- Kconfig | 11 +++++++++++ kas/opt/kernel-head.yml | 18 ++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 kas/opt/kernel-head.yml
Kconfig +11 -0
@@ -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
kas/opt/kernel-head.yml new file +18 -0
@@ -0,0 +1,18 @@ +# +# CIP Core, generic profile +# +# Copyright (c) Siemens, 2025 +# +# Authors: +# Jan Kiszka <[email protected]> +# +# 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%'}"
Signature · 1 line
2.43.0
Re: [isar-cip-core][PATCH v2 3/5] Expose kernel branch head recipes via kas option and Kconfig
Quoted 7 lines · Jan Kiszka
From: Jan Kiszka <[email protected]>
The kas option file adjusts the
PREFERRED_VERSIONfor 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 <[email protected]>
Quoted 52 lines
--- Kconfig | 11 +++++++++++ kas/opt/kernel-head.yml | 18 ++++++++++++++++++ 2 files changed, 29 insertions(+)create mode 100644
kas/opt/kernel-head.ymlKconfig +11
-0@@ -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_12kas/opt/kernel-head.yml new file +18
-0@@ -0,0 +1,18 @@ +# +# CIP Core, generic profile +# +# Copyright (c) Siemens, 2025 +# +# Authors: +# Jan Kiszka <[email protected]> +# +# 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%'}"
PATCH v2 4/5 scripts/update-linux-cip.sh: Address shellcheck findings
In reply to Jan KiszkaFrom: Jan Kiszka <[email protected]>
--- scripts/update-linux-cip.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-)
scripts/update-linux-cip.sh +13 -13
@@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/bash REPO_ROOT=$(git rev-parse --show-toplevel) -pushd ${REPO_ROOT}/recipes-kernel/linux >/dev/null +pushd "${REPO_ROOT}"/recipes-kernel/linux >/dev/null || exit 1 for MAJOR_VERSION in 4.4 4.19 5.10 6.1 6.12; do rm -f sha256sums.asc
@@ -14,16 +14,16 @@ for MAJOR_VERSION in 4.4 4.19 5.10 6.1 6.12; do VERSION=${LAST_ENTRY/*linux-cip-/} VERSION=${VERSION/.tar.xz/} RECIPE_FILE=linux-cip_${VERSION}.bb - if [ ! -f ${RECIPE_FILE} ]; then + if [ ! -f "${RECIPE_FILE}" ]; then echo "Updating recipe to ${VERSION}" - git mv linux-cip_${MAJOR_VERSION}.*.bb ${RECIPE_FILE} + git mv linux-cip_"${MAJOR_VERSION}".*.bb "${RECIPE_FILE}" SHASUM=${LAST_ENTRY/ */} - sed -i 's/\(SRC_URI\[sha256sum\] = "\).*/\1'${SHASUM}'"'/ ${RECIPE_FILE} - git add ${RECIPE_FILE} + sed -i 's/\(SRC_URI\[sha256sum\] = "\).*/\1'"${SHASUM}"'"'/ "${RECIPE_FILE}" + git add "${RECIPE_FILE}" if [ "${MAJOR_VERSION}" == "6.12" ]; then - git rm linux-cip-rt_${MAJOR_VERSION}.*.bb - ln -s ${RECIPE_FILE} linux-cip-rt_${VERSION}.bb - git add linux-cip-rt_${VERSION}.bb + git rm linux-cip-rt_"${MAJOR_VERSION}".*.bb + ln -s "${RECIPE_FILE}" "linux-cip-rt_${VERSION}.bb" + git add "linux-cip-rt_${VERSION}.bb" fi fi
@@ -34,13 +34,13 @@ for MAJOR_VERSION in 4.4 4.19 5.10 6.1 6.12; do RECIPE_FILE=linux-cip-rt_${VERSION}.bb if [ ! -f "${RECIPE_FILE}" ]; then echo "Updating recipe to ${VERSION}" - git mv linux-cip-rt_${MAJOR_VERSION}.*.bb ${RECIPE_FILE} + git mv linux-cip-rt_"${MAJOR_VERSION}".*.bb "${RECIPE_FILE}" SHASUM=${LAST_ENTRY/ */} - sed -i 's/\(SRC_URI\[sha256sum\] = "\).*/\1'${SHASUM}'"'/ ${RECIPE_FILE} - git add ${RECIPE_FILE} + sed -i 's/\(SRC_URI\[sha256sum\] = "\).*/\1'"${SHASUM}"'"'/ "${RECIPE_FILE}" + git add "${RECIPE_FILE}" fi fi done rm -f sha256sums.asc -popd >/dev/null +popd >/dev/null || exit 1
Signature · 1 line
2.43.0
PATCH v2 5/5 linux-cip: Update to 4.19.325-cip120-rt42
In reply to Jan KiszkaFrom: Jan Kiszka <[email protected]>
---
....325-cip118-rt41.bb => linux-cip-rt_4.19.325-cip120-rt42.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename recipes-kernel/linux/{linux-cip-rt_4.19.325-cip118-rt41.bb => linux-cip-rt_4.19.325-cip120-rt42.bb} (68%)recipes-kernel/linux/linux-cip-rt_4.19.325-cip120-rt42.bb renamed from recipes-kernel/linux/linux-cip-rt_4.19.325-cip118-rt41.bb +1 -1
@@ -11,4 +11,4 @@ require linux-cip-release.inc -SRC_URI[sha256sum] = "ac71b31b34e89e7d6daf98a202806037e44203d5d79bc74da5c57f5c24ccf946" +SRC_URI[sha256sum] = "6ed1623cdc2a47131736848e2ba8b4674f9daa33dfb98feff8b062b275009dac"
Signature · 1 line
2.43.0
Quoted 7 lines · Jan Kiszka
Changes in v2:
- fixupdate-linux-cip.shscript
- shellcheck cleanups for the latter
- 4.19.325-cip120-rt42 kernel recipe updateThis turned out to be trickier than I thought, but now it seems to work fine. Please check.
Hey Jan, thanks for the patches. I'll check it out today.
- Kartheek
Quoted 51 lines
Jan
Jan Kiszka (5):
linux-cip: Prepare for building from git branches
linux-cip: Add support for building head of development branches Expose kernel branch head recipes via kas option andKconfigscripts/update-linux-cip.sh: Address shellcheck findings
linux-cip: Update to 4.19.325-cip120-rt42Kconfig | 11 ++++++ kas/opt/kernel-head.yml | 18 ++++++++++ recipes-kernel/linux/linux-cip-common.inc | 9 +---- recipes-kernel/linux/linux-cip-head.inc | 34 +++++++++++++++++++ ...x-cip-common.inc => linux-cip-release.inc} | 11 ++---- .../linux/linux-cip-rt_4.19-cip-head.bb | 1 + ...b => linux-cip-rt_4.19.325-cip120-rt42.bb} | 4 +-- .../linux/linux-cip-rt_4.4-cip-head.bb | 1 + .../linux/linux-cip-rt_4.4.302-cip98-rt55.bb | 2 +- .../linux/linux-cip-rt_5.10-cip-head.bb | 1 + .../linux/linux-cip-rt_5.10.237-cip60-rt26.bb | 2 +- .../linux/linux-cip-rt_6.1-cip-head.bb | 1 + .../linux/linux-cip-rt_6.1.134-cip41-rt22.bb | 2 +- .../linux/linux-cip-rt_6.12-cip-head.bb | 1 + .../linux/linux-cip_4.19-cip-head.bb | 1 + .../linux/linux-cip_4.19.325-cip120.bb | 2 +- .../linux/linux-cip_4.4-cip-head.bb | 1 + .../linux/linux-cip_4.4.302-cip99.bb | 2 +- .../linux/linux-cip_5.10-cip-head.bb | 1 + .../linux/linux-cip_5.10.237-cip60.bb | 2 +- .../linux/linux-cip_6.1-cip-head.bb | 1 + .../linux/linux-cip_6.1.137-cip42.bb | 2 +- .../linux/linux-cip_6.12-cip-head.bb | 1 + .../linux/linux-cip_6.12.29-cip1.bb | 2 +- scripts/update-linux-cip.sh | 26 +++++++------- 25 files changed, 99 insertions(+), 40 deletions(-)create mode 100644
kas/opt/kernel-head.yml
create mode 100644 recipes-kernel/linux/linux-cip-head.inc
copy recipes-kernel/linux/{linux-cip-common.inc => linux-cip-release.inc} (50%)
create mode 120000 recipes-kernel/linux/linux-cip-rt_4.19-cip-head.bb
rename recipes-kernel/linux/{linux-cip-rt_4.19.325-cip118-rt41.bb => linux-cip-rt_4.19.325-cip120-rt42.bb} (57%) 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