Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BEDE9C36002 for ; Wed, 9 Apr 2025 15:10:47 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3570582A18; Wed, 9 Apr 2025 17:10:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=0leil.net Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 75C9D8386D; Wed, 9 Apr 2025 17:10:44 +0200 (CEST) Received: from smtp-1908.mail.infomaniak.ch (smtp-1908.mail.infomaniak.ch [IPv6:2001:1600:4:17::1908]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id BFE23829CF for ; Wed, 9 Apr 2025 17:10:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=0leil.net Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=foss+uboot@0leil.net Received: from smtp-3-0001.mail.infomaniak.ch (unknown [IPv6:2001:1600:4:17::246c]) by smtp-3-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4ZXmbj1f0mz8Cn; Wed, 9 Apr 2025 17:10:41 +0200 (CEST) Received: from unknown by smtp-3-0001.mail.infomaniak.ch (Postfix) with ESMTPA id 4ZXmbh1ZHGz1lF; Wed, 9 Apr 2025 17:10:40 +0200 (CEST) From: Quentin Schulz Subject: [PATCH RFC 0/4] fit: print conf node compatibles + use property string constants Date: Wed, 09 Apr 2025 17:10:24 +0200 Message-Id: <20250409-fit-compat-v1-0-56df89ef486a@cherry.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAOCN9mcC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDI1MDEwNL3bTMEt3k/NyCxBLd1KRUS5M0M0uDJAMLJaCGgqLUtMwKsGHRSkF uzkqxtbUA9wf6dmEAAAA= X-Change-ID: 20250409-fit-compat-ebe94f690b08 To: Tom Rini Cc: Simon Glass , Jonas Karlman , u-boot@lists.denx.de, Quentin Schulz X-Mailer: b4 0.14.2 X-Infomaniak-Routing: alpha X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean This does a bit of "cleanup" by reusing constants for some FIT properties instead of having the same string in multiple places. Additionally, this adds a new constant for the compatible property in FIT configuration nodes[1] which is useful for FIT images with multiple FIT configuration nodes to support multiple devices in the same blob. U-Boot will try to figure out which node to select based on that compatible[2]. However, if this property is missing (and the first blob in the fdt property of the configuration node is uncompressed), the compatible from the root node of the associated kernel FDT will be used for the autoselection mechanism. For now, I only print the property if it exists, but maybe it'd make sense to expose the fallback one if it's missing, hence the RFC state for this series. [1] https://fitspec.osfw.foundation/#optional-properties compatible paragraph [2] https://fitspec.osfw.foundation/#select-a-configuration-to-boot Signed-off-by: Quentin Schulz --- Quentin Schulz (4): boot/fit: use constants for property strings lib: rsa: use FIT_ALGO_PROP constant instead of "algo" in FIT boot/fit: declare (and use) new constant for conf's compatible prop boot/fit: print all configuration node compatibles boot/common_fit.c | 4 ++-- boot/image-fit.c | 15 +++++++++++++-- include/image.h | 1 + lib/rsa/rsa-verify.c | 2 +- 4 files changed, 17 insertions(+), 5 deletions(-) --- base-commit: 341cafc31e4c6941a1b05feb18d18c99ffaebcc1 change-id: 20250409-fit-compat-ebe94f690b08 Best regards, -- Quentin Schulz