ARx8 Posted August 20 Posted August 20 (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. Edited August 20 by ARx8 0 Quote
Nick A Posted August 20 Posted August 20 @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? 0 Quote
ARx8 Posted August 21 Posted August 21 (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 August 21 by ARx8 0 Quote
Nick A Posted August 21 Posted August 21 (edited) @ARx8 try miniarch. https://github.com/warpme/miniarch/releases/tag/f3b14fbae071 I think this box is having the same issue as yours? Edited August 21 by Nick A 0 Quote
ARx8 Posted August 21 Posted August 21 1 hour ago, Nick A said: try miniarch. https://github.com/warpme/miniarch/releases/tag/f3b14fbae071 I think this box is having the same issue as yours? @Nick AI don't think it's the same issue.Later, I entered the Android system and used the dd command to flash the x96q tvbox IMG file into the mmcblk. It successfully ran the armbian via eMMC.Next, I will try the x98h Wi-Fi chip driver.Thanks 0 Quote
Nick A Posted August 22 Posted August 22 (edited) @ARx8if need help fixing the sd card. Login to IRC and ask the sunxi guys. https://oftc.catirclogs.org/linux-sunxi/2025-08-20 Edited August 22 by Nick A 0 Quote
Randlin Posted August 25 Posted August 25 @Nick A Thanks for bringing that to my attention, I'll try that! 0 Quote
ARx8 Posted September 3 Posted September 3 (edited) On 8/23/2025 at 1:05 AM, Nick A said: @ARx8if need help fixing the sd card. Login to IRC and ask the sunxi guys. https://oftc.catirclogs.org/linux-sunxi/2025-08-20 Edited August 23 by Nick A @Nick AHow to use your code repository(https://github.com/NickAlilovic/build) to add a 1.5GB RAM patch. Edited September 3 by ARx8 0 Quote
Andre Ruiz Posted 9 hours ago Posted 9 hours ago 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. 0 Quote
Andre Ruiz Posted 9 hours ago Posted 9 hours ago 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 0 Quote
Nick A Posted 7 hours ago Posted 7 hours ago @Andre Ruiz I might already have those patches in my build. Try the x96q images here. Also, you should change the log level to 7 in armbianEnv.txt. https://github.com/NickAlilovic/build/releases/tag/20250306 0 Quote
Andre Ruiz Posted 6 hours ago Posted 6 hours ago 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. 0 Quote
Andre Ruiz Posted 6 hours ago Posted 6 hours ago Quote @Andre Ruiz I might already have those patches in my build. Try the x96q images here. Also, you should change the log level to 7 in armbianEnv.txt. https://github.com/NickAlilovic/build/releases/tag/20250306 Nick, thanks, I'll take a look and report back. 0 Quote
Andre Ruiz Posted 3 hours ago Posted 3 hours ago 4 hours ago, Nick A said: I might already have those patches in my build. Try the x96q images here. Also, you should change the log level to 7 in armbianEnv.txt. https://github.com/NickAlilovic/build/releases/tag/20250306 @Nick A I tested images from your repo and still can't get one to boot properly from the eMMC in my hardware. The hardware is a X96Q LPDDR3 v1.3 (I'm pretty sure since this info is written in the mainboard). Tested image was Armbian-unofficial_25.05.0-trunk_X96q-lpddr3-v1-3_bookworm_edge_6.12.11_server.img. When booting from SD card, it works. After installing to eMMC and booting from it, I get: [ 2044.312802] reboot: Power down U-Boot SPL 2025.01-armbian-2025.01-S6d41-P7151-H8869-V98f7-Bb703-R448a-dirty (Apr 02 2025 - 21:19:05 -04 00) DRAM:testing 32-bit width, rank = 2 read calibration failed! testing 32-bit width, rank = 1 DRAM:Store cfg DRAM:1st writing pattern DRAM:detecting column address bits detected 10 columns DRAM:restore cfg DRAM:reconfigure for all active rows DRAM:store cfg DRAM:2nd writing pattern DRAM:detecting row address bits detected 15 rows DRAM:restoring cfg DRAM:end of auto detect dram size MBUS port 0 cfg0 0100000d cfg1 00640080 MBUS port 1 cfg0 06000009 cfg1 01000578 MBUS port 2 cfg0 0200000d cfg1 00600100 MBUS port 3 cfg0 01000009 cfg1 00500064 MBUS port 4 cfg0 20000209 cfg1 1388157c MBUS port 5 cfg0 00640209 cfg1 00200040 MBUS port 6 cfg0 00640209 cfg1 00200040 MBUS port 8 cfg0 01000009 cfg1 00400080 MBUS port 11 cfg0 01000009 cfg1 00640080 MBUS port 14 cfg0 04000009 cfg1 00400100 MBUS port 16 cfg0 2000060d cfg1 09600af0 MBUS port 21 cfg0 0800060d cfg1 02000300 MBUS port 22 cfg0 01000009 cfg1 00640080 MBUS port 25 cfg0 0064000f cfg1 00200040 MBUS port 26 cfg0 20000209 cfg1 1388157c MBUS port 37 cfg0 01000009 cfg1 00400080 MBUS port 38 cfg0 00640209 cfg1 00200040 MBUS port 39 cfg0 20000209 cfg1 1388157c MBUS port 40 cfg0 00640209 cfg1 00200040 1024 MiB Trying to boot from MMC2 NOTICE: BL31: v2.10.14(debug):armbian NOTICE: BL31: Built : 18:07:43, Apr 2 2025 NOTICE: BL31: Detected Allwinner H616 SoC (1823) NOTICE: BL31: Found U-Boot DTB at 0x4a0b2520, model: hechuang,x96-q LPDDR3 v1.3 INFO: ARM GICv2 driver initialized INFO: Configuring SPC Controller INFO: PMIC: Probing AXP305 on RSB ERROR: RSB: set run-time address: 0x10003 INFO: Could not init RSB: -65539 INFO: BL31: Platform setup done INFO: BL31: Initializing runtime services INFO: BL31: cortex_a53: CPU workaround for erratum 855873 was applied INFO: BL31: cortex_a53: CPU workaround for erratum 1530924 was applied INFO: PSCI: Suspend is unavailable INFO: BL31: Preparing for EL3 exit to normal world INFO: Entry point address = 0x4a000000 INFO: SPSR = 0x3c9 INFO: Changed devicetree. ns16550_serial serial@5000000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19 U-Boot 2025.01-armbian-2025.01-S6d41-P7151-H8869-V98f7-Bb703-R448a-dirty (Apr 02 2025 - 21:19:05 -0400) 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 use mmc 1: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 U-Boot script /boot/boot.scr 4641 bytes read in 1 ms (4.4 MiB/s) ## Executing script at 4fc00000 U-boot loaded from SD Boot script loaded from mmc 252 bytes read in 1 ms (246.1 KiB/s) The file sun50i-h313-x96-q-lpddr3.dtb was not found in the path /boot/dtb/allwinner Card did not respond to voltage select! : -110 ** Bad device specification mmc 0 ** Failed to load '/boot/dtb/allwinner/sun50i-h313-x96-q-lpddr3.dtb' libfdt fdt_check_header(): FDT_ERR_BADMAGIC No FDT memory address configured. Please configure the FDT address via "fdt addr <address>" command. Aborting! 4203 bytes read in 3 ms (1.3 MiB/s) Applying kernel provided DT fixup script (sun50i-h616-fixup.scr) ## Executing script at 45000000 16776355 bytes read in 532 ms (30.1 MiB/s) 32059904 bytes read in 1017 ms (30.1 MiB/s) Moving Image from 0x40080000 to 0x40200000, end=0x42170000 ## Loading init Ramdisk from Legacy Image at 4ff00000 ... Image Name: uInitrd Image Type: AArch64 Linux RAMDisk Image (gzip compressed) Data Size: 16776291 Bytes = 16 MiB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK ERROR: Did not find a cmdline Flattened Device Tree Could not find a valid device tree SCRIPT FAILED: continuing... Card did not respond to voltage select! : -110 Cannot persist EFI variables without system partition Loading Boot0000 'mmc 1' failed EFI boot manager: Cannot load any image Card did not respond to voltage select! : -110 starting USB... No USB controllers found USB is stopped. Please issue 'usb start' first. starting USB... No USB controllers found ethernet@5030000 Waiting for PHY auto negotiation to complete......... TIMEOUT ! [...] Note that it says "U-boot loaded from SD" but it was not, there is no SD plugged in in this test. Also, It got much further than the upstream one. U-boot was loaded (all stages), it found the boot script & initrd, but then fell apart when loading dtb and booting kernel. Another very interesting issue is that this image that booted fine on the first time, will not boot again from the SD a second time (it hits the same issue as above even from the SD card). I need to re-flash the SD so it will boot again. Very weird. 0 Quote
Nick A Posted 1 hour ago Posted 1 hour ago (edited) @Andre Ruiz that’s weird uboot loaded boot.scr Check if “/boot/dtb/allwinner/sun50i-h313-x96-q-lpddr3.dtb” exists and path is correct. Make sure it’s not 0 bytes. Edited 1 hour ago by Nick A 0 Quote
Recommended Posts
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.