Zero 3W mainline U-Boot + OpenBSD / FreeBSD

Hi!

Mainline U-Boot support is expected in U-Boot 2024.10 (see patches here: https://lore.kernel.org/u-boot/20240802221231.2629416-6-jonas@kwiboo.se/ ), already available in https://source.denx.de/u-boot/custodians/u-boot-rockchip/-/tags/u-boot-rockchip-20240812

Linux support expected in 6.11 : https://lore.kernel.org/linux-devicetree/171684956150.1783037.13006696175237396238.b4-ty@sntech.de/

Board description:
The Radxa ZERO 3W/3E is an ultra-small, high-performance single board
computer based on the Rockchip RK3566, with a compact form factor and
rich interfaces.

Docs: https://docs.radxa.com/en/zero/zero3
Keep in mind: the board is built with 2 different wlan chip, the earlier models have AP6212 but the later models sports AIC8800.

EDK2 available here: https://github.com/jaredmcneill/quartz64_uefi/

Test results: booting using EDK2 results working X11, but the eMMC will not work, however with U-Boot eMMC supported, but starting Xorg fails. Isn’t it supposed to work using rkdrm?

Bootlog using U-Boot:

BSD.RD:

U-Boot 2024.10-rc2 (Aug 15 2024 - 20:05:16 +0200)                                                                      
                                                                                                                       
Model: Radxa ZERO 3W
DRAM:  8 GiB (effective 7.7 GiB)
PMIC:  RK817 (on=0x40, off=0x00)
Core:  299 devices, 28 uclasses, devicetree: separate
MMC:   mmc@fe2b0000: 1, mmc@fe2c0000: 2, mmc@fe310000: 0
Loading Environment from nowhere... OK
In:    serial@fe660000
Out:   serial@fe660000
Err:   serial@fe660000
Model: Radxa ZERO 3W
Net:   No ethernet found.
Hit 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
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
No EFI system partition
Failed to persist EFI variables
No EFI system partition
Failed to persist EFI variables
  0  efi_mgr      ready   (none)       0  <NULL>                    
** Booting bootflow '<NULL>' with efi_mgr
Booting: mmc 1
disks: sd0* sd1
>> OpenBSD/arm64 BOOTAA64 1.20
boot>  
cannot open sd0a:/etc/random.seed: No such file or directory
booting sd0a:/bsd: 3054228+1248332+12713448+634064 [271894+91+707976+290174]=0x13f0f38
Copyright (c) 1982, 1986, 1989, 1991, 1993
        The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2024 OpenBSD. All rights reserved.  https://www.OpenBSD.org

OpenBSD 7.6-beta (RAMDISK) #146: Tue Aug 13 15:23:31 MDT 2024
    [_EMAIL_XXXXXXXXXXXXXXXX]:/usr/src/sys/arch/arm64/compile/RAMDISK
real mem  = 8317743104 (7932MB)
avail mem = 7976288256 (7606MB)
random: good seed from bootblocks
mainbus0 at root: Radxa ZERO 3W
psci0 at mainbus0: PSCI 1.1, SMCCC 1.2, SYSTEM_SUSPEND
efi0 at mainbus0: UEFI 2.10
efi0: Das U-Boot rev 0x20241000
smbios0 at efi0: SMBIOS 3.7.0
smbios0: vendor U-Boot version "2024.10-rc2" date 10/01/2024
smbios0: radxa Radxa ZERO 3W
cpu0 at mainbus0 mpidr 0: ARM Cortex-A55 r2p0
cpu0: 32KB 64b/line 4-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
cpu0: 512KB 64b/line 16-way L2 cache
cpu0: DP,RDM,Atomic,CRC32,SHA2,SHA1,AES+PMULL,LRCPC,DPB,ASID16,PAN+ATS1E1,LO,HPDS,VH,HAFDBS,AdvSIMD+HP,FP+HP,SSBS
scmi0 at mainbus0: SCMI 2.0
agintc0 at mainbus0 mbi shift 4:4 nirq 352 nredist 4: "interrupt-controller"
syscon0 at mainbus0: "syscon"
rkiovd0 at syscon0
syscon1 at mainbus0: "syscon"
syscon2 at mainbus0: "syscon"
syscon3 at mainbus0: "syscon"
syscon4 at mainbus0: "syscon"
syscon5 at mainbus0: "syscon"
syscon6 at mainbus0: "syscon"
rkclock0 at mainbus0: PMUCRU
rkclock1 at mainbus0: CRU
syscon7 at mainbus0: "power-management"
"power-controller" at syscon7 not configured
syscon8 at mainbus0: "qos"
syscon9 at mainbus0: "qos"
syscon10 at mainbus0: "qos"
syscon11 at mainbus0: "qos"
syscon12 at mainbus0: "qos"
syscon13 at mainbus0: "qos"
syscon14 at mainbus0: "qos"
syscon15 at mainbus0: "qos"
syscon16 at mainbus0: "qos"
syscon17 at mainbus0: "qos"
syscon18 at mainbus0: "qos"
syscon19 at mainbus0: "qos"
syscon20 at mainbus0: "qos"
syscon21 at mainbus0: "qos"
syscon22 at mainbus0: "qos"
syscon23 at mainbus0: "qos"
syscon24 at mainbus0: "qos"
syscon25 at mainbus0: "qos"
syscon26 at mainbus0: "qos"
syscon27 at mainbus0: "qos"
syscon28 at mainbus0: "qos"
syscon29 at mainbus0: "qos"
syscon30 at mainbus0: "qos"
syscon31 at mainbus0: "qos"
rkcomphy0 at mainbus0
rkusbphy0 at mainbus0: phy 0
rkpinctrl0 at mainbus0: "pinctrl"
rkgpio0 at rkpinctrl0
rkgpio1 at rkpinctrl0
rkgpio2 at rkpinctrl0
rkgpio3 at rkpinctrl0
rkgpio4 at rkpinctrl0
"fit-images" at mainbus0 not configured
"l3-cache" at mainbus0 not configured
"opp-table-0" at mainbus0 not configured
"display-subsystem" at mainbus0 not configured
"firmware" at mainbus0 not configured
"opp-table-1" at mainbus0 not configured
"hdmi-sound" at mainbus0 not configured
"pmu" at mainbus0 not configured
agtimer0 at mainbus0: 24000 kHz
"xin24m" at mainbus0 not configured
"xin32k" at mainbus0 not configured
"sram" at mainbus0 not configured
xhci0 at mainbus0, xHCI 1.10
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 configuration 1 interface 0 "Generic xHCI root hub" rev 3.00/1.00 addr 1
xhci1 at mainbus0, xHCI 1.10
usb1 at xhci1: USB revision 3.0
uhub1 at usb1 configuration 1 interface 0 "Generic xHCI root hub" rev 3.00/1.00 addr 1
rkiic0 at mainbus0
iic0 at rkiic0
rkpmic0 at iic0 addr 0x20: RK817
"rockchip,rk8600" at iic0 addr 0x40 not configured
"gpu" at mainbus0 not configured
"video-codec" at mainbus0 not configured
"iommu" at mainbus0 not configured
"rga" at mainbus0 not configured
"video-codec" at mainbus0 not configured
"iommu" at mainbus0 not configured
"vop" at mainbus0 not configured
"iommu" at mainbus0 not configured
"hdmi" at mainbus0 not configured
"dfi" at mainbus0 not configured
dwmmc0 at mainbus0: 50 MHz base clock
sdmmc0 at dwmmc0: 4-bit, sd high-speed, dma
dwmmc1 at mainbus0: 50 MHz base clock
sdmmc1 at dwmmc1: 4-bit, sd high-speed, dma
dwmshc0 at mainbus0
dwmshc0: SDHC 4.20, 200 MHz base clock
sdmmc2 at dwmshc0: 8-bit, sd high-speed, mmc high-speed, dma
"i2s" at mainbus0 not configured
"dma-controller" at mainbus0 not configured
"dma-controller" at mainbus0 not configured
"watchdog" at mainbus0 not configured
com0 at mainbus0: dw16550, 64 byte fifo
com1 at mainbus0: dw16550, 64 byte fifo
com1: console
"tsadc" at mainbus0 not configured
"saradc" at mainbus0 not configured
"hdmi-con" at mainbus0 not configured
"leds" at mainbus0 not configured
"regulator-1v8-vcc" at mainbus0 not configured
"regulator-1v8-vcca" at mainbus0 not configured
"regulator-1v8-vcca-image" at mainbus0 not configured
"regulator-3v3-vcc" at mainbus0 not configured
"regulator-5v0-vcc-sys" at mainbus0 not configured
"sdio-pwrseq" at mainbus0 not configured
"binman" at mainbus0 not configured
"dmc" at mainbus0 not configured
rkrng0 at mainbus0: ver 2
"nvmem" at mainbus0 not configured
scsibus0 at sdmmc0: 2 targets, initiator 0
sd0 at scsibus0 targ 1 lun 0: <SD/MMC, NCard, 0010> removable
sd0: 14910MB, 512 bytes/sector, 30535680 sectors
manufacturer 0xc8a1, product 0x0082 at sdmmc1 function 1 not configured
manufacturer 0xc8a1, product 0x0082 at sdmmc1 function 2 not configured
scsibus1 at sdmmc2: 2 targets, initiator 0
sd1 at scsibus1 targ 1 lun 0: <Samsung, CUTB42, 0000>
sd1: 59640MB, 512 bytes/sector, 122142720 sectors
softraid0 at root
scsibus2 at softraid0: 256 targets
root on rd0a swap on rd0b dump on rd0b
WARNING: bad clock chip time
WARNING: CHECK AND RESET THE DATE!
cpu0: regulator not implemented
erase ^?, werase ^W, kill ^U, intr ^C, status ^T

Welcome to the OpenBSD/arm64 7.6 installation program.
(I)nstall, (U)pgrade, (A)utoinstall or (S)hell? i
At any prompt except password prompts you can escape to a shell by
typing '!'. Default answers are shown in []'s and are selected by
pressing RETURN.  You can exit this program at any time by pressing
Control-C, but this can leave your system in an inconsistent state.

Terminal type? [vt220] 
System hostname? (short form, e.g. 'foo') zero

DNS domain name? (e.g. 'example.com') [my.domain] 
DNS nameservers? (IP address list or 'none') [none] 

Password for root account? (will not echo) 
Password for root account? (again) 
Start sshd(8) by default? [yes] 
Setup a user? (enter a lower-case loginname, or 'no') [no] szilard
Full name for user szilard? [szilard] 
Password for user szilard? (will not echo) 
Password for user szilard? (again) 
WARNING: root is targeted by password guessing attacks, pubkeys are safer.
Allow root ssh login? (yes, no, prohibit-password) [no] no

Available disks are: sd0 sd1.
Which disk is the root disk? ('?' for details) [sd0] ?
    sd0: SD/MMC, NCard, 0010  (14.6G)
    sd1: Samsung, CUTB42, 0000  (58.2G)
Available disks are: sd0 sd1.
Which disk is the root disk? ('?' for details) [sd0] sd1
Encrypt the root disk with a (p)assphrase or (k)eydisk? [no] no
Disk: sd1       Usable LBA: 16 to 122142704 [122142720 Sectors]
   #: type                                 [       start:         size ]
------------------------------------------------------------------------
   0: Microsoft basic data                 [          64:        32768 ]
   1: NetBSD                               [       32832:     33554432 ]
   2: 49f48d32-b10e-11dc-b99b-0019d1879648 [    33587264:     16777216 ]
   3: NetBSD                               [    50364480:     67108864 ]
Use (W)hole disk or (E)dit the GPT? [whole] 
Creating a msdos partition and an OpenBSD partition for rest of sd1...done.
The auto-allocated layout for sd1 is:
#                size           offset  fstype [fsize bsize   cpg]
  a:          1024.0M            32832  4.2BSD   2048 16384     1 # /
  b:          4889.4M          2129984    swap                    
  c:         59640.0M                0  unused                    
  d:          3967.5M         12143488  4.2BSD   2048 16384     1 # /tmp
  e:          6332.2M         20268928  4.2BSD   2048 16384     1 # /var
  f:          6309.4M         33237280  4.2BSD   2048 16384     1 # /usr
  g:          1024.0M         46158912  4.2BSD   2048 16384     1 # /usr/X11R6
  h:          8238.1M         48256064  4.2BSD   2048 16384     1 # /usr/local
  i:            16.0M               64   MSDOS                    
  j:          3009.9M         65127648  4.2BSD   2048 16384     1 # /usr/src
  k:          6144.0M         71291872  4.2BSD   2048 16384     1 # /usr/obj
  l:         18685.5M         83874784  4.2BSD   2048 16384     1 # /home
Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout? [a] 
/dev/rsd1a: 1024.0MB in 2097152 sectors of 512 bytes
6 cylinder groups of 202.50MB, 12960 blocks, 25920 inodes each
/dev/rsd1l: 18685.5MB in 38267872 sectors of 512 bytes
93 cylinder groups of 202.50MB, 12960 blocks, 25920 inodes each
/dev/rsd1d: 3967.5MB in 8125440 sectors of 512 bytes
20 cylinder groups of 202.50MB, 12960 blocks, 25920 inodes each
/dev/rsd1f: 6309.4MB in 12921632 sectors of 512 bytes
32 cylinder groups of 202.50MB, 12960 blocks, 25920 inodes each
/dev/rsd1g: 1024.0MB in 2097152 sectors of 512 bytes
6 cylinder groups of 202.50MB, 12960 blocks, 25920 inodes each
/dev/rsd1h: 8238.1MB in 16871584 sectors of 512 bytes
41 cylinder groups of 202.50MB, 12960 blocks, 25920 inodes each
/dev/rsd1k: 6144.0MB in 12582912 sectors of 512 bytes
31 cylinder groups of 202.50MB, 12960 blocks, 25920 inodes each
/dev/rsd1j: 3009.9MB in 6164224 sectors of 512 bytes
15 cylinder groups of 202.50MB, 12960 blocks, 25920 inodes each
/dev/rsd1e: 6332.2MB in 12968352 sectors of 512 bytes
32 cylinder groups of 202.50MB, 12960 blocks, 25920 inodes each
Available disks are: sd0.
Which disk do you wish to initialize? (or 'done') [done] 
/dev/sd1a (0d52d29dff846554.a) on /mnt type ffs (rw, asynchronous, local)
/dev/sd1l (0d52d29dff846554.l) on /mnt/home type ffs (rw, asynchronous, local, nodev, nosuid)
/dev/sd1d (0d52d29dff846554.d) on /mnt/tmp type ffs (rw, asynchronous, local, nodev, nosuid)
/dev/sd1f (0d52d29dff846554.f) on /mnt/usr type ffs (rw, asynchronous, local, nodev)
/dev/sd1g (0d52d29dff846554.g) on /mnt/usr/X11R6 type ffs (rw, asynchronous, local, nodev)
/dev/sd1h (0d52d29dff846554.h) on /mnt/usr/local type ffs (rw, asynchronous, local, nodev)
/dev/sd1k (0d52d29dff846554.k) on /mnt/usr/obj type ffs (rw, asynchronous, local, nodev, nosuid)
/dev/sd1j (0d52d29dff846554.j) on /mnt/usr/src type ffs (rw, asynchronous, local, nodev, nosuid)
/dev/sd1e (0d52d29dff846554.e) on /mnt/var type ffs (rw, asynchronous, local, nodev, nosuid)

Let's install the sets!
Location of sets? (disk http nfs or 'done') [http] disk
Is the disk partition already mounted? [no] 
Available disks are: sd0 sd1.
Which disk contains the install media? (or 'done') [sd0] sd0
  a:          1187232            49152  4.2BSD   2048 16384 16142 
  i:            16384            32768   MSDOS                    
Available sd0 partitions are: a i.
Which sd0 partition has the install sets? (or 'done') [a] a
Pathname to the sets? (or 'done') [7.6/arm64] 

Select sets by entering a set name, a file name pattern or 'all'. De-select
sets by prepending a '-', e.g.: '-game*'. Selected sets are labelled '[X]'.
    [X] bsd           [X] base76.tgz    [X] game76.tgz    [X] xfont76.tgz
    [X] bsd.mp        [X] comp76.tgz    [X] xbase76.tgz   [X] xserv76.tgz
    [X] bsd.rd        [X] man76.tgz     [X] xshare76.tgz
Set name(s)? (or 'abort' or 'done') [done] 
Directory does not contain SHA256.sig. Continue without verification? [no] yes
Installing bsd          100% |**************************| 17344 KB    00:01    
Installing bsd.mp       100% |**************************| 17425 KB    00:01    
Installing bsd.rd       100% |**************************| 18008 KB    00:01    
Installing base76.tgz   100% |**************************|   306 MB    00:49    
Extracting etc.tgz      100% |**************************|   264 KB    00:00    
Installing comp76.tgz   100% |**************************| 78452 KB    00:22    
Installing man76.tgz    100% |**************************|  8049 KB    00:04    
Installing game76.tgz   100% |**************************|  2747 KB    00:00    
Installing xbase76.tgz  100% |**************************| 52028 KB    00:13    
Extracting xetc.tgz     100% |**************************|  8716       00:00    
Installing xshare76.tgz 100% |**************************|  4552 KB    00:04    
Installing xfont76.tgz  100% |**************************| 23023 KB    00:04    
Installing xserv76.tgz  100% |**************************| 15605 KB    00:03    
Installing BUILDINFO    100% |**************************|    54       00:00    
Location of sets? (disk http nfs or 'done') [done] 

What timezone are you in? ('?' for list) [Canada/Mountain] Europe/Budapest
Saving configuration files... done.
Making all device nodes... done.
Multiprocessor machine; using bsd.mp instead of bsd.
fw_update: add none; update none
Relinking to create unique kernel... done.

CONGRATULATIONS! Your OpenBSD install has been successfully completed!

When you login to your new system the first time, please read your mail
using the 'mail' command.

Exit to (S)hell, (H)alt or (R)eboot? [reboot] 

------ reboot ------


U-Boot 2024.10-rc2 (Aug 15 2024 - 20:05:16 +0200)

Model: Radxa ZERO 3W
DRAM:  8 GiB (effective 7.7 GiB)
PMIC:  RK817 (on=0x40, off=0x00)
Core:  299 devices, 28 uclasses, devicetree: separate
MMC:   mmc@fe2b0000: 1, mmc@fe2c0000: 2, mmc@fe310000: 0
Loading Environment from nowhere... OK
In:    serial@fe660000
Out:   serial@fe660000
Err:   serial@fe660000
Model: Radxa ZERO 3W
Net:   No ethernet found.
Hit 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
  0  efi_mgr      ready   (none)       0  <NULL>                    
** Booting bootflow '<NULL>' with efi_mgr
Booting: mmc 1
disks: sd0* sd1
>> OpenBSD/arm64 BOOTAA64 1.20
boot> boot sd1a:/bsd
booting sd1a:/bsd: 11545200+2769512+301024+845320 [939119+91+1307304+809059]=0x8
[ using 3056352 bytes of bsd ELF symbol table ]
Copyright (c) 1982, 1986, 1989, 1991, 1993
        The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2024 OpenBSD. All rights reserved.  https://www.OpenBSD.org

OpenBSD 7.6-beta (GENERIC.MP) #152: Tue Aug 13 15:00:35 MDT 2024
    [_EMAIL_XXXXXXXXXXXXXXXX]:/usr/src/sys/arch/arm64/compile/GENERIC.MP
real mem  = 8317743104 (7932MB)
avail mem = 7976210432 (7606MB)
random: good seed from bootblocks
mainbus0 at root: Radxa ZERO 3W
psci0 at mainbus0: PSCI 1.1, SMCCC 1.2, SYSTEM_SUSPEND
efi0 at mainbus0: UEFI 2.10
efi0: Das U-Boot rev 0x20241000
smbios0 at efi0: SMBIOS 3.7.0
smbios0: vendor U-Boot version "2024.10-rc2" date 10/01/2024
smbios0: radxa Radxa ZERO 3W
cpu0 at mainbus0 mpidr 0: ARM Cortex-A55 r2p0                                   
cpu0: 32KB 64b/line 4-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache       
cpu0: 512KB 64b/line 16-way L2 cache                                            
cpu0: DP,RDM,Atomic,CRC32,SHA2,SHA1,AES+PMULL,LRCPC,DPB,ASID16,PAN+ATS1E1,LO,HPS
cpu1 at mainbus0 mpidr 100: ARM Cortex-A55 r2p0                                 
cpu1: 32KB 64b/line 4-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache       
cpu1: 512KB 64b/line 16-way L2 cache                                            
cpu2 at mainbus0 mpidr 200: ARM Cortex-A55 r2p0                                 
cpu2: 32KB 64b/line 4-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache       
cpu2: 512KB 64b/line 16-way L2 cache                                            
cpu3 at mainbus0 mpidr 300: ARM Cortex-A55 r2p0                                 
cpu3: 32KB 64b/line 4-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache       
cpu3: 512KB 64b/line 16-way L2 cache                                            
scmi0 at mainbus0: SCMI 2.0                                                     
apm0 at mainbus0                                                                
agintc0 at mainbus0 mbi shift 4:4 nirq 352 nredist 4 ipi: 0, 1, 2: "interrupt-c"
syscon0 at mainbus0: "syscon"                                                   
rkiovd0 at syscon0                                                              
syscon1 at mainbus0: "syscon"                                                   
syscon2 at mainbus0: "syscon"                                                   
syscon3 at mainbus0: "syscon"                                                   
syscon4 at mainbus0: "syscon"                                                   
syscon5 at mainbus0: "syscon"                                                   
syscon6 at mainbus0: "syscon"                                                   
rkclock0 at mainbus0: PMUCRU                                                    
rkclock1 at mainbus0: CRU                                                       
syscon7 at mainbus0: "power-management"                                         
"power-controller" at syscon7 not configured                                    
syscon8 at mainbus0: "qos"                                                      
syscon9 at mainbus0: "qos"                                                      
syscon10 at mainbus0: "qos"                                                     
syscon11 at mainbus0: "qos"                                                     
syscon12 at mainbus0: "qos"                                                     
syscon13 at mainbus0: "qos"                                                     
syscon14 at mainbus0: "qos"                                                     
syscon15 at mainbus0: "qos"                                                     
syscon16 at mainbus0: "qos"                                                     
syscon17 at mainbus0: "qos"                                                     
syscon18 at mainbus0: "qos"                                                     
syscon19 at mainbus0: "qos"                                                     
syscon20 at mainbus0: "qos"                                                     
syscon21 at mainbus0: "qos"                                                     
syscon22 at mainbus0: "qos"                                                     
syscon23 at mainbus0: "qos"                                                     
syscon24 at mainbus0: "qos"                                                     
syscon25 at mainbus0: "qos"                                                     
syscon26 at mainbus0: "qos"                                                     
syscon27 at mainbus0: "qos"                                                     
syscon28 at mainbus0: "qos"                                                     
syscon29 at mainbus0: "qos"                                                     
syscon30 at mainbus0: "qos"                                                     
syscon31 at mainbus0: "qos"                                                     
rkcomphy0 at mainbus0                                                           
rkusbphy0 at mainbus0: phy 0                                                    
rkpinctrl0 at mainbus0: "pinctrl"                                               
rkgpio0 at rkpinctrl0                                                           
rkgpio1 at rkpinctrl0                                                           
rkgpio2 at rkpinctrl0                                                           
rkgpio3 at rkpinctrl0                                                           
rkgpio4 at rkpinctrl0                                                           
"fit-images" at mainbus0 not configured                                         
"l3-cache" at mainbus0 not configured                                           
"opp-table-0" at mainbus0 not configured                                        
rkdrm0 at mainbus0                                                              
drm0 at rkdrm0                                                                  
"firmware" at mainbus0 not configured                                           
"opp-table-1" at mainbus0 not configured                                        
simpleaudio0 at mainbus0                                                        
"pmu" at mainbus0 not configured                                                
agtimer0 at mainbus0: 24000 kHz                                                 
"xin24m" at mainbus0 not configured                                             
"xin32k" at mainbus0 not configured                                             
"sram" at mainbus0 not configured                                               
xhci0 at mainbus0, xHCI 1.10                                                    
usb0 at xhci0: USB revision 3.0                                                 
uhub0 at usb0 configuration 1 interface 0 "Generic xHCI root hub" rev 3.00/1.001
xhci1 at mainbus0, xHCI 1.10                                                    
usb1 at xhci1: USB revision 3.0                                                 
uhub1 at usb1 configuration 1 interface 0 "Generic xHCI root hub" rev 3.00/1.001
rkiic0 at mainbus0                                                              
iic0 at rkiic0                                                                  
rkpmic0 at iic0 addr 0x20: RK817                                                
"rockchip,rk8600" at iic0 addr 0x40 not configured                              
"gpu" at mainbus0 not configured                                                
"video-codec" at mainbus0 not configured                                        
"iommu" at mainbus0 not configured                                              
"rga" at mainbus0 not configured                                                
"video-codec" at mainbus0 not configured                                        
"iommu" at mainbus0 not configured                                              
"vop" at mainbus0 not configured                                                
"iommu" at mainbus0 not configured                                              
"hdmi" at mainbus0 not configured                                               
"dfi" at mainbus0 not configured                                                
dwmmc0 at mainbus0: 50 MHz base clock                                           
sdmmc0 at dwmmc0: 4-bit, sd high-speed, dma                                     
dwmmc1 at mainbus0: 50 MHz base clock                                           
sdmmc1 at dwmmc1: 4-bit, sd high-speed, dma                                     
dwmshc0 at mainbus0                                                             
dwmshc0: SDHC 4.20, 200 MHz base clock                                          
sdmmc2 at dwmshc0: 8-bit, sd high-speed, mmc high-speed, dma                    
"i2s" at mainbus0 not configured                                                
"dma-controller" at mainbus0 not configured                                     
"dma-controller" at mainbus0 not configured                                     
"watchdog" at mainbus0 not configured                                           
com0 at mainbus0: dw16550, 64 byte fifo                                         
com1 at mainbus0: dw16550, 64 byte fifo                                         
com1: console                                                                   
rktemp0 at mainbus0                                                             
"saradc" at mainbus0 not configured                                             
"hdmi-con" at mainbus0 not configured                                           
gpioleds0 at mainbus0: "heartbeat"                                              
"regulator-1v8-vcc" at mainbus0 not configured                                  
"regulator-1v8-vcca" at mainbus0 not configured                                 
"regulator-1v8-vcca-image" at mainbus0 not configured                           
"regulator-3v3-vcc" at mainbus0 not configured                                  
"regulator-5v0-vcc-sys" at mainbus0 not configured                              
"sdio-pwrseq" at mainbus0 not configured                                        
"binman" at mainbus0 not configured                                             
"dmc" at mainbus0 not configured                                                
rkrng0 at mainbus0: ver 2                                                       
"nvmem" at mainbus0 not configured                                              
scsibus0 at sdmmc0: 2 targets, initiator 0
sd0 at scsibus0 targ 1 lun 0: <SD/MMC, NCard, 0010> removable
sd0: 14910MB, 512 bytes/sector, 30535680 sectors
scsibus1 at sdmmc2: 2 targets, initiator 0
sd1 at scsibus1 targ 1 lun 0: <Samsung, CUTB42, 0000>
sd1: 59640MB, 512 bytes/sector, 122142720 sectors
sdmmc1: can't enable card
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on sd1a (0d52d29dff846554.a) swap on sd1b dump on sd1b
cpu0: regulator not implemented
rkdrm0: no display interface ports configured
Automatic boot in progress: starting file system checks.
/dev/sd1a (0d52d29dff846554.a): file system is clean; not checking
/dev/sd1l (0d52d29dff846554.l): file system is clean; not checking
/dev/sd1d (0d52d29dff846554.d): file system is clean; not checking
/dev/sd1f (0d52d29dff846554.f): file system is clean; not checking
/dev/sd1g (0d52d29dff846554.g): file system is clean; not checking
/dev/sd1h (0d52d29dff846554.h): file system is clean; not checking
/dev/sd1k (0d52d29dff846554.k): file system is clean; not checking
/dev/sd1j (0d52d29dff846554.j): file system is clean; not checking
/dev/sd1e (0d52d29dff846554.e): file system is clean; not checking
pf enabled
starting network
reordering: ld.so libc libcrypto sshd sshd-session ssh-agent.
openssl: generating isakmpd RSA keys... done.
openssl: generating iked ECDSA keys... done.
ssh-keygen: generating new host keys: RSA ECDSA ED25519 
sshd: (ED25519) SHA256:6RTHh+5m0YEPFemPRbWxM15flworTbY6A0d3m7YH6c4
starting early daemons: syslogd pflogd ntpd.
starting RPC daemons:.
savecore: no core dump
checking quotas: done.
clearing /tmp
kern.securelevel: 0 -> 1
creating runtime link editor directory cache.
preserving editor files.
starting network daemons: sshd smtpd sndiod.
running rc.firsttime
fw_update: add none; update none
starting local daemons: cron.
Tue Aug 13 23:42:17 CEST 2024

OpenBSD/arm64 (zero.my.domain) (console)

login: root
Password:
OpenBSD 7.6-beta (GENERIC.MP) #152: Tue Aug 13 15:00:35 MDT 2024

Welcome to OpenBSD: The proactively secure Unix-like operating system.

Please use the sendbug(1) utility to report bugs in the system.
Before reporting a bug, please try to reproduce it with the latest
version of the code.  With bug reports, please try to ensure that
enough information to reproduce the problem is enclosed, and if a
known fix for it exists, include that as well.

You have mail.
zero# 
zero$ ./pfetch                                                                 
      _____       szilard@zero.my.domain
    \-     -/     os     OpenBSD 7.6-beta
 \_/         \    host   arm64
 |        O O |   uptime 17m
 |_  <   )  3 )   memory 11M / 7932M
 / \         /
    /-_____-\

zero$ uname -a
OpenBSD zero.my.domain 7.6 GENERIC.MP#152 arm64

There is a prototype OpenWRT image coming is there not? That will rely on U-Boot support if I recall right?

I don’t care about linux, so I don’t follow the news regarding that.

FreeBSD boot from USB:

   ______               ____   _____ _____  
  |  ____|             |  _ \ / ____|  __ \ 
  | |___ _ __ ___  ___ | |_) | (___ | |  | |
  |  ___| '__/ _ \/ _ \|  _ < \___ \| |  | |
  | |   | | |  __/  __/| |_) |____) | |__| |
  | |   | | |    |    ||     |      |      |
  |_|   |_|  \___|\___||____/|_____/|_____/      ```                        `
                                                s` `.....---.......--.```   -/
 +---------- Welcome to FreeBSD -----------+    +o   .--`         /y:`      +.
 |                                         |     yo`:.            :o      `+-
 |  1. Boot Installer [Enter]              |      y/               -/`   -o/
 |  2. Boot Single user                    |     .-                  ::/sy+:.
 |  3. Escape to loader prompt             |     /                     `--  /
 |  4. Reboot                              |    `:                          :`
 |  5. Cons: Dual (Serial primary)         |    `:                          :`
 |                                         |     /                          /
 |  Options:                               |     .-                        -.
 |  6. Kernel: default/kernel (1 of 1)     |      --                      -.
 |  7. Boot Options                        |       `:`                  `:`
 |                                         |         .--             `--.
 |                                         |            .---.....----.
 +-----------------------------------------+


Loading kernel...
/boot/kernel/kernel text=0x2a8 text=0x9db150 text=0x260994 data=0x150cb8 data=0x0+0x2bc000 0x8+0x1516b0+0x8+0x17a5c2
Loading configured modules...
can't find '/etc/hostid'
can't find '/boot/entropy'
Using DTB provided by EFI at 0xece92000.
---<<BOOT>>---
WARNING: Cannot find freebsd,dts-version property, cannot check DTB compliance
Copyright (c) 1992-2023 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC arm64
FreeBSD clang version 18.1.5 (https://github.com/llvm/llvm-project.git llvmorg-18.1.5-0-g617a15a9eac9)
VT: init without driver.
module scmi already present!
real memory  = 8319401984 (7934 MB)
avail memory = 8088281088 (7713 MB)
Starting CPU 1 (100)
Starting CPU 2 (200)
Starting CPU 3 (300)
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
random: unblocking device.
random: entropy device external interface
kbd0 at kbdmux0
ofwbus0: <Open Firmware Device Tree>
ofw_firmware0: <OFW Firmware Group> on ofwbus0
rk_grf0: <RockChip General Register Files> mem 0xfdc20000-0xfdc2ffff on ofwbus0
rk_grf1: <RockChip General Register Files> mem 0xfdc50000-0xfdc50fff on ofwbus0
rk_grf2: <RockChip General Register Files> mem 0xfdc60000-0xfdc6ffff on ofwbus0
rk_grf3: <RockChip General Register Files> mem 0xfdc80000-0xfdc80fff on ofwbus0
rk_grf4: <RockChip General Register Files> mem 0xfdc90000-0xfdc90fff on ofwbus0
rk_grf5: <RockChip General Register Files> mem 0xfdca0000-0xfdca7fff on ofwbus0
rk_grf6: <RockChip General Register Files> mem 0xfdca8000-0xfdcaffff on ofwbus0
rk3568_pmucru0: <Rockchip RK3568 PMU Clock & Reset Unit> mem 0xfdd00000-0xfdd00fff on ofwbus0
rk3568_cru0: <Rockchip RK3568 Clock & Reset Unit> mem 0xfdd20000-0xfdd20fff on ofwbus0
rk3568_cru0: cannot get parent at idx 0
regfix0: <Fixed Regulator> on ofwbus0
regfix1: <Fixed Regulator> on ofwbus0
regfix2: <Fixed Regulator> on ofwbus0
regfix3: <Fixed Regulator> on ofwbus0
regfix4: <Fixed Regulator> on ofwbus0
rk_otp0: <RockChip OTP> mem 0xfe38c000-0xfe38ffff on ofwbus0
simple_mfd0: <Simple MFD (Multi-Functions Device)> mem 0xfdd90000-0xfdd90fff on ofwbus0
psci0: <ARM Power State Co-ordination Interface Driver> on ofwbus0
rk3568_combphy0: <RockChip combo PHY> mem 0xfe830000-0xfe8300ff on ofwbus0
gic0: <ARM Generic Interrupt Controller v3.0> mem 0xfd400000-0xfd40ffff,0xfd460000-0xfd4dffff irq 12 on ofwbus0
rk_pinctrl0: <RockChip Pinctrl controller> on ofwbus0
gpio0: <RockChip GPIO Bank controller> mem 0xfdd60000-0xfdd600ff irq 78 on rk_pinctrl0
gpiobus0: <OFW GPIO bus> on gpio0
gpio1: <RockChip GPIO Bank controller> mem 0xfe740000-0xfe7400ff irq 79 on rk_pinctrl0
gpiobus1: <OFW GPIO bus> on gpio1
gpio2: <RockChip GPIO Bank controller> mem 0xfe750000-0xfe7500ff irq 80 on rk_pinctrl0
gpiobus2: <OFW GPIO bus> on gpio2
gpio3: <RockChip GPIO Bank controller> mem 0xfe760000-0xfe7600ff irq 81 on rk_pinctrl0
gpiobus3: <OFW GPIO bus> on gpio3
gpio4: <RockChip GPIO Bank controller> mem 0xfe770000-0xfe7700ff irq 82 on rk_pinctrl0
gpiobus4: <OFW GPIO bus> on gpio4
rk_i2c0: <RockChip I2C> mem 0xfdd40000-0xfdd40fff irq 17 on ofwbus0
iicbus0: <OFW I2C bus> on rk_i2c0
rk817_pmu0: <RockChip RK817 PMIC> at addr 0x40 irq 83 on iicbus0
rk_iodomain0: <RockChip IO Voltage Domain> mem 0xfdc20000-0xfdc2ffff on rk_grf0
generic_timer0: <ARMv8 Generic Timer> irq 4,5,6,7 on ofwbus0
Timecounter "ARM MPCore Timecounter" frequency 24000000 Hz quality 1000
Event timer "ARM MPCore Eventtimer" frequency 24000000 Hz quality 1000
rk_tsadc0: <RockChip temperature sensors> mem 0xfe710000-0xfe7100ff irq 74 on ofwbus0
mmc_pwrseq0: <MMC Simple Power sequence> on ofwbus0
mmio_sram0: <MMIO SRAM> mem 0x10f000-0x10f0ff on ofwbus0
shmem0: <ARM SCMI Shared Memory driver> mem 0-0xff on mmio_sram0
rk_usb2phy0: <Rockchip USB2PHY> mem 0xfe8a0000-0xfe8affff irq 76 on ofwbus0
cpulist0: <Open Firmware CPU Group> on ofwbus0
cpu0: <Open Firmware CPU> on cpulist0
cpufreq_dt0: <Generic cpufreq driver> on cpu0
cpufreq_dt0: no clock for cpu@0
device_attach: cpufreq_dt0 attach returned 6
pcm0: <simple-audio-card> on ofwbus0
pmu0: <Performance Monitoring Unit> irq 0,1,2,3 on ofwbus0
snps_dwc3_fdt0: Found dr_mode 'otg' but only 'host' supported. s=4
snps_dwc3_fdt0: <Synopsys Designware DWC3> mem 0xfd000000-0xfd3fffff irq 11 on ofwbus0
rk3568_combphy0: configuring for USB3 ref_clk=25000000
snps_dwc3_fdt0: 64 bytes context size, 32-bit DMA
usbus0: trying to attach
usbus0 on snps_dwc3_fdt0
iicbus0: <unknown card> at addr 0x80
iic0: <I2C generic I/O> on iicbus0
rockchip_dwmmc0: <Synopsys DesignWare Mobile Storage Host Controller (RockChip)> mem 0xfe2b0000-0xfe2b3fff irq 41 on ofwbus0
rockchip_dwmmc0: Hardware version ID is 270a
mmc0: <MMC/SD bus> on rockchip_dwmmc0
rockchip_dwmmc1: <Synopsys DesignWare Mobile Storage Host Controller (RockChip)> mem 0xfe2c0000-0xfe2c3fff irq 42 on ofwbus0
rockchip_dwmmc1: Hardware version ID is 270a
sdhci_fdt0: <Rockchip RK3568 fdt SDHCI controller> mem 0xfe310000-0xfe31ffff irq 44 on ofwbus0
sdhci_fdt0: 1 slot(s) allocated
mmc1: <MMC/SD bus> on sdhci_fdt0
uart0: <16750 or compatible> mem 0xfe650000-0xfe6500ff irq 65 on ofwbus0
uart1: <16750 or compatible> mem 0xfe660000-0xfe6600ff irq 66 on ofwbus0
uart1: console (1500000,n,8,1)
gpioc0: <GPIO controller> on gpio0
gpioc1: <GPIO controller> on gpio1
gpioc2: <GPIO controller> on gpio2
gpioc3: <GPIO controller> on gpio3
gpioc4: <GPIO controller> on gpio4
gpioled0: <GPIO LEDs> on ofwbus0
armv8crypto0: <AES-CBC,AES-XTS,AES-GCM>
Timecounters tick every 1.000 msec
rk817_pmu0: registered as a time-of-day clock, resolution 1.000000s
pcm0: no driver attached to cpu node
rockchip_dwmmc0: failed to set frequency to 400000 Hz: 16
usbus0: 5.0Gbps Super Speed USB v3.0
ugen0.1: <Synopsys XHCI root HUB> at usbus0
uhub0 on usbus0
uhub0: <Synopsys XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0
rockchip_dwmmc0: failed to set frequency to 50000000 Hz: 16
mmcsd0: 16GB <SDHC NCard 1.0 SN 19302912 MFG 01/2010 by 137 0x0303> at mmc0 50.0MHz/4bit/1016-block
CPU  0: ARM Cortex-A55 r2p0 affinity:  0  0
                   Cache Type = <64 byte D-cacheline,64 byte I-cacheline,VIPT ICache,64 byte ERG,64 byte CWG>
 Instruction Set Attributes 0 = <DP,RDM,Atomic,CRC32,SHA2,SHA1,AES+PMULL>
 Instruction Set Attributes 1 = <RCPC-8.3,DCPoP>
 Instruction Set Attributes 2 = <>
         Processor Features 0 = <RAS,GIC,AdvSIMD+HP,FP+HP,EL3 32,EL2 32,EL1 32,EL0 32>
         Processor Features 1 = <PSTATE.SSBS>
      Memory Model Features 0 = <TGran4,TGran64,TGran16,SNSMem,BigEnd,16bit ASID,1TB PA>
      Memory Model Features 1 = <XNX,PAN+ATS1E1,LO,HPD+TTPBHA,VH,16bit VMID,HAF+DS>
      Memory Model Features 2 = <32bit CCIDX,48bit VA,IESB,UAO,CnP>
             Debug Features 0 = <DoubleLock,2 CTX BKPTs,4 Watchpoints,6 Breakpoints,PMUv3p1,Debugv8p2>
             Debug Features 1 = <>
         Auxiliary Features 0 = <>
         Auxiliary Features 1 = <>
AArch32 Instruction Set Attributes 5 = <RDM,CRC32,SHA2,SHA1,AES+VMULL,SEVL>
AArch32 Media and VFP Features 0 = <FPRound,FPSqrt,FPDivide,DP VFPv3+v4,SP VFPv3+v4,AdvSIMD>
AArch32 Media and VFP Features 1 = <SIMDFMAC,FPHP Arith,SIMDHP Arith,SIMDSP,SIMDInt,SIMDLS,FPDNaN,FPFtZ>
CPU  1: ARM Cortex-A55 r2p0 affinity:  1  0
CPU  2: ARM Cortex-A55 r2p0 affinity:  2  0
CPU  3: ARM Cortex-A55 r2p0 affinity:  3  0
Release APs...done
TCP_ratelimit: Is now initialized
Unresolved linked clock found: clk_32k_pvtm
Trying to mount root from ufs:/dev/ufs/FreeBSD_Install [ro,noatime]...
Unresolved linked clock found: usb480m_phy
Unresolved linked clock found: mpll
Unresolved linked clock found: i2s0_mclkin
Unresolved linked clock found: i2s1_mclkin
Unresolved linked clock found: i2s2_mclkin
Unresolved linked clock found: i2s3_mclkin
Unresolved linked clock found: gpu_pvtpll_out
Unresolved linked clock found: npu_pvtpll_out
Unresolved linked clock found: gmac0_clkin
Unresolved linked clock found: gmac1_clkin
Unresolved linked clock found: clk_gmac0_xpcs_mii
Unresolved linked clock found: clk_gmac1_xpcs_mii
Unresolved linked clock found: dummy
GEOM: mmcsd0: the secondary GPT header is not in the last LBA.
uhub0: 2 ports with 2 removable, self powered
GEOM: diskid/DISK-19302912: the secondary GPT header is not in the last LBA.
Dual Console: Serial Primary, Video Secondary
Starting file system checks:
GEOM: diskid/DISK-19302912: the secondary GPT header is not in the last LBA.
/dev/ufs/FreeBSD_Install: FILE SYSTEM CLEAN; SKIPPING CHECKS
/dev/ufs/FreeBSD_Install: clean, 36521 free (1 frags, 4565 blocks, 0.0% fragmentation)
usb_msc_auto_quirk: UQ_MSC_NO_GETMAXLUN set for USB mass storage device USB SanDisk 3.2Gen1 (0x0781:0x5583)
usb_msc_auto_quirk: UQ_MSC_NO_PREVENT_ALLOW set for USB mass storage device USB SanDisk 3.2Gen1 (0x0781:0x5583)
GEOM: diskid/DISK-19302912: the secondary GPT header is not in the last LBA.
usb_msc_auto_quirk: UQ_MSC_NO_SYNC_CACHE set for USB mass storage device USB SanDisk 3.2Gen1 (0x0781:0x5583)
ugen0.2: <USB SanDisk 3.2Gen1> at usbus0
umass0 on uhub0
umass0: <USB SanDisk 3.2Gen1, class 0/0, rev 2.10/1.00, addr 1> on usbus0
umass0:  SCSI over Bulk-OnlyMounting local f; quirks = 0xc100
umass0:0:0: Attached to scbus0
ilesystems:da0 at umass-sim0 bus 0 scbus0 target 0 lun 0
da0: <USB SanDisk 3.2Gen1 1.00> Removable Direct Access SPC-4 SCSI device
da0: Serial Number 05016efe255b095ca37d7cfd7cae5eeabf2a28f4e4e9fd61b8aa8177cbd5
da0: 40.000MB/s transfers
da0: 29340MB (60088320 512 byte sectors)
da0: quirks=0x2<NO_6_BYTE>
.
GEOM: da0: the secondary GPT header is not in the last LBA.
mkdir: /tmp/.diskless.a322a9c64e3d5dd7cee0bda1213666e49dab8f31b7808fb0ad9e0909811bddce: Read-only file system
ELF ldconfig path: /lib /usr/lib /usr/lib/compat
32-bit compatibility ldconfig path:
/etc/rc: WARNING: $hostname is not set -- see rc.conf(5).
Setting up harvesting: [CALLOUT],[UMA],[FS_ATIME],SWI,INTERRUPT,NET_NG,[NET_ETHER],NET_TUN,MOUSE,KEYBOARD,ATTACH,CACHED
Feeding entropy: dd: /entropy: Read-only file system
dd: /boot/entropy: Read-only file system
.
When finished, type 'exit' to return to the installer.

Wow! Been a while sense I worked with FreeBSD or stuff based on it. I think the last I did… it was a firewall that was based on FreeBSD.

@santafe can you explain how you setup u-boot to run openbsd ?

Sure! (I wrote this guide from my memories, I have no access to my laptop right now, sorry.)

To build the mainline U-boot and to create an SD-card with OpenBSD + U-boot, follow these steps:

export BL31=/path/to/rk3568_bl31_v1.44.elf
export ROCKCHIP_TPL=/path/to/rk3566_ddr_1056MHz_v1.21.bin
  • then attempt to build U-boot:
make radxa-zero-3-rk3566_defconfig
make CROSS_COMPILE=aarch64-linux-gnu-

It will result a u-boot-rockchip.bin file in your u-boot root folder.

  • then simply grab the installer image: https://cdn.openbsd.org/pub/OpenBSD/snapshots/arm64/install76.img

  • and write it to your SD-card. For example on OpenBSD host you will use a similar command:
    # dd if=install76.img of=/dev/rsdXc bs=1m
    But on linux host you probably want use something like:
    # dd if=install76.img of=/dev/sdX bs=1m
    (the m in the bs parameter can be lowercase or upper case depending on your host operating system)

  • then write the U-boot aswell tothe SD-card:
    On OpenBSD host:
    # dd if=u-boot-rockchip.bin of=/dev/sdXc seek=64
    Or on Linux:
    # dd if=u-boot-rockchip.bin of=/dev/sdX seek=64

Then insert the DS-card into your device, conenct your USB-serial adapter to the correct GPIO pins (consult the documentation) and open a serial monitor with the correct serial port, 1500000 baud, 8N1, then power up the board. It shoult spit tons on text on the console, then it will boot the OpenBSD loader automatically.

Hope it helps.

Thanks.

Yes, this works.

I’m on another board (QuartzPro64) though, so I adapted the different things.