From patchwork Wed Apr 29 14:12:57 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 4585 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 4CD72432AC for ; Wed, 29 Apr 2026 16:13:07 +0200 (CEST) Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-48a7994e8ddsf12650335e9.0 for ; Wed, 29 Apr 2026 07:13:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1777471987; cv=pass; d=google.com; s=arc-20240605; b=V2DpUdrdGacyI4Ak41CKpgPIkoF7HHYr9e9kCeruoYomCMnElYHIN9YHbx3J5CeFY7 oprG3yw3VFPoYr4uhlMb/EPmgJi6JAqNYkZahLHGIsolA2v4CoLZR0j+BzGq/xkcDdDS O6K2HOG1J1wxntGqwCqofq+f8FH90vMTaG1eb2Q3LFfOimQMHv02IuMTY8/8ZE8hPUZ5 iLJ4BN5upE8MpOZL9sZsORhZWOywVIDKKjJobJ/R6WU68d2nUSwttBW1VfXJogdUZoya NBHSEhI2O/LiZZ0NmF/rSHnFLVQucXMKJxFBN9SulbWl45G+QsPl8aGr6IY2B7z/0V1r g/Zg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=LARl++y4ms1lM3uKaOfy1KyYz5ZxXEq2xDyMsSpHvpc=; fh=0X48K48IhPON7J8ELwDPxrKHmOwZlXFemdPUDmr93XI=; b=DANeNdO4BRortIj27rfK3uQmy7HdptFZGpl6mbjEMDfzrPZv4riDrt9FxmZQlUxMFs OX3FZk52y4tyrlGCpBSBlncxCPFQ1IpmQYjR2NiO65BgEH1XuB2VIOmC59isL5Sls3ak ysqQURDbV4h91s/G+CA1JYLFMWfMzCvqllTfLMXOcCW4c+5p7AiNU5BW0BRW+qM8ITDz fVBcJBslZ9A+Vlima9U8lm1RWsxD4zwsZ+P7fiIqL/pHzGVAyu9Kcnx30RO5yT4XmTyr k3ha6QGyYPeRSys3Hl6jJ3M5OP/rb+ncHnU5xjDJaZlVnpw9ucGIP+UbO/kVuqgwns09 mB4Q==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="Fu4Dm0/w"; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=neutral header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1777471987; x=1778076787; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=LARl++y4ms1lM3uKaOfy1KyYz5ZxXEq2xDyMsSpHvpc=; b=T8QbVuooTpNY0L/dnImHn2RQfRgWumpEjqowVDD8WNzSFAgiqF5C30SyPjij28cKl6 r7ianBzzZihUiLFFT6w7LY6Y1K2JO9M51ca+1q/ocOsQ9GkSjRh9Wmv5zZPMSQZL+rb3 hcT7Gp1TPqCJ0r8c/idmT0qNHlETEQ+tCvmys= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777471987; x=1778076787; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=LARl++y4ms1lM3uKaOfy1KyYz5ZxXEq2xDyMsSpHvpc=; b=mYor07RAs84/S0zRBhzoyRy2h3C69uqX/o9Uj8A4vIEorNPU0h1D9QMDO84+49Gk/H ZwsQl62L1LV0ehZ2XQc/zPYth+OxH+1wT84m3vt7Lz26WzPKeqK1D2UfNo4WkTU44F80 dTPMFDety6BKND4OBaqJnnyKvSETWk+b0IMaF5bHVx7ZR9jtzRMZ24MTKTnX5hjG0fNq UjOn71R/UEHE3z8d+QkRRscW6EKCM4RvuIpXZF7XX5lKQ+egSVs7yLxG1MxmVX74bzfZ ABViG/rNffgwDZJWBHOqXnuJKFVWkXZXSK7GQHT5PrY7X3mTa56Y6vPbwSjwP/jkw+UW DxeQ== X-Forwarded-Encrypted: i=2; AFNElJ+ndHXZK65No+sOtul9M+ytrJLdbbZGFdWzhpfxX+Y/xbuRGXWTuEtOdTeqwQ5IKMbFTPUWPAlGYvhrPbcK@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0Yy3WkFJv5Xo98j7oELx7aMRbxR3NtODo/+7qlt8FWQs6xANHevu gUApI5pun/bhGbuh/dfn++eYzMavHPTe6ryIdK4AP+4n0qT6nOD1PBs9Fp2FzDTUHHYAyQ== X-Received: by 2002:a05:600c:c091:b0:48a:58ae:9938 with SMTP id 5b1f17b1804b1-48a77b19957mr89466585e9.19.1777471986755; Wed, 29 Apr 2026 07:13:06 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com; h="AUV6zMMDXYQDjDn5YeTOQYROntAmrSYkbL79ts7O+wO8+KgGew==" Received: by 2002:a05:600c:a405:b0:485:3184:a1ab with SMTP id 5b1f17b1804b1-48a5bc86f0els47610175e9.1.-pod-prod-03-eu; Wed, 29 Apr 2026 07:13:05 -0700 (PDT) X-Received: by 2002:a05:600c:34c9:b0:48a:53ea:1405 with SMTP id 5b1f17b1804b1-48a7bfa1be7mr56972795e9.12.1777471985031; Wed, 29 Apr 2026 07:13:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1777471985; cv=none; d=google.com; s=arc-20240605; b=E03aIvIsiWwGMLGBYoS7R/v2ABrZX0s7OcpERLrKnWVejGBtipLbLWB1ntHY+3TWHk fZy4hK6El5ySh/sbKkzDLu97fXNjI1pY5W4ip8EasMix1HVYD/k/l180vnPJ5KTy8z+s d3rfxt953VWKFfUKHLyPc73eLg3NuFZz4AkL9gc29e38lrqTa6Isrc1qp3cf5QEULIX/ 44ulCGIyJk7UqbHG+UwYKX+ZAJnaXCxHTwRqaB4RTCr74DojZ5CcYQtml51xWQRlD+mF l3LG9VNxxSH68lSYrKVkw1iXvuJ6mGbh24rwB7+W9kvi+hm5m++MGJ5K7z7AFjNWhq/C 22lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=eJStLb4cSltdYehIVlVzO4CzVIexMZLhOBmEAGRMBM0=; fh=PVQ6qK/apE8apMCQLUsBZ5FgEk1zvaf7+lv3UFNLduQ=; b=Q6JPT5NTLdTLivRF9DC/T5fjmlqtFbxVxcx1mPtkrH9OzfNCP1AoHMVUGXeicSXXB3 VCwVYjOAPXiTG+h0PQ3vb26ZewiVvS+QhlZhtVLdM86646jtZ99vRixU3x4f6zllbty8 3OK27yEuceJNkXQ4tvg94bXbUReb0P+FxOFUBvV8YRkjyG+rH0vYPf/psOHKlWwpUMvJ V31M4QQBy6arcstG0LWyL4d5oY+zExE7TSFHBU0/4QS/rWzK9XDVzRHaW5ug8euRB+9s TZepRao0XqFmF7E4qLJDK6BM/P+2mtfzRx4fbJrVU6Y+ghY508lXHSz1I2iCJfmwVT8J mavQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="Fu4Dm0/w"; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=neutral header.i=@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id 5b1f17b1804b1-48a7c5d993dsor4749715e9.15.2026.04.29.07.13.04 for (Google Transport Security); Wed, 29 Apr 2026 07:13:05 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Gm-Gg: AeBDieuzbs0dRHqGYKQBf7pCn+96miAMVrAV643BLzEV6NNOsT71yROxVuTE3zFUWRI aGcmgavVcICEgyWQmZ9Z1PZazFoBbHx7iIj7+aFNruV3aaN2h/u6K36HrwPeHZFXncTLLYiDOFU PqBU7ClpgOoXwSHTnl48zcw2NaWZ6KOjobWzCZ/UMNbBAn47gvX5+Hrjz3SmgspbrsQgRcfanZB 8raUVyZykJdUmOm3JbvxVlR2pgCV0wi3PiX0RDU8d1lrUENVYyOrKJknyh1kEANA7wc0/gRAF5y QyS07FySfOBL0oz72G80/DRRE2rcHqQTS9ihAUJoYxjb7O4O9udr7r/OH99VScu60VbsCE+/wzr BrU3LfBbPPcwUI9ayTUOHM471ZH5r8cBkWHhX6rvojwwfMwM5pSf4L6EHw6cF/Zjmtgn2QmijQc A3U9sNbNLE6dEMr+KwkOZwZ11zKKm2FELqRZStrClI6MSL4vzfgUJTd6F27szqXtjbtOIX0NGji XovX4sD+RXkL5KB2aB59Gym70tMYVEhWvfzkXX8O0CDNm1lloZn417Sdu9ZIvSNlltQvkEeCSTI 26QIgOHIVq2+6gP2s4giACf17FkIzdAW7Oo= X-Received: by 2002:a05:600c:8b2f:b0:48a:58ae:9933 with SMTP id 5b1f17b1804b1-48a77b1990dmr121806645e9.18.1777471984512; Wed, 29 Apr 2026 07:13:04 -0700 (PDT) Received: from dario-ThinkPad-P14s-Gen-5.homenet.telecomitalia.it (host-82-56-22-134.retail.telecomitalia.it. [82.56.22.134]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48a7c2ddc65sm30476145e9.4.2026.04.29.07.13.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Apr 2026 07:13:03 -0700 (PDT) From: Dario Binacchi To: swupdate@googlegroups.com Cc: linux-amarula@amarulasolutions.com, Dario Binacchi Subject: [meta-swupdate][PATCH 1/2] classes: add support for DISTRO suffix in artifact names Date: Wed, 29 Apr 2026 16:12:57 +0200 Message-ID: <20260429141258.616058-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260429141258.616058-1-dario.binacchi@amarulasolutions.com> References: <20260429141258.616058-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="Fu4Dm0/w"; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=neutral header.i=@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Currently, only images containing the MACHINE name are supported. With this change, when both SWUPDATE_IMAGES_NOAPPEND_DISTRO and SWUPDATE_IMAGES_NOAPPEND_MACHINE are set to 0, rootfs formatted as -- will be searched too. This is particularly useful for STMicroelectronics (OpenSTLinux) BSPs, where the generated rootfs for a selected image always contains both the distro and the machine names. For example: core-image-full-cmdline-openstlinux-weston-stm32mp25-eval.rootfs.ext4.gz Signed-off-by: Dario Binacchi --- classes-recipe/swupdate-common.bbclass | 5 ++++- classes-recipe/swupdate.bbclass | 7 ++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/classes-recipe/swupdate-common.bbclass b/classes-recipe/swupdate-common.bbclass index 80a5d5b2c917..a5ad10672154 100644 --- a/classes-recipe/swupdate-common.bbclass +++ b/classes-recipe/swupdate-common.bbclass @@ -296,8 +296,11 @@ def swupdate_add_artifacts(d, list_for_cpio): fstypes = (d.getVarFlag("SWUPDATE_IMAGES_FSTYPES", image) or "").split() encrypted = (d.getVarFlag("SWUPDATE_IMAGES_ENCRYPTED", image) or "") if fstypes: + noappend_distro = d.getVarFlag("SWUPDATE_IMAGES_NOAPPEND_DISTRO", image) noappend_machine = d.getVarFlag("SWUPDATE_IMAGES_NOAPPEND_MACHINE", image) - if noappend_machine == "0": # Search for a file explicitly with MACHINE + if noappend_distro == "0" and noappend_machine == "0": # Search for a file explicitly with DISTRO and MACHINE + imagebases = [ image + '-' + d.getVar('DISTRO') + '-' + d.getVar('MACHINE') ] + elif noappend_machine == "0": # Search for a file explicitly with MACHINE imagebases = [ image + '-' + d.getVar('MACHINE') ] elif noappend_machine == "1": # Search for a file explicitly without MACHINE imagebases = [ image ] diff --git a/classes-recipe/swupdate.bbclass b/classes-recipe/swupdate.bbclass index 5390c9b314f1..f6e500947649 100644 --- a/classes-recipe/swupdate.bbclass +++ b/classes-recipe/swupdate.bbclass @@ -23,9 +23,10 @@ # SWUPDATE_IMAGES = "core-image-full-cmdline" # SWUPDATE_IMAGES_FSTYPES[core-image-full-cmdline] = ".ext4.gz" # For this example either a file core-image-full-cmdline-${MACHINE}.ext4.gz or a file -# core-image-full-cmdline.ext4.gz gets added the swu archive. Optionally the variable -# SWUPDATE_IMAGES_NOAPPEND_MACHINE allows to explicitly define if the MACHINE name -# must be part of the image file name or not. +# core-image-full-cmdline.ext4.gz gets added the swu archive. Optionally the variables +# SWUPDATE_IMAGES_NOAPPEND_MACHINE and SWUPDATE_IMAGES_NOAPPEND_DISTRO allow to +# explicitly define if the MACHINE and/or DISTRO names must be part of the image +# file name or not. # * image file name(s) # Example: # SWUPDATE_IMAGES = "core-image-full-cmdline.ext4.gz"