* Using USB Mass Storage on AM335X
@ 2020-10-29 22:19 Otavio Salvador
2020-10-29 22:46 ` Tom Rini
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Otavio Salvador @ 2020-10-29 22:19 UTC (permalink / raw)
To: u-boot
Hi,
I am working on porting mainline U-Boot to a custom AM335X board that
only has eMMC as the boot medium.
I can load U-Boot via serial boot and flash MLO and u-boot.img into
the eMMC using DFU. Then the board boots successfully via eMMC.
Now I want to run the "ums" command to be able to mount the eMMC on
the host. The problem I am getting is that when I select
CONFIG_CMD_USB_MASS_STORAGE=y the board no longer boots.
Does anyone know why selecting CONFIG_CMD_USB_MASS_STORAGE=y causes
the board to not boot anymore?
Thanks for your help
--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854 Mobile: +1 (347) 903-9750
^ permalink raw reply [flat|nested] 8+ messages in thread* Using USB Mass Storage on AM335X 2020-10-29 22:19 Using USB Mass Storage on AM335X Otavio Salvador @ 2020-10-29 22:46 ` Tom Rini 2020-10-30 0:49 ` Otavio Salvador 2020-10-30 6:06 ` Heiko Schocher 2020-11-01 1:12 ` Otavio Salvador 2 siblings, 1 reply; 8+ messages in thread From: Tom Rini @ 2020-10-29 22:46 UTC (permalink / raw) To: u-boot On Thu, Oct 29, 2020 at 07:19:47PM -0300, Otavio Salvador wrote: > Hi, > > I am working on porting mainline U-Boot to a custom AM335X board that > only has eMMC as the boot medium. > > I can load U-Boot via serial boot and flash MLO and u-boot.img into > the eMMC using DFU. Then the board boots successfully via eMMC. > > Now I want to run the "ums" command to be able to mount the eMMC on > the host. The problem I am getting is that when I select > CONFIG_CMD_USB_MASS_STORAGE=y the board no longer boots. > > Does anyone know why selecting CONFIG_CMD_USB_MASS_STORAGE=y causes > the board to not boot anymore? Have you otherwise confirmed that you have gadget support configured / enabled correctly on the board? The first thing that comes to mind with that type of problem is clock/pinmux being wrong. -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20201029/6a2b2dce/attachment.sig> ^ permalink raw reply [flat|nested] 8+ messages in thread
* Using USB Mass Storage on AM335X 2020-10-29 22:46 ` Tom Rini @ 2020-10-30 0:49 ` Otavio Salvador 0 siblings, 0 replies; 8+ messages in thread From: Otavio Salvador @ 2020-10-30 0:49 UTC (permalink / raw) To: u-boot Em qui., 29 de out. de 2020 ?s 19:46, Tom Rini <trini@konsulko.com> escreveu: > On Thu, Oct 29, 2020 at 07:19:47PM -0300, Otavio Salvador wrote: > > Does anyone know why selecting CONFIG_CMD_USB_MASS_STORAGE=y causes > > the board to not boot anymore? > > Have you otherwise confirmed that you have gadget support configured / > enabled correctly on the board? The first thing that comes to mind with > that type of problem is clock/pinmux being wrong. I think so as the DFU works just fine. Anything specific I could look for? -- Otavio Salvador O.S. Systems http://www.ossystems.com.br http://code.ossystems.com.br Mobile: +55 (53) 9 9981-7854 Mobile: +1 (347) 903-9750 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Using USB Mass Storage on AM335X 2020-10-29 22:19 Using USB Mass Storage on AM335X Otavio Salvador 2020-10-29 22:46 ` Tom Rini @ 2020-10-30 6:06 ` Heiko Schocher 2020-10-30 6:11 ` Lokesh Vutla 2020-11-01 1:12 ` Otavio Salvador 2 siblings, 1 reply; 8+ messages in thread From: Heiko Schocher @ 2020-10-30 6:06 UTC (permalink / raw) To: u-boot Hello Otavio, Am 29.10.2020 um 23:19 schrieb Otavio Salvador: > Hi, > > I am working on porting mainline U-Boot to a custom AM335X board that > only has eMMC as the boot medium. > > I can load U-Boot via serial boot and flash MLO and u-boot.img into > the eMMC using DFU. Then the board boots successfully via eMMC. > > Now I want to run the "ums" command to be able to mount the eMMC on > the host. The problem I am getting is that when I select > CONFIG_CMD_USB_MASS_STORAGE=y the board no longer boots. > > Does anyone know why selecting CONFIG_CMD_USB_MASS_STORAGE=y causes > the board to not boot anymore? Not really ... I cannot see, which impact activating this command has with not booting ... May some problem with image size? Early malloc space, some addresses which now overlap? You see absolutly no U-Boot output on serial? Do you have enabled early debug uart (if it is possible for am335x .. I can;t remember) If so, you need a debugger, as it fails very early ... So, you see .. no real idea ... I am sorry. 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] 8+ messages in thread
* Using USB Mass Storage on AM335X 2020-10-30 6:06 ` Heiko Schocher @ 2020-10-30 6:11 ` Lokesh Vutla 2020-10-30 8:33 ` Lukasz Majewski 0 siblings, 1 reply; 8+ messages in thread From: Lokesh Vutla @ 2020-10-30 6:11 UTC (permalink / raw) To: u-boot + Pratyush On 30/10/20 11:36 am, Heiko Schocher wrote: > Hello Otavio, > > Am 29.10.2020 um 23:19 schrieb Otavio Salvador: >> Hi, >> >> I am working on porting mainline U-Boot to a custom AM335X board that >> only has eMMC as the boot medium. >> >> I can load U-Boot via serial boot and flash MLO and u-boot.img into >> the eMMC using DFU. Then the board boots successfully via eMMC. >> >> Now I want to run the "ums" command to be able to mount the eMMC on >> the host. The problem I am getting is that when I select >> CONFIG_CMD_USB_MASS_STORAGE=y the board no longer boots. >> >> Does anyone know why selecting CONFIG_CMD_USB_MASS_STORAGE=y causes >> the board to not boot anymore? > > Not really ... I cannot see, which impact activating this command > has with not booting ... > > May some problem with image size? Early malloc space, some addresses > which now overlap? Good point. Just to avoid this scenario, can you make sure UMS is enabled only in U-Boot and not in SPL? or you can try with old MLO with new U-Boot :). As Heiko already asked, can you provide more details in the failing scenario? Thanks and regards, Lokesh ^ permalink raw reply [flat|nested] 8+ messages in thread
* Using USB Mass Storage on AM335X 2020-10-30 6:11 ` Lokesh Vutla @ 2020-10-30 8:33 ` Lukasz Majewski 0 siblings, 0 replies; 8+ messages in thread From: Lukasz Majewski @ 2020-10-30 8:33 UTC (permalink / raw) To: u-boot Hi Lokesh, Otavio, > + Pratyush > > On 30/10/20 11:36 am, Heiko Schocher wrote: > > Hello Otavio, > > > > Am 29.10.2020 um 23:19 schrieb Otavio Salvador: > >> Hi, > >> > >> I am working on porting mainline U-Boot to a custom AM335X board > >> that only has eMMC as the boot medium. > >> > >> I can load U-Boot via serial boot and flash MLO and u-boot.img into > >> the eMMC using DFU. Then the board boots successfully via eMMC. > >> > >> Now I want to run the "ums" command to be able to mount the eMMC on > >> the host. The problem I am getting is that when I select > >> CONFIG_CMD_USB_MASS_STORAGE=y the board no longer boots. > >> > >> Does anyone know why selecting CONFIG_CMD_USB_MASS_STORAGE=y causes > >> the board to not boot anymore? > > > > Not really ... I cannot see, which impact activating this command > > has with not booting ... > > > > May some problem with image size? Early malloc space, some addresses > > which now overlap? > > Good point. Just to avoid this scenario, can you make sure UMS is > enabled only in U-Boot and not in SPL? or you can try with old MLO > with new U-Boot :). IIRC there were some attempts to port gadget infrastructure to SPL for the TI SoCs. As pointed out above - it may happen that CONFIG_CMD_USB_MASS_STORAGE implicitly enables some other option in Kconfig, which also enables some SPL initialization for gadgets. The other option would be to check if the SPL malloc space is enough to handle allocations for gargets (as pointed out above). > > As Heiko already asked, can you provide more details in the failing > scenario? And yes, JTAG debugger would help. > > Thanks and regards, > Lokesh 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: <https://lists.denx.de/pipermail/u-boot/attachments/20201030/b401b1e8/attachment.sig> ^ permalink raw reply [flat|nested] 8+ messages in thread
* Using USB Mass Storage on AM335X 2020-10-29 22:19 Using USB Mass Storage on AM335X Otavio Salvador 2020-10-29 22:46 ` Tom Rini 2020-10-30 6:06 ` Heiko Schocher @ 2020-11-01 1:12 ` Otavio Salvador 2020-11-02 7:05 ` Heiko Schocher 2 siblings, 1 reply; 8+ messages in thread From: Otavio Salvador @ 2020-11-01 1:12 UTC (permalink / raw) To: u-boot Hello all, Em qui., 29 de out. de 2020 ?s 19:19, Otavio Salvador <otavio@ossystems.com.br> escreveu: ... > Does anyone know why selecting CONFIG_CMD_USB_MASS_STORAGE=y causes > the board to not boot anymore? We found it; setting CONFIG_SYS_MALLOC_F_LEN=0x2000 it works :-) -- Otavio Salvador O.S. Systems http://www.ossystems.com.br http://code.ossystems.com.br Mobile: +55 (53) 9 9981-7854 Mobile: +1 (347) 903-9750 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Using USB Mass Storage on AM335X 2020-11-01 1:12 ` Otavio Salvador @ 2020-11-02 7:05 ` Heiko Schocher 0 siblings, 0 replies; 8+ messages in thread From: Heiko Schocher @ 2020-11-02 7:05 UTC (permalink / raw) To: u-boot Hello Otavio, Am 01.11.2020 um 02:12 schrieb Otavio Salvador: > Hello all, > > Em qui., 29 de out. de 2020 ?s 19:19, Otavio Salvador > <otavio@ossystems.com.br> escreveu: > ... >> Does anyone know why selecting CONFIG_CMD_USB_MASS_STORAGE=y causes >> the board to not boot anymore? > > We found it; setting CONFIG_SYS_MALLOC_F_LEN=0x2000 it works :-) Fine! 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] 8+ messages in thread
end of thread, other threads:[~2020-11-02 7:05 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2020-10-29 22:19 Using USB Mass Storage on AM335X Otavio Salvador 2020-10-29 22:46 ` Tom Rini 2020-10-30 0:49 ` Otavio Salvador 2020-10-30 6:06 ` Heiko Schocher 2020-10-30 6:11 ` Lokesh Vutla 2020-10-30 8:33 ` Lukasz Majewski 2020-11-01 1:12 ` Otavio Salvador 2020-11-02 7:05 ` Heiko Schocher
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox