All of lore.kernel.org
 help / color / mirror / Atom feed
* i.MX USB SDP broken on imx6q-sabresd
@ 2020-11-12  2:11 Fabio Estevam
  2020-11-12  5:12 ` Heiko Schocher
  0 siblings, 1 reply; 4+ messages in thread
From: Fabio Estevam @ 2020-11-12  2:11 UTC (permalink / raw)
  To: u-boot

Hi,

I am trying to load SPL and u-boot-dtb.img via USB using the
imx_usb_loader tool.

Running the latest mainline U-Boot on a imx6q-sabresd I get:

$ sudo ./imx_usb SPL

On the console:

U-Boot SPL 2021.01-rc2-00005-g832bfad7451e (Nov 11 2020 - 23:00:05 -0300)
Trying to boot from USB SDP
SDP: initialize...
SDP: handle requests...

Then I try to load u-boot-dtb.img and the following is seen on the host PC:

$ sudo ./imx_usb  u-boot-dtb.img
config file </usr/etc/imx-loader.d//imx_usb.conf>
vid=0x066f pid=0x3780 file_name=mx23_usb_work.conf
vid=0x15a2 pid=0x004f file_name=mx28_usb_work.conf
vid=0x15a2 pid=0x0052 file_name=mx50_usb_work.conf
vid=0x15a2 pid=0x0054 file_name=mx6_usb_work.conf
vid=0x15a2 pid=0x0061 file_name=mx6_usb_work.conf
vid=0x15a2 pid=0x0063 file_name=mx6_usb_work.conf
vid=0x15a2 pid=0x0071 file_name=mx6_usb_work.conf
vid=0x15a2 pid=0x007d file_name=mx6_usb_work.conf
vid=0x15a2 pid=0x0080 file_name=mx6_usb_work.conf
vid=0x1fc9 pid=0x0128 file_name=mx6_usb_work.conf
vid=0x15a2 pid=0x0076 file_name=mx7_usb_work.conf
vid=0x1fc9 pid=0x0126 file_name=mx7ulp_usb_work.conf
vid=0x15a2 pid=0x0041 file_name=mx51_usb_work.conf
vid=0x15a2 pid=0x004e file_name=mx53_usb_work.conf
vid=0x15a2 pid=0x006a file_name=vybrid_usb_work.conf
vid=0x066f pid=0x37ff file_name=linux_gadget.conf
vid=0x1b67 pid=0x4fff file_name=mx6_usb_sdp_spl.conf
vid=0x0525 pid=0xb4a4 file_name=mx6_usb_sdp_spl.conf
vid=0x1fc9 pid=0x012b file_name=mx8mq_usb_work.conf
config file </usr/etc/imx-loader.d//mx6_usb_sdp_spl.conf>
parse /usr/etc/imx-loader.d//mx6_usb_sdp_spl.conf
Trying to open device vid=0x0525 pid=0xb4a4
Interface 0 claimed
HAB security state: development mode (0x56787856)
== work item
filename u-boot-dtb.img
load_size 0 bytes
load_addr 0x00000000
dcd 1
clear_dcd 0
plug 1
jump_mode 3
jump_addr 0x00000000
== end work item
header not found 8400:2e77d044, 4000
do_download failed, err=-22
HAB security state: development mode (0x56787856)

And nothing else appears in the console.

I tried to bisect, but the latest version I got this to run was
v2019.01, which was not using the driver model and prevents bisection.

Does anyone have any suggestions?

Thanks,

Fabio Estevam

^ permalink raw reply	[flat|nested] 4+ messages in thread

* i.MX USB SDP broken on imx6q-sabresd
  2020-11-12  2:11 i.MX USB SDP broken on imx6q-sabresd Fabio Estevam
@ 2020-11-12  5:12 ` Heiko Schocher
  2020-11-12 12:52   ` Fabio Estevam
  0 siblings, 1 reply; 4+ messages in thread
From: Heiko Schocher @ 2020-11-12  5:12 UTC (permalink / raw)
  To: u-boot

Hello Fabio,

Am 12.11.2020 um 03:11 schrieb Fabio Estevam:
> Hi,
> 
> I am trying to load SPL and u-boot-dtb.img via USB using the
> imx_usb_loader tool.
> 
> Running the latest mainline U-Boot on a imx6q-sabresd I get:
> 
> $ sudo ./imx_usb SPL
> 
> On the console:
> 
> U-Boot SPL 2021.01-rc2-00005-g832bfad7451e (Nov 11 2020 - 23:00:05 -0300)
> Trying to boot from USB SDP
> SDP: initialize...
> SDP: handle requests...
> 
> Then I try to load u-boot-dtb.img and the following is seen on the host PC:
> 
> $ sudo ./imx_usb  u-boot-dtb.img
> config file </usr/etc/imx-loader.d//imx_usb.conf>
> vid=0x066f pid=0x3780 file_name=mx23_usb_work.conf
> vid=0x15a2 pid=0x004f file_name=mx28_usb_work.conf
> vid=0x15a2 pid=0x0052 file_name=mx50_usb_work.conf
> vid=0x15a2 pid=0x0054 file_name=mx6_usb_work.conf
> vid=0x15a2 pid=0x0061 file_name=mx6_usb_work.conf
> vid=0x15a2 pid=0x0063 file_name=mx6_usb_work.conf
> vid=0x15a2 pid=0x0071 file_name=mx6_usb_work.conf
> vid=0x15a2 pid=0x007d file_name=mx6_usb_work.conf
> vid=0x15a2 pid=0x0080 file_name=mx6_usb_work.conf
> vid=0x1fc9 pid=0x0128 file_name=mx6_usb_work.conf
> vid=0x15a2 pid=0x0076 file_name=mx7_usb_work.conf
> vid=0x1fc9 pid=0x0126 file_name=mx7ulp_usb_work.conf
> vid=0x15a2 pid=0x0041 file_name=mx51_usb_work.conf
> vid=0x15a2 pid=0x004e file_name=mx53_usb_work.conf
> vid=0x15a2 pid=0x006a file_name=vybrid_usb_work.conf
> vid=0x066f pid=0x37ff file_name=linux_gadget.conf
> vid=0x1b67 pid=0x4fff file_name=mx6_usb_sdp_spl.conf
> vid=0x0525 pid=0xb4a4 file_name=mx6_usb_sdp_spl.conf
> vid=0x1fc9 pid=0x012b file_name=mx8mq_usb_work.conf
> config file </usr/etc/imx-loader.d//mx6_usb_sdp_spl.conf>
> parse /usr/etc/imx-loader.d//mx6_usb_sdp_spl.conf
> Trying to open device vid=0x0525 pid=0xb4a4
> Interface 0 claimed
> HAB security state: development mode (0x56787856)
> == work item
> filename u-boot-dtb.img
> load_size 0 bytes
> load_addr 0x00000000
> dcd 1
> clear_dcd 0
> plug 1
> jump_mode 3
> jump_addr 0x00000000
> == end work item
> header not found 8400:2e77d044, 4000
> do_download failed, err=-22
> HAB security state: development mode (0x56787856)
> 
> And nothing else appears in the console.
> 
> I tried to bisect, but the latest version I got this to run was
> v2019.01, which was not using the driver model and prevents bisection.
> 
> Does anyone have any suggestions?

Hmm... just tried cuurent mainline on an imx6ull based board, works
fine for me, see log [1] ... Ok, I boot signed image: u-boot-ivt.img.signed

(Board is not yet in mainline ... but no special change regarding USB,
only dts and board code ...)

bye,
Heiko
[1] boot SPL/U-Boot with imx_usb_loader

$ tbot @argsk30rfdevboard-local interactive_uboot -f usbloader
tbot starting ...
??Flags:
? 'do_power', 'usbloader', 'local', 'threadripper-big-build'
??Calling interactive_uboot ...
?   ??[lab3] sudo ifconfig eth0 down 192.168.3.1 up
?   ??[lab3] sudo ifconfig eth0 down 192.168.3.1 up
?   ??[lab3] kermit /home/pi/kermrc_k30rf-devboard
?   ??POWERON (k30rf-devboard)
?   ??[lab3] sispmctl -D 01:01:5c:29:39 -o 2
?   ?    ## Accessing Gembird #0 USB device 005
?   ?    ## Switched outlet 2 on
?   ??[lab3] sudo /home/pi/source/imx_usb_loader/imx_usb 
/srv/tftpboot/imx6ull_pat_defconfig/20201016/SPL.signed
?   ?    ## config file </home/pi/source/imx_usb_loader//imx_usb.conf>
?   ?    ## vid=0x066f pid=0x3780 file_name=mx23_usb_work.conf
?   ?    ## vid=0x15a2 pid=0x004f file_name=mx28_usb_work.conf
?   ?    ## vid=0x15a2 pid=0x0052 file_name=mx50_usb_work.conf
?   ?    ## vid=0x15a2 pid=0x0054 file_name=mx6_usb_work.conf
?   ?    ## vid=0x15a2 pid=0x0061 file_name=mx6_usb_work.conf
?   ?    ## vid=0x15a2 pid=0x0063 file_name=mx6_usb_work.conf
?   ?    ## vid=0x15a2 pid=0x0071 file_name=mx6_usb_work.conf
?   ?    ## vid=0x15a2 pid=0x007d file_name=mx6_usb_work.conf
?   ?    ## vid=0x15a2 pid=0x0080 file_name=mx6ull_usb_work.conf
?   ?    ## vid=0x1fc9 pid=0x0128 file_name=mx6_usb_work.conf
?   ?    ## vid=0x15a2 pid=0x0076 file_name=mx7_usb_work.conf
?   ?    ## vid=0x1fc9 pid=0x0126 file_name=mx7ulp_usb_work.conf
?   ?    ## vid=0x15a2 pid=0x0041 file_name=mx51_usb_work.conf
?   ?    ## vid=0x15a2 pid=0x004e file_name=mx53_usb_work.conf
?   ?    ## vid=0x15a2 pid=0x006a file_name=vybrid_usb_work.conf
?   ?    ## vid=0x066f pid=0x37ff file_name=linux_gadget.conf
?   ?    ## vid=0x1b67 pid=0x4fff file_name=mx6_usb_sdp_spl.conf
?   ?    ## vid=0x0525 pid=0xb4a4 file_name=mx6_usb_sdp_spl.conf
?   ?    ## vid=0x1fc9 pid=0x012b file_name=mx8mq_usb_work.conf
?   ?    ## vid=0x1fc9 pid=0x0134 file_name=mx8mm_usb_work.conf
?   ?    ## vid=0x1fc9 pid=0x013e file_name=mx8mn_usb_work.conf
?   ?    ## vid=0x3016 pid=0x1001 file_name=mx8m_usb_sdp_spl.conf
?   ?    ## config file </home/pi/source/imx_usb_loader//mx6ull_usb_work.conf>
?   ?    ## parse /home/pi/source/imx_usb_loader//mx6ull_usb_work.conf
?   ?    ## Trying to open device vid=0x15a2 pid=0x0080
?   ?    ## Interface 0 claimed
?   ?    ## HAB security state: development mode (0x56787856)
?   ?    ## == work item
?   ?    ## filename /srv/tftpboot/imx6ull_pat_defconfig/20201016/SPL.signed
?   ?    ## load_size 0 bytes
?   ?    ## load_addr 0x00000000
?   ?    ## dcd 1
?   ?    ## clear_dcd 0
?   ?    ## plug 1
?   ?    ## jump_mode 3
?   ?    ## jump_addr 0x00000000
?   ?    ## == end work item
?   ?    ## No DCD table
?   ?    ##
?   ?    ## loading binary file(/srv/tftpboot/imx6ull_pat_defconfig/20201016/SPL.signed) to 
00907400, skip=0, fsize=f540 type=aa
?   ?    ##
?   ?    ## <<<62784, 62784 bytes>>>
?   ?    ## succeeded (security 0x56787856, status 0x88888888)
?   ?    ## jumping to 0x00907400
?   ??[lab3] sudo /home/pi/source/imx_usb_loader/imx_usb 
/srv/tftpboot/imx6ull_pat_defconfig/20201016/u-boot-ivt.img.signed
?   ?    ## config file </home/pi/source/imx_usb_loader//imx_usb.conf>
?   ?    ## vid=0x066f pid=0x3780 file_name=mx23_usb_work.conf
?   ?    ## vid=0x15a2 pid=0x004f file_name=mx28_usb_work.conf
?   ?    ## vid=0x15a2 pid=0x0052 file_name=mx50_usb_work.conf
?   ?    ## vid=0x15a2 pid=0x0054 file_name=mx6_usb_work.conf
?   ?    ## vid=0x15a2 pid=0x0061 file_name=mx6_usb_work.conf
?   ?    ## vid=0x15a2 pid=0x0063 file_name=mx6_usb_work.conf
?   ?    ## vid=0x15a2 pid=0x0071 file_name=mx6_usb_work.conf
?   ?    ## vid=0x15a2 pid=0x007d file_name=mx6_usb_work.conf
?   ?    ## vid=0x15a2 pid=0x0080 file_name=mx6ull_usb_work.conf
?   ?    ## vid=0x1fc9 pid=0x0128 file_name=mx6_usb_work.conf
?   ?    ## vid=0x15a2 pid=0x0076 file_name=mx7_usb_work.conf
?   ?    ## vid=0x1fc9 pid=0x0126 file_name=mx7ulp_usb_work.conf
?   ?    ## vid=0x15a2 pid=0x0041 file_name=mx51_usb_work.conf
?   ?    ## vid=0x15a2 pid=0x004e file_name=mx53_usb_work.conf
?   ?    ## vid=0x15a2 pid=0x006a file_name=vybrid_usb_work.conf
?   ?    ## vid=0x066f pid=0x37ff file_name=linux_gadget.conf
?   ?    ## vid=0x1b67 pid=0x4fff file_name=mx6_usb_sdp_spl.conf
?   ?    ## vid=0x0525 pid=0xb4a4 file_name=mx6_usb_sdp_spl.conf
?   ?    ## vid=0x1fc9 pid=0x012b file_name=mx8mq_usb_work.conf
?   ?    ## vid=0x1fc9 pid=0x0134 file_name=mx8mm_usb_work.conf
?   ?    ## vid=0x1fc9 pid=0x013e file_name=mx8mn_usb_work.conf
?   ?    ## vid=0x3016 pid=0x1001 file_name=mx8m_usb_sdp_spl.conf
?   ?    ## config file </home/pi/source/imx_usb_loader//mx6_usb_sdp_spl.conf>
?   ?    ## parse /home/pi/source/imx_usb_loader//mx6_usb_sdp_spl.conf
?   ?    ## Trying to open device vid=0x0525 pid=0xb4a4
?   ?    ## Interface 0 claimed
?   ?    ## HAB security state: development mode (0x56787856)
?   ?    ## == work item
?   ?    ## filename /srv/tftpboot/imx6ull_pat_defconfig/20201016/u-boot-ivt.img.signed
?   ?    ## load_size 0 bytes
?   ?    ## load_addr 0x00000000
?   ?    ## dcd 1
?   ?    ## clear_dcd 0
?   ?    ## plug 1
?   ?    ## jump_mode 3
?   ?    ## jump_addr 0x00000000
?   ?    ## == end work item
?   ?    ##
?   ?    ## loading binary file(/srv/tftpboot/imx6ull_pat_defconfig/20201016/u-boot-ivt.img.signed) 
to 84ffffc0, skip=0, fsize=94960 type=aa
?   ?    ##
?   ?    ## <<<608608, 608608 bytes>>>
?   ?    ## succeeded (security 0x56787856, status 0x88888888)
?   ?    ## jumping to 0x84ffffc0
?   ??UBOOT (k30rfdev-uboot)
?   ?    <> 18
?   ?    <>   OpenSSL versions prior to 1.0.0 must be the same.
?   ?    <>   Set LD_LIBRARY_PATH for OpenSSL 1.0.2j  26 Sep 2016.
?   ?    <>   Or rebuild C-Kermit from source on this computer to make versions agree.
?   ?    <>   C-Kermit makefile target: linux+krb5+openssl
?   ?    <>   Or if that is what you did then try to find out why
?   ?    <>   the program loader (image activator) is choosing a
?   ?    <>   different OpenSSL library than the one specified in the build.
?   ?    <>
?   ?    <>   All SSL/TLS features disabled.
?   ?    <>
?   ?    <> Connecting to /dev/serial/by-id/usb-FTDI_TTL232R-3V3_FTBQ76YJ-if00-port0, speed 115200
?   ?    <>  Escape character: Ctrl-\ (ASCII 28, FS): enabled
?   ?    <> Type the escape character followed by C to get back,
?   ?    <> or followed by ? to see other options.
?   ?    <> ----------------------------------------------------
?   ?    <> ??
?   ?    <> U-Boot SPL 2021.01-rc2-development-00017-gf4ab9f8665-dirty (Nov 12 2020 - 06:03:54 +0100)
?   ?    <> Trying to boot from MMC1
?   ?    <> Card did not respond to voltage select!
?   ?    <> spl: mmc init failed with error: -95
?   ?    <> Trying to boot from SPI
?   ?    <> Trying to boot from USB SDP
?   ?    <> SDP: initialize...
?   ?    <> SDP: handle requests...
?   ?    <> Downloading file of size 608608 to 0x84ffffc0... done
?   ?    <> Jumping to header at 0x84ffffc0
?   ?    <> Header Tag is not an IMX image
?   ?    <> Found header at 0x84ffffc0
?   ?    <> hab fuse not enabled
?   ?    <>
?   ?    <> Authenticate image from DDR location 0x84ffffc0...
?   ?    <>
?   ?    <>
?   ?    <> U-Boot 2021.01-rc2-development-00017-gf4ab9f8665-dirty (Nov 12 2020 - 06:03:54 +0100)
?   ?    <>
?   ?    <> CPU:   Freescale i.MX6ULL rev1.1 528 MHz (running at 396 MHz)
?   ?    <> CPU:   Industrial temperature grade (-40C to 105C) at 26C
?   ?    <> Reset cause: POR
?   ?    <> Model: xxx patdevboard imx6ull board
?   ?    <> Board: pat-devboard
?   ?    <> Devel version, do not use in production!
?   ?    <> DRAM:  128 MiB
?   ?    <> WDT:   Started with servicing (90s timeout)
?   ?    <> NAND:  512 MiB
?   ?    <> MMC:   FSL_SDHC: 0
?   ?    <> Loading Environment from nowhere... OK
?   ?    <> Loading Environment from SPIFlash... SF: Detected s25fl128l with page size 256 Bytes, 
erase size 4 KiB, total 16 MiB
?   ?    <> OK
?   ?    <> In:    serial at 21f4000
?   ?    <> Out:   serial at 21f4000
?   ?    <> Err:   serial at 21f4000
?   ?    <> Net:   usb_ether
?   ?    <> Hit any key to stop autoboot:  0
?   ?    <> DEVEL: autoboot failed, go to cmdline
?   ?    <> =>
?   ??[k30rfdev-uboot] setenv rescuetftp run loadrescuetftp ramargs addcon addmtd addmisc\;bootm 
${loadaddr}
?   ??Entering interactive shell (CTRL+D to exit) ...

=>


-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* i.MX USB SDP broken on imx6q-sabresd
  2020-11-12  5:12 ` Heiko Schocher
@ 2020-11-12 12:52   ` Fabio Estevam
  2020-11-12 13:33     ` Heiko Schocher
  0 siblings, 1 reply; 4+ messages in thread
From: Fabio Estevam @ 2020-11-12 12:52 UTC (permalink / raw)
  To: u-boot

Hi Heiko,

On Thu, Nov 12, 2020 at 2:12 AM Heiko Schocher <hs@denx.de> wrote:

> Hmm... just tried cuurent mainline on an imx6ull based board, works
> fine for me, see log [1] ... Ok, I boot signed image: u-boot-ivt.img.signed

Thanks for your test.

I suppose your board does not use CONFIG_SPL_LOAD_FIT=y.

If you have a chance to try loading SPL and u-boot-dtb.img via
imx_usb_loader using a wandboard, I believe you will be able to
reproduce the problem.

It looks like the issue I am having is the same as the one reported by Tim:
http://u-boot.10912.n7.nabble.com/iMX8MM-USB-support-td405349.html

Thanks,

Fabio Estevam

^ permalink raw reply	[flat|nested] 4+ messages in thread

* i.MX USB SDP broken on imx6q-sabresd
  2020-11-12 12:52   ` Fabio Estevam
@ 2020-11-12 13:33     ` Heiko Schocher
  0 siblings, 0 replies; 4+ messages in thread
From: Heiko Schocher @ 2020-11-12 13:33 UTC (permalink / raw)
  To: u-boot

Hello Fabio,

Am 12.11.2020 um 13:52 schrieb Fabio Estevam:
> Hi Heiko,
> 
> On Thu, Nov 12, 2020 at 2:12 AM Heiko Schocher <hs@denx.de> wrote:
> 
>> Hmm... just tried cuurent mainline on an imx6ull based board, works
>> fine for me, see log [1] ... Ok, I boot signed image: u-boot-ivt.img.signed
> 
> Thanks for your test.
> 
> I suppose your board does not use CONFIG_SPL_LOAD_FIT=y.

No ...

> If you have a chance to try loading SPL and u-boot-dtb.img via
> imx_usb_loader using a wandboard, I believe you will be able to
> reproduce the problem.

I have here a wandboard which I have in my daily U-Boot mainline
testing:

http://xeidos.ddns.net/ubtestresults/home

But I boot from sd card ...

> It looks like the issue I am having is the same as the one reported by Tim:
> http://u-boot.10912.n7.nabble.com/iMX8MM-USB-support-td405349.html

Hmm... I can not say here more without trying out ... currently
it is hard to find some freetime ... I can just speculate now ...

your log:
"""
load_size 0 bytes
load_addr 0x00000000
dcd 1
clear_dcd 0
plug 1
jump_mode 3
jump_addr 0x00000000
== end work item
header not found 8400:2e77d044, 4000
do_download failed, err=-22
HAB security state: development mode (0x56787856)
"""

Hmm... there is no line:

loading binary file(/srv/tftpboot/imx6ull_pat_defconfig/20201016/u-boot-ivt.img.signed) to 84ffffc0, 
skip=0, fsize=94960 type=aa

instead:

header not found 8400:2e77d044, 4000

So this seems to me failing in imx_usb_loader code ...

The "header not found" comes from imx_sdp.c

May you enable dbg_printf() in imx_usb_loader code ... it seems
to me, that there is a problem with missing some header in your
file you try to download .... may you can compare with working one?

bye,
Heiko
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-11-12 13:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-12  2:11 i.MX USB SDP broken on imx6q-sabresd Fabio Estevam
2020-11-12  5:12 ` Heiko Schocher
2020-11-12 12:52   ` Fabio Estevam
2020-11-12 13:33     ` Heiko Schocher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.