
HI Adam
On Wed, Jan 26, 2022 at 7:01 PM Adam Ford aford173@gmail.com wrote:
On Wed, Jan 26, 2022 at 11:24 AM Michael Nazzareno Trimarchi michael@amarulasolutions.com wrote:
Hi Adam
On Wed, Jan 26, 2022 at 2:26 AM Tim Harvey tharvey@gateworks.com wrote:
On Tue, Jan 25, 2022 at 3:49 PM Adam Ford aford173@gmail.com wrote:
I have a flash.bin file that boots over MMC just fine, but when I use that same flash.bin file, it appears to hang after running ATF. I dumped some debug info for printing the handling of the FIT file, and I noticed the fit read sizes are also not consistent between MMC and USB loads with the identical flash.bin.
MMC booting is calling spl_romapi_raw_seekable_read, but the USB booting is not. Maybe this is normal.
I was hoping someone might have some pointers on how I can troubleshoot this. It's also weird to me that the various nodes are listed twice in the USB boot, but not the MMC boot.
I have poked around in the spl_imx_romapi.c file, but I am not seeing anything obvious.
SPL and ATF are executing, so it's partially decoding the FIT file and executing those two pieces correctly from what I can see.
USB log (no FDT) U-Boot SPL 2022.01-00753-g7f7f25ecb8-dirty (Jan 25 2022 - 15:54:57 -0600) WDT: Started watchdog@30280000 with servicing (60s timeout) Trying to boot from BOOTROM Find img info 0x&48027600, size 872 Need continue download 1024 fit read sector 48027600, sectors=872, dst=42206c40, count=872, size=0x368 firmware: 'uboot' External data: dst=40200000, offset=3000, size=a4d98 fdt: 'fdt' External data: dst=402a4dc0, offset=b1e60, size=af68 loadables: 'atf' External data: dst=960000, offset=a7d98, size=a0c6 no string for index 1 Download 772040, Total size 773576 fit read sector 48027600, sectors=872, dst=42206fb0, count=872, size=0x368 firmware: 'uboot' External data: dst=40200000, offset=3000, size=a4d98 fdt: 'fdt' External data: dst=402a4dc0, offset=b1e60, size=af68 loadables: 'atf' External data: dst=960000, offset=a7d98, size=a0c6 no string for index 1 NOTICE: BL31: v2.4(release):lf-5.10.72-2.2.0-0-g5782363f9 NOTICE: BL31: Built : 14:45:34, Jan 25 2022
<hang>
MMC Booting Log (with DTB):
U-Boot SPL 2022.01-00753-g7f7f25ecb8-dirty (Jan 25 2022 - 15:54:57 -0600) WDT: Started watchdog@30280000 with servicing (60s timeout) Trying to boot from BOOTROM image offset 0x8000, pagesize 0x200, ivt offset 0x0 ROM API load from 0x60000, size 0x400 spl_romapi_raw_seekable_read 0x60000, size 0x400 fit read sector 300, sectors=2, dst=42206c40, count=2, size=0x368 firmware: 'uboot' ROM API load from 0x63000, size 0xa4e00 spl_romapi_raw_seekable_read 0x63000, size 0xa4e00 External data: dst=40200000, offset=3000, size=a4d98 fdt: 'fdt' ROM API load from 0x111e00, size 0xb000 spl_romapi_raw_seekable_read 0x111e00, size 0xb000 External data: dst=402a4dc0, offset=b1e60, size=af68 loadables: 'atf' ROM API load from 0x107c00, size 0xa400 spl_romapi_raw_seekable_read 0x107c00, size 0xa400 External data: dst=960000, offset=a7d98, size=a0c6 no string for index 1 NOTICE: BL31: v2.4(release):lf-5.10.72-2.2.0-0-g5782363f9 NOTICE: BL31: Built : 14:45:34, Jan 25 2022
<u-boot loads successfully from here>
Adam,
I've previously run into this as well and unfortunately have no solution. Note that I had to hack in some support to the SPL for USB which I assume you've done as well. If I recall trying to enable DM_USB for the SPL took too much space so that hacks I had revolved around getting it to work in the non-DM fashion.
I was having the same problem and I found that was related to diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c index 863508776d..9d6dab08e6 100644 --- a/arch/arm/mach-imx/imx8m/soc.c +++ b/arch/arm/mach-imx/imx8m/soc.c @@ -1333,6 +1333,7 @@ enum env_location env_get_location(enum env_operation op, int prio)
You should support USB_BOOT in switch case or change your defconfig and add CONFIG_ENV_IS_NOWHERE=y
Thanks for the tip. it strikes me as odd that the system would hang if we don't know what to do with the environment. I would expect it to just load the default and move on.
I'll work on a defconfig fix.
Those nxp function should be dropped or fixed anyway
Michael
adam
Michael
Best regards,
Tim