[U-Boot] [PATCH v2 3/3] usb: gadget: f_sdp: Allow SPL to load and boot FIT via SDP

Sjoerd Simons sjoerd.simons at collabora.co.uk
Wed Jun 19 09:53:03 UTC 2019


Hey,

On Tue, 2019-06-18 at 23:00 -0300, Breno Matheus Lima wrote:
> > Seems a bit ugly that the start offset of the external data can't
> > be
> > introspected from the fdt blob, but oh well.
> > 
> > The way this seems to work for i.mx8 is that the SECOND_LOADER
> > command
> > sticks in a IVT header into the fit image. I assume some other
> > tooling
> > can then stick the CSF data in the appropriate place (anyone have a
> > pointer?).
> > 
> 
> Thanks for looking at this issue.
> 
> We are using similar structure in NXP U-Boot for i.MX8M devices, you
> can use dd tool as explained in document below:
> https://source.codeaurora.org/external/imx/uboot-imx/tree/doc/imx/habv4/guides/mx8m_mx8mm_secure_boot.txt?h=imx_v2018.03_4.14.98_2.0.0_ga#n301

THat's a quite useful document indeed to explain the mx8m setup a bit
more; Would be lovely to get that in upstream u-boot!

Though from what i can tell mx8m secure boot isn't there yet upstream,
at least judging by the fact there is no correct definition of the RVT
base address for those upstream yet ;) 

> > Now i guess the first question becomes whether the i.mx6 should
> > follow
> > the same layout. And if so how to integrate it properly (teach
> > mkimage
> > about handling firmware_ivt for fit images?).
> > 
> 
> IMHO we should follow the same layout as in i.MX8M, as far as I know
> in NXP BSP this is handled by imx-mkimage tool:
> https://source.codeaurora.org/external/imx/imx-mkimage/?h=imx_4.14.98_2.0.0_ga
> 
> Perhaps we can try similar with mkimage tool included in upstream U-
> Boot?

Right i'd hope the i.mx8m specific bits in u-boot already do that as
well; but for i.MX6 those are overkill since there isn't one big
flash.bin but two seperate bits of data (Though from the documentation
it feels like that might be the case for i.mx8 as well? As there
doesn't seem to be a reason apart from flashing convenience to put the
SPL and the u-boot images in one big file)


> > Relatedly i was looking for a good description of using HAB for
> > loading
> > the OS in FIT images, but failed to find a good document. pointers
> > welcome.
> > 
> 
> For HAB API usage you can take a look in HABv4 RVT Guidelines and
> Recommendations application note:
> https://www.nxp.com/docs/en/application-note/AN12263.pdf
> 
> The U-Boot docs in NXP BSP U-Boot also provides an overview:
> https://source.codeaurora.org/external/imx/uboot-imx/tree/doc/imx/habv4?h=imx_v2018.03_4.14.98_2.0.0_ga

Right all those assume you're using a (z)Image with the IVT/CSF
appended; None of those describe a conventional layout for a FIT image.


-- 
Sjoerd Simons
Collabora Ltd.


More information about the U-Boot mailing list