[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 5 07:25:39 UTC 2019


On Tue, 2019-06-04 at 18:56 -0300, Fabio Estevam wrote:
> On Tue, Jun 4, 2019 at 5:41 PM Sjoerd Simons
> <sjoerd.simons at collabora.co.uk> wrote:
> 
> > Small steps right; Ooi what imx_usb_loader configuration/commands
> > are
> > you using to test this? (I find its config rather tricky to grasp).
> 
> I simply run:
> 
> sudo ./imx_usb SPL
> 
> and then
> 
> sudo ./imx_usb u-boot-dtb.img
> 
> I suggest you to try U-Boot 2019.01 on a mx6sabreauto first.

> U-Boot 2019.01 is prior to the DM / fit conversion and loading SPL +
> u-boot.img with the method above works fine.

Right; I've used that method on a fair few boards but none of those use
FIT.

For loading the SPL mx6_usb_sdp_spl.conf of imx_usb_loader has:
`hid,uboot_header,1024,0x10000000,1G,0x00907000,0x31000`

So my guess was that it was simply failing as a fit image doesn't have
a uboot header ;). I did have a quick look at seeing how to convince
imx_usb_loader to upload a FIT image, but failed to do so (hence my
question). uuu turned to be simpler to get to comply :)

> > One of the next things I will need to look at is actually secure
> > boot..
> > That said why does imx_usb_loader if the board isn't locked?
> 
> Not sure what you mean by locked.

Sorry closing the device would be the right jargon for i.mx. My point
really is, isn't it something to be fixed in imx_usb_loader if it can't
upload unsigned FIT images rather then in u-boot?

> We have been using imx_usb_loader for a long time. After DM / fit
> comvesion the IVT piece is not added into the final .img.
> 
> From the main Makefile:
> 
> ifdef CONFIG_SPL_LOAD_FIT
> MKIMAGEFLAGS_u-boot.img = -f auto -A $(ARCH) -T firmware -C none -O
> u-boot \
> -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
> -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board" -E \
> $(patsubst %,-b arch/$(ARCH)/dts/%.dtb,$(subst ",,$(CONFIG_OF_LIST)))
> else
> MKIMAGEFLAGS_u-boot.img = -A $(ARCH) -T firmware -C none -O u-boot \
> -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
> -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board"
> MKIMAGEFLAGS_u-boot-ivt.img = -A $(ARCH) -T firmware_ivt -C none -O
> u-boot \
> -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
> -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board"
> u-boot-ivt.img: MKIMAGEOUTPUT = u-boot-ivt.img.log
> CLEAN_FILES += u-boot-ivt.img.log u-boot-dtb.imx.log SPL.log u-
> boot.imx.log
> endif
> 
> we  can see that the ivt is not added for the CONFIG_SPL_LOAD_FIT
> case.
> 
> I tried to change this logic, but so far was not able to make it
> work.

Right; Thanks for the pointer

-- 
Sjoerd Simons
Collabora Ltd.


More information about the U-Boot mailing list