[v4,1/2] add new machine qemuamd64-cip and corresponding mc

Message ID 20241026015550.1419162-1-srinuvasan.a@siemens.com
State Accepted, archived
Headers show
Series [v4,1/2] add new machine qemuamd64-cip and corresponding mc | expand

Commit Message

srinuvasan.a Oct. 26, 2024, 1:55 a.m. UTC
From: srinuvasan <srinuvasan.a@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 <srinuvasan.a@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

Comments

Uladzimir Bely Nov. 4, 2024, 1:52 p.m. UTC | #1
On Sat, 2024-10-26 at 07:25 +0530, srinuvasan.a@siemens.com wrote:
> From: srinuvasan <srinuvasan.a@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 <srinuvasan.a@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
> 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"
> 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',

Applied to next, thanks.

Patch

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
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"
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',