Jump to content

Recommended Posts

Posted (edited)
3 hours ago, Nick A said:

try using the x98h image.

@Nick AJust tried, couldn't start with SD. It's worse than before.😔.Currently, it can only run on the SD card using the x96Q-tvbox image. However, writing data to the SD card causes data loss or system crashes. I've already tried almost 10 different models of SD cards. Why is this happening? Have you encountered similar issues before?It usually freezes, and the box's light turns red. Occasionally, it crashes with the error shown in the screenshot.

a.jpg

Edited by ARx8
Posted

@ARx8X98h has a similar AIC8800D wifi chip. You could probably use the wifi section from x98h dts.

 

I have never had problems with my sdcard. Maybe it’s a bad solder joint?

Posted (edited)
8 hours ago, Nick A said:

@ARx8X98h has a similar AIC8800D wifi chip. You could probably use the wifi section from x98h dts.

I have never had problems with my sdcard. Maybe it’s a bad solder joint?

@Nick AThe possibility of a cold solder joint is very low since both devices (with identical eMCP chips) exhibit the same symptoms. Additionally, SD card read/write functions normally within the Android system.

Are there any alternative methods to install the OS onto the eMMC?

Edited by ARx8
Posted

 

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.

 

Posted

Just a few more details on the system booted from eMMC:

 

ubuntu@x96q:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
tmpfs            98M  2,5M   95M   3% /run
/dev/mmcblk2p1  7,0G  1,2G  5,5G  19% /
tmpfs           486M     0  486M   0% /dev/shm
tmpfs           5,0M     0  5,0M   0% /run/lock
tmpfs           486M     0  486M   0% /tmp
/dev/zram1       47M  344K   43M   1% /var/log
tmpfs            98M  4,0K   98M   1% /run/user/1000
ubuntu@x96q:~$ lsblk
NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
mmcblk2      179:32   0   7,3G  0 disk 
└─mmcblk2p1  179:33   0   7,2G  0 part /var/log.hdd
                                       /
mmcblk2boot0 179:64   0     4M  1 disk 
mmcblk2boot1 179:96   0     4M  1 disk 
zram0        251:0    0 485,5M  0 disk [SWAP]
zram1        251:1    0    50M  0 disk /var/log
zram2        251:2    0     0B  0 disk 

 

Posted

I have just tried MiniArch and the installation on eMMC was successful, it boots normally.

 

--- MiniMyth2 to eMMC installer v5.0 (c)Piotr Oniszczuk ---
 
Ooo...you are running hechuang,x96-qallwinner,sun50i-h616
Allwinner detected...Good!
 
SDcard device        : mmcblk0
eMMC device          : mmcblk2
UFS device           : N/A
System booted from   : SD card (mmcblk0)
Boot device has      : p2 partitions
Boot device usage    : 1768MB

[...]

copying 1768MB to eMMC/UFS ...
  ==> copying from: mmcblk0 to: eMMC/UFS (mmcblk2) ...
copying to eMMC/UFS done ...
copying bootloader to eMMC/UFS ...

 

But then again it uses a very recent version of u-boot:

 

U-Boot 2025.04 (Aug 15 2025 - 18:43:21 +0200) Allwinner Technology

CPU:   Allwinner H616 (SUN50I)
Model: hechuang,x96-q LPDDR3 v1.3
DRAM:  1 GiB
Core:  59 devices, 20 uclasses, devicetree: separate
WDT:   Not starting watchdog@30090a0
MMC:   mmc@4020000: 0, mmc@4021000: 3, mmc@4022000: 1
Loading Environment from FAT... Unable to read "uboot.env" from mmc1:1... 
In:    serial@5000000
Out:   serial@5000000
Err:   serial@5000000
No USB device found
Net:   apply fix for AC300 ephy bb version bug ...
using AC300 emac1 ephy default config ...
eth0: ethernet@5030000
starting USB...
No USB controllers found
Hit any key to stop autoboot:  0 
switch to partitions #0, OK
mmc1(part 0) is current device
Scanning mmc 1:1...
Found /extlinux/extlinux.conf
Retrieving file: /extlinux/extlinux.conf
1:	MiniMyth2
Retrieving file: /Image
append: root=/dev/mmcblk0p2 rw rootwait earlycon console=ttyS0,115200n8 loglevel=6 consoleblank=0 fsck.mode=auto fsck.repair=yes
Retrieving file: /dtbs/allwinner/sun50i-h313-x96-q-lpddr3.dtb
Moving Image from 0x40080000 to 0x40200000, end=0x42190000
## Flattened Device Tree blob at 4fa00000
   Booting using the fdt blob at 0x4fa00000
Working FDT set to 4fa00000
   Loading Device Tree to 0000000049ff5000, end 0000000049fff691 ... OK
Working FDT set to 49ff5000

Starting kernel ...

 

Which makes me believe that the only thing missing here is some fix on u-boot side.

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines