public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Lukasz Majewski <lukma@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 3/3] usb: gadget: f_sdp: Allow SPL to load and boot FIT via SDP
Date: Wed, 5 Jun 2019 11:40:37 +0200	[thread overview]
Message-ID: <20190605114037.46558a06@jawa> (raw)
In-Reply-To: <CAOMZO5BRSGjhSJjpOUiqgKMz_reJrvpuL=hhZQOh=uYwHXhmDA@mail.gmail.com>

Hi Fabio, Sjoerd

> On Tue, Jun 4, 2019 at 5:41 PM Sjoerd Simons
> <sjoerd.simons@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.
> 

Tested-by: Lukasz Majewski <lukma@denx.de>

Test HW: i.MX6Q Display5 factory setup.



However, one thing puzzles me - the VID / PID used.When I run uuu
(mfgtools: SHA1: 13d187304f4faa473d2141409419c5b6f052addb):

I see that "Build in config" has following VID/PID:
        SDPU:    SPL             0x0525  0xb4a4  [0x0000..0x04ff] [1]
        SDPV:    SPL1            0x0525  0xb4a4  [0x0500..0x9998]
        SDPU:    SPL             0x0525  0xb4a4  [0x9999..0x9999]

But to make the SDPU command working I had to adjust it to be similar
to sabreauto (CONFIG_USB_GADGET_VENDOR_NUM=0x0525
CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5). Those match to "FB" (fastboot?).

Is this a bug or just the "Build in config" information is outdated?
With VID/PID set as for [1] (and as we use SDPU command, not FB), the
uuu doesn't connect to loaded SPL.



To make it working (on host):

cat << EOF > display5_recovery.lst
uuu_version 1.2.135
SDP: boot -f /srv/tftp/SPL
SDPU: write -f /srv/tftp/u-boot-dtb.img -addr 0x10000000
SDPU: jump -addr 0x10000000
SDPU: done
EOF

sudo ./uuu/uuu display5_recovery.lst


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




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190605/27394673/attachment.sig>

  parent reply	other threads:[~2019-06-05  9:40 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-04 19:56 [U-Boot] [PATCH v2 0/3] Enable usage of SDP for i.MX6 Sabre Auto Boards Sjoerd Simons
2019-06-04 19:56 ` [U-Boot] [PATCH v2 1/3] mx6sabreauto: Remove CONFIG_SPL_DM to decrease the SPL size Sjoerd Simons
2019-06-04 20:25   ` Fabio Estevam
2019-06-11  8:44   ` sbabic at denx.de
2019-06-04 19:56 ` [U-Boot] [PATCH v2 2/3] mx6sabreauto: Enable SPL SDP support Sjoerd Simons
2019-06-04 20:26   ` Fabio Estevam
2019-06-11  8:44   ` sbabic at denx.de
2019-06-04 19:56 ` [U-Boot] [PATCH v2 3/3] usb: gadget: f_sdp: Allow SPL to load and boot FIT via SDP Sjoerd Simons
2019-06-04 20:19   ` Fabio Estevam
2019-06-04 20:41     ` Sjoerd Simons
2019-06-04 21:56       ` Fabio Estevam
2019-06-05  7:25         ` Sjoerd Simons
2019-06-05 12:23           ` Fabio Estevam
2019-06-05  9:40         ` Lukasz Majewski [this message]
2019-06-05 10:00           ` Sjoerd Simons
2019-06-05 10:31             ` Lukasz Majewski
2019-06-17 14:26         ` Sjoerd Simons
2019-06-17 14:57           ` Fabio Estevam
2019-06-19  2:00           ` Breno Matheus Lima
2019-06-19  9:53             ` Sjoerd Simons
2019-06-04 21:46     ` Lukasz Majewski
2019-06-11 12:44   ` Fabio Estevam
2019-06-11 12:48     ` Fabio Estevam
2019-06-11 13:11     ` Stefano Babic
2019-06-11 13:14       ` Fabio Estevam
2019-06-11 13:53         ` Lukasz Majewski
2019-07-22 18:31           ` Fabio Estevam
2019-07-22 20:52             ` Lukasz Majewski
2019-07-22 20:54               ` Fabio Estevam
2019-07-23  6:51             ` Stefano Babic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190605114037.46558a06@jawa \
    --to=lukma@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox