[RFC][PATCH v1] linux-custom: Add a provision to support CONFIG_LOCALVERSION_AUTO

32 views
Skip to first unread message

srinuv...@siemens.com

unread,
Oct 22, 2024, 7:57:40 AM10/22/24
to isar-...@googlegroups.com, cedric.h...@siemens.com, jan.k...@siemens.com, srinuvasan
From: srinuvasan <srinuv...@siemens.com>

This change might be useful for downstream layers to set the CONFIG_LOCALVERSION_AUTO
in their base defconfig to append the version automatically to kernel release.

Presently ISAR doesn't have this support, hence add this provision.

Here we try to find the CONFIG_LOCALVERSION_AUTO availability and .git present during
build the kernel package, unfortunately we are not getting the .git directory in the dpkg_build stage
even if we are fetching the git repo, this is due to sbuild always uses the sources (dsc) file
to build the package, when we generate the dsc file it create the tar ball without .git, hence
during dpkg_build stage it is not possible to get the latest commit HEAD value using "git rev-parse --verify HEAD"

To solve this issue we have base .config and .git available in the do_dpkg_source stage, here we try to find the
latest commit and write them into .scmversion file, later during the kernel build package stage
we are calling the kernelrelease target to set the localversion, this setlocalversion script
handle the availability of .scmversion file and append the string accordingly to the kernelrelease.

Signed-off-by: srinuvasan <srinuv...@siemens.com>
---
.../linux/files/debian/isar/version.cfg.tmpl | 1 -
meta/recipes-kernel/linux/linux-custom.inc | 11 +++++++++++
2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-kernel/linux/files/debian/isar/version.cfg.tmpl b/meta/recipes-kernel/linux/files/debian/isar/version.cfg.tmpl
index 17effe52..1ab699f5 100644
--- a/meta/recipes-kernel/linux/files/debian/isar/version.cfg.tmpl
+++ b/meta/recipes-kernel/linux/files/debian/isar/version.cfg.tmpl
@@ -1,2 +1 @@
CONFIG_LOCALVERSION="${LINUX_VERSION_EXTENSION}"
-# CONFIG_LOCALVERSION_AUTO is not set
diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
index 0f23d6f0..d0787aad 100644
--- a/meta/recipes-kernel/linux/linux-custom.inc
+++ b/meta/recipes-kernel/linux/linux-custom.inc
@@ -296,6 +296,17 @@ EOF
done
}

+get_localversion_auto() {
+ if grep -q "^CONFIG_LOCALVERSION_AUTO=y" ${S}/${KERNEL_BUILD_DIR}/.config; then
+ cd ${S}
+ if test -z "$(git rev-parse --show-cdup 2>/dev/null)" &&
+ head=$(git rev-parse --verify --short HEAD 2>/dev/null); then
+ echo "-g${head}" >${S}/.scmversion
+ fi
+ fi
+}
+
do_dpkg_source:prepend() {
dpkg_configure_kernel
+ get_localversion_auto
}
--
2.39.5

Jan Kiszka

unread,
Oct 22, 2024, 9:18:01 AM10/22/24
to srinuv...@siemens.com, isar-...@googlegroups.com, cedric.h...@siemens.com
This acts as a test whether is a git repo, or what is the role of this
line? Why is testing for success of the next line not enough?

> + head=$(git rev-parse --verify --short HEAD 2>/dev/null); then

I would indent by one space more.

> + echo "-g${head}" >${S}/.scmversion
> + fi
> + fi
> +}
> +
> do_dpkg_source:prepend() {
> dpkg_configure_kernel
> + get_localversion_auto
> }

Is this already stressed by any of the existing kernel builds in isar?
If not, can you make that happen?

Jan

--
Siemens AG, Technology
Linux Expert Center

srinuv...@siemens.com

unread,
Oct 23, 2024, 8:52:07 AM10/23/24
to isar-...@googlegroups.com, cedric.h...@siemens.com, jan.k...@siemens.com, srinuvasan
From: srinuvasan <srinuv...@siemens.com>

The newly added machine qemuamd64-cip provides to build the
kernel from cip git repository, this would be helpul to demonstrate
the kernel build from git repo rather than tarball.

Moreover this changes needed to demonstrate the support of CONFIG_LOCALVERSION_AUTO
in defconfig to automatically append the version in kernelrelease.

We chooses this git repo method becuase the repository should contain
the .git folder to get the latet HEAD revison to append into the kernelrelease.

Signed-off-by: srinuvasan <srinuv...@siemens.com>
---
meta-isar/conf/machine/qemuamd64-cip.conf | 20 +++++++++++++++++++
meta-isar/conf/mc.conf | 1 +
.../multiconfig/qemuamd64-cip-bookworm.conf | 4 ++++
.../linux/linux-cip_4.4.166-cip29.bb | 4 ++--
testsuite/start_vm.py | 2 +-
5 files changed, 28 insertions(+), 3 deletions(-)
create mode 100644 meta-isar/conf/machine/qemuamd64-cip.conf
create mode 100644 meta-isar/conf/multiconfig/qemuamd64-cip-bookworm.conf

diff --git a/meta-isar/conf/machine/qemuamd64-cip.conf b/meta-isar/conf/machine/qemuamd64-cip.conf
new file mode 100644
index 00000000..e1a63fa4
--- /dev/null
+++ b/meta-isar/conf/machine/qemuamd64-cip.conf
@@ -0,0 +1,20 @@
+# This software is a part of ISAR.
+# Copyright (c) Siemens AG, 2024
+#
+# SPDX-License-Identifier: MIT
+
+DISTRO_ARCH ?= "amd64"
+
+KERNEL_NAME ?= "cip"
+
+IMAGE_FSTYPES ?= "wic"
+WKS_FILE ?= "sdimage-efi"
+IMAGER_INSTALL:wic += "${GRUB_BOOTLOADER_INSTALL}"
+
+QEMU_ARCH ?= "x86_64"
+QEMU_MACHINE ?= "q35"
+QEMU_CPU ?= ""
+QEMU_DISK_ARGS ?= "-hda ##ROOTFS_IMAGE## -bios /usr/share/ovmf/OVMF.fd"
+
+MACHINE_SERIAL ?= "ttyS0"
+BAUDRATE_TTY ?= "115200"
diff --git a/meta-isar/conf/mc.conf b/meta-isar/conf/mc.conf
index 212d3e4d..2a7b69f3 100644
--- a/meta-isar/conf/mc.conf
+++ b/meta-isar/conf/mc.conf
@@ -21,6 +21,7 @@ BBMULTICONFIG = " \
qemuamd64-bullseye \
qemuamd64-sb-bullseye \
qemuamd64-bookworm \
+ qemuamd64-cip-bookworm \
qemuamd64-trixie \
container-amd64-buster \
container-amd64-bullseye \
diff --git a/meta-isar/conf/multiconfig/qemuamd64-cip-bookworm.conf b/meta-isar/conf/multiconfig/qemuamd64-cip-bookworm.conf
new file mode 100644
index 00000000..a6eaedd0
--- /dev/null
+++ b/meta-isar/conf/multiconfig/qemuamd64-cip-bookworm.conf
@@ -0,0 +1,4 @@
+# This software is a part of ISAR.
+
+MACHINE ?= "qemuamd64-cip"
+DISTRO ?= "debian-bookworm"
diff --git a/meta-isar/recipes-kernel/linux/linux-cip_4.4.166-cip29.bb b/meta-isar/recipes-kernel/linux/linux-cip_4.4.166-cip29.bb
index 4e8fc08a..873ca7b0 100644
--- a/meta-isar/recipes-kernel/linux/linux-cip_4.4.166-cip29.bb
+++ b/meta-isar/recipes-kernel/linux/linux-cip_4.4.166-cip29.bb
@@ -1,7 +1,7 @@
# Example recipe for building the CIP 4.4 kernel
#
# This software is a part of ISAR.
-# Copyright (c) Siemens AG, 2018
+# Copyright (c) Siemens AG, 2024
#
# SPDX-License-Identifier: MIT

@@ -13,4 +13,4 @@ SRC_URI += " \

SRCREV = "af3adf9f9c633ac0e1d68487d7fad22285dda8a3"

-KERNEL_DEFCONFIG:qemuamd64 = "x86_64_defconfig"
+KERNEL_DEFCONFIG:qemuamd64-cip = "x86_64_defconfig"
diff --git a/testsuite/start_vm.py b/testsuite/start_vm.py
index 2c986344..76814ee3 100755
--- a/testsuite/start_vm.py
+++ b/testsuite/start_vm.py
@@ -148,7 +148,7 @@ def start_qemu(arch, build, distro, image, out, pid, enforce_pcbios):

def parse_args():
parser = argparse.ArgumentParser()
- arch_names = ['arm', 'arm64', 'amd64', 'amd64-sb', 'i386', 'mipsel']
+ arch_names = ['arm', 'arm64', 'amd64', 'amd64-sb', 'amd64-cip', 'i386', 'mipsel']
distro_names = [
'buster',
'bullseye',
--
2.39.5

srinuv...@siemens.com

unread,
Oct 23, 2024, 8:52:11 AM10/23/24
to isar-...@googlegroups.com, cedric.h...@siemens.com, jan.k...@siemens.com, srinuvasan
From: srinuvasan <srinuv...@siemens.com>

This change might be useful for downstream layers to set the CONFIG_LOCALVERSION_AUTO
in their base defconfig to append the version automatically to kernel release.

Presently ISAR doesn't have this support, hence add this provision.

Here we try to find the CONFIG_LOCALVERSION_AUTO availability and .git present during
build the kernel package, unfortunately we are not getting the .git directory in the dpkg_build stage
even if we are fetching the git repo, this is due to sbuild always uses the sources (dsc) file
to build the package, when we generate the dsc file it create the tar ball without .git, hence
during dpkg_build stage it is not possible to get the latest commit HEAD value using "git rev-parse --verify HEAD"

To solve this issue we have base .config and .git available in the do_dpkg_source stage, here we try to find the
latest commit and write them into .scmversion file, later during the kernel build package stage
we are calling the kernelrelease target to set the localversion, this setlocalversion script
handle the availability of .scmversion file and append the string accordingly to the kernelrelease.

Added qemuamd64-cip BSP to demonstrate this feature.

Signed-off-by: srinuvasan <srinuv...@siemens.com>
---
meta-isar/recipes-kernel/linux/files/x86_64_defconfig | 2 +-
.../linux/files/debian/isar/version.cfg.tmpl | 1 -
meta/recipes-kernel/linux/linux-custom.inc | 11 +++++++++++
3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/meta-isar/recipes-kernel/linux/files/x86_64_defconfig b/meta-isar/recipes-kernel/linux/files/x86_64_defconfig
index f3bafe00..c27a5a61 100644
--- a/meta-isar/recipes-kernel/linux/files/x86_64_defconfig
+++ b/meta-isar/recipes-kernel/linux/files/x86_64_defconfig
@@ -1,6 +1,6 @@
# Copy of linux/arch/x86/configs/x86_64_defconfig for demonstration purposes

-# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_LOCALVERSION_AUTO=y
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
CONFIG_BSD_PROCESS_ACCT=y
diff --git a/meta/recipes-kernel/linux/files/debian/isar/version.cfg.tmpl b/meta/recipes-kernel/linux/files/debian/isar/version.cfg.tmpl
index 17effe52..1ab699f5 100644
--- a/meta/recipes-kernel/linux/files/debian/isar/version.cfg.tmpl
+++ b/meta/recipes-kernel/linux/files/debian/isar/version.cfg.tmpl
@@ -1,2 +1 @@
CONFIG_LOCALVERSION="${LINUX_VERSION_EXTENSION}"
-# CONFIG_LOCALVERSION_AUTO is not set
diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
index 0f23d6f0..04c3fdb6 100644
--- a/meta/recipes-kernel/linux/linux-custom.inc
+++ b/meta/recipes-kernel/linux/linux-custom.inc
@@ -296,6 +296,17 @@ EOF
done
}

+get_localversion_auto() {
+ if grep -q "^CONFIG_LOCALVERSION_AUTO=y" ${S}/${KERNEL_BUILD_DIR}/.config; then
+ cd ${S}
+ if (git rev-parse --git-dir >/dev/null 2>&1) &&
+ head=$(git rev-parse --verify --short HEAD 2>/dev/null); then
+ echo "-g${head}" >${S}/.scmversion
+ fi
+ fi
+}
+
do_dpkg_source:prepend() {
dpkg_configure_kernel
+ get_localversion_auto
}
--
2.39.5

Arjunan, Srinu

unread,
Oct 23, 2024, 8:54:39 AM10/23/24
to isar-...@googlegroups.com, cedric.h...@siemens.com, Kiszka, Jan
Hi Jan,

Addressed all the comment in V2.

Many thanks,
Srinu

Jan Kiszka

unread,
Oct 23, 2024, 12:03:04 PM10/23/24
to srinuv...@siemens.com, isar-...@googlegroups.com, cedric.h...@siemens.com
On 23.10.24 14:53, srinuv...@siemens.com wrote:
> From: srinuvasan <srinuv...@siemens.com>
>
> The newly added machine qemuamd64-cip provides to build the
> kernel from cip git repository, this would be helpul to demonstrate

"helpful"
Include qemuamd64.conf and then append/deviate?
We no longer use this machine? Or we didn't use it with the cip kernel
anymore? If so, please clarify in the commit message then.

> +KERNEL_DEFCONFIG:qemuamd64-cip = "x86_64_defconfig"
> diff --git a/testsuite/start_vm.py b/testsuite/start_vm.py
> index 2c986344..76814ee3 100755
> --- a/testsuite/start_vm.py
> +++ b/testsuite/start_vm.py
> @@ -148,7 +148,7 @@ def start_qemu(arch, build, distro, image, out, pid, enforce_pcbios):
>
> def parse_args():
> parser = argparse.ArgumentParser()
> - arch_names = ['arm', 'arm64', 'amd64', 'amd64-sb', 'i386', 'mipsel']
> + arch_names = ['arm', 'arm64', 'amd64', 'amd64-sb', 'amd64-cip', 'i386', 'mipsel']
> distro_names = [
> 'buster',
> 'bullseye',

Jan Kiszka

unread,
Oct 23, 2024, 12:04:36 PM10/23/24
to srinuv...@siemens.com, isar-...@googlegroups.com, cedric.h...@siemens.com
On 23.10.24 14:53, srinuv...@siemens.com wrote:
Still here - did I miss the explanation why it is needed?

> + head=$(git rev-parse --verify --short HEAD 2>/dev/null); then
> + echo "-g${head}" >${S}/.scmversion
> + fi
> + fi
> +}
> +
> do_dpkg_source:prepend() {
> dpkg_configure_kernel
> + get_localversion_auto
> }

Arjunan, Srinu

unread,
Oct 23, 2024, 12:26:41 PM10/23/24
to Kiszka, Jan, isar-...@googlegroups.com, cedric.h...@siemens.com


-----Original Message-----
From: Kiszka, Jan (FT RPD CED) <jan.k...@siemens.com>
Sent: 23 October 2024 21:35
To: Arjunan, Srinu (FT FDS CES LX PBU 2) <srinuv...@siemens.com>; isar-...@googlegroups.com
Cc: Hombourger, Cedric (FT FDS CES LX) <cedric.h...@siemens.com>
Here we are checking the repo is git or not, because mainline and cip kernel uses the same defconfig (x86_64_defconfig enabled with CONFIG_LOCALVERSION_AUTO) for few machines, Just we are skipping the finding HEAD revision if kernel builds via tarball.

Thanks,
Srinu

Jan Kiszka

unread,
Oct 23, 2024, 12:31:38 PM10/23/24
to Arjunan, Srinu (FT FDS CES LX PBU 2), isar-...@googlegroups.com, Hombourger, Cedric (FT FDS CES LX)
Why is

if head=$(git rev-parse --verify --short HEAD 2>/dev/null); then

not enough for this check?

Jan

Arjunan, Srinu

unread,
Oct 23, 2024, 12:43:23 PM10/23/24
to Kiszka, Jan, isar-...@googlegroups.com, cedric.h...@siemens.com
Yes this is enough to work, Just I added that option --git-dir to return
The status of .git availability for more readable code rather than checking
With latest git commit.

Will address this one in next version patch.

Thanks,
Srinu

srinuv...@siemens.com

unread,
Oct 24, 2024, 2:08:02 AM10/24/24
to isar-...@googlegroups.com, cedric.h...@siemens.com, jan.k...@siemens.com, srinuvasan
From: srinuvasan <srinuv...@siemens.com>

The newly added machine qemuamd64-cip provides to build the
kernel from the cip git repository, this would be helpful to demonstrate
the kernel built from git repo rather than tarball.

Moreover, these changes needed to demonstrate the support of CONFIG_LOCALVERSION_AUTO.
in defconfig to automatically append the version in kernelrelease.

We chose this git repo method because the repository should contain
the.git folder to get the latet HEAD revision to append into the kernel release.

Note: The qemuamd64 machine no longer depends on the cip kernel, use qemuamd64-cip
machine to build the images with cip-kernel and updated the KERNEL_DEFCONFIG accordingly.

Signed-off-by: srinuvasan <srinuv...@siemens.com>
---
meta-isar/conf/machine/qemuamd64-cip.conf | 8 ++++++++
meta-isar/conf/mc.conf | 1 +
meta-isar/conf/multiconfig/qemuamd64-cip-bookworm.conf | 4 ++++
meta-isar/recipes-kernel/linux/linux-cip_4.4.166-cip29.bb | 4 ++--
testsuite/start_vm.py | 2 +-
5 files changed, 16 insertions(+), 3 deletions(-)
create mode 100644 meta-isar/conf/machine/qemuamd64-cip.conf
create mode 100644 meta-isar/conf/multiconfig/qemuamd64-cip-bookworm.conf

diff --git a/meta-isar/conf/machine/qemuamd64-cip.conf b/meta-isar/conf/machine/qemuamd64-cip.conf
new file mode 100644
index 00000000..50897ddc
--- /dev/null
+++ b/meta-isar/conf/machine/qemuamd64-cip.conf
@@ -0,0 +1,8 @@
+# This software is a part of ISAR.
+# Copyright (c) Siemens AG, 2024
+#
+# SPDX-License-Identifier: MIT
+
+include conf/machine/qemuamd64.conf
+
+KERNEL_NAME = "cip"
+KERNEL_DEFCONFIG:qemuamd64-cip = "x86_64_defconfig"
diff --git a/testsuite/start_vm.py b/testsuite/start_vm.py
index 2c986344..76814ee3 100755
--- a/testsuite/start_vm.py
+++ b/testsuite/start_vm.py
@@ -148,7 +148,7 @@ def start_qemu(arch, build, distro, image, out, pid, enforce_pcbios):

def parse_args():
parser = argparse.ArgumentParser()
- arch_names = ['arm', 'arm64', 'amd64', 'amd64-sb', 'i386', 'mipsel']
+ arch_names = ['arm', 'arm64', 'amd64', 'amd64-sb', 'amd64-cip', 'i386', 'mipsel']
distro_names = [
'buster',
'bullseye',
--
2.39.5

srinuv...@siemens.com

unread,
Oct 24, 2024, 2:08:05 AM10/24/24
to isar-...@googlegroups.com, cedric.h...@siemens.com, jan.k...@siemens.com, srinuvasan
From: srinuvasan <srinuv...@siemens.com>

This change might be useful for downstream layers to set CONFIG_LOCALVERSION_AUTO
in their base defconfig to append the version automatically to the kernel release.

Presently ISAR doesn't have this support, hence add this provision.

Here we try to find the CONFIG_LOCALVERSION_AUTO availability and .git present during
build the kernel package, unfortunately we are not getting the .git directory in the dpkg_build stage
even if we are fetching the git repo, this is due to sbuild always using the sources (dsc) file
to build the package, when we generate the dsc file it creates the tar ball without .git, hence
during the dpkg_build stage it is not possible to get the latest commit HEAD value using "git rev-parse --verify HEAD"

To solve this issue, we have base .config and .git available in the do_dpkg_source stage, here we try to find the
latest commit and write them into .scmversion file, later during the kernel build package stage
we are calling the kernelrelease target to set the localversion, this setlocalversion script
handle the availability of .scmversion file and append the string accordingly to the kernelrelease.

Added qemuamd64-cip BSP to demonstrate this feature.

Signed-off-by: srinuvasan <srinuv...@siemens.com>
---
meta-isar/recipes-kernel/linux/files/x86_64_defconfig | 2 +-
.../linux/files/debian/isar/version.cfg.tmpl | 1 -
meta/recipes-kernel/linux/linux-custom.inc | 10 ++++++++++
3 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/meta-isar/recipes-kernel/linux/files/x86_64_defconfig b/meta-isar/recipes-kernel/linux/files/x86_64_defconfig
index f3bafe00..c27a5a61 100644
--- a/meta-isar/recipes-kernel/linux/files/x86_64_defconfig
+++ b/meta-isar/recipes-kernel/linux/files/x86_64_defconfig
@@ -1,6 +1,6 @@
# Copy of linux/arch/x86/configs/x86_64_defconfig for demonstration purposes

-# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_LOCALVERSION_AUTO=y
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
CONFIG_BSD_PROCESS_ACCT=y
diff --git a/meta/recipes-kernel/linux/files/debian/isar/version.cfg.tmpl b/meta/recipes-kernel/linux/files/debian/isar/version.cfg.tmpl
index 17effe52..1ab699f5 100644
--- a/meta/recipes-kernel/linux/files/debian/isar/version.cfg.tmpl
+++ b/meta/recipes-kernel/linux/files/debian/isar/version.cfg.tmpl
@@ -1,2 +1 @@
CONFIG_LOCALVERSION="${LINUX_VERSION_EXTENSION}"
-# CONFIG_LOCALVERSION_AUTO is not set
diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
index 0f23d6f0..bf6c879b 100644
--- a/meta/recipes-kernel/linux/linux-custom.inc
+++ b/meta/recipes-kernel/linux/linux-custom.inc
@@ -296,6 +296,16 @@ EOF
done
}

+get_localversion_auto() {
+ if grep -q "^CONFIG_LOCALVERSION_AUTO=y" ${S}/${KERNEL_BUILD_DIR}/.config; then
+ cd ${S}
+ if head=$(git rev-parse --verify --short HEAD 2>/dev/null); then
+ echo "-g${head}" >${S}/.scmversion
+ fi
+ fi
+}
+
do_dpkg_source:prepend() {
dpkg_configure_kernel
+ get_localversion_auto
}
--
2.39.5

Arjunan, Srinu

unread,
Oct 25, 2024, 1:14:26 AM10/25/24
to isar-...@googlegroups.com, cedric.h...@siemens.com, Kiszka, Jan
Hi Jan,

Addressed the suggested points, Please confirm is this changes in V3 is fine or still need to look any changes?

Many thanks,
Srinu

-----Original Message-----

Jan Kiszka

unread,
Oct 25, 2024, 5:09:17 AM10/25/24
to Arjunan, Srinu (FT FDS CES LX PBU 2), isar-...@googlegroups.com, Hombourger, Cedric (FT FDS CES LX)
On 25.10.24 07:14, Arjunan, Srinu (FT FDS CES LX PBU 2) wrote:
> Hi Jan,
>
> Addressed the suggested points, Please confirm is this changes in V3 is fine or still need to look any changes?

Looks good to me now.

Jan

Uladzimir Bely

unread,
Oct 25, 2024, 9:14:03 AM10/25/24
to Jan Kiszka, Arjunan, Srinu (FT FDS CES LX PBU 2), isar-...@googlegroups.com
On Fri, 2024-10-25 at 11:09 +0200, 'Jan Kiszka' via isar-users wrote:
> On 25.10.24 07:14, Arjunan, Srinu (FT FDS CES LX PBU 2) wrote:
> > Hi Jan,
> >
> >               Addressed the suggested points, Please confirm is
> > this changes in V3 is fine or still need to look any changes?
>
> Looks good to me now.
>
> Jan
>
> >

Just one more addition for patch v1. Since a new machine config is
added, it is worth having kas menu item for it as well.

Running `scripts/generate_yaml.sh` should help with it, but manual
editing of Kconfig files (distro/ and machine/) is also required.
--
Best regards,
Uladzimir.

srinuv...@siemens.com

unread,
Oct 25, 2024, 9:54:47 PM10/25/24
to isar-...@googlegroups.com, cedric.h...@siemens.com, jan.k...@siemens.com, ub...@ilbers.de, srinuvasan
From: srinuvasan <srinuv...@siemens.com>

The newly added machine qemuamd64-cip provides to build the
kernel from the cip git repository, this would be helpful to demonstrate
the kernel built from git repo rather than tarball.

Moreover, these changes needed to demonstrate the support of CONFIG_LOCALVERSION_AUTO.
in defconfig to automatically append the version in kernelrelease.

We chose this git repo method because the repository should contain
the.git folder to get the latet HEAD revision to append into the kernel release.

Note: The qemuamd64 machine no longer depends on the cip kernel, use qemuamd64-cip
machine to build the images with cip-kernel and updated the KERNEL_DEFCONFIG accordingly.

Signed-off-by: srinuvasan <srinuv...@siemens.com>
---
kas/machine/Kconfig | 5 +++++
kas/machine/qemuamd64-cip.yaml | 9 +++++++++
meta-isar/conf/machine/qemuamd64-cip.conf | 8 ++++++++
meta-isar/conf/mc.conf | 1 +
meta-isar/conf/multiconfig/qemuamd64-cip-bookworm.conf | 4 ++++
.../recipes-kernel/linux/linux-cip_4.4.166-cip29.bb | 4 ++--
testsuite/start_vm.py | 2 +-
7 files changed, 30 insertions(+), 3 deletions(-)
create mode 100644 kas/machine/qemuamd64-cip.yaml
create mode 100644 meta-isar/conf/machine/qemuamd64-cip.conf
create mode 100644 meta-isar/conf/multiconfig/qemuamd64-cip-bookworm.conf

diff --git a/kas/machine/Kconfig b/kas/machine/Kconfig
index 4c3866a2..c3b568df 100644
--- a/kas/machine/Kconfig
+++ b/kas/machine/Kconfig
@@ -46,6 +46,10 @@ config MACHINE_PHYBOARD_MIRA
bool "phyboard-mira"
depends on DEBIAN_BULLSEYE || DEBIAN_BOOKWORM

+config MACHINE_QEMU_AMD64_CIP
+ bool "qemuamd64-cip"
+ depends on DEBIAN_BOOKWORM
+
config MACHINE_QEMU_AMD64_SB
bool "qemuamd64-sb"
depends on DEBIAN_BULLSEYE
@@ -126,6 +130,7 @@ config KAS_INCLUDE_MACHINE
default "kas/machine/nanopi-neo.yaml" if MACHINE_NANOPI_NEO
default "kas/machine/nanopi-neo-efi.yaml" if MACHINE_NANOPI_NEO_EFI
default "kas/machine/phyboard-mira.yaml" if MACHINE_PHYBOARD_MIRA
+ default "kas/machine/qemuamd64-cip.yaml" if MACHINE_QEMU_AMD64_CIP
default "kas/machine/qemuamd64-sb.yaml" if MACHINE_QEMU_AMD64_SB
default "kas/machine/qemuamd64.yaml" if MACHINE_QEMU_AMD64
default "kas/machine/qemuarm.yaml" if MACHINE_QEMU_ARM
diff --git a/kas/machine/qemuamd64-cip.yaml b/kas/machine/qemuamd64-cip.yaml
new file mode 100644
index 00000000..d99cb4a6
--- /dev/null
+++ b/kas/machine/qemuamd64-cip.yaml
@@ -0,0 +1,9 @@
+# This software is a part of ISAR.
+# Copyright (c) Siemens AG, 2024
+#
+# SPDX-License-Identifier: MIT
+
+header:
+ version: 14
+
+machine: qemuamd64-cip

srinuv...@siemens.com

unread,
Oct 25, 2024, 9:54:49 PM10/25/24
to isar-...@googlegroups.com, cedric.h...@siemens.com, jan.k...@siemens.com, ub...@ilbers.de, srinuvasan

Uladzimir Bely

unread,
Nov 4, 2024, 8:52:13 AM11/4/24
to srinuv...@siemens.com, isar-...@googlegroups.com
Applied to next, thanks.

--
Best regards,
Uladzimir.



Reply all
Reply to author
Forward
0 new messages