[PATCH v3 0/5] misc: fs_loader: reorg and split to FS and FW loader + FIP loader
Christian Marangi
ansuelsmth at gmail.com
Tue Mar 31 09:54:55 CEST 2026
On Mon, Mar 30, 2026 at 05:07:57PM -0600, Tom Rini wrote:
> On Tue, Mar 17, 2026 at 04:36:04PM +0100, Christian Marangi wrote:
>
> > This series mainly rework the FS loader to permit reading firmware from
> > container that are not exactly a readable filesystem.
> >
> > One scenario is when a firmware is shipped in a FIP container as
> > a generic blob with an UUID.
> >
> > FIP are mostly used on ARM in the context of ATF.
> > In such context U-Boot is loaded as BL31 and the PHY firmware
> > can't be stored in the FIT image for the kernel as U-Boot should
> > not depend on the presence of the kernel to correctly enable PHY
> > for Ethernet port.
> >
> > To handle such case the PHY firmware is stored in FIP with a
> > predictable UUID.
> >
> > One example is with Airoha 8811H firmware where the FIP can
> > have a blob with UUID "d39d2cf2-9bd0-3ca7-93e9-e71b4f9250b2".
> > (generated from command "uuidgen -n @dns --md5 --name en8811h.bin")
> >
> > With these example DTS entry:
> >
> > fs_loader0: fip-loader {
> > bootph-all;
> > compatible = "u-boot,fip-loader";
> > phandlepart = <&mmc0 0>;
> > partoffset = <0x100>;
> > };
> >
> > mdio {
> > en8811: ethernet-phy at f {
> > reg = <0xf>;
> > firmware-name = "d39d2cf2-9bd0-3ca7-93e9-e71b4f9250b2";
> > firmware-loader = <&fs_loader0>;
> > };
> > };
> >
> > And PHY driver using the get_fw_loader_from_node() and the
> > common request_firmware_into_buf() it's possible to
> > load the PHY firmware transparently by just declaring
> > the required entry in the DTS.
> >
> > get_fw_loader_from_node() is implemented to actual get the
> > loader from DT. This was something that was already in mind
> > from when the FS loader was implemented but then it was
> > never implemented in favor of a single loader per device.
> >
> > The first patch is a minor fixup for something that probably
> > won't ever happen.
> >
> > The second one is a good reworking of the FS and FW loader
> > moving the internal struct to a dedicated header. (this is
> > really to enforce what drivers should use and what
> > driver should not mess with)
> >
> > Then there is the request_firmware_size() new OP to get only
> > the size of the firmware. Useful for case where the firmware
> > size is not always the same and change across different version.
> > (the patter might be get size -> alloc buffer -> get firmware).
> >
> > Then the FIP loader as a basic parser of FIP. This only
> > read the FIP header, loop all the entry and search for a
> > matching UUID. If nothing is found then no firmware blob.
> > Very simple implementation.
> >
> > This is being CI tested on [0]
>
> Both "git am" and "b4 shazam" fail to apply the second patch here, can
> you please rebase on top of current next and repost? Thanks.
>
Sorry I was targetting master instead of next. Just sent v4 with the
conflict fixed (it was the global declare dropped commit).
--
Ansuel
More information about the U-Boot
mailing list