Re: FreeBSD on Nanopi R4S(E)

From: Bernhard Froehlich <decke_at_FreeBSD.org>
Date: Sun, 16 Jun 2024 08:02:48 UTC
 ---- On Sat, 15 Jun 2024 00:11:14 +0200  Nenhum_de_Nos  wrote --- 
 > Hello,
 > 
 > I amd trying to install FreeBSD 14.1 on this arm64 board and, despite
 > booting fine till the booting process needs to mount the root partition.
 > It just finds none. I am using sd card on it, but tried also having a copy
 > on the USB stick. I finds none, and the boot process won't continue.
 > 
 > Have anyone done this? I know there are images for FreeBSD 13.x for it,
 > but I cannot find any clues so far on how to make it boot.
 > 
 > I am using the guide on
 > https://forums.freebsd.org/threads/nanopi-r4s-official-images-not-yet-available.91167/post-651057

Hi Matheus,

i'm glad you asked for NanoPi R4S support but you are actually a bit late
to the show. I worked on it in 2021 and well I hope it still works but there
has not been much interest in it actually.

Since my backup R4S board broke (RAM chip defect) in 2022 I do not have
a spare one around to play with but I still have some notes and one running
in production 
--
Bernhard Froehlich
https://www.bluelife.at/
with OpenWRT :(.

To build your own release image you can roughly follow the outdated
instructions from the wiki:

https://wiki.freebsd.org/arm/Build_image_using_release_building_infrastructure

it should be a bit more like:

* make sure you have the 14.1-RELEASE sources checked out in /usr/src
* make sure sysutils/u-boot-nanopi-r4s port is installed
* copy NANOPI-R4S.conf from https://reviews.freebsd.org/D31134 to /usr/src/release/arm64/

cd /usr/src/release
sh release.sh -c arm64/NANOPI-R4S.conf


Since in the forum thread you asked about PersonalBSD images I can
only say that I personally do not trust any 3rd party images which I can't
verify in any production environment. But I also tested his R4S images from
2021 and they were actually working fine in most regards. He always used a
patched and outdated u-boot which can be a pain (but usually also newer
u-boot can be pain) and applied his own sauce to some configs and stuff
which might not be what you expect in some details.

His u-boot sources can be found here:

https://github.com/S199pWa1k9r/ports/tree/master/sysutils/u-boot-nanopi-r4s-2020.07


Some notes from 2021 that might help you:

* They use a special hack to store their MAC address (on older models) so
your re0 interface might not have a MAC. This can be easily solved by like
this:

ifconfig re0 link 12:89:BB:YY:XX:AA

* NanoPI R4S 1GB model might not work with official u-boot because
only the 4GB model was upstreamed (might have changed in the meantime)

* re0 device only visible when cable is connected at boot (make sure it is)


--
Bernhard Fröhlich
https://www.bluelife.at/