NanoPi R6C

Hello,

I've currently got Armbian booting on a NanoPi R6C but ultimately I'd like to boot OPNsense.

I've been following the instructions here but the author has used a Raspberry Pi to boot FreeBSD for which there exists a dedicated FreeBSD image whereas the only Arm machine I have access to is my NanoPi. I tried the armv7-GENERICSD image but it wouldn't boot. As the DTB exists in Armbian, is it possible for me to copy the appropriate files across to the FreeBSD image and somehow configure it to load the correct DTB in order for it to boot?
 
I tried the armv7-GENERICSD image but it wouldn't boot.
This is for Arm v7 you have arm64 also called aarch64.
So for this RockChip platform the RK3588 you would generally start with the ROCKPRO64 image.
I have to recommend CURRENT BUILD here because it is so new.

The process is similar among RK boards on FreeBSD and that is put your dtb file in ESP/EFI partition in
/dtb/rockchip/ directory (which you may have to create).

You might want to stall u-boot and checkout the environmental variables. It will show you where (directory structure) it is expecting to find the dtb. Usually it will be /rockchip/${BOARD_NAME.dtb} apparently the /dtb/ directory is a given.
I think it is printenv you want at u-boot prompt. You might need your scroll lock to see it all.

So take your Armbiam image and burn to SD Card then use gpart delete -F to destroy the partition table.
This should leave only u-boot on card. Take that and test boot up the board.
Does it still boot? But stalls at u-boot trying to network boot?

That is what you want. u-boot only on microSD card booting on device.

Then you introduce a FreeBSD USB memstick prepared with the ROCKPRO64 CURRENT IMAGE flashed to it.
Copy the dtb to the EFI partition in proper directory. Finding the proper dtb can be challenging. You have to try some.

At this point you should boot up your board with the microSD card with u-boot and have your FreeBSD Memstick inserted.
Now at boot up to u-boot you need to probe the usb ports.
usb start
Now hope you find one Removable Storage option found.
Some times you might want to do a usb restart if you insert USB disk late in u-boot.

The problem here is some Armbians don't seem to like USB booting but you have to try it out. This is the least work possible.
Use the blue USB ports first. Eyeball your drive to see if flashing LED on during usb restart.
If unsuccessful try other USB ports and observe LED. Obviously a USB stick with LED is really helpful here.

That is Part One. Let me know where it goes. You hope to see --(1)Mass Storage Device found--- from u-boot

Look at usb dev If you are lucky and a drive shows and you can set it active.
usb dev 0
and let it rip
boot
 
I think the most easy route is to flash UEFI firmware on the board.
There is efi firmware for the R6C.
This project is really interesting:
edk2-rk3588 efi
I use this firmware to run FreeBSD, Opnsense, and Win11 on Orange Pi 5 Plus.
Next download this opnsense image.
opnsense for arm or amd64
Mount the image on another machine and add the correct nic drivers for the R6C. Then put the image on sd card and boot off that image.
I am impressed by FreeBSD on the Orange Pi 5 Plus.
 
I build images for the R5S, that uses the same Realtek 2.5Gbps but a different CPU. There are images for R6S from https://yrzr.github.io/running-opnsense-on-r6s/, I don't know how many devices they share, but if you have dtb and boot stuff you can manage to have the image you want, just use the right boot files dd'ed to the beginning of the image and that should do.

I have repository files for R5S that uses all opnsense files but the realtek kmod. For R5S must use realtek-kmod198 port instead. On https://github.com/matheusber/opnsense/ these files are available to build for R5S.

Once you have it running on R6C, you can use repository to keep it updated and able to install packages and plugins.

none
 
Back
Top