From patchwork Wed Apr 15 18:31:27 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 4534 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 0BE803F2F2 for ; Wed, 15 Apr 2026 20:33:05 +0200 (CEST) Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-43d76eeb303sf3866030f8f.3 for ; Wed, 15 Apr 2026 11:33:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1776277984; cv=pass; d=google.com; s=arc-20240605; b=EPAZbh2MOA4TK0GB9lBGfjhvuPyoBustWeeo3/bozistrJWWBW54WYX2C+YSpeD6rp MVP5OdEJVipYFAiVtEbUMTKoe6UtDHgTA2mLeKR0uNxn8YrI2TyyvOr17IS5lC5fVXdD LhtSrQHGHRQx3S8oAahfcSa7VsfZFnWjFzEWFkGQxXgwGsjagGg3nt9CGHsD+Cr/3rjo u6zX8KC7W5VE12ph1sNaC3qCgDxuL4e55hBG9GXOMWKuSQusnU4lZ+V2/48Sr30nyZR9 gw9RyfehpeVgFVPwTb/OLJz/iJjUxlaOp9zhXn8BjwnMAL7nrNiJ6APsuimOdLO9JUpA FWMw== 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=FaVTa9tyhtVygPCadW6PPuQuTOYPAX2GuVIAoUovmGY=; fh=/yB4gqnLShF6N7QeY6pGVYpD0eNHPKHgElYu2CNXOCs=; b=MsGjbKkoBkIc8TvCjA2t0B7CYAYo3oj/o2kfK7HHWiJGEXUizzyR0K4d7MQySMmiOd fdYHlxWUzNdvGZvezmt7mBWL66WBPmPXFqDLLTp0bN/Ow4ZLRxNoP3phcLYVw17nKuCu XThNKeGv9V/ynM50fYeOSHyevnDRdgevl5dbaeHEHwFZXXazQ34VNHUvMGA0ue+fCM1V zHdH/gamXOnlqBdjNqBTimd8o9VbKx0rXd8iovS1WoGpwOXs4slAxEzssb+3+xneOwqu M4zbIeS9v5bNxr5RrUhK7Cn+3qz7VKN7mGC6x8D17wBaLnqLvHQE5ikYTL0k75mWbohs 7LeQ==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=S7SQeQfQ; 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=1776277984; x=1776882784; 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=FaVTa9tyhtVygPCadW6PPuQuTOYPAX2GuVIAoUovmGY=; b=TpPbzlkxcjCuccsJq+4RDcj5jgiiMfAzsILzIkQ9QCyxDqSIR7/VavURlWY7vNcrl3 /X996O/vn+19QfZaRb283jSHYToxP0W2YodT7/C8kkR0XvkGGtI01HGNvugToIOoAdH4 Nb3u82a8bKbr5iA06915z9qBgcrkYsy7gUkhA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776277984; x=1776882784; 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=FaVTa9tyhtVygPCadW6PPuQuTOYPAX2GuVIAoUovmGY=; b=JKDeIyXPKINig64qMiawAINKFYVB/PLv1zWAUiGUSNH9qlIk7AXRe6tUGOrIiotiQL iMfBCPvU/DdvVWFEKMRwZ/ca8QQVGy+4sNIJBnDMnZg7tKVqkbhUbT6/1sMebUh+qNGE 5IHe/qCwIyPKmS9bGoz7MzRnnNvN3qCFbGse/I/pNTpLw+DyAshp9IKeZb4b2iYeLPsy n2GUlRuZJq735HKY5V+2yZTMzARrvFe8pl5VOqjGc+BNe8IsE8VBxh3BqCZ3y+98NLHb q/VUannadjaXhSWgfH7oPoh+INAd2OdOOPQ++mIuvvbnPOHsxHI2h/00Rj15kVQe9ilH xyuQ== X-Forwarded-Encrypted: i=2; AFNElJ8O8WIvMMbC78e+E/67tjWAXDKZqX/F0+uz8moCJxDdkj1WyuQ6bnlKJ1cD+5o4J23FujKICBG0MX8dvcCk@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YzWOl1UahDNlls2rfDrcKOdHIWMg9A/mD9mqH1CZtQh6YzUq4kv WobDPTwt6ZYHNSpMbu+fbWQxb1RLco21FoiygQl8IG/U+1jFHL9G9DmtwpjkdCcq/ikZplt5vL7 vkg== X-Received: by 2002:a5d:5f89:0:b0:43e:b0fd:5a24 with SMTP id ffacd0b85a97d-43eb0fd5abbmr926741f8f.17.1776277984211; Wed, 15 Apr 2026 11:33:04 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com; h="AYAyTiKHcicD4QlyYTfPAx74/3qbE3S/zs1N78nJMX2y/LOnoA==" Received: by 2002:a05:6000:4b03:b0:43d:7c0f:b30e with SMTP id ffacd0b85a97d-43eb1bd3cc3ls69004f8f.0.-pod-prod-05-eu; Wed, 15 Apr 2026 11:33:02 -0700 (PDT) X-Received: by 2002:a05:600c:45c9:b0:488:869c:edaa with SMTP id 5b1f17b1804b1-488d67e269amr317717645e9.7.1776277982264; Wed, 15 Apr 2026 11:33:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1776277982; cv=none; d=google.com; s=arc-20240605; b=jbxIvJvg/cT3zrL26rHwrOjDRdolSnmgRSivIe5288T2pRHxLvBATs9ErhXmwH2GRL TYwWef+2xRjb8d4B14LlXhGaqqsVugYwHpzMl616cnaOUxV45G8SasMbivzh641kEBe8 t105aoTq9FGyJ2ELWaxz6J3mPlO6vscAMNcE/mvq2vR6cSwc4uQlKbVGGfC6vYZR5BWG QQlz7e4wXBE/vErgbMZ6ansxy/GibP8I0GpqkGFC76pAaeJ/m6G2JdmH07r1RV0Rpbmy KylxKzpy4HXTw9R0uyaRfy1doFhLrgMfIz4gqsbVtRSO0079E41bUELBy7WLHZFjgChe 1nHA== 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=l3dsxgHdTRh48jhXtZr4KYgKydq1Ij5NciYZkY2qac8=; fh=1++I4mQPFaF8M6MCMd+mjFLZt9O3Ou9wuU4eNHco1NQ=; b=cr+owILLrTfKqAZiK9WezhggVrJqaoCzmaSLxI56hh+tgFcIE5p2V6G5++pwObicNw 4Yjhzgd84SB8FmGnUd9iYS/bE0+NucJxB6Tq7Qx39ZUAZUYebgLWFBsAhxevEoXLN+JY 0xdLwwa4RuMNSkkWMCk6uwUD3+P4KpiRNCK91vqUrXKmApH+pGSQS/tRezFLQvjdIbXu UcOmD6RYpW5BqfZeFqPnLauXsDpchxhBc3qllrPDXHK7BO6ngsT5SEbc7nc5cEqUz1ic nEqdnYHr9/bFaKossn3Ig3k7IxwflXMOzeRhXxj4vXldXlCacA8+e26U5STv68y129VP bJlA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=S7SQeQfQ; 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-488f1dd5669sor5372195e9.3.2026.04.15.11.33.02 for (Google Transport Security); Wed, 15 Apr 2026 11:33:02 -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: AeBDietJUtUQe1nzc4OyHwgpwwqqraX1R4jpcQITOtj8pCnEw+Eh5QFtnDzDS7Sgg4L Ak1RKRvKH5R+i2eDQAHq6vJvMAnoMQNIeuJYAwTMrylUJF/EPrZUUTVcE1RgwyKnqtMbtQF1qlj xe/UxZ02WDiNeAKqHsCSYme+kMQ7usM0SVWILoxIFsialH2ntP3cuxN8hNP0/lsiAkC9FoZ1GKo 1/UjdjSRhwfaPWgR8sRjdVObF3G3ZJ8GUf5mGJ1/LtoFXunm2WrS2pt9bsrnwqu2GlivMVCq7ZC j/Lo6gW3v0bAW/ZGsQkrqvgDENpuzmrj/ABgdwjOW+tpfl8XiGQok+QXSwPscD3Ap+QiketKwzw juu9utU6wg/1Y6Ps2k4Wpvn9YrQpT7VKG29gDz+DjJ+W0NpGb3eU9KtyXksHzbBgkvVElDzKvAw 1pjXD+WLP7avHaipSCDw2AyhuyCT82b8ZjChfku0qMnWESkuG4GaQc6R/5XasFzunIcm8umJmk9 mfVcPFgIHkWpwomOqUNdy2vq1IIgEEpVOXOIZu2sQLT5/N7SHIKfWHAXA== X-Received: by 2002:a05:600c:64c9:b0:488:c40b:c8b9 with SMTP id 5b1f17b1804b1-488d67b8d4emr337238575e9.3.1776277981605; Wed, 15 Apr 2026 11:33:01 -0700 (PDT) Received: from dario-ThinkPad-P14s-Gen-5.amarulasolutions.com ([2.196.40.93]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-488f0e72980sm34953115e9.5.2026.04.15.11.32.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Apr 2026 11:33:00 -0700 (PDT) From: Dario Binacchi To: u-boot@lists.denx.de Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Dinesh Maniyam , Heinrich Schuchardt , Ilias Apalodimas , Javier Martinez Canillas , Jerome Forissier , John Toomey , Kory Maincent , Marek Vasut , Mattijs Korpershoek , Michal Simek , Padmarao Begari , Patrice Chotard , Patrick Delaunay , Quentin Schulz , Rasmus Villemoes , Simon Glass , Sughosh Ganu , Tom Rini , =?utf-8?q?Vincent_Stehl=C3=A9?= , uboot-stm32@st-md-mailman.stormreply.com Subject: [PATCH v3 0/7] Support metadata-driven A/B boot for STM32MP25 Date: Wed, 15 Apr 2026 20:31:27 +0200 Message-ID: <20260415183250.3031030-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=S7SQeQfQ; 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: , 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 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 (7): 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 board: st: stm32mp25: support dynamic A/B bank bootup board/st/stm32mp2/stm32mp2.c | 32 ++++ cmd/part.c | 12 +- doc/README.gpt | 2 + 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 | 205 ++++++++++++++++++++++++++ test/dm/part.c | 53 +++++++ 11 files changed, 364 insertions(+), 4 deletions(-) create mode 100644 test/cmd/part.c