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 AFC20CD5BD0 for ; Sat, 30 May 2026 17:13:04 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 129FE84671; Sat, 30 May 2026 19:13:03 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=nabladev.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=nabladev.com header.i=@nabladev.com header.b="gt2ZKych"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C856C84693; Sat, 30 May 2026 19:13:00 +0200 (CEST) Received: from mx.nabladev.com (mx.nabladev.com [178.251.229.89]) (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 E06198405A for ; Sat, 30 May 2026 19:12:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=nabladev.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=marex@nabladev.com Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 7966510A1C5; Sat, 30 May 2026 19:12:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nabladev.com; s=dkim; t=1780161178; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:content-language:in-reply-to:references; bh=XgDbtcIpiAhVjpxRkZLFrxrrQ7RbD9jHz5rYE/3e3wU=; b=gt2ZKych4yCNfUTBbJ7vO91cg9ATpyzMUY8Ty7h24jjZmX5H1e0StHhJPK9zfrLwkCh28X rEfj7cW2EylSNpXZO3xNZI1UTST+FK7vx/O8oQlSMQJOIcXfLxNqENQWU4/ZpKktBNjEVJ J6AQfbWWBbCLhCqn0lUiJgD3HPnJEXo5HyPR96HkjUvUM4ig1L3h+6ED8vXnlEMsf64uFl CPHA85UxZS9Og8w35dGrk1OmUYhPndyu9oDqLkBttMWyzvAl66qx0XfBjmn+2js8V7RInc xvfdpV8gt+xCtzs7HTAX74Dsl+OLliVtpl1NQ8kekJu0r3h0eHtxv3MP+972vg== Message-ID: <055d0c5f-b6f3-405d-9c81-e829aec25d0d@nabladev.com> Date: Sat, 30 May 2026 19:12:56 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 1/3] binman: imx8mimage: Handle nxp,boot-from = "fspi" To: Simon Glass Cc: u-boot@lists.denx.de, "NXP i.MX U-Boot Team" , Adam Ford , Alexander Koch , Fabio Estevam , Peng Fan , Tom Rini References: <20260525235155.96167-1-marex@nabladev.com> Content-Language: en-US From: Marek Vasut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Last-TLS-Session-Version: TLSv1.3 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 On 5/30/26 12:03 AM, Simon Glass wrote: > Hi Marek, > > On 2026-05-25T23:51:02, Marek Vasut wrote: >> binman: imx8mimage: Handle nxp,boot-from = 'fspi' >> >> Boot from FSPI requires additional 448 Byte long header, with U-Boot SPL >> starting at offset 0x1000. Currently, both i.MX8MM and i.MX8MN attempt >> to generate this header using fspi_conf_block with filename pointing at >> CONFIG_FSPI_CONF_FILE file. This does not work, for two reasons. >> >> First, the CONFIG_FSPI_CONF_FILE is generated by mkimage -T imx8mimage >> and may not be available yet when the fspi_conf_block is evaluated. That >> leads to a race condition where highly parallel builds fail to find the >> CONFIG_FSPI_CONF_FILE, which is usually called fspi_header.bin, on first >> build attempt. >> >> Second, binman gets confused and patches incorrect offset of DDR PHY >> firmware blobs into U-Boot SPL, the offset is incremented by exactly >> 0x1000 which is the size of fspi_conf_block. >> >> Fix both problems at once, make imx8mimage handle the generated FSPI >> header and prepend it in front of the imx8mimage processed data. This >> way, the race condition is solved, because the data generated by the >> [...] >> >> tools/binman/etype/nxp_imx8mimage.py | 11 ++++++++++- >> tools/binman/ftest.py | 9 +++++++++ >> tools/binman/test/vendor/nxp_imx8m_fspi.dts | 18 ++++++++++++++++++ >> 3 files changed, 37 insertions(+), 1 deletion(-) > >> diff --git a/tools/binman/etype/nxp_imx8mimage.py b/tools/binman/etype/nxp_imx8mimage.py >> @@ -33,6 +35,7 @@ class Entry_nxp_imx8mimage(Entry_mkimage): >> def ReadNode(self): >> super().ReadNode() >> self.boot_from = fdt_util.GetString(self._node, 'nxp,boot-from') >> + self.fspi_header = fdt_util.GetString(self._node, 'nxp,fspi-header-filename') >> self.loader_address = fdt_util.GetInt(self._node, 'nxp,loader-address') >> self.rom_version = fdt_util.GetInt(self._node, 'nxp,rom-version') > > Please update the class docstring to document > nxp,fspi-header-filename: what it is, that it only applies when > nxp,boot-from = 'fspi', and that the file is read relative to the > binman output directory. Binman has no separate entries.rst, so the > docstring is the documentation. All feedback should be addressed in V3, thanks.