From patchwork Thu Feb 4 06:39:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Henning Schild X-Patchwork-Id: 296 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:3788:0:0:0:0:0 with SMTP id r130csp1471254oor; Thu, 4 Feb 2021 08:39:18 -0800 (PST) X-Received: by 2002:a1c:2e04:: with SMTP id u4mr24196wmu.79.1612456758151; Thu, 04 Feb 2021 08:39:18 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1612456758; cv=pass; d=google.com; s=arc-20160816; b=ftuz9it40o9kkgJTQgNqJN2O246a5DsUraB3IZE6QKf1gZtl8DmXKcSYiumS1/LjYR 9pS47rZ5vHDUUOTvikNm45CZk5X1z341FJ52zFSD8Gi1i36u9SCVbK0Hzq+KskGTKfr3 FgniIsnkLy+LwbrT2njTzxJRpGrQjPpzdrriiibxSKI7+EkQ8CJZ2mMEpCX8mei3M+AG B7HfFptWTnD9YAkVF3FDOQukfn1/QhNQa70lmpASQUIxQB/tKvvQWQxFiTO9+z4GtpiN 7IJhyoyKQmJdtnB4l3sooaDDvbpbajwUoy4n5Xy8KMgpdUlZ1d+Jqua9cARFu3+eCorB s8TQ== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:message-id:date :subject:cc:to:from:sender:dkim-signature; bh=fDaViJikkYgVoANrcQhAHFpi9aWGpxyw+XiMJhGzLTY=; b=P2uj2JarZbhSCh7aAMK5Nfum/1za9xzrKIEYosdecQq6AsyRjxuUnPvs3UIAtuGP4X nv+w+PGhw25IekWdQtkFCLRwrVXtRsRzPT17yJXioNpUhBwpkipkJb0bd6yxebHuIAN7 qlbt+EkYYiqMwJ5V83RoEdf4rOE4rPCHydPfQumvgSNk5PBUnS9NDcMHvpJ9ekX4uQ9C LplBUc2PYf9OfoUxBdsJdSc7CU+rYZ3z4BGe+wMLSwvA1ecgSHG29MY6Va4UdsIHA3CB BaULcAxBTPHQybskGL2ArcMqWlefTfR/lQbH+uFdi25iNfVwFsk8+dzXb9x6StCDrxxJ IPUQ== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=XLeyCjzn; arc=pass (i=2 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of isar-users+bncbdjmjpgy2mgrbnog6caamgqevxltviy@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBDJMJPGY2MGRBNOG6CAAMGQEVXLTVIY@googlegroups.com; dmarc=fail (p=NONE sp=NONE dis=NONE arc=pass) header.from=siemens.com Received: from mail-sor-f55.google.com (mail-sor-f55.google.com. [209.85.220.55]) by mx.google.com with SMTPS id k132sor3172104wmk.12.2021.02.04.08.39.17 (Google Transport Security); Thu, 04 Feb 2021 08:39:18 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbdjmjpgy2mgrbnog6caamgqevxltviy@googlegroups.com designates 209.85.220.55 as permitted sender) client-ip=209.85.220.55; Authentication-Results: mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=XLeyCjzn; arc=pass (i=2 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of isar-users+bncbdjmjpgy2mgrbnog6caamgqevxltviy@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBDJMJPGY2MGRBNOG6CAAMGQEVXLTVIY@googlegroups.com; dmarc=fail (p=NONE sp=NONE dis=NONE arc=pass) header.from=siemens.com ARC-Seal: i=2; a=rsa-sha256; t=1612456757; cv=pass; d=google.com; s=arc-20160816; b=mgQKPMRfkdXBnYTAp7QzUWX8chPZIvdaEFn4+BXhMoRP6D9XYRxOyDfEKAdVrc/XK0 f1R3khvXcivnBrEMTjd8MvyEOtIceF4+cSk9hloDTJk4RqVbwSwLds60zCUwNWQ3TjX9 94HoVcey8hsEsWus9CFkHB4qbHMRqUII/QJ0tCMJy0g1uzdr8rRPDyybaeoRP3k0cLLl 8eOT5JrfDbMy+D/ZJViTZjIzpga/GK9T02/SEP0zkMvOAWICjPUHYg7hG8xxUH94QXsA pHLpqW+9+TVUuaoNhCFSdLIKoum1eByUUqQbez72Z9GewlCfLQMlkEA+kQh4qpdYU4MF ShxQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:message-id:date :subject:cc:to:from:sender:dkim-signature; bh=fDaViJikkYgVoANrcQhAHFpi9aWGpxyw+XiMJhGzLTY=; b=ldML4udyOw0e5IPHqFIXc0NkD1/8j+Qy5p+dPnBWyPquRGa1fLH8St+qjIpcEUKdwi AepN1nnGxnSCPTmhG4eygGXNOAE+wo1W9SI+zopmrH1z9cx8xUj4xRMc6oSuGZiYQEKB YRs7fE4lyXQADQk4AZMiQKqhvtv8elSwO+UL27lAv5RXpOcVl7Lw7eAkZIR9dMb7QpPE yq77ITk1kWXfEFl3065VNHH87BAaEvKxbDW6WOg2T9MehaVGMh7r/Ww/+eCNy4DoDnRK mWe4EJgucDaeBEDM4FxjyqJLityNQAgrn/1U+mIE4YW6UtsJmkjq2395LTzFAQ2Szmds RfYg== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=fDaViJikkYgVoANrcQhAHFpi9aWGpxyw+XiMJhGzLTY=; b=XLeyCjznYmPN4/PqrWxn3Q9DsoRBLj4kyQqPNaDAx44+52BOslYphfk/k4z2XoENO0 nQ7pHRmazA7zK+0kAghneq/hSMTTlnj2fhzYZjlYU0S0htYCjNa4JMwkVwjfeFfI3W9r 2NgFLNbSBoMuK0QxptHZqxsrQDGaeoAYMl5WvsjBvRh7CURupljR6/5YH8fRId9F9Q11 E0XtW3qT0b2PyvhxRAB2A3ZkaqyUkhk+qwR8G19OwH25W/7D4J8zhDBOiIQYtSeEgFvv 16fghDSfFS4lKFisT0GLf77n550o+pKnOErIjBJK0AXk0mbeGYP/hpjkSS4X2qHIoHFq kKGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=fDaViJikkYgVoANrcQhAHFpi9aWGpxyw+XiMJhGzLTY=; b=ZegldGThsXStZNxO6LAAevRROKKzOVGgO55lkAMQaoypGO/qSSwYk9Txnd9IbFC2g8 BQQw6ZTmUGp0LW/prVujW5aNmr2HKJIO8JAmTT9w2fJhcNIc/tLbFGDlfAOFUkGlQ+0m 5ElTL8if9KrPJIRW/ujO2sEZWhWHOhrcVu6mdcM4lgUg5CD1K9KVRmtXqdQFROeXjxE8 4nmubpC4jzWW8Y7yUA4970RdU0wy71os+h5RXt2iVLLNpUCloBIoHExvc3tkd/5YN+sL Vl5BtFsEJbT7Yii+276EuyRPA+naEyhrPTDIu7Yd/yjzbyy/LiibYSfLe+2zkYfMtor8 5lDw== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM531UUN2/CD+U0PdW/9xIYnYXi4cyFuKYeiD3yt9jzagrjKVrNMTz Jic9OlOsOMC7uj9ubdWk1f0= X-Google-Smtp-Source: ABdhPJxSNRmSq9l5MtqHRQcijIJcRmm95JboEyqRKxK6KuDB6mcCTR+4YDKespxBQR3sxLYUqxNYSQ== X-Received: by 2002:a1c:e905:: with SMTP id q5mr58120wmc.84.1612456757458; Thu, 04 Feb 2021 08:39:17 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:adf:fd09:: with SMTP id e9ls788343wrr.0.gmail; Thu, 04 Feb 2021 08:39:16 -0800 (PST) X-Received: by 2002:adf:dd05:: with SMTP id a5mr192886wrm.402.1612456756689; Thu, 04 Feb 2021 08:39:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612456756; cv=none; d=google.com; s=arc-20160816; b=rtwPdaOYAtOIdUgfWjBrbjsgioWGgI3jVqgQS3tWqs9pwW4Tn3QX0GZnmQi1Wr6PcY +LA9JxWvOVxu8o483NqzSr30Cy4AbYYRlhl8EROdoAkrfNEIRURf9dXrOsnavTQZw6/e YISfAPvB8kiGn7C2Nkk7HLkJb667gGlICOIus1RSaqbLn7MLzaS8lOVMQo2IiuuA223C wFGQI+unLWR2+BBlmKxdA5i3W9wkbU2p+fAs9eiwcM1D+OZWQkJMhnkB7WbzZgv97D2W FAu+htCZUVgyaOgofpm5ZbG7zv3WamOjTm0zKHN02rqVBgGFG2DyEnenwmXapwtYlwNf bqjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from; bh=2W9fmX0AwvdYmADqrea91kQE9bCVORJ69l32UguXg54=; b=nIiWCL5WSiwvNVz7lDVyim70QCytecif7qUnzomultpgfijMaTOGJy+xA/5i4tyVCl s/ALeFTS0gt4i2ewmUyOUMMf+4s2f+2V8zUuqGGRdyyClwxin5hBkjORQh9xPNnf2hOB mdiSut0yvmNG8iHpP666+lw23dcXBDf8yyuuv3GMVNsznE4r0doPAu6GTaJUjUA9WeK8 lBNIGoMPWSQx4DmcQpmlGax0aYv/mWBD/e0fPTlImk9SOjfOyQ8yNDwZTD7WJIBdlbLf aIN1Ib/9rQDfyApd72zrEaHPcRZVC85KYQEZ8Xg3HRUBVz8+Do0P4ttmi9JmsKp+O8IZ A5ig== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from david.siemens.de (david.siemens.de. [192.35.17.14]) by gmr-mx.google.com with ESMTPS id t16si825385wmi.3.2021.02.04.08.39.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Feb 2021 08:39:16 -0800 (PST) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.14 as permitted sender) client-ip=192.35.17.14; Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by david.siemens.de (8.15.2/8.15.2) with ESMTPS id 114GdG8d016275 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 4 Feb 2021 17:39:16 +0100 Received: from localhost.localdomain ([139.22.126.146]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 114GdFB2008886; Thu, 4 Feb 2021 17:39:15 +0100 From: Henning Schild To: isar-users@googlegroups.com Cc: Vijai Kumar K , Henning Schild Subject: [PATCHv2] wic/plugins: fix kernel version detection for bios Date: Thu, 4 Feb 2021 17:39:12 +0100 Message-Id: <20210204163912.31570-1-henning.schild@siemens.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-Original-Sender: henning.schild@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1690783145010254202?= X-GMAIL-MSGID: =?utf-8?q?1690783457279277782?= From: Henning Schild The mechanism used to "cut off the end" seems to cut off too much. >>> "vmlinuz-4.19.0-14-amd64".strip('-' + 'amd64') 'vmlinuz-4.19.0-1' But indeed we would hope for 'vmlinuz-4.19.0-14'. This is a fix that should be aplied asap, it seems to affect all "even" kernel revisions, "odd" is odly enough no problem. Signed-off-by: Henning Schild --- meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py b/meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py index 493615b481..ece08efa76 100644 --- a/meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py +++ b/meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py @@ -135,7 +135,7 @@ class BootimgPcbiosIsarPlugin(SourcePlugin): kernel_name = get_bitbake_var("KERNEL_NAME") rootfs_dir = get_bitbake_var("IMAGE_ROOTFS") kernel = os.path.basename(os.path.realpath(os.path.join(rootfs_dir, kernel_file))) - kernel_version = kernel.strip('-' + kernel_name).strip(kernel_file + '-') + kernel_version = kernel[len(kernel_file)+1:-(len(kernel_name)+1)] initrd = "initrd.img-%s-%s" % (kernel_version, kernel_name) syslinux_conf += "KERNEL " + kernel + "\n" @@ -165,7 +165,7 @@ class BootimgPcbiosIsarPlugin(SourcePlugin): kernel_name = get_bitbake_var("KERNEL_NAME") rootfs_dir = rootfs_dir['ROOTFS_DIR'] kernel = os.path.basename(os.path.realpath(os.path.join(rootfs_dir, kernel_file))) - kernel_version = kernel.strip('-' + kernel_name).strip(kernel_file + '-') + kernel_version = kernel[len(kernel_file)+1:-(len(kernel_name)+1)] initrd = "initrd.img-%s-%s" % (kernel_version, kernel_name) config = "config-%s-%s" % (kernel_version, kernel_name) mapfile = "System.map-%s-%s" % (kernel_version, kernel_name)