| Message ID | 20260426154054.2040932-1-dario.binacchi@amarulasolutions.com |
|---|---|
| Headers |
Return-Path:
<linux-amarula+bncBCQ4XFG47UFRBDPEXDHQMGQEK2RNUXA@amarulasolutions.com>
X-Original-To: linux-amarula@patchwork.amarulasolutions.com
Delivered-To: linux-amarula@patchwork.amarulasolutions.com
Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com
[209.85.128.69])
by ganimede.amarulasolutions.com (Postfix) with ESMTPS id E4A7C3F36A
for <linux-amarula@patchwork.amarulasolutions.com>;
Sun, 26 Apr 2026 17:41:01 +0200 (CEST)
Received: by mail-wm1-f69.google.com with SMTP id
5b1f17b1804b1-4837b6f6b93sf101661545e9.3
for <linux-amarula@patchwork.amarulasolutions.com>;
Sun, 26 Apr 2026 08:41:01 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1777218061; cv=pass;
d=google.com; s=arc-20240605;
b=PXCguRqPGYt+J2JXoFAGQOTs5KJuSZIehjzT10xDyScJb5mg9LucettrslyUe7bxZV
7KcVtGprUQ1ZSxU1s1oEic3ZqaR+FKGHrl6kh284v30Uhfjy/isPEEb8GbfUogesKt4w
tQBLyBlmqkuBOfmDuOIleODqSh1HzPV71dr2C3O72X6N6qf5ZhQz4Ws2czS12FSAQkgT
88UKobAzCZ1QcPohYM3HKDXvPdwFdkcQlFQkLZvNB0I+CiKHSvKjuNFsxnS2jPg+pyji
csk7mLiGfMTjzTOxPL+um32Ay5CVgPuzFcU7jEizrEUyHwrzPlNUS9ZiedGbxPa0gPnY
LUug==
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:message-id:date:subject:cc:to
:from:dkim-signature;
bh=bUUvGkCqot+TcMcEBfPYkRqecqB9B6ZaOXS5SnmFVv0=;
fh=luwLEYB2QZQKg2D9CLzTyjhzr9nHN9nTvjwwdOjE5Tc=;
b=AYQZX6aI6988jokHIjpqvB1gHZ5yyIZgyIpSqEM2dohkBQcjUJCsMS8CMZDjrD56lF
5KeHX1yXlAhS57rJPlluUdGVjmtNe7XcDezBF2Dz9O9XW5YQVIUUwHl6+8/mJMxtszP8
2PsWu1g5mitAu7Kc9kz4Cj3IlD8wG+oolu3HHWBuMWu351WweYGSHWLc2OQTa3bAWtyx
H2LSdQCECWQITXD2zhanIf6jPnlX63/PqwgCR//5HmhOew8myN6kvnqw/qIg+7MfnBB1
IWCklRm93BS0qHkipuM2cj2fYHiu4G2el/jdiVpf9jGCpV2ObDqwgDTLFwWr8Pv2jIJL
oKTA==;
darn=patchwork.amarulasolutions.com
ARC-Authentication-Results: i=2; mx.google.com;
dkim=pass header.i=@amarulasolutions.com header.s=google
header.b=TT6sTvHQ;
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=1777218061; x=1777822861;
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:message-id:date:subject:cc:to:from
:from:to:cc:subject:date:message-id:reply-to;
bh=bUUvGkCqot+TcMcEBfPYkRqecqB9B6ZaOXS5SnmFVv0=;
b=a0j9juGfIzXyexRX/o+7aKmjtOjbfzRPuXFtDQzeqCBv+FWBrHzmEP/3tLzTnHzYmE
N+bSkJgAKvo1mMGmN7sP7XeK8+ur5gvJMUI/03zj5ZH7KlogRQ1AagbJTUPtfIHFU2My
cv/51kasbj0rc4RSWX9o1WNubYpBkakVwV5Zo=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20251104; t=1777218061; x=1777822861;
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
: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=bUUvGkCqot+TcMcEBfPYkRqecqB9B6ZaOXS5SnmFVv0=;
b=jjPVYT67CRkaG0P0qgs1ISyEsdK6IxjaQJGFdEG07/9X1+rsxITgtNwSrFYoa1AzXM
j/thUQnyfLN5DqUBjf+e7wyLBAaEkk8u86FeDUgTpg7Tiu0Uv//LC37ZQBpP8PmK+Gkt
GMTFLQyt1dJxvkXCmlfFDY11q2B53hRO6DLJAdSYSG+graZ2eOOCfDsQt5ppEQpTsbGA
QIPH4HhftW2qKxADIM8M2eCqDwsDH5kjB4VysmpwhpbMqSmzkA411gF8+EsJSD6Gqn+h
3ljFf+8OD8Nj2Xj7xKpu4q28Uax4hcylXQydQUJgIGZ/RRmdOTUmjDiSaQV89NagQw5M
FLWw==
X-Forwarded-Encrypted: i=2;
AFNElJ+SbmmD8k1FugaNEbcTlCbNMaqynU6YX38Y+M4whs+oRdL8n0fACIygAkZ6kb6c9Rom6FiRng2TPqdeyOms@patchwork.amarulasolutions.com
X-Gm-Message-State: AOJu0YzXAjpPnWZo0iORul61af/O74D5NG1bH3Dli1gx3toaaS/YbF9Q
oW40KlxdsFQ92p5aydPElQQbdCmHg3HIza7j/zLSdZ6zybx4f1mUDI2sGDGD1U/HyhMnMQirLBH
cgQ==
X-Received: by 2002:a05:600c:6206:b0:48a:599a:3716 with SMTP id
5b1f17b1804b1-48a599a3bfamr282883395e9.23.1777218061464;
Sun, 26 Apr 2026 08:41:01 -0700 (PDT)
X-BeenThere: linux-amarula@amarulasolutions.com;
h="AYAyTiKLvvVYdvgpCijOXjkbpJmeASEOvniSAAVDV1emmMwG9g=="
Received: by 2002:a05:600c:6385:b0:489:1e89:e9b5 with SMTP id
5b1f17b1804b1-4891e89ea64ls45885815e9.0.-pod-prod-04-eu; Sun, 26 Apr 2026
08:41:00 -0700 (PDT)
X-Received: by 2002:a05:600c:a414:b0:48a:53ea:13e6 with SMTP id
5b1f17b1804b1-48a53ea14d3mr282734915e9.25.1777218059659;
Sun, 26 Apr 2026 08:40:59 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1777218059; cv=none;
d=google.com; s=arc-20240605;
b=heied8o8xy5VmhV7S9BKwUZ1szKPA1RR8oST+CVNgBMaGBPZnCIk3f/yH8PUw0p0qv
TKvaEiIVn+T2SCL3XqIIGVCwFE+gw1Uj+tvE9fTvGxdX0R8GSGLp6uU7Jea6OlAYC76z
bR+upDYfaj/za+bQoahT8FU4zsy6Mv3Dxx98zneL2tn47xkZl0TXRJn7iG9kwMkumkbg
3uf4aBp3HhB8qpPzs5FT8HGDSQcmDlHmsN3jUPbNm+oX3aKU7ps9rjo1glE9xRIdhSBv
2/6IAHHhYJgBgK+UnVcL0odji01jI1gejCi9tZMr1MBYlYe1XgXd47e2PKBvJOSHoiKs
/5PQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20240605;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:dkim-signature;
bh=38y71G8u32Iq7qDsma7gZWIJhzWUGr4t+BVMIDD2Oq8=;
fh=6WxqNna7MhvEm2JacuW+E3gX1VQx/2Ic9olTg2M2JEE=;
b=LaPo5xTSufqEmVBQ2+H09Oxvugjm8sMy6Twqbx3Q8k+GZjd1uqub5GQn9zkjF2dVSY
EQIuvz5l36/Ap5BGQ17j7/HKCnsJ4YW71QL2Ohi+gyMKRmpusySzO8W5T5alCPXH6JXR
mhZ7uDC1wKO2t7TRjY0ARMfY1Lc2kLYbTx/Ji1dRgjjkkKCFQlERP6A+4KGyLDuX4v4A
zuT2a0p48rTOCc7H1ksrBVLV2tHWK711D5AEM2APIv10OcHYfSj6l+r+adUtGtmBTaTx
wsKgpzTFlhXy9tPUWQlZa3jqnnMby6WCYQZU4oKfnS0oDyX1/PMeXGjd/hXL4UfxJbvj
ek6A==;
dara=google.com
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@amarulasolutions.com header.s=google
header.b=TT6sTvHQ;
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-488fc139c10sor49245185e9.12.2026.04.26.08.40.59
for <linux-amarula@amarulasolutions.com>
(Google Transport Security);
Sun, 26 Apr 2026 08:40:59 -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: AeBDietkpSKSGlLEIf3fvUb4wukwtBwSCnnrB7dNeFWVUL+fAR44YFbTk96koK827CH
IgY5L3jS8z3l18XEBJwPfESESSYKm+yq8PwSnFz7qtM6QXe4E5RrdXXtsDP+rvalRvOGY8LMVbs
EB6GRyghCvd8FNmHHCQhEWzEttLmVHO37OQMd3RzY1aIm/8CWHRG99NWuSeHbs7wr67dBEoAItL
ojvkGj1rifJmRiwyEWYRoUqGeEG24Zbg+EXZgGe2uTSgkxj51d+Nr6OXM89GkIbejiC+cpF68Xd
p6slR8/+3wsrIoW+NdPauUvKCBmlBnCd1Ys1ZSYIum+E9QLRrXt/EuncteZSUs0O6IV9ICPpDC2
SOg8Nua9wq5RY1V2UpEY8PvJOc77OpIB1IbkiSUHpgbocpxgvj7S/7xj+t8cNZrr5L7V9N7G37S
y/2HPswTbrF3qKPaaWYi2esTTEPraEZyTK1ykgcmg2/+qkcNd2uR0DRC8xeyGjKk5JAgGXKnXC8
j9adLHwZ9jiQDMIOH1dMhZ6NKuntF7V/Uc46R1j3xVJ8Th96obQIDy9rHqMkJTMiCHom+VuFVHJ
UZjvGDoszyv3YvrKR1i1x+Bcq83qSA==
X-Received: by 2002:a05:600c:3e8f:b0:48a:65a5:751f with SMTP id
5b1f17b1804b1-48a65a57799mr154552245e9.31.1777218059218;
Sun, 26 Apr 2026 08:40:59 -0700 (PDT)
Received: from dario-ThinkPad-P14s-Gen-5.amarulasolutions.com
(host-82-56-22-134.retail.telecomitalia.it. [82.56.22.134])
by smtp.gmail.com with ESMTPSA id
5b1f17b1804b1-4891bb3d121sm802593765e9.14.2026.04.26.08.40.57
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Sun, 26 Apr 2026 08:40:58 -0700 (PDT)
From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
To: u-boot@lists.denx.de
Cc: linux-amarula@amarulasolutions.com,
Dario Binacchi <dario.binacchi@amarulasolutions.com>,
Bin Meng <bmeng.cn@gmail.com>, Dinesh Maniyam <dinesh.maniyam@altera.com>,
Heinrich Schuchardt <xypron.glpk@gmx.de>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Javier Martinez Canillas <javierm@redhat.com>,
Jerome Forissier <jerome.forissier@arm.com>,
John Toomey <john.toomey@amd.com>, Jonathan GUILLOT <jonathan@joggee.fr>,
Kory Maincent <kory.maincent@bootlin.com>,
Marek Vasut <marek.vasut+renesas@mailbox.org>,
Mattijs Korpershoek <mkorpershoek@kernel.org>,
Michal Simek <michal.simek@amd.com>,
Padmarao Begari <padmarao.begari@amd.com>,
Patrice Chotard <patrice.chotard@foss.st.com>,
Patrick Delaunay <patrick.delaunay@foss.st.com>,
Quentin Schulz <quentin.schulz@cherry.de>, Rasmus Villemoes <ravi@prevas.dk>,
Simon Glass <sjg@chromium.org>, Sughosh Ganu <sughosh.ganu@arm.com>,
Tom Rini <trini@konsulko.com>,
=?utf-8?q?Vincent_Stehl=C3=A9?= <vincent.stehle@arm.com>,
uboot-stm32@st-md-mailman.stormreply.com
Subject: [PATCH v6 0/8] Support metadata-driven A/B boot for STM32MP25
Date: Sun, 26 Apr 2026 17:40:32 +0200
Message-ID: <20260426154054.2040932-1-dario.binacchi@amarulasolutions.com>
X-Mailer: git-send-email 2.43.0
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=TT6sTvHQ;
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: <linux-amarula.amarulasolutions.com>
X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com
X-Google-Group-Id: 476853432473
List-Post:
<https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/post>,
<mailto:linux-amarula@amarulasolutions.com>
List-Help:
<https://support.google.com/a/amarulasolutions.com/bin/topic.py?topic=25838>,
<mailto:linux-amarula+help@amarulasolutions.com>
List-Archive:
<https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/>
List-Unsubscribe:
<mailto:googlegroups-manage+476853432473+unsubscribe@googlegroups.com>,
<https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/subscribe>
|
| Series |
Support metadata-driven A/B boot for STM32MP25
|
|
Message
Dario Binacchi
April 26, 2026, 3:40 p.m. UTC
This series, the mainline version of [1], provides the necessary changes in U-Boot to support the metadata-driven A/B update flow for STM32MP25 boards. It implements the logic required to dynamically select the boot bank based on FWU metadata. These changes are designed to be backward compatible while providing the necessary infrastructure for the A/B scheme. The series has been tested on the STM32MP257F-EV1 board. Additionally, some patches in the series propose changes with general-purpose utility: 1/7 lib: uuid: add partition type GUID for extended bootloader 4/7 cmd: part: support lookup by UUID in 'part number' 6/7 fwu: add helper to get image GUID by type and bank index [1] https://github.com/STMicroelectronics/u-boot/pull/6 Changes in v6: - Add Reviewed-by of Simon Glass to patch 3/8 "test: cmd: add unit tests for part command" Changes in v5: - Update doc/usage/cmd/part.rst to reflect the changes related to the part command. - Add Acked-by of Ilias Apalodimas to patch 6/8 "fwu: add helper to get image GUID by type and bank index" Changes in v4: - Place the part command tests in the cmd suite rather than the dm suite. - Order the include files according the U-Boot coding style. - Add patch 7/8 test: dm: fwu_mdata: add test for fwu_mdata_get_image_guid Changes in v3: - Wrap lines exceeding 80 columns in test/cmd/part.c file. - Combine run_command() and ut_asserteq() -> ut_asserteq(1, run_command( - Add kerneldoc comment for fwu_mdata_get_image_guid() above its declaration in fwu.h. - Add log_warning() messages to fwu_platform_hook() to catch inconsistent FWU metadata (boot GUID found but root GUID missing or viceversa), as suggested by Simon Glass. Changes in v2: - Add links to the XBOOTLDR specification in the commit message of patch 1/7 lib: uuid: add partition type GUID for extended bootloader. - Update help for 'part start', 'part size' to mention UUID. - Add kerneldoc comment for fwu_mdata_get_image_guid(). - Pass efi_guid_t by pointer in fwu_mdata_get_image_guid(). - Add patches: 5/7 test: cmd: part: add UUID lookup tests 3/7 test: cmd: add unit tests for part command 2/7 test: dm: part: add test for part_get_info_by_uuid Dario Binacchi (8): lib: uuid: add partition type GUID for extended bootloader test: dm: part: add test for part_get_info_by_uuid test: cmd: add unit tests for part command cmd: part: support lookup by UUID test: cmd: part: add UUID lookup tests fwu: add helper to get image GUID by type and bank index test: dm: fwu_mdata: add test for fwu_mdata_get_image_guid board: st: stm32mp25: support dynamic A/B bank bootup board/st/stm32mp2/stm32mp2.c | 32 ++++ cmd/part.c | 12 +- doc/README.gpt | 2 + doc/usage/cmd/part.rst | 6 +- include/configs/stm32mp25_st_common.h | 15 ++ include/fwu.h | 11 ++ include/part_efi.h | 3 + lib/fwu_updates/fwu.c | 33 ++++ lib/uuid.c | 1 + test/cmd/Makefile | 1 + test/cmd/part.c | 209 ++++++++++++++++++++++++++ test/dm/fwu_mdata.c | 48 ++++++ test/dm/part.c | 53 +++++++ 13 files changed, 419 insertions(+), 7 deletions(-) create mode 100644 test/cmd/part.c