I am trying to build mainline atf, u-boot, and arch on this board.
i built atf (bl31.elf
), u-boot with rkbin’s (rk3568_ddr_1560MHz_v1.21.bin), and got the rootfs arch from https://archlinuxarm.org/platforms/armv8/generic.
I flashed u-boot-rockchip-spi.bin to SPI on the board.
I created a gtp partition table on the emmc with 1 ext4 partition and extracted the arch image to the ext4 drive (sudo bsdtar -xpf "ArchLinuxARM-aarch64-latest.tar.gz" -C "whereimountemmc"
). I created this file with these contents
/boot/extlinux/extlinux.conf
menu title Select kernel timeout 100 label Arch kernel /boot/Image initrd /boot/initramfs-linux.img devicetree /boot/dtbs/rockchip/rk3568-rock-3a.dtb append console=ttyS0,115200 console=tty1 rw root=UUID=df42bbe6-9be9-483c-b56b-9bccbf67a65f
And then booted the board and I get this output
DDR 2d653b3476 typ 24/01/20-15:04:19,fwver: v1.21
In
LP4/4x derate en, other dram:1x trefi
ddrconfig:7
LPDDR4X, 324MHz
BW=32 Col=10 Bk=8 CS0 Row=17 CS1 Row=17 CS=2 Die BW=8 Size=8192MB
tdqss: cs0 dqs0: 48ps, dqs1: -72ps, dqs2: -48ps, dqs3: -120ps,
tdqss: cs1 dqs0: 48ps, dqs1: -72ps, dqs2: -48ps, dqs3: -144ps,change to: 324MHz
PHY drv:clk:36,ca:36,DQ:29,odt:0
vrefinner:24%, vrefout:41%
dram drv:40,odt:0
clk skew:0x61
rx vref: 34.4%
tx vref: 42.0%change to: 528MHz
PHY drv:clk:36,ca:36,DQ:29,odt:0
vrefinner:24%, vrefout:41%
dram drv:40,odt:0
clk skew:0x58
rx vref: 34.4%
tx vref: 38.0%change to: 780MHz
PHY drv:clk:36,ca:36,DQ:29,odt:60
vrefinner:16%, vrefout:41%
dram drv:40,odt:0
clk skew:0x58
rx vref: 16.6%
tx vref: 36.0%change to: 1560MHz(final freq)
PHY drv:clk:36,ca:36,DQ:29,odt:60
vrefinner:16%, vrefout:22%
dram drv:40,odt:80
vref_ca:00000071
clk skew:0x26
rx vref: 16.6%
tx vref: 22.8%
cs 0:
the read training result:
DQS0:0x33, DQS1:0x32, DQS2:0x36, DQS3:0x2f,
min : 0xd 0x11 0x11 0x11 0x2 0x5 0x9 0x5 , 0x9 0x9 0x1 0x2 0xc 0xc 0xd 0xa ,
0x10 0x10 0xe 0xb 0x5 0x2 0x4 0x9 , 0x9 0x8 0x6 0x2 0xc 0xe 0xb 0xe ,
mid :0x29 0x2a 0x2b 0x2b 0x1c 0x20 0x23 0x21 ,0x24 0x23 0x1c 0x1d 0x27 0x26 0x27 0x24 ,
0x2b 0x2b 0x27 0x26 0x20 0x1d 0x1e 0x23 ,0x23 0x22 0x20 0x1c 0x27 0x29 0x25 0x29 ,
max :0x45 0x43 0x46 0x45 0x37 0x3b 0x3e 0x3e ,0x3f 0x3d 0x37 0x39 0x42 0x41 0x41 0x3e ,
0x47 0x47 0x41 0x41 0x3b 0x39 0x39 0x3e ,0x3e 0x3c 0x3a 0x36 0x43 0x44 0x40 0x45 ,
range:0x38 0x32 0x35 0x34 0x35 0x36 0x35 0x39 ,0x36 0x34 0x36 0x37 0x36 0x35 0x34 0x34 ,
0x37 0x37 0x33 0x36 0x36 0x37 0x35 0x35 ,0x35 0x34 0x34 0x34 0x37 0x36 0x35 0x37 ,
the write training result:
DQS0:0x2f, DQS1:0x18, DQS2:0x1d, DQS3:0xa,
min :0x78 0x7b 0x7d 0x7a 0x6b 0x6f 0x73 0x73 0x72 ,0x5c 0x57 0x54 0x53 0x5d 0x5c 0x5c 0x5d 0x58 ,
0x67 0x67 0x62 0x5f 0x58 0x58 0x59 0x5e 0x5e ,0x53 0x4f 0x4d 0x48 0x53 0x56 0x4f 0x57 0x4e ,
mid :0x93 0x95 0x98 0x95 0x85 0x8a 0x8e 0x8d 0x8b ,0x78 0x73 0x6e 0x6d 0x79 0x76 0x78 0x77 0x72 ,
0x82 0x82 0x7c 0x7a 0x73 0x72 0x73 0x78 0x79 ,0x6d 0x69 0x67 0x62 0x6e 0x70 0x6b 0x72 0x68 ,
max :0xaf 0xb0 0xb4 0xb1 0xa0 0xa5 0xa9 0xa8 0xa5 ,0x94 0x90 0x89 0x87 0x95 0x91 0x94 0x92 0x8d ,
0x9d 0x9e 0x97 0x95 0x8e 0x8d 0x8e 0x93 0x95 ,0x87 0x83 0x81 0x7c 0x8a 0x8b 0x88 0x8e 0x83 ,
range:0x37 0x35 0x37 0x37 0x35 0x36 0x36 0x35 0x33 ,0x38 0x39 0x35 0x34 0x38 0x35 0x38 0x35 0x35 ,
0x36 0x37 0x35 0x36 0x36 0x35 0x35 0x35 0x37 ,0x34 0x34 0x34 0x34 0x37 0x35 0x39 0x37 0x35 ,
cs 1:
the read training result:
DQS0:0x33, DQS1:0x32, DQS2:0x36, DQS3:0x2f,
min : 0xd 0x11 0x11 0x11 0x2 0x5 0x9 0x5 , 0x9 0x9 0x1 0x2 0xc 0xc 0xd 0xa ,
0x10 0x10 0xe 0xb 0x5 0x2 0x4 0x9 , 0x9 0x8 0x6 0x2 0xc 0xe 0xb 0xe ,
mid :0x29 0x2a 0x2b 0x2b 0x1c 0x20 0x23 0x21 ,0x24 0x23 0x1c 0x1d 0x27 0x26 0x27 0x24 ,
0x2b 0x2b 0x27 0x26 0x20 0x1d 0x1e 0x23 ,0x23 0x22 0x20 0x1c 0x27 0x29 0x25 0x29 ,
max :0x45 0x43 0x46 0x45 0x37 0x3b 0x3e 0x3e ,0x3f 0x3d 0x37 0x39 0x42 0x41 0x41 0x3e ,
0x47 0x47 0x41 0x41 0x3b 0x39 0x39 0x3e ,0x3e 0x3c 0x3a 0x36 0x43 0x44 0x40 0x45 ,
range:0x38 0x32 0x35 0x34 0x35 0x36 0x35 0x39 ,0x36 0x34 0x36 0x37 0x36 0x35 0x34 0x34 ,
0x37 0x37 0x33 0x36 0x36 0x37 0x35 0x35 ,0x35 0x34 0x34 0x34 0x37 0x36 0x35 0x37 ,
the write training result:
DQS0:0x2f, DQS1:0x18, DQS2:0x1d, DQS3:0xa,
min :0x78 0x7b 0x7d 0x7a 0x6b 0x6f 0x73 0x73 0x72 ,0x5c 0x57 0x54 0x53 0x5d 0x5c 0x5c 0x5d 0x58 ,
0x67 0x67 0x62 0x5f 0x58 0x58 0x59 0x5e 0x5e ,0x53 0x4f 0x4d 0x48 0x53 0x56 0x4f 0x57 0x4e ,
mid :0x93 0x95 0x98 0x95 0x85 0x8a 0x8e 0x8d 0x8b ,0x78 0x73 0x6e 0x6d 0x79 0x76 0x78 0x77 0x72 ,
0x82 0x82 0x7c 0x7a 0x73 0x72 0x73 0x78 0x79 ,0x6d 0x69 0x67 0x62 0x6e 0x70 0x6b 0x72 0x68 ,
max :0xaf 0xb0 0xb4 0xb1 0xa0 0xa5 0xa9 0xa8 0xa5 ,0x94 0x90 0x89 0x87 0x95 0x91 0x94 0x92 0x8d ,
0x9d 0x9e 0x97 0x95 0x8e 0x8d 0x8e 0x93 0x95 ,0x87 0x83 0x81 0x7c 0x8a 0x8b 0x88 0x8e 0x83 ,
range:0x37 0x35 0x37 0x37 0x35 0x36 0x36 0x35 0x33 ,0x38 0x39 0x35 0x34 0x38 0x35 0x38 0x35 0x35 ,
0x36 0x37 0x35 0x36 0x36 0x35 0x35 0x35 0x37 ,0x34 0x34 0x34 0x34 0x37 0x35 0x39 0x37 0x35 ,
CA Training result:
cs:0 min :0x54 0x50 0x49 0x43 0x49 0x3e 0x4e ,0x4f 0x49 0x47 0x3e 0x48 0x3e 0x4c ,
cs:0 mid :0x90 0x8f 0x85 0x82 0x85 0x7e 0x7e ,0x8c 0x89 0x82 0x7f 0x82 0x7f 0x7c ,
cs:0 max :0xcc 0xce 0xc2 0xc2 0xc1 0xbf 0xae ,0xc9 0xca 0xbd 0xc0 0xbd 0xc1 0xac ,
cs:0 range:0x78 0x7e 0x79 0x7f 0x78 0x81 0x60 ,0x7a 0x81 0x76 0x82 0x75 0x83 0x60 ,
cs:1 min :0x4f 0x57 0x45 0x49 0x48 0x46 0x51 ,0x4e 0x51 0x45 0x48 0x48 0x48 0x4f ,
cs:1 mid :0x90 0x92 0x86 0x84 0x87 0x80 0x83 ,0x8f 0x8c 0x85 0x81 0x88 0x84 0x81 ,
cs:1 max :0xd2 0xcd 0xc7 0xbf 0xc7 0xbb 0xb6 ,0xd1 0xc8 0xc6 0xbb 0xc9 0xc0 0xb4 ,
cs:1 range:0x83 0x76 0x82 0x76 0x7f 0x75 0x65 ,0x83 0x77 0x81 0x73 0x81 0x78 0x65 ,
outU-Boot SPL 2024.10-00926-gc7aafb20ce99 (Oct 15 2024 - 10:14:58 -0500)
Trying to boot from SPIChecking hash(es) for config config-1 … OK
Checking hash(es) for Image atf-1 … sha256+ OK
Checking hash(es) for Image u-boot … sha256+ OK
Checking hash(es) for Image fdt-1 … sha256+ OK
Checking hash(es) for Image atf-2 … sha256+ OK
NOTICE: BL31: v2.11.0(release):v2.11.0-753-geaaf26e3e
NOTICE: BL31: Built : 18:47:07, Oct 14 2024
NOTICE: BL31: Rockchip release version: v1.0U-Boot 2024.10-00926-gc7aafb20ce99 (Oct 15 2024 - 10:14:58 -0500)
Model: Radxa ROCK 3A
DRAM: 8 GiB (effective 7.7 GiB)
PMIC: RK809 (on=0x40, off=0x00)
Core: 343 devices, 31 uclasses, devicetree: separate
MMC: mmc@fe000000: 2, mmc@fe2b0000: 1, mmc@fe310000: 0
Loading Environment from nowhere… OK
In: serial@fe660000
Out: serial@fe660000
Err: serial@fe660000
Model: Radxa ROCK 3A
Net: eth0: ethernet@fe010000Hit any key to stop autoboot: 0
Scanning for bootflows in all bootdevs
Seq Method State Uclass Part Name Filename
Scanning global bootmeth ‘efi_mgr’:
Card did not respond to voltage select! : -110
Card did not respond to voltage select! : -110
No EFI system partition
No EFI system partition
Failed to persist EFI variables
No EFI system partition
Failed to persist EFI variables
No EFI system partition
Failed to persist EFI variables
0 efi_mgr ready (none) 0
** Booting bootflow ‘’ with efi_mgr
Loading Boot0000 ‘mmc 0’ failed
EFI boot manager: Cannot load any image
Boot failed (err=-14)
Scanning bootdev ‘mmc@fe2b0000.bootdev’:
Card did not respond to voltage select! : -110
Scanning bootdev ‘mmc@fe310000.bootdev’:
1 extlinux ready mmc 1 mmc@fe310000.bootdev.part /boot/extlinux/extlinux.conf
** Booting bootflow ‘mmc@fe310000.bootdev.part_1’ with extlinux
Select kernel
1: Arch Linux
Enter choice: 1: Arch Linux
Retrieving file: /boot/Image
Retrieving file: /boot/initramfs-linux.img
append: console=ttyS0,115200 console=tty1 rw root=UUID=df42bbe6-9be9-483c-b56b-9bccbf67a65f
Retrieving file: /boot/dtbs/rockchip/rockchip/rk3568-rock-3a.dtb
Skipping fdtdir /boot/dtbs/rockchip/ for failure retrieving dtsFlattened Device Tree blob at eded39c0
Booting using the fdt blob at 0xeded39c0
Working FDT set to eded39c0
Loading Ramdisk to ec799000, end ececf5e8 … OK
Loading Device Tree to 00000000ec780000, end 00000000ec79839f … OK
Working FDT set to ec780000Starting kernel …
efi_free_pool: illegal free 0x00000000ececf040
efi_free_pool: illegal free 0x00000000ececc040
Those last 2 lines seem to be the problem. Does this suggest a ram memory problem? I can’t find any info on the internet about this issue or how to fix it.
U-boot can find the menu config, it can find the kernel, and when it tries to load the kernel I get this problem. The kernel does not continue past these 2 errors after waiting 30 minutes. Arch says it this kernel is built to support the device trees provided in /boot/dtbs. Nothing was changed in the rootfs except the extlinux.conf.
Anybody got an idea on what to do? Thanks
And if I’m able to get this working I can provide all the steps needed to get a full mainline vanilla Arch linux install running.
EDIT : After rebuilding u-boot without modifications (had made some for display but didn’t work) I get this error instead
Retrieving file: /boot/Image
Retrieving file: /boot/initramfs-linux.img
append: initrd=/boot/initramfs-linux.img console=ttyS0,1500000 console=tty1 rw root=UUID=df42bbe6-9be9-483c-b56b-9bccbf67a65f
Retrieving file: /boot/dtbs/rockchip/rk3568-rock-3a.dtbFlattened Device Tree blob at 12000000
Booting using the fdt blob at 0x12000000
Working FDT set to 12000000
Loading Ramdisk to ec7a3000, end eced95e8 … OK
Loading Device Tree to 00000000ec782000, end 00000000ec7a217e … OK
Working FDT set to ec782000Starting kernel …
“Synchronous Abort” handler, esr 0x96000004, far 0x76b1ba0296fa8f6f
elr: 0000000000a8de50 lr : 0000000000a77f70 (reloc)
elr: 00000000eff9fe50 lr : 00000000eff89f70
x0 : 76b1ba0296fa8f6f x1 : 00000000effaad4c
x2 : 0000000000000010 x3 : 0000000000000007
x4 : 0000000000000000 x5 : 76b1ba0296fa8f6f
x6 : 00000000eccaf000 x7 : 0000000000000004
x8 : 00000000ededd0d0 x9 : 00000000ffffffd0
x10: 00000000ec79ffff x11: 00000000edf29b50
x12: 0000000000000003 x13: 00000000ec782000
x14: 0000000000000000 x15: 00000000ededd048
x16: 00000000eff6713c x17: 0000000000000000
x18: 00000000edef2d70 x19: 00000000eceb6040
x20: 00000000eff12f58 x21: 00000000effaad4c
x22: 0000000000200000 x23: 00000000edf40bd0
x24: 00000000effcabb8 x25: 00000000eceda000
x26: 00000000edf2ffa0 x27: 00000000ecedb000
x28: 00000000effcabb8 x29: 00000000ededce80Code: eb04005f 54000061 52800000 14000006 (386468a3)
Resetting CPU …resetting …