FreeBSD for RK3568?

Hello all,
I’m just wondering if anyone has gotten FreeBSD to run on a rockchip 3568 yet?

I’ve got a rock 3a and am working my way through documentation for the SOC and for some tools to port the OS too ARM based boards, But a lot of it references armv7 based boards or earlier ones that are 32 bit.

If anyone has any good documentation they could point me too it would be much appreciated.

1 Like

I’ve done some looking and reading into docs and it looks Like I can use crochet or just do it my self, will report back with info.

For anyone else who comes across this, I wound documentation for how to cross compile the kernel here: https://people.freebsd.org/~cognet/arm.html

I’m going to give it a shot and report back for anyone who’s interested.

There is for Station P2 so it will work with rock3a when the dts is ported. I have shared the dts with @SleepWalker he will do it when he gets time.

1 Like

Awesome, thanks for the info. I looked through some of the other form posts and saw he’s worked on it for the rock pi 4 stuff.

I think I’ll keep poking around just to learn more if nothing else.

1 Like

Hi @lenzo1337,
Several guys from the FreeBSD team are working on RK356x.

We see the medium path.

  1. Change from u-boot to EDK2 UEFI. https://github.com/jaredmcneill/quartz64_uefi
  2. Modify existing drivers to support ACPI mode.
    At the moment there is already UEFI for Firefly Station-M2(RK3566)/P2(RK3568), RADXA CM3.
    On all boards, the system boots in multi-user mode. The dwmmc and dwc v4(eqos) drivers have been tweaked, USB works in 2.0 mode.
    Most of the equipment was revived on Firefly Station-M2 (this is how NVMe works on PCie).
    Here an attempt was made to add EDK2 UEFI support for RADXA Rock3a.
    https://github.com/strongtz/quartz64_uefi
    If you have any ideas write to me.
3 Likes

Hello All!
Has anyone tried to build UEFI for Rock-3A?
I can try to do this but as long as I don’t have the device, can anyone test it?

@SleepWalker
I downloaded the repo and let the make file do it’s thing, but I don’t have a serial adapter for my board so I’ll have to look around for one or make one.

EDIT:
I got errors after running make sdcard in the cloned repo’s directory. Looks like it’s complaining about invalid line types in a makefile under /edk2/basetools/makefile for lines 17, 18, 22, 23, 27, 28, 32, 33

I’m just guessing but could it be an issue I’m using make instead of gmake/gnu make on my BSD machine?

I’ll try it on one of my linux boxes and report back.

Retired it with gmake on my linux box. It failed on brotlicompress with errors about the decode file.

Looks like the header shows it as a uint_8 array and the C file has a function that takes it as an argument except it’s a pointer which causes a error.

Hi All,
I build EDK2 UEFI for Radxa Rock-3A.
Can anyone try to write it to an SD card and try to run it?

https://personalbsd.org/download/UEFI-RK356x/ROCK-3A_EFI.img

The console port speed is 115200, this is a little different from the usual.
I do not rule out that HDMI, and USB hd & keyboard can work. :wink:

1 Like

I will give it a try tonight…

I have a serial cable and some blank emmc/uSD cards so I can give it a try this weekend.

I’m 90% sure that HDMI will work.
It remains to select those USB ports that will be active for connecting a USB keyboard and USD disk.
This weekend I can prepare a FreeBSD Boot Image for Rock3A.
Let me know if you are interested and ready to test.
It’s better to use Linux for UEFI build.
I completely reworked the UEFI source code…

Sorry for the late reply, had some other things I’m working on.

Anyway, long story short I couldn’t get it to boot or the HDMI to work. I didn’t even sees anything over the Serial connection. I’ll see if I can get another micro SD to try, I might also try to write the img file with a different utility instead of dd.

Hi !

In the latest build of EDK2 UEFI for Rock3A
Serial/HDMI/USB/Ethernet work.
Tested on VMware ESXi/Fedora/FreeBSD/NetBSD
The source code can be viewed here

3 Likes

Nice,
I’ll give it a shot and hook up my usb to serial adapter.
Thanks for the update btw.

EDIT:
maybe I will test later, still waiting download, and it doesn’t look like it will finish for another 16 hours.

2 Likes

@lenzo1337
My HDMI monitor also works with Rock3A. :wink:

ROCK-3A EDK2 UEFI BootLoader

FreeBSD-aarch64-14.0-CURRENT-Rock-3A-20230530.img.xz

You need to write UEFI to sdcard, and OS to USB flash disk.

Console port speed 115200.
ssh enabled by default.
root without password.

Login via ssh
Username: admin
Password: admin

OPNsense test on Rock 3A

2 Likes

I cant wait for opnsense with both lan working at its max speed 2.5g

Pcie/eth support when?

@spikerguy

1GbE on Rock-3A works. If you speak about FreeBSD on E23/E25 and about RTL8125BG, 2.5 GbE support then we need to add PCIe3 support to EDK2 UEFI.

And this is the shortest and easiest way to solve the problem.

I’m posting this to draw attention to the possibility of solving it this way.
There are already several UEFI repositories for RockChip RK35xx.

And the more participants in such projects, the faster we will get the result.

If anyone knows of other public EDK2 UEFI repositories for the RockChip SOC,
please post links here.

after dd into sdcard/usb stick, need fdisk to fix gpt.

HDMI Monitor work, Network work, but USB mouse/keyboard didn’t

I can see “login:” in HDMI monitor, “Rock3a” in router, and connect by ssh.

I found the user/password in telegram. admin/admin
thank you very much.

2 Likes