From patchwork Sat Oct 26 01:55:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "srinuvasan.a" X-Patchwork-Id: 3885 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Sat, 26 Oct 2024 03:54:58 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-qt1-f184.google.com (mail-qt1-f184.google.com [209.85.160.184]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 49Q1sqHU026526 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 26 Oct 2024 03:54:53 +0200 Received: by mail-qt1-f184.google.com with SMTP id d75a77b69052e-460bfa9ff3dsf39464301cf.1 for ; Fri, 25 Oct 2024 18:54:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1729907687; cv=pass; d=google.com; s=arc-20240605; b=arxS4XxUz2CXw34unJ1nqYOcgG2BQ/RNwEGjxT0D7i7iWrCm5pLeNWJos91UZ93bDo ZBFAfXmnmi2Y4tELrbOnYcY231xpEjckoGEOhkjf0M68k6A5siDRIenyG207GgMvkLy/ gsLvpITXzlzISMFr3nA7DYSLxiwgskMpy0hsRKzzf1dHGC9IJAC9j/27q9BoG1CQ372c XDOBWyf0qMlRd6VaP2YLYRZ7IndD4wO4DZZaPL7IWWZAFH4hBbHvjcCJYtkTuDAp2QHV R3BOVE0DvbpJ6WN8zIaeM6niMEHRrIc9sxlz1++6ZHtlFFUAdJL5Ql65WrDmPX4aAXE1 R+9Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:feedback-id:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0gROy81uIswtAKjkmMfoetGp9guDSLKPVco3l7eMWNM=; fh=QuMKcDxaq1PUqZrVvQRDyV3Uf3C6x14gxpozDcxK5yk=; b=YP6IZyhvhvKVtozXcbVvdHltzkiJkWJ7B9uxZIulJLccJHSZUM3ni/0kn138HSTHrk nEEa4uK1SYy09OQnfBKRkY9fV/NTKfkcm7CJKTp63Ai4qcn3DhgnujmCQLKdeja+dxSw vEH0JZ0uFrFqYoYK2dbmGY68+PceI1IrgvYKsxyXosg0SBnKubPDmNcoCJ1ObGGH0VeL /b0xKTa+VzhUD4eqXYbfJv4r/vRbcOQRTlrGS7DpEm9kb7dlRajduPuT5yjxkhI3x798 ffjj6/ZjwBSrl223RE9xjBOxTu2b3MBdfcl8kQwxi9a73IFy7wgIoI4qqfYJcEsUEVfO Fpew==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=DiV6Bmq1; spf=pass (google.com: domain of fm-1324425-20241026015444429919ba7c30ca682e-qukvsq@rts-flowmailer.siemens.com designates 185.136.64.225 as permitted sender) smtp.mailfrom=fm-1324425-20241026015444429919ba7c30ca682e-QUkVSq@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1729907687; x=1730512487; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=0gROy81uIswtAKjkmMfoetGp9guDSLKPVco3l7eMWNM=; b=h9ek02CEyKWLKlzfboyFJoRAVtIU4nJGE0R4+YEvB5FsnJ4vDW8Vg/jqBqcTMf+4ZF aAjRWTIHBaXxusn1ialldNyRETLAM/nj+JGWB3dDuFcsEScerSTrafhyR35aXvnMlPj4 hPV5Q9lafBmrYKBjCxI4UhA9RUBG6SyyXI9yOFbCpsYJ26Oti9ckQ+ZP5XSUsCwvGOpF g3wNYGgoM28qcm8QW0kZl6NYeQW5vmeP7H/lBUTPPzzEglEihCECw3lEZOfCqdliF+CJ v4J4FXDtRvfuJLSzRswQF/zQoFfuB3qY3fqe8Q9dl/qktIOo47y50hwtNNysk5hOg/vF TiFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729907687; x=1730512487; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-beenthere:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=0gROy81uIswtAKjkmMfoetGp9guDSLKPVco3l7eMWNM=; b=oabZxY1lwMB6TXYBkuS6zJ89WYptHCvI9zDGtaI0fY3SyzJlse7ZAY+h82tzzs/1pj Qwk4oPvmsZ38+tCwQvmch/iLru0ArdbH55Gxl1e+xvenCMMjaJlqYQAtZGz/T5IFrI/J YYzqRuJFImiF/vkeEzfoAZ8RP+HbfaVq/Oyj5ESWtWlghWW+fISODXtyVQelAG9TqM/7 n9yeVo+WBkotBNlkZTJZspbpjVX60CZeLa+1c1QeejvxCp4P1yqkHjSn0DuOAFsNNOYu fBA7TS+IuMyW9onZpWF18qIV/QA30OrDcvnT2Cyyyq/rv4B03n+6OYzdPP2lh72EABtL m3Hw== X-Forwarded-Encrypted: i=2; AJvYcCWo3hYkPNiRYzZO6OjKIdZqxHOvt1ygvCyEByNcGDyx3U/D5N4CLTmFQGXfyMBhvJNxKypBXoQ=@isar-build.org X-Gm-Message-State: AOJu0Yz8tUS+RGJ8LEwKZ2e6upjayRCO46Ht2zyCXEPJ8nR7U96IEfiN bqzVKjhcz4jO1N8xQAI5isEmLR4LIhBQXqEi/qHHiDKnToI0pztD X-Google-Smtp-Source: AGHT+IEFq8hZKp0HkLpZYNx9a28Bq0xVpueFpruxBqUQd0u8Q49WdwMJJmOpCojqRj1rUVFBmrwTow== X-Received: by 2002:ac8:5790:0:b0:460:ff33:9141 with SMTP id d75a77b69052e-4613bffcaf3mr17853731cf.15.1729907687360; Fri, 25 Oct 2024 18:54:47 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:622a:1928:b0:461:2c82:a2ae with SMTP id d75a77b69052e-4612c82b29als30506071cf.0.-pod-prod-01-us; Fri, 25 Oct 2024 18:54:46 -0700 (PDT) X-Received: by 2002:a05:620a:2a0d:b0:7b1:52a0:48eb with SMTP id af79cd13be357-7b193ef403dmr238732685a.22.1729907686291; Fri, 25 Oct 2024 18:54:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729907686; cv=none; d=google.com; s=arc-20240605; b=ZefXH4i2R8vr9a6VoeBMw2paOo6vB2bSDx+kEElY5AuiDo1BwMB8uWPa64Jy4fWtkr 22+Slaoart2mnWJwLea3xGEKNPM4NKvCgnXT3/vsENcM1s4INJH1WR5vc+NIjiVTLk7U 8/aePBgF0KPQWeQFRauV5yQZif92s5N3C8YEYbUhavjnNcYdWU2bfM2OEgqAaEWEyK7Q S5Lx2AYG8D6gEpG0k2hB9AZT861XM+vjrJLGKujfp8WN27OQR9BP7TF1O/4ArRjL22+x vP6cqh+7YuxCSt4RFPmfY2cAu7Hs1eOt8gExyBDfoJe4TtR/5lcJpbSNoGaA4mhGpwZb d5zA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=feedback-id:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=bJOxi3GGeUowQAb5/ztKQg9xOQea5Lc9n8thfI0vsyg=; fh=qEmUv7UYYyWiUby6ri6URwndIAhlHli3YTKYU6E217s=; b=jtcHNVW7/uwbRMIYsq4He0tjXNKKs2Fuha0SSVzIm9bHQGXKLHpaUHbRZqjsT+0Qxe pTf3u9xch1NqqNWd6rhK9oJu1B/9DlcS1UaPxIjmEq6YP0xrdII5W4CoQnyRAova3rqt vVHC994mSqrm0B5n5I0+KgHHdK1d3UQ0vIjWFdZz9ycIZ8jBLBkm8w2ORJo4S/hA8M6M lliq0N8L3csx+E8LklRDHDfEUtL4ehjC7N6Vd44Qs+9s1W/69QL/HKXwWUUVRQw8Yrsk IZlwnGrajnbUwdrr4YoB6QFAWwYGdyUXeqxeNWFGymFJ7mDJhoBwY3KdeHazRz3F9juF ckSw==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=DiV6Bmq1; spf=pass (google.com: domain of fm-1324425-20241026015444429919ba7c30ca682e-qukvsq@rts-flowmailer.siemens.com designates 185.136.64.225 as permitted sender) smtp.mailfrom=fm-1324425-20241026015444429919ba7c30ca682e-QUkVSq@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-64-225.siemens.flowmailer.net (mta-64-225.siemens.flowmailer.net. [185.136.64.225]) by gmr-mx.google.com with ESMTPS id af79cd13be357-7b18d282dadsi10329085a.2.2024.10.25.18.54.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Oct 2024 18:54:46 -0700 (PDT) Received-SPF: pass (google.com: domain of fm-1324425-20241026015444429919ba7c30ca682e-qukvsq@rts-flowmailer.siemens.com designates 185.136.64.225 as permitted sender) client-ip=185.136.64.225; Received: by mta-64-225.siemens.flowmailer.net with ESMTPSA id 20241026015444429919ba7c30ca682e for ; Sat, 26 Oct 2024 03:54:44 +0200 X-Patchwork-Original-From: "srinuvasan.a via isar-users" From: "srinuvasan.a" To: isar-users@googlegroups.com Cc: cedric.hombourger@siemens.com, jan.kiszka@siemens.com, ubely@ilbers.de, srinuvasan Subject: [PATCH v4 1/2] add new machine qemuamd64-cip and corresponding mc Date: Sat, 26 Oct 2024 07:25:49 +0530 Message-Id: <20241026015550.1419162-1-srinuvasan.a@siemens.com> In-Reply-To: <19e24d8e7b06465b0553cb95f2985b91466b220d.camel@ilbers.de> References: <19e24d8e7b06465b0553cb95f2985b91466b220d.camel@ilbers.de> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-1324425:519-21489:flowmailer X-Original-Sender: srinuvasan.a@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=DiV6Bmq1; spf=pass (google.com: domain of fm-1324425-20241026015444429919ba7c30ca682e-qukvsq@rts-flowmailer.siemens.com designates 185.136.64.225 as permitted sender) smtp.mailfrom=fm-1324425-20241026015444429919ba7c30ca682e-QUkVSq@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: srinuvasan.a@siemens.com Reply-To: srinuvasan.a@siemens.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-4.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, RCVD_IN_RP_CERTIFIED,RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= From: srinuvasan 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 --- 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', From patchwork Sat Oct 26 01:55:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "srinuvasan.a" X-Patchwork-Id: 3886 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Sat, 26 Oct 2024 03:55:12 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-qt1-f188.google.com (mail-qt1-f188.google.com [209.85.160.188]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 49Q1sxI9026536 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 26 Oct 2024 03:55:05 +0200 Received: by mail-qt1-f188.google.com with SMTP id d75a77b69052e-460b35f8214sf37254151cf.1 for ; Fri, 25 Oct 2024 18:55:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1729907689; cv=pass; d=google.com; s=arc-20240605; b=CDA45duk4a3ZtscSP2S2gP8FfUFnpO9Fv6rGCcUeTi/vh8ebjEI8Nr5SFqZFuZTUo0 3V88mflFo7vjzJ3oXVy8IuKraQwfVDU+sL0Ln7MDbv4rzm0N1u5eW8r6Abd97AR9S0c8 +VOauZaHbhQ9QUkbcb9DgLAhrd86VRQJCzdzJN1MLaltA5NVoYgMHJGSo/JuQYRKQR5z 3pan/vU++fx5YsOtsh78qRXPYgxH6SgaX66Arl/V6Mm/iyrQAwTHa7QyecS2J77GD4zE wN7rUROEPlu2uEH9QyBhtsos5GxHXjm2LYP1KeG2ghUpGJWAZnDlQmQ7kLTfpdZZceR0 1XJA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:feedback-id:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=2LAOaDPdEokJplAp0mhZ27GSqt8UyWtrV9Vl58y3VvQ=; fh=Bpqfpv7bcjUslIYrf7J3y9PkFYCw9tqQSeWIeVuhP0Q=; b=GJRlxTowFMqeD2+fmq2tdVYgCNrqr6PYsXSWobMoRhtL/Z/2NSwi618n3iTbx0e7JL W1+YDo3MJf2z30igxuKoBeY5fKyByIMWkCx/0XEvcyI65BI+/BCxJZIBb9IpupCe/gru srp+QgUbnUx3LdJ44+/L9t/hVPp4wEtLitr9e6TcsivD4aFMkUSAAQOZ1CP3T0tXdnEH SwZNGNmcDFSPq6+r/xtnIUVsaEOPX2qEHQ7Nf1fRsVIIHL9/s1gWoJkB/pkbgw1JUqdn gY1owGKWZ92Yo6FzuScfhnNwszp0goFG7ilMahBI6+I3ftKRjfbpuJxBZn2pFL1yutXV 9duw==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=arSmk1k6; spf=pass (google.com: domain of fm-1324425-202410260154479c4002b1ca89721737-jhhtna@rts-flowmailer.siemens.com designates 185.136.64.225 as permitted sender) smtp.mailfrom=fm-1324425-202410260154479c4002b1ca89721737-jhHtna@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1729907689; x=1730512489; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=2LAOaDPdEokJplAp0mhZ27GSqt8UyWtrV9Vl58y3VvQ=; b=nHDbkOZEvynv/bw1OKwVHagME9kYvHq+wRUaaRg5k6miLWNgmO1+iOnK/Q2PFM6H3d UPD+YXwXr5fd1BGuNJmWcxbpO8QhZPuKXckoNbOxXg5Chl7CxcL65fkKtLHLgOqQmZnD STK1OlawPJY/Z6dvUa6g0yzYLKXvfL7KJwwfRwqP7+cIIhld9ZnXRIYcc6TkXFzUzJ3C XX9lk2H57K/T/bkJEXsp8XpUYcGHUq6A9LI1SqqNz+NHxcrMeCqnq+2qVnMIA9UvFLOv 4oswWBoq8j0/WoQ7pUOm1OdeiZ8zMcxL6GjGEQdtEhNTcvxwZ4o8xDyMFypqnUNUViTM /dkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729907689; x=1730512489; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-beenthere:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=2LAOaDPdEokJplAp0mhZ27GSqt8UyWtrV9Vl58y3VvQ=; b=rj81B/YgQDDqWTES5Ei7bIqSiemyGN5YXzf+X9c4UVTbdPBO8nP8gBLh6jh8de217H yQOcwGHrh9R19/j5ZaJgoPPKPfhnEH+edgOLJqtNmv3QFbs7gsLMaS0DNaaERFXjDkTP 7XbkZupt7iN0irgBLGXxoDGbpToKANQ31owK1JHg+S0LwhLGpmcRoVxyV8ia9WCiGaFG hOKeAfL/B7Frx+j3FNXRVPlxIas4MrrTmMUYpBUGRwKyQ9H1qiZDmFOna3gtsQJQmnTV M4eOkizuA3k9+n6Y81/QQKTY1sSYC9p75em6Y9E0Wrl0DGj45Ha4MLNdhyyBzrMYbCVd 0SSw== X-Forwarded-Encrypted: i=2; AJvYcCWK8T3sRt+1P8hy75KxX79W1s1Xuzbc4q++Wzgm/zAp+ViE2zlfK7e2ztwYKdNFTCcu2ZKjnds=@isar-build.org X-Gm-Message-State: AOJu0YyQ9bPAzwu1Kchgc0723B/eFE7a8BGhDUPY44hkUHOOHNp3AoM2 9sF09kfxK7oTMyGn3nIYXNuv3TUmbWUxVOOeewWQgQrJNi0jdTTh X-Google-Smtp-Source: AGHT+IFjM1ws2IOUdyGopelZVoZ0WtfC9GuReKraLKd2FPthAC8RCWGeaPjU5OQypx2VdgtrEMJWiQ== X-Received: by 2002:a05:622a:341:b0:458:23e5:1342 with SMTP id d75a77b69052e-4613c1a028emr19169661cf.56.1729907689071; Fri, 25 Oct 2024 18:54:49 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:ac8:5841:0:b0:45d:920e:ce87 with SMTP id d75a77b69052e-46122b34987ls37715631cf.0.-pod-prod-02-us; Fri, 25 Oct 2024 18:54:48 -0700 (PDT) X-Received: by 2002:a05:620a:3184:b0:7b1:41c8:332a with SMTP id af79cd13be357-7b193f35b68mr212923385a.50.1729907688224; Fri, 25 Oct 2024 18:54:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729907688; cv=none; d=google.com; s=arc-20240605; b=ICBrqMZgPa4JO9xoeGH0fnMkFwZnkrN6yVsj6/YAr8gtaW4OML6KUnY2Rxw9rO3wPV 1XrLVXApDJt3AAmQ7EmR4i4jQWoTiuVdRtJJzWoZXqX7NuTRdhyT+Rlian8OkeHjClm8 RiyOZ/ML1VhS4Ur63rjynGq6mO5eMtjCzqN5yU2AgL/eDoZPlfPknjGMvXLUi5OtOwif alQId1E0u+SgQ4tRv72c39Lyn0O0f4+S/vhgh5B3PQACUQi3eM3ndpiVWpEcwVu0NRaP /nFcqjqeIHkJmyqx8uTdhoktnZOj7CNgqsdWXo7IWmxGw+dglg8dsFOoogeZ1suDyyjn MQ7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=feedback-id:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=wQtq+y3PWsB1r+GkrRtU+mv0uh27XMPNPlSRmFOXVPU=; fh=qEmUv7UYYyWiUby6ri6URwndIAhlHli3YTKYU6E217s=; b=gLfzjuIRIQ2kRCXMDxgZCjFGZujl5t0AKn19p0hn4MQlW2p+VUQY9u0wc5EuRzHS18 0CRL7kqrZ2pRqek7JQcuZcCJYZko/gkA1f+bBBcg8Wchdchu8rP+8LEXqmqwxQMLplBN 80q2jKhAjAv0pn49stVd4vTNP/PLVNHuqbiKuqky9boFKlj0ADk4bJFW9Eyl4bEF4ZOe 7xWecL67zzNsW5AeRnIne0JuWW5fmNhxR52j68VRftwNrLexCI2jm5O0Q9zRzQMk+9rL vg/DT6Odn6WJcH4mwmr3WzkZrxKm5QZPNhK8L3Vwrim1jeUNtoa2Me0CXIEyw3OhgrlM trsA==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=arSmk1k6; spf=pass (google.com: domain of fm-1324425-202410260154479c4002b1ca89721737-jhhtna@rts-flowmailer.siemens.com designates 185.136.64.225 as permitted sender) smtp.mailfrom=fm-1324425-202410260154479c4002b1ca89721737-jhHtna@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-64-225.siemens.flowmailer.net (mta-64-225.siemens.flowmailer.net. [185.136.64.225]) by gmr-mx.google.com with ESMTPS id af79cd13be357-7b18d282dadsi10329085a.2.2024.10.25.18.54.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Oct 2024 18:54:48 -0700 (PDT) Received-SPF: pass (google.com: domain of fm-1324425-202410260154479c4002b1ca89721737-jhhtna@rts-flowmailer.siemens.com designates 185.136.64.225 as permitted sender) client-ip=185.136.64.225; Received: by mta-64-225.siemens.flowmailer.net with ESMTPSA id 202410260154479c4002b1ca89721737 for ; Sat, 26 Oct 2024 03:54:48 +0200 X-Patchwork-Original-From: "srinuvasan.a via isar-users" From: "srinuvasan.a" To: isar-users@googlegroups.com Cc: cedric.hombourger@siemens.com, jan.kiszka@siemens.com, ubely@ilbers.de, srinuvasan Subject: [PATCH v4 2/2] linux-custom: Add a provision to support CONFIG_LOCALVERSION_AUTO Date: Sat, 26 Oct 2024 07:25:50 +0530 Message-Id: <20241026015550.1419162-2-srinuvasan.a@siemens.com> In-Reply-To: <20241026015550.1419162-1-srinuvasan.a@siemens.com> References: <19e24d8e7b06465b0553cb95f2985b91466b220d.camel@ilbers.de> <20241026015550.1419162-1-srinuvasan.a@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-1324425:519-21489:flowmailer X-Original-Sender: srinuvasan.a@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=arSmk1k6; spf=pass (google.com: domain of fm-1324425-202410260154479c4002b1ca89721737-jhhtna@rts-flowmailer.siemens.com designates 185.136.64.225 as permitted sender) smtp.mailfrom=fm-1324425-202410260154479c4002b1ca89721737-jhHtna@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: srinuvasan.a@siemens.com Reply-To: srinuvasan.a@siemens.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-4.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, RCVD_IN_RP_CERTIFIED,RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= From: srinuvasan 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 --- 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 }