From patchwork Wed Oct 23 12:53:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "srinuvasan.a" X-Patchwork-Id: 3879 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Wed, 23 Oct 2024 14:52:22 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-il1-f192.google.com (mail-il1-f192.google.com [209.85.166.192]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 49NCqDhL012357 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 23 Oct 2024 14:52:14 +0200 Received: by mail-il1-f192.google.com with SMTP id e9e14a558f8ab-3a3a6afd01esf53212785ab.3 for ; Wed, 23 Oct 2024 05:52:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1729687928; cv=pass; d=google.com; s=arc-20240605; b=R/ZPmi2PUniESmBMLySn0gmzuBAF/Pj1o9A8+UXLoMAkQQtBeC73Pb15g5Ha+j7ucC ELxOd0DEi6EdEQhwdjsKFMsZL72f2zGl6WnEP4YQVwQomgnDp+dmUsB3OP6pQuvQkclj hHpKt/i946OdoDUfYqSCfQ9d8UHMM3wzZfsiSqQ/zKbZ9/UVUwYGI+oRPaFY55zg2npb VZ80f4b0hju/tgNQYRIJzdJ3Hriix7TRvTRFTp68JPA3t8mZGT7elobDe+b4GYxrFV4C tqlmSQzr52NTIuDJo1pZkjrM6gEkWVPqdsetesU0qpZsauGYwQbFG+wBIoaVogPQGd24 Mj1A== 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=t4CuzgfUOHmmQ+gqif7VAYesY6fv+Kc7o2od8afWE9A=; fh=E/xYAhPgqbg0HUbiUgfHS1APi+pBEcO7gI9IRnYKP3I=; b=J7bDB1AxBmziIuwq+FfGGxSio8Ohx+CIFLjdS0E+xAztvorMGEio1g4JCZuCto1cxQ BqI+g+5CLn7s+FaQdz0y/WLciDPoDZEzRWGJv5bWD4SxrnugZdlvOKjzc31dxVV8XmQ2 y2k8JvRoB7FIoR3UKnv8y4SgsPTtP4HfjrWinguE6tGdAbIHtKRH6JLmYxdPoXyvTtWn Nqh6YPGwmyzP9IBC+9NPPPnpTRXz778NB4LzpH3yGlC1RyaSMNlmi5JyiOf0NxFDqrRZ tu9hysnNJ6b1HiC/1UzPn87badv+/sYNffYY9G1yjLaJrtSj3yMg9XuedlqjXCDH0Fhg 6SUA==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=YOnvbna9; spf=pass (google.com: domain of fm-1324425-2024102312520406016c42ea565dcb0d-e2ncpm@rts-flowmailer.siemens.com designates 185.136.64.225 as permitted sender) smtp.mailfrom=fm-1324425-2024102312520406016c42ea565dcb0d-E2NCPM@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=1729687928; x=1730292728; 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=t4CuzgfUOHmmQ+gqif7VAYesY6fv+Kc7o2od8afWE9A=; b=rHDrHCjCm+iUnMQ1EJmAne0pSgk5IcqrMWj2CUn+MCYxG4o/e85LJ1WAv0/GycN7SP ytj6az7jAGCPhTJRePMCMj3qgaqTFBAKtye7wcwkH/T5cQphF6VX2kNN/Oly70wIQa7t JUrnTrIs28XSK7xmkXHzct9eNb3tBEK3/Mo1wbj/WcITEp0uPn25i4OvBwwYgDUCFzAy wOCAMI+5QHk7lkgLs3HviM0WPRlb+qGoSGEbnvXIxzOBRjOOLcDMGafL1O7pYZVyZQkX 7zmZTnoTdDzX8BPwAQoiAVdUb4zIAOgZFQY8qAJJ4c9k1eXgU/pdrO+AI1TsWXau0Y/l Ts6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729687928; x=1730292728; 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=t4CuzgfUOHmmQ+gqif7VAYesY6fv+Kc7o2od8afWE9A=; b=lelRyhmGOPfCopLnHa0bXTOS3BunHtOhuLMFfrLBMLk+zzjGuqHgWUlmrJo2h7CpEi GQUmJp/Ahg4qskw6drznbd5FQ8xN1AfLscGuoWIVS47bz+2DlTMlZGC5f2hW21LTkSVh 5p+eVK2mUdIwdzHPqrEdlyHj2TLYP33GQYYSy8lCxTQcKhVlIXZ28OH7nBncc5iGh4aF e4Vt0NQLFes9eb6HRS0HQ+46GsEmy7k0ip4iZB3SegEl+CJGL51/++2xX/VRh1bbiXUl SnJmo3wdsbyMtUoLKZRruKegmmDThr3U1qy/Zd38JdAER0F/F8+3ZMHILBgFQlUY+uiA J/qA== X-Forwarded-Encrypted: i=2; AJvYcCXHff+V+SBpXuOAD23GuHZKz2bcS04AuM2QSJ4shoCqrV+Ow6d4RG+es2Icrw1iGWPNkBANRoU=@isar-build.org X-Gm-Message-State: AOJu0YyTelh6D4fP3Ixd4wSuLLbUIlXOboIjCHmO2TCQ93ywKO8O6jMS 40SflkNGjQIWEfdHwHM/YgXI1PNb6OzG0owUH2zYCIz9xQfoe+to X-Google-Smtp-Source: AGHT+IGTn1wV+ZGRMvF4fPNMNCKVPnmtVgIwqeTPjYrMV4DfoxHkiIWDR7g9nBauqJGeUOBdD2ABzg== X-Received: by 2002:a05:6e02:1d1b:b0:3a0:8d2f:2914 with SMTP id e9e14a558f8ab-3a4d59e056fmr25336925ab.23.1729687927821; Wed, 23 Oct 2024 05:52:07 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6e02:1947:b0:3a0:c882:585e with SMTP id e9e14a558f8ab-3a3e49aec32ls23334715ab.0.-pod-prod-07-us; Wed, 23 Oct 2024 05:52:07 -0700 (PDT) X-Received: by 2002:a05:6602:1501:b0:83a:a9e9:6dc9 with SMTP id ca18e2360f4ac-83af61fe624mr263358839f.12.1729687926829; Wed, 23 Oct 2024 05:52:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729687926; cv=none; d=google.com; s=arc-20240605; b=EDSPjeFmUuupbf78lWJdh+gIMXWhVoL+oQHvq/fPLbkDFCG30POBYQwutBs0vR0/Mj 1pgdvg2lUPc5C7uqnZMnI82KXkKuYUDzn2JTFmPMxi3GhVZEXn1hX8Xn3i6jOTS0oIGd 1QaSHnXJ3ys0KoM2Q47F3BHxIAah/u2n40FOXrIsgCVuK09w0V8a0JzeEtFEStcyGz9a ZmwGzNYSvAbCnAs8StGDe1QW0PBh3h7F2E2gfvJKePwmlgpEGeGOonnVnpT4BHGvcIOj G6+k7sogH4WDXmfCLiMsrFvxHgd/oBAwOyhpMNVNz+BRa+bvXbbSbchXmDpFfMdw/PUn O8Qg== 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=u7KMAMgjQLMXyAB6kPQ7T5BUGpLrj25qlns1RypArUc=; fh=7w8uPGiMToa9ZVDAMG2h4OTikUm4uxVmIZ1hUqaFJ54=; b=Ry1ay2ZCaWuygVrLIl2J7bm8wmnJshYj+dy1sBHv6j0SfDuDMh8FGs05sglWy3qUtP ysogxBuVivhwpnHwiK8X7J8k4N2rMeAI5SdXOTFmF3vTaF0wqXTEHz+emh36oaOFCm5s pLt9Qr7WMXMa14O+AE2kP9hXJHHxsw0twd/+2SkRdfxtfLyrpH8Etk1dPUfm/00bqYMb jtVFiLE70DrLYuGMf9had7sRk5V+sPF4in2ijXmEucsCE2Z/0fmsYzn9vZK0gIDEOca9 od/tuLiMtzFjSvMdRh1i4OtJktRDLtTSpgbcAClSySoeVn/ej2gQh288MJ/3NmsLPhmk onPQ==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=YOnvbna9; spf=pass (google.com: domain of fm-1324425-2024102312520406016c42ea565dcb0d-e2ncpm@rts-flowmailer.siemens.com designates 185.136.64.225 as permitted sender) smtp.mailfrom=fm-1324425-2024102312520406016c42ea565dcb0d-E2NCPM@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 8926c6da1cb9f-4dc2a594a33si317038173.4.2024.10.23.05.52.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Oct 2024 05:52:06 -0700 (PDT) Received-SPF: pass (google.com: domain of fm-1324425-2024102312520406016c42ea565dcb0d-e2ncpm@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 2024102312520406016c42ea565dcb0d for ; Wed, 23 Oct 2024 14:52:04 +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, srinuvasan Subject: [PATCH v2 1/2] add new machine qemuamd64-cip and corresponding mc Date: Wed, 23 Oct 2024 18:23:06 +0530 Message-Id: <20241023125307.1402533-1-srinuvasan.a@siemens.com> In-Reply-To: <3a6be839-a3a9-4b0f-970a-29ea3509b8a7@siemens.com> References: <3a6be839-a3a9-4b0f-970a-29ea3509b8a7@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=YOnvbna9; spf=pass (google.com: domain of fm-1324425-2024102312520406016c42ea565dcb0d-e2ncpm@rts-flowmailer.siemens.com designates 185.136.64.225 as permitted sender) smtp.mailfrom=fm-1324425-2024102312520406016c42ea565dcb0d-E2NCPM@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_H2,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 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 --- 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', From patchwork Wed Oct 23 12:53:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "srinuvasan.a" X-Patchwork-Id: 3880 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Wed, 23 Oct 2024 14:52:26 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-il1-f190.google.com (mail-il1-f190.google.com [209.85.166.190]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 49NCqHdM012358 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 23 Oct 2024 14:52:17 +0200 Received: by mail-il1-f190.google.com with SMTP id e9e14a558f8ab-3a3b506c87csf69227375ab.1 for ; Wed, 23 Oct 2024 05:52:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1729687931; cv=pass; d=google.com; s=arc-20240605; b=GjHsIwPkqsvl3tQgFTDADB2qAZmr1sb5fw6dwq81w/EeFxJuAH3huXCTWbF90oYNja Fcsrr6kq5LdeVbo1ReGeBXoYEk7NHO+ItfVkPCONQzaVf9fJu2SXz8lnP79stGDdJlGL P1yGrmL0o29SzNwI+obZPINUYALSekir/tIhIHE0UQXY9o3BmVSbu2uy+4lmXyHdv1RY YHL0eXgf0O++V9LLPCkodNuZUw+r8ykrBNfZFIEpxYjSi8Q8dNRgsVwqXoT4GUNT/HrH p5mwgILudhjrx+GETMFuONhHvV57bx9k/UBBLjzd4QfFP2wmxjVFHnvAdqGpFEAEXGWw yTeg== 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=/RpLcUhBBevKbytYCWGtrTKK2QJ7H0yRjZbgAHKPtH0=; fh=GmuHyaE3tee/GOR6oYFtGCHM+SjwKyupHpEdJXH8CHA=; b=ZS3kWt1+0R/Q5ZHelWMopBfNxxpQwspperTCJGc7D+38Onv45d74WZItMGtqL/sVs1 uKrqnX0hikdzcKwKYWf5UFLZG4gxxiWTszhYEthY8/6PLdnrgZ/xkJBqrMZbNe0nMQOR 718KLifOlQcAPECGymHByNGUJJpgZGABVawZ0FASlgXy9QVSq+XwWcYyB0DQ2ZX6Gvdo OiQNgncpzFv6q2FB8o/ogkrYpL9FFGzufkDXim8nOBMfoZT6Sr/9VV507/88LBXnt/oE yl+THVwj6U2c/fERvJD7VPSwTKjF+EOaBbEBGd5wcUORwbLAAJavyyVieQkqNeR81Box cNFw==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=QL+hXV+k; spf=pass (google.com: domain of fm-1324425-20241023125208b3d902c3b9fd8d598a-en2mbc@rts-flowmailer.siemens.com designates 185.136.64.226 as permitted sender) smtp.mailfrom=fm-1324425-20241023125208b3d902c3b9fd8d598a-en2MBc@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=1729687931; x=1730292731; 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=/RpLcUhBBevKbytYCWGtrTKK2QJ7H0yRjZbgAHKPtH0=; b=o7c6VKEW7yjS6Sr9FHPCtnlxAkMk8jkw/hvEEhkD+8jxEExizA352RQW3kzSgkVAwl CQGU3/hcGdIhidK2lXGnvuZmCMW2n2dw/SHcCImszq1dlXvKkWJlgRXj4KEyfbJlNDkk EViFlwEhMkMaIASgLwAkEA9/Murk1Tmt5uq6WCiDWp8bDJ+DIMgbJfMmpMRhrV6D/XfP 87xNcy4xq7dwi/NRwFsb5KEKKmBpcVEJUW8uP2TnqQIAQgKWEwLOFicskJ66OJWIlkob zVF8zlNJF2M0oIVu/LXpPe3vmZkpSIVyMEnatiJysuby+XwUPOVC7AbPO1+2hYpt8NmQ amLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729687931; x=1730292731; 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=/RpLcUhBBevKbytYCWGtrTKK2QJ7H0yRjZbgAHKPtH0=; b=AXASQJaKgOnAg08aur0q44EJeSPrunnrgofU9udnkusZyceRBoqM/p8sPGmiRwKN69 TZ4E8w2iCiHdFnCyLl4pGnxG1LIE/p3FKfXt0yewDLOEJUnUC3MjFXKKtaPPnpHtUHh0 Nv31X0BYYGw45Nh4oQc5e+eR/P7dsJbwh2Wf+Tejgy6+cwiX35Pvscc5DfT8YrOQwPxn pVzINwwHsKKRFlpJC/YSls6EBmgZkClW8s6StsAVvnv3G0N/0wjN4Z47TLJwAHSiwrwm 1YE6xEDgIlQW5VhiNlM+B7EI0gsO6slqN5dRPMh4Bktz2VYxKdkOkh4Y9k28lAYfutdJ Fscg== X-Forwarded-Encrypted: i=2; AJvYcCXpZ3qWZQdCz1M4Yo69bWxkzRMKrapiNZIeHNreBsmwVUYp9JqdDmrfHUypeRnQcG4cwuYsnD8=@isar-build.org X-Gm-Message-State: AOJu0YyQ1PmBrF4wELMOrpH0Ph68PyZyWJoK7FOsVICh6a0XOdleGNkn tbqLvO+LwOmnkGYZER7L2TTWPd2cz1mDRjDHndFTAooJY96xA/3/ X-Google-Smtp-Source: AGHT+IHdCosWJEY6mWERthcGR/XbTAgu0xi0sdTUrt9OP2ouGZjoLG3oDquln9ms5kN9iFelRXfs2Q== X-Received: by 2002:a05:6e02:190d:b0:3a0:a385:911d with SMTP id e9e14a558f8ab-3a4d5826967mr27388675ab.0.1729687931330; Wed, 23 Oct 2024 05:52:11 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6e02:b4e:b0:3a3:6ada:9a4d with SMTP id e9e14a558f8ab-3a3e4b0bf39ls31536305ab.2.-pod-prod-09-us; Wed, 23 Oct 2024 05:52:10 -0700 (PDT) X-Received: by 2002:a05:6602:15d1:b0:83a:c4e1:7d69 with SMTP id ca18e2360f4ac-83af614d24bmr281745439f.1.1729687930494; Wed, 23 Oct 2024 05:52:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729687930; cv=none; d=google.com; s=arc-20240605; b=N8lYOjTFOpRU9B5Qe7DNbe4thz/XCaeddz4vtjuM7zZvWehV3GDBWne0cI6HgaW4ge 72O5ITsp81IHgT5MR5sm0gN35zvqBHnZglu52Goo3q4U7JWbDDUPy35mnGVaSCvolc/J IgoX5G2rfxXGISqDeVmzQYXNc7Mlo0v0iWWY6keCNWtd9mAWWOVKJDCoXaEIUZ9Za1RI lbeQZVIyGRm4bXFVLwJ4pi8voVwAxI2h54AG1fYo5lWWwlvGH6zQwqXFlaYMXZxpqaK0 LzBKuNUQodwewJAoIHwnbrqhlPgdhvsToE78Hj3UBfcOzWZaKZTMEKqBCioAqJNOzG5k g8Ww== 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=dAXdeYUkG2BFJ6P25f4TsZxnA03hKxf/bOfLWF/Tn6E=; fh=7w8uPGiMToa9ZVDAMG2h4OTikUm4uxVmIZ1hUqaFJ54=; b=A+1lKifbcquGyCXH3EZXiHQONdu8h2oyP6w0qU2cd/gSvcISuexg4QEa/X9ZRMlbsp wjL4o2heyZV8aCPdIQ+U+7RKNFUwysIkmKm3jjo++A7psD58ST6KNxd7C6nfu7eAPKHE j3X0IoS0W5UO6di32Hwm66AMLT1CXmLhfF4A5SoeCXuZKYPt4+2yeob39RyfOqzry296 nzCZd3Z2wIbPY/zY8vO12VxafMjrkeUpwwPSuEAFAh4Vxzuz02SWmzRMX6OoQ//6Nwic 5JNnUS4AIDV4XFeZIPsEIbiHgm8EvZWXDfSqC886zU2ztkKqubPD1v/5OknAbA5AukVx cETw==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=QL+hXV+k; spf=pass (google.com: domain of fm-1324425-20241023125208b3d902c3b9fd8d598a-en2mbc@rts-flowmailer.siemens.com designates 185.136.64.226 as permitted sender) smtp.mailfrom=fm-1324425-20241023125208b3d902c3b9fd8d598a-en2MBc@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-64-226.siemens.flowmailer.net (mta-64-226.siemens.flowmailer.net. [185.136.64.226]) by gmr-mx.google.com with ESMTPS id 8926c6da1cb9f-4dc2a594a33si317044173.4.2024.10.23.05.52.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Oct 2024 05:52:10 -0700 (PDT) Received-SPF: pass (google.com: domain of fm-1324425-20241023125208b3d902c3b9fd8d598a-en2mbc@rts-flowmailer.siemens.com designates 185.136.64.226 as permitted sender) client-ip=185.136.64.226; Received: by mta-64-226.siemens.flowmailer.net with ESMTPSA id 20241023125208b3d902c3b9fd8d598a for ; Wed, 23 Oct 2024 14:52:08 +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, srinuvasan Subject: [PATCH v2 2/2] linux-custom: Add a provision to support CONFIG_LOCALVERSION_AUTO Date: Wed, 23 Oct 2024 18:23:07 +0530 Message-Id: <20241023125307.1402533-2-srinuvasan.a@siemens.com> In-Reply-To: <20241023125307.1402533-1-srinuvasan.a@siemens.com> References: <3a6be839-a3a9-4b0f-970a-29ea3509b8a7@siemens.com> <20241023125307.1402533-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=QL+hXV+k; spf=pass (google.com: domain of fm-1324425-20241023125208b3d902c3b9fd8d598a-en2mbc@rts-flowmailer.siemens.com designates 185.136.64.226 as permitted sender) smtp.mailfrom=fm-1324425-20241023125208b3d902c3b9fd8d598a-en2MBc@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_H2,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 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 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 | 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 }