My ALL-H3-CC-H5 doesn’t boot from any of the available images from (micro) SD card, it always goes into FEL mode, regardless of an SD-card with a viable image being inserted or not.
Once in FEL mode I can detect it with sunxi-fel and load a self-compiled u-boot and from that u-boot boot from the micro-SD card. I can also boot with a different H5-SoC board (OPI PC2) from the same SD-card.
To see if it would boot from eMMC I purchased a 8GB eMMC card so I could write an image to that (using the distro I booted from in FEL mode). However that idea was thwarted as I get lots of errors even when booting (from FEL+SD-card) with the eMMC attached:
[ 3.935365] sunxi-mmc 1c11000.mmc: Linked as a consumer to regulator.5
[ 3.977610] sunxi-mmc 1c11000.mmc: initialized, max. request size: 2048 KB, uses new timings mode
[ 199.658761] sunxi-mmc 1c11000.mmc: Dropping the link to regulator.5
[ 202.939842] sunxi-mmc 1c11000.mmc: Linked as a consumer to regulator.5
[ 202.978671] sunxi-mmc 1c11000.mmc: initialized, max. request size: 2048 KB, uses new timings mode
[ 203.144413] sunxi-mmc 1c11000.mmc: data error, sending stop command
[ 203.150855] sunxi-mmc 1c11000.mmc: send stop command failed
[ 203.156588] mmc1: switch to bus width 8 failed
[ 203.159818] sunxi-mmc 1c11000.mmc: data error, sending stop command
[ 203.166512] sunxi-mmc 1c11000.mmc: send stop command failed
[ 203.173910] mmc1: switch to bus width 4 failed
[ 203.174541] mmc1: new high speed MMC card at address 0001
[ 203.181724] mmcblk1: mmc1:0001 H8G4a2 7.28 GiB
[ 203.182909] mmcblk1boot0: mmc1:0001 H8G4a2 partition 1 4.00 MiB
[ 203.183954] mmcblk1boot1: mmc1:0001 H8G4a2 partition 2 4.00 MiB
[ 203.186110] sunxi-mmc 1c11000.mmc: data error, sending stop command
[ 203.194347] sunxi-mmc 1c11000.mmc: data error, sending stop command
[ 203.200818] sunxi-mmc 1c11000.mmc: send stop command failed
[ 203.208252] sunxi-mmc 1c11000.mmc: data error, sending stop command
[ 203.214703] sunxi-mmc 1c11000.mmc: send stop command failed
[ 203.221909] sunxi-mmc 1c11000.mmc: data error, sending stop command
[ 203.228417] sunxi-mmc 1c11000.mmc: send stop command failed
[ 203.234351] sunxi-mmc 1c11000.mmc: data error, sending stop command
[ 203.240812] sunxi-mmc 1c11000.mmc: send stop command failed
[ 203.332578] sunxi-mmc 1c11000.mmc: data error, sending stop command
[ 203.339022] sunxi-mmc 1c11000.mmc: send stop command failed
[ 203.346111] mmc1: switch to bus width 8 failed
[ 203.346675] sunxi-mmc 1c11000.mmc: data error, sending stop command
[ 203.353209] sunxi-mmc 1c11000.mmc: send stop command failed
[ 203.360477] mmc1: switch to bus width 4 failed
etc etc
I’m powering the board via the microUSB port with a 5V 4Amp PSU.
Any hints/suggestions what I could to to get it to boot from SD-card or fix the eMMC issue?
What eMMC module do you have? Try to push the u-boot button a couple times on the board. There might be rust buildup causing the button to be shorted resulting in FEL mode being activated.
I’ve pushed the u-boot button many times in a row now to no avail (creative thinking though ). Also, when I read the UBOOT_SEL pin (VER_REG at 0x01C00024 bit 8) in FEL-mode I can see it changing to 0 when I press the uboot button and to 1 again when I release the uboot button.
Ah OK, that explains the eMMC issues. Where can I buy the appropriate 4.x eMMC with a connector compatible with the ALL-H3-CC-H5?
But my main problem is still that the board goes straight into FEL mode even without eMMC and an SD-car inserted with Raspbian ( [2022-09-22-raspbian-bullseye-arm64-lite+all-h3-cc-h5.img.xz].
I can even dump the uboot from it and upload that via FEL and it will boot from the SD-card:
$ sudo dd if=/dev/sdc of=uboot.bin bs=1024 skip=8 count=1024
1024+0 records in
1024+0 records out
1048576 bytes (1,0 MB, 1,0 MiB) copied, 0,00804595 s, 130 MB/s
$ sunxi-fel uboot uboot.bin
And then the log from the UART is:
U-Boot SPL 2022.07+ (Dec 06 2022 - 22:25:33 -0500)
DRAM: 2048 MiB
Trying to boot from FEL
NOTICE: BL31: v2.7(release):v2.7-rc0-160-ga1a2b6d1e
NOTICE: BL31: Built : 22:25:29, Dec 6 2022
NOTICE: BL31: Detected Allwinner H5 SoC (1718)
NOTICE: BL31: Found U-Boot DTB at 0x20cfda8, model: Libre Computer Board ALL-H3-CC H5
NOTICE: PMIC: Assuming H5 reference regulator design
SCP/INF: Crust v0.5.10000
U-Boot 2022.07+ (Dec 06 2022 - 22:25:33 -0500) Libre Computer ALL-H3-CC H5
CPU: Allwinner H5 (SUN50I)
Model: Libre Computer Board ALL-H3-CC H5
DRAM: 2 GiB
Core: 76 devices, 23 uclasses, devicetree: separate
WDT: Not starting watchdog@1c20ca0
MMC: mmc@1c0f000: 0, mmc@1c11000: 1
Loading Environment from FAT... Unable to read "uboot.env" from mmc0:1...
Error (-2): cannot determine file size
In: serial
Out: serial
Err: serial
Net: phy interface1
Error: ethernet@1c30000 address not set.
No ethernet found.
starting USB...
Bus usb@1c1a000: USB EHCI 1.00
Bus usb@1c1a400: USB OHCI 1.0
Bus usb@1c1b000: USB EHCI 1.00
Bus usb@1c1b400: USB OHCI 1.0
Bus usb@1c1c000: USB EHCI 1.00
Bus usb@1c1c400: USB OHCI 1.0
Bus usb@1c1d000: USB EHCI 1.00
Bus usb@1c1d400: USB OHCI 1.0
scanning bus usb@1c1a000 for devices... 1 USB Device(s) found
scanning bus usb@1c1a400 for devices... 1 USB Device(s) found
scanning bus usb@1c1b000 for devices... 1 USB Device(s) found
scanning bus usb@1c1b400 for devices... 1 USB Device(s) found
scanning bus usb@1c1c000 for devices... 1 USB Device(s) found
scanning bus usb@1c1c400 for devices... 1 USB Device(s) found
scanning bus usb@1c1d000 for devices... 1 USB Device(s) found
scanning bus usb@1c1d400 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot: 0
Card did not respond to voltage select! : -110
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
No EFI system partition
phy interface1
mdio_register: non unique device name 'ethernet@1c30000'
Error: ethernet@1c30000 address not set.
phy interface1
mdio_register: non unique device name 'ethernet@1c30000'
Error: ethernet@1c30000 address not set.
BootOrder not defined
EFI boot manager: Cannot load any image
Found EFI removable media binary efi/boot/bootaa64.efi
856064 bytes read in 39 ms (20.9 MiB/s)
Booting /efi\boot\bootaa64.efi
No EFI system partition
Failed to persist EFI variables
Welcome to GRUB!
<snip>
Loading Linux 6.0.12-00858-gb98721ea4575 ...
Loading initial ramdisk ...
EFI stub: Booting Linux Kernel...
EFI stub: EFI_RNG_PROTOCOL unavailable
EFI stub: Using DTB from configuration table
EFI stub: Exiting boot services...
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 6.0.12-00858-gb98721ea4575 (autobuild@deb.libre.computer) (gcc (Debian 8.3.0-6) 8.3.0, GNU ld (GNU Binutils for Debian) 2.31.1) #1 SMP PREEMPT_DYNAMIC Thu Dec 8 19:08:19 UTC 2022
[ 0.000000] Machine model: Libre Computer Board ALL-H3-CC H5
<snip>
Debian GNU/Linux 11 raspberrypi ttyS0
raspberrypi login:
If I put this SD-card in an Orange Pi PC2 it boots fine so the SD-card should be good.
You only have one board right? It is difficult to determine if this is a board issue. FEL starts when there is no bootloader either read or able to be read. It could be a defective board or bad CD pin. Hard to determine the exact cause without two boards side by side.
I checked the SD-card CD pin (PF6) in FEL mode, it does change from 1 (no SD-card inserted) to 0 (SD-card inserted). So that seems to work OK.
I guess I’ll put it down as defective board. It’s a pity I purchased the wrong eMMC it would be interesting to see if it does boot from eMMC. But with shipping costs of €29,90 for an 8GB eMMC of €9,95 I’m not sure if it is worth the risk just to satisfy my curiousity.