[U-Boot][bug report] clearfog: EMMC boot broken on clearfog pro
Martin Rowe
martin.p.rowe at gmail.com
Sat Jan 14 15:21:52 CET 2023
Hello again
> So in order to move forward, the current plan is to find out/bisect first
> commit after v2021.01 which has introduced this BootROM SD/eMMC/SATA boot
> regression and inform involved folks (Author and Commiter) accordingly with a
> proper bug report.
I did try to bisect the eMMC issue, but there are a few related
breakages for different reasons over the last 2 years, so it's not one
commit that has done it. For example, just the 4 changes I listed for
kwbimage.c are introduced by the following 5 commits:
5c61710c9880290d54db72878c4435cdaee07d78
501a54a29cc20ce7df70f290fa274b8e2ea9d6f4
e0c243c398a771df22fd3caf309b04eef3ba2683
700ea98b2e364a8107a9af962ba39f2eeadfc678
aa6943ca3122db7ea0063684f94b5dbdf9c5cf51
> Since you're able to boot from SATA, it would help to know if it's broken as
> well. Having BootROM output with failing header offsets would be nice as well.
SATA boot works for me up until around 2022.10-rc4. The following
configs were required on top of the clearfog_defconfig:
CONFIG_MVEBU_SPL_BOOT_DEVICE_SATA=y
CONFIG_SPL_SATA=y
CONFIG_SPL_FS_EXT4=y
UART boot and SPI boot work, too.
After the commit I tested (1977d72a69f3c8d97bd25a86a6be4da27cde3724)
some mvebu timer changes got merged and __udelay gets stuck in an
infinite loop while probing hardware. I'm still trying to pin that one
down, but it seems entirely unrelated to BootROM finding invalid
headers.
In case you still need it, here's the BootROM output for SATA with no
u-boot installed:
BootROM - 1.73
Booting from AHCI
Probing HBA- 0 port 0 SATA device found
BootROM: Bad header at offset 00000001
BootROM: Bad header at offset 00000022
BootROM: Bad header at offset 00001000
BootROM: Bad header at offset 00002000
BootROM: Bad header at offset 00003000
BootROM: Bad header at offset 00004000
BootROM: Bad header at offset 00005000
BootROM: Bad header at offset 00006000
BootROM: Bad header at offset 00007000
Also, I found a non-eMMC clearfog base to test SD card boot. I had
assumed that SD card boot was working, therefore my patches would have
broken it. It appears the inverse is true. I can boot from a SD card
with the same changes I posted that fix eMMC. That means my changes
address two different issues:
1. eMMC not being detected, which could be fixed with a
CONFIG_CLEARFOG_EMMC kconfig and ifdef for the dts file, similar to
the existing clearfog kconfigs
2. MMC boot (both eMMC and SD card) not working, which is fixed by
removing the special handling that converts to/from sectors in the
SDIO case and allowing a 1 sector offset for
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
How 2 gets implemented depends on what subset of devices MMC boot is
broken for. If all devices are broken, my changes would fix it
cleanly, otherwise the changes would need to be wrapped in some kind
of ifdef which would mean the kwboot tool is no longer universal but
must be compiled for specific boards.
Let me know if there is any other data that would be useful.
Regards
Martin
More information about the U-Boot
mailing list