Rock64

ebike

Member

Thanks: 1
Messages: 49

#2
Hi,

Did you get any info on this?
I have that board. I tried the Pine64 image on it, but it does not boot, I guess someone will have to create a new image for it.

Devs?
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 6,599
Messages: 28,129

#3
I guess someone will have to create a new image for it.
You can try building your own images using Crochet. I don't see a config for this specific board but it should be relatively easy to create your own.
 

ebike

Member

Thanks: 1
Messages: 49

#4
You can try building your own images using Crochet. I don't see a config for this specific board but it should be relatively easy to create your own.
Thanks ... but I don't know enough of the differences between Pine64 board and the Rock64 board to adapt the script for the Pine64 board to the Rock64.
... so "relatively easy" becomes "very hard" ;)
 

daviddpd

New Member

Thanks: 5
Messages: 5

#5
I have a Pine64 and Brad's builds at http://www.raspbsd.org/pine64.html work out of the box.

I just got two Rock64's ... but haven't gotten them to boot FreeBSD. I'm installed pine's linux on a card ... it has a while partition table :

Code:
/dev/disk3 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *31.9 GB    disk3
   1:           Linux Filesystem                         4.1 MB     disk3s1
   2:           Linux Filesystem                         65.5 KB    disk3s2
   3:           Linux Filesystem                         4.2 MB     disk3s3
   4:           Linux Filesystem                         4.2 MB     disk3s4
   5:           Linux Filesystem                         4.2 MB     disk3s5
   6:       Microsoft Basic Data boot                    117.4 MB   disk3s6
   7:           Linux Filesystem                         1.1 GB     disk3s7

> ls -l /Volumes/boot/
total 21162
-rwxrwxrwx  1 dpd  staff  18128904 Jul 31  2017 Image*
-rwxrwxrwx  1 dpd  staff     40801 Jul 31  2017 dtb*
drwxrwxrwx  1 dpd  staff      2048 Jul 31  2017 extlinux/
-rwxrwxrwx  1 dpd  staff   3494500 Jul 31  2017 initrd.img*
It looks like the boot loader, pretty sure it's U-boot ... and p6 looks like EFI (file listing above) but has the linux kernel and initrd ... was trying to see if I could shim in FreeBSD ... but looks like U-boot is loading the kernel directly ... would have been cool if it was chain loading BOOT EFI.
 

ronaldlees

Aspiring Daemon

Thanks: 300
Messages: 708

#6
Rockchip RK3399 (in Odroid N1), RK3328 (in Rock64).

I am interested in this also, as the Odroid-N1 boards due out in March are using the RK3399. That chip looks to be much more promising for a FreeBSD build than the Odroid XU4, which is Samsung Exynos chip based.
 

daviddpd

New Member

Thanks: 5
Messages: 5

#8
Hi,

We are one step closer:
github
Kernel support - but need some U-boot/bootloader support or hints on how to get started. Have two or three ROCK64's (got them a while go, forgot how many I purchased). Willing to test. Would like to get these up and running. Still can't find an affordable small HDMI 2.0 / 4k @ 60Hz Intel platform.

Like I've told many ... ARM is the future.
 

ronaldlees

Aspiring Daemon

Thanks: 300
Messages: 708

#9
Like I've told many ... ARM is the future.
For now it is. I use the Odroid XU series boards for video. There's no usable 4k on them but I usually run home movies at 720p, and it's fine with that on Gentoo. The C2 model (from the same folks) - does do 4k I think. Unfortunately the XU series does not run on FreeBSD due to the Samsung Exynos SoC they use. There is a very nascent XU3 NetBSD kernel - but work seems to have stopped.

The next iteration of the XU series will be the N1, which will replace it and run a 64 bit Rockchip (but a slightly more recent chip than the one in your devices). So, since support has already started, I'm hopeful I can see an N1/FreeBSD setup in the future.

ARM seems to have so many advantages for me. I boot the Gentoo system in ten or fifteen seconds, and dread having to boot the old beast AMD, which takes forever. But, something new always comes along. The RiscV architecture may produce some alternatives, once it gets going.
 

cynosure

New Member


Messages: 3

#11
Netbooting HEAD works for me with some hacks, thanks to @evadot. I'm a noob in this field, so please don't blame me if something not accurate or I did something wrong. :) Currently I have login, networking works good, and it seems everything will work fine after some minor patching and fixing. But now it is unstable yet for me, trying to debug why it freezes all the time, for example after running top, exiting then rerunning it, it freezes the board.

First you will need ayufan's u-boot flashed to SPI from here: ayufan's releases - look for the file u-boot-flash-spi-rock64.img.xz and follow instructions from here: Flash the SPI.
I rebuilt u-boot to remove all other boot targets like PXE and USB, but it's optional.
Next you need to patch FreeBSD HEAD from here: evadot's dwc patch.
Crosscompile to arm64/aarch64 and install it to a folder where you can set up your nfs root. Set up nfs, tftpd, dhcpd. In the dhcpd config you have to set up serving loader.efi.
Don't forget to copy the dtb file where u-boot looks for it, somewhere in boot\dtb\rockchip. You can get the dtb from ayufan's releases.
Also I had to insert an empty pendrive or microsd to the board. Without it, after u-boot downloads the loader.efi and starts it, it fails with an error getting back the u-boot console.
As I wrote, it's a bit hacky yet. After that you should be able to boot Rock64.

Later I'll try to clean up the process and write somewhere a post about it with step-by-step guide if needed. I don't remember exactly what's missing to boot from eMMC/microsd, but something u-boot specific if I'm not wrong.
 

Magenta

New Member

Thanks: 1
Messages: 3

#12
cynosure
Which version of the Rock64 do you have? I'm eager to test FreeBSD on my board. It would be really great if you could write a tutorial :) I already played around with Linux and OpenBSD on the board but I'm rather new to FreeBSD crosscompiling. I see "dwc_rk" was recently added to the kernel config. So is the patch still required?
Can you say what does work and what not? Like hdmi, USB ...
 
D

Deleted member 54719

Guest


#13
This board interests me greatly. The Rockchip seems to have FULLY open specifications, whereas the VC4 in the PI is not a truly open and publicly documented device. I think I need to get one of these and run it through its paces.
 

cynosure

New Member


Messages: 3

#14
cynosure
Which version of the Rock64 do you have? I'm eager to test FreeBSD on my board. It would be really great if you could write a tutorial :) I already played around with Linux and OpenBSD on the board but I'm rather new to FreeBSD crosscompiling. I see "dwc_rk" was recently added to the kernel config. So is the patch still required?
Can you say what does work and what not? Like hdmi, USB ...
My board is the Rock64 v2.0 with 4GiB RAM. The dwc_rk is the GbE driver, it also needs some tweaks but it works. Because of the hangs, I didn't tested performance on it yet, but since I built the last image a lot of fixes was made by @evadot . You should follow his work if you want to track the process.

I use it on serial console only, I'll check HDMI later. Some info to check about this topic is in this thread about Mali-450 support and efifb.

In the other hand, the kernel recognized my SD card, so now I try to "hand make" an image for it first. If it works and boots, I'll check if I can set up a crochet board configuration. I'm sure there will be u-boot and other issues but I hope nothing serious. The crochet build would be a super easy way for everyone, but anyway I'll try to make a tutorial for netbooting, it will probably interests others too.

This board interests me greatly. The Rockchip seems to have FULLY open specifications, whereas the VC4 in the PI is not a truly open and publicly documented device. I think I need to get one of these and run it through its paces.
The RockPro64 is only $25 more expensive than the Rock64 (comparing the 4GiB versions), and much better in most ways. But at the moment it have close to zero support on FreeBSD, first boards will be shipped on July only. So if you go that way, you have to wait and/or work on it. :)
 

Magenta

New Member

Thanks: 1
Messages: 3

#15
cynosure

I also got tftp boot working so far. The native ethernet connection works for gbit but i can't push any package out on 100baseTX. You were talking about some tweaks, were those related to 100baseTX or other issues with the older version of the driver back then?
 
D

Deleted member 54719

Guest


#16
the holy grail for me on any of these embedded project boards is USB boot of a ramdisk based OS, where some USB stick is reserved for persistent storage.

Actually, to clarify "FAST BOOT RAMDISK OS"
 

Phishfry

Son of Beastie

Thanks: 1,049
Messages: 3,092

#17
NanoBSD does use memdisk based install and there are templates for several of the Arm boards.
USB boot seems logical but I think that's a u-boot issue.
 

Magenta

New Member

Thanks: 1
Messages: 3

#18
The current u-boot version from ayufan which supports netbooting also supports USB booting, though I did not test USB boot personally.
 

ronaldlees

Aspiring Daemon

Thanks: 300
Messages: 708

#20
The RockPro64 is only $25 more expensive than the Rock64 (comparing the 4GiB versions), and much better in most ways. But at the moment it have close to zero support on FreeBSD, first boards will be shipped on July only. So if you go that way, you have to wait and/or work on it. :)
If you subscribe to the FreeBSD ARM mailing list, you'll see that they have the RockPro64 working now - in limited form - it boots to multiuser.
 
Top