[v5,0/8] Support metadata-driven A/B boot for STM32MP25
| Message ID | 20260426153617.2039651-1-dario.binacchi@amarulasolutions.com |
|---|---|
| Headers |
Return-Path:
<linux-amarula+bncBCQ4XFG47UFRB57BXDHQMGQEIJWSHVA@amarulasolutions.com>
X-Original-To: linux-amarula@patchwork.amarulasolutions.com
Delivered-To: linux-amarula@patchwork.amarulasolutions.com
Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com
[209.85.128.72])
by ganimede.amarulasolutions.com (Postfix) with ESMTPS id CF01C3F206
for <linux-amarula@patchwork.amarulasolutions.com>;
Sun, 26 Apr 2026 17:36:24 +0200 (CEST)
Received: by mail-wm1-f72.google.com with SMTP id
5b1f17b1804b1-48a538b0d6esf8326795e9.3
for <linux-amarula@patchwork.amarulasolutions.com>;
Sun, 26 Apr 2026 08:36:24 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1777217784; cv=pass;
d=google.com; s=arc-20240605;
b=AMUKQz7ydYq2M7HbLtOdVKQdBarlXAN3vDK/O9g+B24wqEjYP9NVWjhKwfoXS/ONTI
74NDEuSLb17RCh5iRQ57qzA2fXI9kgDdBZHi5gSqOqJvN6Pc7r4gvcvr/uJZqmf+SOpq
XHycp4HUlu++A7HrsyltkvaN6y0WhOfEqZGevHO1nlQrd/vT0SJz1hG8FQLJfBGd5MDq
ywWwA7sClCh9KHTVolNlJI898kDeaBi7vRVl6MBlzElQlD651tayasEU0O97Jb255aWE
xUPFwmoNYZNfHkPJjnnkGyCPC8QainFnzOF/brh/nk5AVr0myrE3AI6lbh1AMSDmJMyc
cfQw==
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=KTlhULF8NC9a6s7Msy0uBbjB7rBfEDxmBBl3968I24I=;
fh=xhztUkGbfYi3vfVKjvoJE7o4HtSVQJct82PntWLFNhM=;
b=g2SLLG6SluEMoKioxBIgZQXGzCgNrmsOFLAS/HVFiX73T/J/0A6juwSCY7ssuVyjtY
TCTxGCwf1x218juE2+fXQlR99Fd1Gm4AWdn+7RJUy6prfQVan/j/UKEwbAftnGP4Hc/Y
8YFB4zBLjWBEjSzApNJKKLfE52inKHRYSO7AxPgTysr+1iABSDMeCiCvNojnzO1nJmx1
msSrmQpc/g02Gkc2e5Br8sDQVh1Gc1OD8tR6ytf6ZAfXj7jsMr0DkRa4+YEgPqpIvhHB
rtLP8VaRXsH4xEYzCVMdFVSetmqNRxtpL/qFSUj9PY2OInugC7mGq1CARzy3odlBNwcv
/XeA==;
darn=patchwork.amarulasolutions.com
ARC-Authentication-Results: i=2; mx.google.com;
dkim=pass header.i=@amarulasolutions.com header.s=google
header.b=IBQ78o1e;
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=1777217784; x=1777822584;
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=KTlhULF8NC9a6s7Msy0uBbjB7rBfEDxmBBl3968I24I=;
b=REMg4mi2Dh96XtkGpSaUb5KKtXjarijsKnscOXqa83SZHw1neiaCzRXkbaSBpsMC98
OmMIkmfK1svGTGzT1pFLfoORzEnEkB3Ym4IDsr94NyqGr0g9w2HwfyrTtkS0pSrXK+Mw
EFg3lO+qvdX2Xyi4jH/wC+5VLJKa/+N6DQxig=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20251104; t=1777217784; x=1777822584;
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=KTlhULF8NC9a6s7Msy0uBbjB7rBfEDxmBBl3968I24I=;
b=Aylul5IiLFE5mnKqPqAGcumtl067PeUoAhL0vPgGWOKC249OLqj5by1ka5YjeExMgC
aLtEaYEbY3lqWcijwQvuj1UDdTXEyb7TPmfl34rfZ7gg41nEoAVKV3XnnAr60BO8NPSp
PJf7r01/Hkq3vm/ONbwDM+emP9TiAgn/pLoCRpSLhBUcWRy9W6S0nlkJV/iLhEX6nB18
5lw6YS7r0BypgDy64LrCPZJYsizsFg3x06KlDNy1wTTBg+pcZsWTFGPOlb1E5fyMdQAv
VbbMRyJqSIt4eBWkI/ydXmWMTV2gd+ORFymsqkpFL/6D1ygmCQ3PQF7YM2OJ2GZ8fGoE
Ig9w==
X-Forwarded-Encrypted: i=2;
AFNElJ/KLd40ABb/3ap7Bks7Tu+vyoJRphTCU0XQkuHs4OguWas+BypCZBzLLtQ+J0LhsoRarb3vC0nZl+oTxdJE@patchwork.amarulasolutions.com
X-Gm-Message-State: AOJu0YwEgjsqEZR/czW1IeknorZfv6HMtgr+PT8cAZaPq27e7l9Hdhq6
eaOQi642bd5fdp9deM5HG+ltKGsbrS/UjuS9w5rnukdhlOX/CEcEfo/6TEwQ8OkVMqdrSw==
X-Received: by 2002:a05:600c:1f82:b0:48a:5546:619e with SMTP id
5b1f17b1804b1-48a55466251mr172135935e9.4.1777217784122;
Sun, 26 Apr 2026 08:36:24 -0700 (PDT)
X-BeenThere: linux-amarula@amarulasolutions.com;
h="AYAyTiJeM1wmx6V4jJqrvAL9IhuU9M5f+xDpfq99ldzqSXG8Kw=="
Received: by 2002:a05:600c:648a:b0:488:9454:b51 with SMTP id
5b1f17b1804b1-488f4a708aals29466775e9.0.-pod-prod-05-eu; Sun, 26 Apr 2026
08:36:22 -0700 (PDT)
X-Received: by 2002:a05:600c:4ec8:b0:485:7f02:afd5 with SMTP id
5b1f17b1804b1-488fb755caamr588580605e9.13.1777217782004;
Sun, 26 Apr 2026 08:36:22 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1777217781; cv=none;
d=google.com; s=arc-20240605;
b=W8NiJ4qLDWWtv728batRg23iy2zeMxKRb2gWT0Kw6uJB5bo29F1mzXIPNXua3w1+8S
pzxyEkc7Ng9D6mLRJAU2+3zvRwQ3E+zVFoDBU78uXGs+R0FqX/OShm0EkmcO8N+v84u0
8kpZAAl/NgHsML15DqG8jqunin0snxNKY1B2/sWe1NHEc3D/9EE+MWDGuaPBWGQzC89E
Cw30KRHkSYKf68YRBfHNNm7M1w5d4Cpl1IHDwHsn6ox3op717HFx5ECLe0nm5MCXnKIY
U5mAo4dNXGcYYLyTrp3jbOxg6FrWsZaZMP8houAL1UAtbTpWmiN1CvpnLyBOxLVHpY0R
jkyA==
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=0bTiupAMZrJPuHFqIh5SV7noAT+NuuYb+WXTBbCsIN4=;
fh=Cz/sY8zpkpQmclTy+XOk+qFS4QV7TEHlYbwT3/vMQ1M=;
b=DXZ4UcbaGZHZEEjlIpKss06cehh9Ab8oJ7yIP2gjsmqifQs2I+68+pll41Y4Aw9n6o
bMZ1YKEnNh81Lqydi2Cuqw6uwWPXOpWMal6gQZJ6xChLQaIoIeU4i8NIxb2H7eOMLqSO
BSVcqPK4HDyPUo+0FbgDNGXnIlFn35Dj0cL0umips5EbypyY8xiVAaXWSJTSSpqFvKlz
aUUzjA3+Y+4FXkwn03Rz1EdiYjYTGrLigoiitGEKSW3WmW+SZHN3ZEsgpFZbbjHf/nFe
oLg+tcpOuDvb42JAzG63hPZQC8XfslJgTcYUrUraR6gS44cPNXyTXxfmH7V+brcYTAWs
7rAg==;
dara=google.com
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@amarulasolutions.com header.s=google
header.b=IBQ78o1e;
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-488fc102708sor44894415e9.7.2026.04.26.08.36.21
for <linux-amarula@amarulasolutions.com>
(Google Transport Security);
Sun, 26 Apr 2026 08:36:21 -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: AeBDietv27pFEDjORjg/fkhYfu0l+jXfy8fw3tFqRdREzfHX29M4Wg5kVM1R28TRwwo
3alYS5HmmPPDW/357L7Fbi8InvEygojkEx8LJfRYndbMMRqsoaFzCMw158WlgApM3n6/3KZve70
CSd+jAiOKWz4DOYM53Zo5D2lXumEgVKX3dHoiHg24XmVOFLpxxSYuXqJrPlveajuTmaGUVG2hTq
WpuYgiSg8wTjX6aW4KPYhMNCDdXQI+eN35F5VQRB2NjHlIeCEftSrh00e8JgFDKjPBwq5Nfax7X
XJo9zJVRFSRV7vo3QsGWoPw1u9dp59rh7TP3M5c1zT2KwdEpQc5ExAgF37iZbu0Wxc1200YzXgY
ixk1DwLLgtER8/usyFU4sv7R1SioqxKpJB2MsqEGUnkMjOOBmpwo0WnNo9LijKMiEurq5apJ9k3
/MUdO0L2zikuslCizR8h4rw+mSptmiKKp13kMX4bHRK6BS1PFh4vCaJtahZhlfY211fn3ZTg5a6
2rGKJ/orQ4hG8Sp6337a24gVnGy1LCZPrMIcg2d0GE2ZS8qKmbetPaYQksnlG8rBciOjUYVXPUP
HhKvEEFmkTi03nPoWyvp48sTVEyQ5Q==
X-Received: by 2002:a05:600c:5246:b0:488:a639:b787 with SMTP id
5b1f17b1804b1-488fb74fc0dmr568333695e9.11.1777217780930;
Sun, 26 Apr 2026 08:36:20 -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-48a5499b0edsm388438845e9.14.2026.04.26.08.36.19
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Sun, 26 Apr 2026 08:36:20 -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>,
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 v5 0/8] Support metadata-driven A/B boot for STM32MP25
Date: Sun, 26 Apr 2026 17:35:25 +0200
Message-ID: <20260426153617.2039651-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=IBQ78o1e;
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>
|
Message
Dario Binacchi
April 26, 2026, 3:35 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 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