[PATCH v2 1/3] binman: imx8mimage: Handle nxp,boot-from = "fspi"
Marek Vasut
marex at nabladev.com
Sat May 30 19:12:56 CEST 2026
On 5/30/26 12:03 AM, Simon Glass wrote:
> Hi Marek,
>
> On 2026-05-25T23:51:02, Marek Vasut <marex at nabladev.com> 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.
More information about the U-Boot
mailing list