From patchwork Wed Nov 25 16:41:24 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 5060 Delivered-To: michael@amarulasolutions.com Received: by 2002:a05:7300:bf19:b0:386:abcc:ec87 with SMTP id ff25csp4768335dyb; Wed, 25 Nov 2026 08:41:41 -0800 (PST) X-Forwarded-Encrypted: i=2; AL+hErH+jOEy+/im+eATeQ/TMOf2PHLCOf3+mkZCjdsuOcV8nY/Y+vlqQAHNxc4nbsjBWxeaJR7Yx9WY@amarulasolutions.com X-Received: by 2002:a05:600c:64c6:b0:4a3:598e:e7a8 with SMTP id 5b1f17b1804b1-4bb887c2c98mr338821605e9.4.1795624900753; Wed, 25 Nov 2026 08:41:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1795624900; cv=none; d=google.com; s=arc-20260327; b=ncb1B5HPEAywnz1HKGMAdqhdPIKazyEtq8PYkcgVd5pIEBusgMXEwRCxdmgwZR1BEC ZSHuo5H3fOsaTLq4MjvSOie6kLHvPnDs3phHpRThnsUXJMUp3X9Qwfno9FR062sl1vME 9ICLaz4zgvJfb7JDWgk5z5cOWrt830JYc4OSuzEI28uXF1+xu9IbAkAZYTlwAhfT7H0d HNrfcDqnjbikFjMpISuShPnACHDhXgcgFYhfy3uqJzKf94PwiqYTnYDRHPCqK5i0YCZf ZIDldKgctQbU8AAhzpsWflG0Ro6JofBG8InM/mKzi+cnTpmuTqXpWNf54tezBmXPlhxh QsFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=lRxKDcxWE8Agooira60Q7tQB+EikI6b1bRzFl6F9FGo=; fh=by5nteEMIsYgKXRs8Zg21JI25+8bcsI9HNcTTGJKLsc=; b=YRp27/2MB/slj9hYJ04PLg61rxgsZ3U9lIs7dfSp2b5/qCeiyV5plTPp9L3bCTI+Z/ L07IpubJUc5jF9cwc6xLJIa1Dt1Xsh95ro4Z2A+Q0AXM7EgG2oAP5OKuCdExWjPwzCGw mTgJ4+sCYTvLof0nVvKIqUfYWmSg5HZW+J7WQHn7KcxK35LXPfECA2XXPYhxk3GAAi8J 2is1ZVmphZPuW6vquCD60+LIqLLfz/ZFvr9H3m8nR/JVUjrkqKf6c8Sr/1vlLg/jjjUR paf3vghygywGdq8xJnWnQ2LmJL8XUm+8/w8ztYrcvhQkdJ97PqheCTMrShwWu2/YMs7w DJJw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=cwSTII6Z; 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 Return-Path: Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id 5b1f17b1804b1-4bb88785f40sor33510645e9.17.2026.11.25.08.41.40 for (Google Transport Security); Wed, 25 Nov 2026 08:41:40 -0800 (PST) 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; Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=cwSTII6Z; 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=1795624900; x=1796229700; darn=amarulasolutions.com; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=lRxKDcxWE8Agooira60Q7tQB+EikI6b1bRzFl6F9FGo=; b=cwSTII6Z0Dv8tSqog0ARCj7d8DLhvYpimh9Qrv1YnhPegKmY8TNzdityV54UDAyCWP HSl5zQ6ALDUP7J4XO/iJjQgDsyzfXAYB4fPYLblTKsoogLqbIyNqRN0Xvi3cdr7IyKWK +LNEYIJBpEWhxq74s8y02cA6vUyUbx33epHEE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795624900; x=1796229700; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=lRxKDcxWE8Agooira60Q7tQB+EikI6b1bRzFl6F9FGo=; b=Hru9/HhteDOJu9QysqweCoCyPmM5pHmdGH2/w8aw0ejdkWTtKRzXYddMvj9Y1iyDFl dJvl1JJ+6s8yXG8Ocr8be8IYl+DM3sDZv6C/inBExXVUw8NH4Kg6cy46B/ZqfeXYzDkt f/HC3KrNnkTSf+D9FZuPUSLXQW4OiHWTmXvKyNEJvsRjM9+foZ+mETDCsL5n+sN4wLS/ SCtYRxpTCSOZ+0nxLrV9ZsxEitypXNw/g+tl4VAn0p2yISvU+aLtMxFev1Wd3aJgaX9a +Q+lNCZIjpBQNaYclN7zsAN3z1nlOAYatB6bhRRR17PNpNnbLJ425sQS3OF7ViP8q+Ja y5WQ== X-Forwarded-Encrypted: i=1; AL+hErFRTKVlP/ECDTo+5k7Ro3fTuTMeMCN5VsjiWAIFePTz2gQirgsYPJAoBwcMWk9lYDFRnJu4XN41@amarulasolutions.com X-Gm-Message-State: APuU4Z95eWgSGYgyWN6HQWXEBWWwP6MUbIrLfMsDLiSbFD9yucYil78Q qVLGcQoySUQTAisD14WRldm0V5Ti63yzPILHcbzpm0Y/FP8OMnhDJ8luDJzLFNYpduTjXg== X-Gm-Gg: AZFdTZcURWezA5szrwHIRPz1+9NRr96PWaW0av3AVWrnM6gYwcO95edMLBx5lVcT3Y6 vqUJnA3ToKRhhBycrnQ98mpG+VHbnpVXA02BvyStK7P9EKLxK75rylbKUzh0fGkf1B0YO21tEyo JurbzQ+Q/PPrxrfHyuJhCvDR3fWY0XQcH9FEKZ40s1XaFbsdTdjZWe0sN0pN8ic+nWeoOU2wTuL /dLgLbBNfzk/P5bpTStJQmnTSpcUb58a8hyYKDg2jGZvTcNqfHgh9SL2bd5pM8QIRx6ILZF+OrF POXOWQwIG8Hhb2bw3pS66tXi4bC4KW7Qehj6W4ahXu3W17zIaq/+jIFuLRtuWvskQ7wdxUPuqi9 u1AeI96AzpCTE3tttgXiE61QJcMykcXO2bwKspR3vljVkQhOIKEZ6xi9L7iBhPqZN6htMZLNnMp pSEdNbdLT3IEg/rqI72+W8kbrj6qd5oNYqJVpNUgWsWVDiTYLuPUge3lNZsQYlNGD57TFoIV79Z NKLrCYuZDbuJDpjdHPfcTiapLdCu+V6nwCICSrdZ/J2MaXluJrzg4UOKDCcp/vd5ZCv+0r0/FA8 fyk7pG9Hbm/fcVfQL6ajJu87njFOrULXbHNeOsYK3g1crZwhkU0NVcaiveTJkxFKEiMSGYzPiyE H9g3ug9zd5cBuih8VaJJhRETA76X3u1unRrVk0vvfR/VLiPnvLek/Br5IBjDAFY4L7WXCWkGoux PLeLQPuJsWgl8wU8hInE6o X-Received: by 2002:a05:600c:6219:b0:4a1:d087:f6ab with SMTP id 5b1f17b1804b1-4bb8880badfmr354845415e9.18.1795624900058; Wed, 25 Nov 2026 08:41:40 -0800 (PST) Return-Path: Received: from dario-ThinkPad-P14s-Gen-5.amarulasolutions.com (host-79-14-29-58.business.telecomitalia.it. [79.14.29.58]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb9067a0e6sm247988765e9.4.2026.11.25.08.41.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Nov 2026 08:41:39 -0800 (PST) From: Dario Binacchi To: buildroot@buildroot.org Cc: Dick Olsson , Sergey Matyukevich , Thomas Petazzoni , Kory Maincent , linux-amarula@amarulasolutions.com, michael@amarulasolutions.com, Dario Binacchi Subject: [PATCH v2 2/5] package/uboot-tools: add fwumdata target tool Date: Wed, 25 Nov 2026 17:41:24 +0100 Message-ID: <20261125164127.863713-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261125164127.863713-1-dario.binacchi@amarulasolutions.com> References: <20261125164127.863713-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 Add an option to build and install the fwumdata tool on the target. fwumdata allows to read, display and modify the FWU (Firmware Update) metadata from Linux userspace, similarly to what fw_printenv/fw_setenv do for the U-Boot environment. It can be used to change the active/previous bank indices, the bank states or the image acceptance flags, e.g. by an update agent after writing a new firmware bank. The location of the metadata is read from /etc/fwumdata.config, which is platform specific and is therefore not installed by the package: it has to be provided, for example, by a rootfs overlay. Signed-off-by: Dario Binacchi Reviewed-by: Kory Maincent --- package/uboot-tools/Config.in | 14 ++++++++++++++ package/uboot-tools/uboot-tools.mk | 11 +++++++++++ 2 files changed, 25 insertions(+) -- 2.43.0 diff --git a/package/uboot-tools/Config.in b/package/uboot-tools/Config.in index c99ab9825ef3..bd066fd5a50b 100644 --- a/package/uboot-tools/Config.in +++ b/package/uboot-tools/Config.in @@ -104,6 +104,20 @@ config BR2_PACKAGE_UBOOT_TOOLS_FWPRINTENV bootloader, which allows access to the U-Boot environment from Linux. +config BR2_PACKAGE_UBOOT_TOOLS_FWUMDATA + bool "fwumdata" + help + Install the fwumdata tool on the target system + + The fwumdata tool from Das U-Boot bootloader, which allows + to read, display and modify the FWU (Firmware Update) + metadata from Linux (e.g. change the active/previous bank + indices, the bank states or the image acceptance flags). + + The location of the metadata is described by the + /etc/fwumdata.config file, which must be provided (e.g. by a + rootfs overlay). + config BR2_PACKAGE_UBOOT_TOOLS_DUMPIMAGE bool "dumpimage" help diff --git a/package/uboot-tools/uboot-tools.mk b/package/uboot-tools/uboot-tools.mk index a508e61c53c8..c655095b4771 100644 --- a/package/uboot-tools/uboot-tools.mk +++ b/package/uboot-tools/uboot-tools.mk @@ -63,6 +63,10 @@ UBOOT_TOOLS_MAKE_OPTS += CONFIG_TOOLS_MKEFICAPSULE=y UBOOT_TOOLS_DEPENDENCIES += gnutls endif +ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_FWUMDATA),y) +UBOOT_TOOLS_MAKE_OPTS += CONFIG_TOOLS_FWUMDATA=y +endif + ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_FIT_CHECK_SIGN),y) define UBOOT_TOOLS_INSTALL_FIT_CHECK_SIGN $(INSTALL) -m 0755 -D $(@D)/tools/fit_check_sign $(TARGET_DIR)/usr/bin/fit_check_sign @@ -101,6 +105,12 @@ define UBOOT_TOOLS_INSTALL_FWPRINTENV endef endif +ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_FWUMDATA),y) +define UBOOT_TOOLS_INSTALL_FWUMDATA + $(INSTALL) -m 0755 -D $(@D)/tools/fwumdata $(TARGET_DIR)/usr/sbin/fwumdata +endef +endif + ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_DUMPIMAGE),y) define UBOOT_TOOLS_INSTALL_DUMPIMAGE $(INSTALL) -m 0755 -D $(@D)/tools/dumpimage $(TARGET_DIR)/usr/sbin/dumpimage @@ -117,6 +127,7 @@ define UBOOT_TOOLS_INSTALL_TARGET_CMDS $(UBOOT_TOOLS_INSTALL_MKEFICAPSULE) $(UBOOT_TOOLS_INSTALL_MKENVIMAGE) $(UBOOT_TOOLS_INSTALL_FWPRINTENV) + $(UBOOT_TOOLS_INSTALL_FWUMDATA) $(UBOOT_TOOLS_INSTALL_DUMPIMAGE) $(UBOOT_TOOLS_INSTALL_FIT_CHECK_SIGN) endef