ROCK(Pro)64 won't boot with Linux 6.12

I have not done anything new, both boards were put into service about 1.5 years ago or so probably about the first time I show up on the forums. Definitely not over or even near five years I hope but time does fly by.

2 Likes

Okay thanks, so either only very old bootloaders are affected, or it it affects certain SD cards only.

@usr_9 @Cosmo2 if you are open for another test:

cd /tmp
wget https://dietpi.com/downloads/binaries/testing/linux-u-boot-rock64-current.deb https://dietpi.com/downloads/binaries/testing/linux-{dtb,image}-current-rockchip64.deb
dpkg -i linux-u-boot-rock64-current.deb linux-{dtb,image}-current-rockchip64.deb
/boot/dietpi/func/dietpi-set_hardware flash-uboot-mmc
reboot
1 Like

I’'l give it try tomorrow. Have to reconnect the HDMI and the UART to the Rock64.

1 Like

Had my UART cable handy so I decided to give this a try. Here’s a summary of my steps and results:

  1. Flashed β€œDietPi_ROCK64-ARMv8-Bookworm.img.xz” to SD card.

  2. Booted up ROCK64, ran through initial setup and update/upgrade. Rebooted fine.

  3. Ran through ROCK64 specific steps from POST 14 (ROCK(Pro)64 won't boot with Linux 6.12 - #14 by MichaIng). Result: Reboots fine into Linux DietPi 6.6.56-current-rockchip64 #1 SMP PREEMPT Thu Oct 10 10:50:06 UTC 2024 aarch64 GNU/Linux.

  4. Proceeded to go through steps from POST 22 (ROCK(Pro)64 won't boot with Linux 6.12 - #22 by MichaIng). Result: ROCK64 does not boot.

root@DietPi:/tmp# wget https://dietpi.com/downloads/binaries/testing/linux-u-boot-rock64-current.deb https://dietpi.com/downloads/binaries/testing/linux-{dtb,image}-current-rockchip64.deb
--2025-06-11 17:04:14--  https://dietpi.com/downloads/binaries/testing/linux-u-boot-rock64-current.deb
Resolving dietpi.com (dietpi.com)... 172.67.193.183, 104.21.12.65, 2606:4700:3034::ac43:c1b7, ...
Connecting to dietpi.com (dietpi.com)|172.67.193.183|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 321636 (314K) [application/vnd.debian.binary-package]
Saving to: β€˜linux-u-boot-rock64-current.deb’

linux-u-boot-rock64-current.deb  100%[==========================================================>] 314.10K  1.32MB/s    in 0.2s

2025-06-11 17:04:15 (1.32 MB/s) - β€˜linux-u-boot-rock64-current.deb’ saved [321636/321636]

--2025-06-11 17:04:15--  https://dietpi.com/downloads/binaries/testing/linux-dtb-current-rockchip64.deb
Reusing existing connection to dietpi.com:443.
HTTP request sent, awaiting response... 200 OK
Length: 769892 (752K) [application/vnd.debian.binary-package]
Saving to: β€˜linux-dtb-current-rockchip64.deb’

linux-dtb-current-rockchip64.deb 100%[==========================================================>] 751.85K  1.84MB/s    in 0.4s

2025-06-11 17:04:15 (1.84 MB/s) - β€˜linux-dtb-current-rockchip64.deb’ saved [769892/769892]

--2025-06-11 17:04:15--  https://dietpi.com/downloads/binaries/testing/linux-image-current-rockchip64.deb
Reusing existing connection to dietpi.com:443.
HTTP request sent, awaiting response... 200 OK
Length: 48667600 (46M) [application/vnd.debian.binary-package]
Saving to: β€˜linux-image-current-rockchip64.deb’

linux-image-current-rockchip64.d 100%[==========================================================>]  46.41M  26.7MB/s    in 1.7s

2025-06-11 17:04:17 (26.7 MB/s) - β€˜linux-image-current-rockchip64.deb’ saved [48667600/48667600]

FINISHED --2025-06-11 17:04:17--
Total wall clock time: 3.3s
Downloaded: 3 files, 47M in 2.4s (20.0 MB/s)


root@DietPi:/tmp# dpkg -i linux-u-boot-rock64-current.deb linux-{dtb,image}-current-rockchip64.deb
(Reading database ... 17645 files and directories currently installed.)
Preparing to unpack linux-u-boot-rock64-current.deb ...
Unpacking linux-u-boot-rock64-current (25.08.0-trunk-dietpi1) over (25.08.0-trunk-dietpi1) ...
Preparing to unpack linux-dtb-current-rockchip64.deb ...
Armbian 'linux-dtb-current-rockchip64' for '6.12.32-current-rockchip64': 'preinst' starting.
Armbian 'linux-dtb-current-rockchip64' for '6.12.32-current-rockchip64': 'preinst' finishing.
Unpacking linux-dtb-current-rockchip64 (25.08.0-trunk-dietpi1) over (24.11.0-trunk-dietpi1) ...
Preparing to unpack linux-image-current-rockchip64.deb ...
Armbian 'linux-image-current-rockchip64' for '6.6.56-current-rockchip64': 'prerm' starting.
Armbian 'linux-image-current-rockchip64' for '6.6.56-current-rockchip64': 'prerm' finishing.
Armbian 'linux-image-current-rockchip64' for '6.12.32-current-rockchip64': 'preinst' starting.
Armbian 'linux-image-current-rockchip64' for '6.12.32-current-rockchip64': 'preinst' finishing.
Unpacking linux-image-current-rockchip64 (25.08.0-trunk-dietpi1) over (24.11.0-trunk-dietpi1) ...
Armbian 'linux-image-current-rockchip64' for '6.6.56-current-rockchip64': 'postrm' starting.
Removing obsolete initramfs images
Armbian 'linux-image-current-rockchip64' for '6.6.56-current-rockchip64': 'postrm' finishing.
Setting up linux-u-boot-rock64-current (25.08.0-trunk-dietpi1) ...
Armbian 'uboot-rock64-current' for '2022.07-Se092-P9a7e-H7573-V54ab-Bb703-R448a': 'postinst' starting.
Armbian 'uboot-rock64-current' for '2022.07-Se092-P9a7e-H7573-V54ab-Bb703-R448a': 'postinst' finishing.
Setting up linux-dtb-current-rockchip64 (25.08.0-trunk-dietpi1) ...
Armbian 'linux-dtb-current-rockchip64' for '6.12.32-current-rockchip64': 'postinst' starting.
Armbian: DTB: symlinking /boot/dtb to /boot/dtb-6.12.32-current-rockchip64...
'dtb' -> 'dtb-6.12.32-current-rockchip64'
Armbian 'linux-dtb-current-rockchip64' for '6.12.32-current-rockchip64': 'postinst' finishing.
Setting up linux-image-current-rockchip64 (25.08.0-trunk-dietpi1) ...
Armbian 'linux-image-current-rockchip64' for '6.12.32-current-rockchip64': 'postinst' starting.
Removing obsolete initramfs images
removed '/boot/initrd.img-6.6.56-current-rockchip64'
removed '/boot/uInitrd-6.6.56-current-rockchip64'
update-initramfs: Generating /boot/initrd.img-6.12.32-current-rockchip64
update-initramfs: Converting to U-Boot format
Image Name:   uInitrd
Created:      Wed Jun 11 17:06:43 2025
Image Type:   AArch64 Linux RAMDisk Image (gzip compressed)
Data Size:    14952544 Bytes = 14602.09 KiB = 14.26 MiB
Load Address: 00000000
Entry Point:  00000000
'/boot/uInitrd' -> 'uInitrd-6.12.32-current-rockchip64'
Armbian: update last-installed kernel symlink to 'Image'...
'/boot/Image' -> 'vmlinuz-6.12.32-current-rockchip64'
Armbian: Debian compat: linux-update-symlinks install 6.12.32-current-rockchip64 /boot/vmlinuz-6.12.32-current-rockchip64
Armbian 'linux-image-current-rockchip64' for '6.12.32-current-rockchip64': 'postinst' finishing.


root@DietPi:/tmp# /boot/dietpi/func/dietpi-set_hardware flash-uboot-mmc

 DietPi-Set_hardware
─────────────────────────────────────────────────────
 Mode: flash-uboot-mmc ()

208+1 records in
208+1 records out
106926 bytes (107 kB, 104 KiB) copied, 0.00311763 s, 34.3 MB/s
1640+1 records in
1640+1 records out
839824 bytes (840 kB, 820 KiB) copied, 0.168907 s, 5.0 MB/s
[  OK  ] flash-uboot-mmc /dev/mmcblk0 | Completed
  1. Connect UART cable to pins 6, 8, and 10 of ROCK64. Output during boot is as follows:
Welcome to minicom 2.8

OPTIONS: I18n 
Port /dev/ttyUSB0, 10:22:05

Press CTRL-A Z for help on special keys

@DDR version 1.13 20180428
ID:0x805 Y
In
LPDDR3
786MHz
Bus Width=32 Col=10 Bank=8 Row=15 CS=1 Die Bus-Width=32 Size=1024MB
ddrconfig:1
OUT

U-Boot SPL 2017.09-rockchip-ayufan-1065-g95f6152134 (Apr 06 2020 - 08:10:17)
board_init_sdmmc_pwr_en
setup_ddr_param  1
booted from SPI flash
Trying to boot from SPI
NOTICE:  BL31: v1.3(debug):9d3f591
NOTICE:  BL31: Built : 14:39:02, Jan 17 2018                                                        
NOTICE:  BL31:Rockchip release version: v1.3                                                        
INFO:    ARM GICv2 driver initialized                                                               
INFO:    Using opteed sec cpu_context!                                                              
INFO:    boot cpu mask: 1                                                                           
INFO:    plat_rockchip_pmu_init: pd status 0xe                                                      
INFO:    BL31: Initializing runtime services                                                        
WARNING: No OPTEE provided by BL2 boot loader, Booting device without OPTEE initialization. SMC`s dK
ERROR:   Error initializing runtime service opteed_fast                                             
INFO:    BL31: Preparing for EL3 exit to normal world                                               
INFO:    Entry point address = 0x200000                                                             
INFO:    SPSR = 0x3c9                                                                               
                                                                                                    
                                                                                                    
U-Boot 2017.09-rockchip-ayufan-1065-g95f6152134 (Apr 06 2020 - 08:10:39 +0000)                      
                                                                                                    
Model: Pine64 Rock64                                                                                
DRAM:  1022 MiB                                                                                     
MMC:   rksdmmc@ff520000: 0, rksdmmc@ff500000: 1                                                     
SF: Detected gd25q128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB                      
*** Warning - bad CRC, using default environment                                                    
                                                                                                    
In:    serial@ff130000                                                                              
Out:   serial@ff130000                                                                              
Err:   serial@ff130000                                                                              
Model: Pine64 Rock64                                                                                
misc_init_r                                                                                         
cpuid=55524b5030393030370000000002220b                                                              
serial=334f3f8136648e5                                                                              
Net:   eth0: ethernet@ff540000                                                                      
Hit any key to stop autoboot:  0                                                                    
Card did not respond to voltage select!                                                             
mmc_init: -95, time 10                                                                              
switch to partitions #0, OK                                                                         
mmc1 is current device                                                                              
Scanning mmc 1:1...                                                                                 
Found U-Boot script /boot/boot.scr                                                                  
2711 bytes read in 18 ms (146.5 KiB/s)                                                              
## Executing script at 00500000                                                                     
312 bytes read in 23 ms (12.7 KiB/s)                                                                
38007296 bytes read in 1774 ms (20.4 MiB/s)                                                         
14952608 bytes read in 706 ms (20.2 MiB/s)                                                          
54353 bytes read in 258 ms (205.1 KiB/s)                                                            
## Loading init Ramdisk from Legacy Image at 04000000 ...                                           
   Image Name:   uInitrd                                                                            
   Image Type:   AArch64 Linux RAMDisk Image (gzip compressed)                                      
   Data Size:    14952544 Bytes = 14.3 MiB                                                          
   Load Address: 00000000                                                                           
   Entry Point:  00000000                                                                           
   Verifying Checksum ... OK                                                                        
## Flattened Device Tree blob at 01f00000                                                           
   Booting using the fdt blob at 0x1f00000                                                          
   Loading Ramdisk to 3d0bf000, end 3df01860 ... OK                                                 
   Loading Device Tree to 000000003d0ae000, end 000000003d0be450 ... OK                             
                                                                                                    
Starting kernel ...                                                                                 
                                                                                                    



DietPi version | 9.13.2
Distro version | bookworm
Kernel version | Linux DietPi 6.6.56-current-rockchip64 #1 SMP PREEMPT Thu Oct 10 10:50:06 UTC 2024 aarch64 GNU/Linux
Architecture | arm64
SBC model | ROCK64 (aarch64) ROCK64_V2.0 2017-0713 1GB
Power supply used | Generic 5v 3A
SD card used | SanDisk High Endurance 32gb

1 Like

Thanks for testing

U-Boot SPL 2017.09-rockchip-ayufan-1065-g95f6152134 (Apr 06 2020 - 08:10:17)
...
booted from SPI flash

So the culprit is indeed a very old bootloader on the SPI flash. I was not aware the ROCK64 has one, and it seems it loads the SPI bootloader even if there is one on the SD card or eMMC, like the Odroid HC4 does as well. There is no switch or jumper to force it loading the bootloader from MMC, is it? The Odroid HC4 has a little button for that at the bottom of the PCB.

The problem is that the Armbian config for the ROCK64 does not include an SPI U-Boot image. There is a config key to enable it, but that would be the case already if it worked. I mean I can just do a test build, and we see whether it works.

Is the SPI storage visible from the system?

ls -l /dev/mtd0 /dev/mtdblock0
root@DietPi:~# ls -l /dev/mtd0 /dev/mtdblock0
crw------- 1 root root 90, 0 Jun 16 15:25 /dev/mtd0
brw-rw---- 1 root disk 31, 0 Jun 16 15:25 /dev/mtdblock0

If I remember correctly this bootloader was flashed to enable booting from USB.

There is no jumper I can see, there is a recovery button, though not sure if it’s any help in this case.

This is what I get on mine:

dietpi@DietPi:~$ sudo ls -l /dev/mtd0 /dev/mtdblock0
ls: cannot access '/dev/mtd0': No such file or directory
ls: cannot access '/dev/mtdblock0': No such file or directory

The only jumper is to enable/disable the optional onboard eMMC, it is right behind the power button.
Mine is revision v3

Hmm, revision 3 has the SPI flash as well: https://files.pine64.org/doc/rock64/ROCK64_Schematic_v3.0_20181105.pdf

Maybe it changed enough so that kernel cannot expose it on revision 3 for some reason. Or Linux 6.12 lost support to expose it (which would not cause any issue).

I’ll create a U-Boot patch.

Since in theory it is possible that that U-Boot SPI image is broken, but functional enough for the hardware to try booting with it, then failing at some point, I checked back whether there is any method to disable the SPI flash. Otherwise it could be permanently unbootable when failing at a bad stage, which I cannot believe is how anyone designs hardware, especially not PINE64. And luckily there is, using e.g. a jumper to shortcut pins 23 and 25:

@qtang if you have a jumper, you can do this already now. Of course USB boot does not work in this case. So indeed best would be we manage to provide a compatible SPI bootloader.

… bootloader build done, looks good. So test:

cd /tmp
wget https://dietpi.com/downloads/binaries/testing/linux-u-boot-rock64-current.deb
dpkg -i linux-u-boot-rock64-current.deb
source /usr/lib/u-boot/platform_install.sh
write_uboot_platform_mtd "$DIR" /dev/mtdblock0

@bin4ry can you also try whether shortcutting pins 23 and 25 (23 to GND) solves boot with new kernel for you? Currently not sure whether you otherwise flashed the SPI bootloader already, or whether also the new one does not work with Linux 6.12 for some reason, or whether it is a dedicated issue. But this is at least something to test quicky with a jumper at hand.