[U-Boot][bug report] clearfog: EMMC boot broken on clearfog pro

Florian Kaiser flo at flo-kaiser.de
Thu Sep 15 14:20:55 CEST 2022


Hi,

I am using a clearfog pro with emmc as router.
while upgrading from openwrt 21.02.3 to 22.03.0 I discovered, that the 
provided u-boot binary gets rejected by the BootROM:
-> BootROM - 1.73

-> Booting from MMC
-> BootROM: Bad header at offset 00000000
-> BootROM: Bad header at offset 00200000
-> Switching BootPartitions.
-> BootROM: Invalid HDR source addr

While comparing the different u-boot-spl.kwb between openwrt 21.02.3 
(u-boot 2021.01) and openwrt 22.03.0 (u-boot 2022.07) I saw that the 
image has changed from a gpimage to the kwbimage v1.
After reading some code, my gut feeling told me, that maybe the BootROM 
does not like the HDR source addr because it does not expect it to be in 
sectors but in Bytes.
After binary patching the the srcaddr (srcaddr = srcaddr * 512) in the 
kwbimage v1 header, I got the BootROM to execute the SPL again.

-> Booting from MMC 
 


-> U-Boot SPL 2022.07-OpenWrt-r19685-512e76967f (Sep 03 2022 - 02:55:34 
+0000) 

-> High speed PHY - Version: 2.0 
 

-> EEPROM TLV detection failed: Using static config for Clearfog Pro. 
 

-> Detected Device ID 6828 
 

-> board SerDes lanes topology details: 
 

->  | Lane # | Speed |  Type       | 
 

->  --------------------------------
->  |   0    |   3   | SATA0       |
->  |   1    |   0   | SGMII1      |
->  |   2    |   5   | PCIe1       |
->  |   3    |   5   | USB3 HOST1  |
->  |   4    |   5   | PCIe2       |
->  |   5    |   0   | SGMII2      |
->  --------------------------------
-> High speed PHY - Ended Successfully
-> mv_ddr: 14.0.0
-> DDR3 Training Sequence - Switching XBAR Window to FastPath Window
-> mv_ddr: completed successfully
-> Trying to boot from MMC1
-> ERROR: Invalid kwbimage v1
-> ERROR: Invalid data checksum in kwbimage
-> SPL: failed to boot from all boot devices
-> ### ERROR ### Please RESET the board ###


I think I do understand the problem here, but I am not quite sure whats 
the best way to move forward.
Unfortunately I am not that familiar with the u-boot sourcecode...
Could you give me some pointers, where to start for an integrate-able 
solution?

Thanks!


More information about the U-Boot mailing list