I would like to report here a bug about the ZYNQ CPU platform. Same issue on ZedBoard and Zybo. I have done some testing and know since when the regression have appeared.
OpenWrt Versions tested:
[23.05.2] - not booting (stuck in u-boot)
[22.03.6] - not booting (stuck in u-boot)
[21.02.7] - not booting (stuck in u-boot)
[19.07.9] - booting
I cant register to github to report it also there. I hope its enough to report it here.
This is the output of the openwrt snapshot build dated 1.1.2024 (not that long, posting it here):
U-Boot SPL 2019.07-OpenWrt-r24707-4693514ca8 (Jan 01 2024 - 01:34:48 +0000)
mmc boot
Trying to boot from MMC1
spl_load_image_fat_os: error reading image system.dtb, err - -2
U-Boot 2019.07-OpenWrt-r24707-4693514ca8 (Jan 01 2024 - 01:34:48 +0000)
CPU: Zynq 7z020
Silicon: v3.1
Model: Avnet ZedBoard board
DRAM: ECC disabled 512 MiB
MMC: mmc@e0100000: 0
Loading Environment from SPI Flash... SF: Detected s25fl256s1 with page size 256 Bytes, erase size 64 KiB, total 32 MiB
*** Warning - bad CRC, using default environment
In: serial@e0001000
Out: serial@e0001000
Err: serial@e0001000
Net: ZYNQ GEM: e000b000, phyaddr 0, interface rgmii-id
Warning: ethernet@e000b000 (eth0) using random MAC address - da:c8:23:01:62:56
eth0: ethernet@e000b000
74 bytes read in 8 ms (8.8 KiB/s)
Importing environment from mmc ...
Checking if uenvcmd is set ...
Hit any key to stop autoboot: 0
## Error: "bootcmd_mmc" not defined
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
SF: Detected s25fl256s1 with page size 256 Bytes, erase size 64 KiB, total 32 MiB
device 0 offset 0xfc0000, size 0x40000
SF: 262144 bytes @ 0xfc0000 Read: OK
## Executing script at 03000000
Wrong image format for "source" command
SCRIPT FAILED: continuing...
starting USB...
Bus usb@e0002000: USB EHCI 1.00
scanning bus usb@e0002000 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
Device 0: unknown device
ethernet@e000b000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
missing environment variable: pxeuuid
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000000
ethernet@e000b000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000000
ethernet@e000b000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000000
ethernet@e000b000 Waiting for PHY auto negotiation to complete........
FATAL: read zero bytes from port
term_exitfunc: reset failed for dev UNKNOWN: Input/output error
And this is the log from the working 19.07.9 OpenWrt release on same board:
U-Boot SPL 2018.07 (Feb 16 2022 - 20:47:59 +0000)
mmc boot
Trying to boot from MMC1
spl_load_image_fat_os: error reading image system.dtb, err - -2
U-Boot 2018.07 (Feb 16 2022 - 20:47:59 +0000)
CPU: Zynq 7z020
Silicon: v3.1
Model: Zynq Zed Development Board
DRAM: ECC disabled 512 MiB
MMC: sdhci@e0100000: 0
Loading Environment from SPI Flash... SF: Detected s25fl256s_64k with page size 256 Bytes, erase size 64 KiB, total 32 MiB
*** Warning - bad CRC, using default environment
Failed (-5)
In: serial@e0001000
Out: serial@e0001000
Err: serial@e0001000
Net: ZYNQ GEM: e000b000, phyaddr 0, interface rgmii-id
Warning: ethernet@e000b000 (eth0) using random MAC address - ba:cb:64:48:a9:a5
eth0: ethernet@e000b000
74 bytes read in 6 ms (11.7 KiB/s)
Importing environment from mmc ...
Checking if uenvcmd is set ...
Hit any key to stop autoboot: 0
Copying FIT from SD to RAM...
3714728 bytes read in 213 ms (16.6 MiB/s)
## Loading kernel from FIT Image at 02000000 ...
Using 'config@1' configuration
Verifying Hash Integrity ... OK
Trying 'kernel@1' kernel subimage
Description: ARM OpenWrt Linux-4.14.267
Type: Kernel Image
Compression: gzip compressed
Data Start: 0x020000e4
Data Size: 3704838 Bytes = 3.5 MiB
Architecture: ARM
OS: Linux
Load Address: 0x00008000
Entry Point: 0x00008000
Hash algo: crc32
Hash value: 45a0ee26
Hash algo: sha1
Hash value: 3e3bb3d6a176cb013b87cc15cd6f235fa3ffc8cf
Verifying Hash Integrity ... crc32+ sha1+ OK
## Loading fdt from FIT Image at 02000000 ...
Using 'config@1' configuration
Trying 'fdt@1' fdt subimage
Description: ARM OpenWrt avnet_zynq-zed device tree blob
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0x02388a24
Data Size: 8020 Bytes = 7.8 KiB
Architecture: ARM
Hash algo: crc32
Hash value: b6b92738
Hash algo: sha1
Hash value: 8a3e1d922842a4373c2c41f8d7961b1cf336d4e6
Verifying Hash Integrity ... crc32+ sha1+ OK
Booting using the fdt blob at 0x2388a24
Uncompressing Kernel Image ... OK
Loading Device Tree to 1eb1b000, end 1eb1ff53 ... OK
Starting kernel ...
[regular kernel booting output removed]
I have took a look into the openwrt development history for this cpu architecture.
It was the same person bumping the u-boot version.
This one works: https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=09ac4aa86b889446969df10e397798c7fe961515
And this one is broken:
https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=5ca243153b110ceddffecb70ba8a8cd0e33c8f0b
But maybe its something different then the u-boot version as a reason why its not booting.
Its easy for me to test images. I just write them with dd to a sd card and plug the card into the cardslot and apply power. I am willing to help with further debugging and test other images.
@luaraneda would you like to take a look at the issue?