Hi everyone, first post here.
Sorry but after reading a lot I'm still not sure if the issue of installing into the eMMC was resolved or not. This is my experience.
I generated an image with "./compile.sh build BOARD=x96q BRANCH=current BUILD_DESKTOP=no BUILD_MINIMAL=yes EXPERT=yes KERNEL_CONFIGURE=no KERNEL_GIT=shallow RELEASE=noble" which works on SD.
I ran "armbian-install" and installed to eMMC. When rebooting without the SD card, on the serial console I get:
U-Boot SPL 2024.01-armbian-2024.01-S866c-P63e9-H8869-Vad24-Bb703-R448a (Sep 10 2025 - 13:04:13 +0000)
DRAM base address is defined as 0x40000000
DRAM has 15 b/raw, 10 b/col, 4 B/width, 1 #rank and 8 #bank
DRAM top address must be less than 0x40000000
DRAM: 1024 MiB
Trying to boot from MMC2
MMC Device 1 not found
spl: could not find mmc device 1. error: -19
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###
Lookin online for this specific issue, I found this issue in github: ( https://github.com/apritzel/u-boot/issues/7 ). Seems like there is indeed a bug with u-boot and this particular hardware which was addressed by that patch.
When booting with the SD card and pressing "space" to interrupt the boot and get a prompt, I can run a few commands. Running "mmc info" after selecting "mmc dev 2" shows that the eMMC is there, seems healthy and accessible. If I run those "mmc read $kernel_addr_r 10 XXX" commands suggested in the bug report, I can read up to max 4 units, after 5 I start getting the ERROR, which confirms the bug.
I then saved that patch ( https://lore.kernel.org/linux-sunxi/20250309061241.62170-1-jernej.skrabec@gmail.com/ ) into a file in armbian-build/userpatches/u-boot/u-boot-sunxi/fix-emmc-h313.patch and rebuilt my image. The patch was applied successfully (I confirmed in the logs). I flashed the new image to SD card and booted.
Right at the first boot, I pressed space and tried those same "read" commands in u-boot as above, now I don't get errors anymore, which is good.
Before the patch:
=> mmc dev 2
switch to partitions #0, OK
mmc2(part 0) is current device
=> mmc read $kernel_addr_r 10 1
MMC read: dev # 2, block # 16, count 1 ... 1 blocks read: OK
=> mmc read $kernel_addr_r 10 2
MMC read: dev # 2, block # 16, count 2 ... 2 blocks read: OK
=> mmc read $kernel_addr_r 10 3
MMC read: dev # 2, block # 16, count 3 ... 3 blocks read: OK
=> mmc read $kernel_addr_r 10 4
MMC read: dev # 2, block # 16, count 4 ... 4 blocks read: OK
=> mmc read $kernel_addr_r 10 5
MMC read: dev # 2, block # 16, count 5 ... 5 blocks read: OK
=> mmc read $kernel_addr_r 10 6
MMC read: dev # 2, block # 16, count 6 ... 0 blocks read: ERROR
After the patch:
=> mmc dev 2
switch to partitions #0, OK
mmc2(part 0) is current device
=> mmc read $kernel_addr_r 10 10
MMC read: dev # 2, block # 16, count 16 ... 16 blocks read: OK
I booted the full system, installed to eMMC, rebooted, but still the same error as above (SPL: failed to boot from all boot devices). I'm not sure why.
My last test: I booted u-boot from the SD card, stopped at the prompt, switched to emmc and proceeded the boot. It worked, I have a system booted from eMMC.
U-Boot 2024.01-armbian-2024.01-S866c-P63e9-H8869-Vad24-Bb703-R448a (Sep 10 2025 - 13:04:13 +0000) Allwinner Technology
CPU: Allwinner H616 (SUN50I)
Model: hechuang,x96q LPDDR3
DRAM: 1 GiB
Core: 55 devices, 20 uclasses, devicetree: separate
WDT: Not starting watchdog@30090a0
MMC: mmc@4020000: 0, mmc@4021000: 1, mmc@4022000: 2
Loading Environment from FAT... Unable to use mmc 0:1...
In: serial@5000000
Out: serial@5000000
Err: serial@5000000
No USB device found
Net: eth0: ethernet@5030000
starting USB...
No working controllers found
Autoboot in 1 seconds, press <Space> to stop
=> mmc dev 2
switch to partitions #0, OK
mmc2(part 0) is current device
=> mmc info
Device: mmc@4022000
Manufacturer ID: 90
OEM: 4a
Name: H8G4t�
Bus Speed: 52000000
Mode: MMC High Speed (52MHz)
Rd Block Len: 512
MMC version 5.0
High Capacity: Yes
Capacity: 7.3 GiB
Bus Width: 8-bit
Erase Group Size: 512 KiB
HC WP Group Size: 4 MiB
User Capacity: 7.3 GiB WRREL
Boot Capacity: 4 MiB ENH
RPMB Capacity: 4 MiB ENH
Boot area 0 is not write protected
Boot area 1 is not write protected
=> setenv devnum 2
=> run distro_bootcmd
switch to partitions #0, OK
mmc2(part 0) is current device
Scanning mmc 2:1...
Found U-Boot script /boot/boot.scr
4641 bytes read in 2 ms (2.2 MiB/s)
## Executing script at 4fc00000
U-boot loaded from SD
Boot script loaded from mmc
205 bytes read in 1 ms (200.2 KiB/s)
Load fdt: /boot/dtb/allwinner/sun50i-h313-x96q-lpddr3.dtb
42411 bytes read in 4 ms (10.1 MiB/s)
Working FDT set to 4fa00000
4203 bytes read in 3 ms (1.3 MiB/s)
Applying kernel provided DT fixup script (sun50i-h616-fixup.scr)
## Executing script at 45000000
11874272 bytes read in 378 ms (30 MiB/s)
38217736 bytes read in 1213 ms (30 MiB/s)
Moving Image from 0x40080000 to 0x40200000, end=42760000
## Loading init Ramdisk from Legacy Image at 4ff00000 ...
Image Name: uInitrd
Image Type: AArch64 Linux RAMDisk Image (gzip compressed)
Data Size: 11874208 Bytes = 11.3 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 4fa00000
Booting using the fdt blob at 0x4fa00000
Working FDT set to 4fa00000
Loading Ramdisk to 494ad000, end 49ffffa0 ... OK
Loading Device Tree to 000000004943a000, end 00000000494acfff ... OK
Working FDT set to 4943a000
Starting kernel ...
The installation seems mostly ok since I can boot u-boot from SD and then switch to booting on the eMMC side and it works. The question now is why u-boot still fails to load from the eMMC.