NanoPI Neo 3 rockchip rk3328

xandor

New Member


Messages: 5

Hi All,

I am trying to boot a FreeBSD image on a NanoPI Neo 3 rockchip with 2 GB ram. I tried to boot from the ROCK64 image but it is not booting. I've tried booting netbsd 9.0 stable and it just boots normally. Unfortunately, I do not have enough knowledge to boot process and order. Other then that it boots off a fat partition first. Can any one help making FreeBSD running on this nice little board?

X.
 

JohnnySorocil

Active Member

Reaction score: 27
Messages: 121

Where are logs? Do FreeBSD stars to boot and then panic? Did you pass u-boot phase? Are you using right device tree?
 
OP
X

xandor

New Member


Messages: 5

Where are logs? Do FreeBSD stars to boot and then panic? Did you pass u-boot phase? Are you using right device tree?

I got a fresh snapshot FreeBSD-13.0-CURRENT-arm64-aarch64-ROCK64-20200813-r364182.img
I get this from the console:

Code:
[...FreeBSD...]
U-Boot TPL 2020.07 (Jul 16 2020 - 04:58:08)
data training error
col error
data training error
LPDDR3, 800MHz
BW=16 Col=12 Bk=8 CS0 Row=16 CS=1 Die BW=8 Size=4096MB
[...]
and then, it hangs. There is quite a difference with the netbsd output, notably the detection of LPDDR3 and DDR4 and the size. The correct memory size is 2048MB.

Code:
[...NetBSD..]
DDR version 1.13 20180428
ID:0x805 N
In
DDR4
786MHz
Bus Width=32 Col=10 Bank=4 Bank Group=2 Row=16 CS=1 Die Bus-Width=16 Size=2048MB
ddrconfig:14
OUT

U-Boot SPL 2017.09-rockchip-ayufan-1060-g56bd958253 (Jun 05 2019 - 09:41:25)
board_init_sdmmc_pwr_en
setup_ddr_param  1
booted from SD
Trying to boot from MMC2
NOTICE:  BL31: v1.3(debug):9d3f591
NOTICE:  BL31: Built : 14:39:02, Jan 17 2018
NOTICE:  BL31:Rockchip release version: v1.3
INFO:    ARM GICv2 driver initialized
INFO:    Using opteed sec cpu_context!
INFO:    boot cpu mask: 1
INFO:    plat_rockchip_pmu_init: pd status 0xe
INFO:    BL31: Initializing runtime services
WARNING: No OPTEE provided by BL2 boot loader, Booting device without OPTEE initialization. SMC`s destined for OPTEE will return SMC_UNK
ERROR:   Error initializing runtime service opteed_fast
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x200000
etc. etc.
[...]
 
Last edited by a moderator:

alfa

New Member

Reaction score: 3
Messages: 14

Hi All,

I am trying to boot a FreeBSD image on a NanoPI Neo 3 rockchip with 2 GB ram. I tried to boot from the ROCK64 image but it is not booting. I've tried booting netbsd 9.0 stable and it just boots normally. Unfortunately, I do not have enough knowledge to boot process and order. Other then that it boots off a fat partition first. Can any one help making FreeBSD running on this nice little board?

X.

you can try Ganbold's rk3328 based board FreeBSD 13.0 Current image and u-boot

i have orange pi r1 plus board seems like nano pi r2s clone and they are same rk3328 based boards

 

felix

Member

Reaction score: 23
Messages: 22

You can use last snapshots ISO for ROCK64 and MicroSD as /dev/sdb:

Code:
wget https://download.freebsd.org/ftp/snapshots/ISO-IMAGES/13.0/FreeBSD-13.0-ALPHA2-arm64-aarch64-ROCK64-20210122-02611ef8ee9-256201.img.xz
xz -d FreeBSD-13.0-ALPHA2-arm64-aarch64-ROCK64-20210122-02611ef8ee9-256201.img.xz
dd if=FreeBSD-13.0-ALPHA2-arm64-aarch64-ROCK64-20210122-02611ef8ee9-256201.img of=/dev/sdb bs=1M status=progress


wget https://mirrors.dotsrc.org/armbian-apt/pool/main/l/linux-u-boot-nanopineo3-current/linux-u-boot-current-nanopineo3_21.02.1_arm64.deb
ar x linux-u-boot-current-nanopineo3_21.02.1_arm64.deb
tar Jxpvf data.tar.xz
x ./
x ./usr/
x ./usr/lib/
x ./usr/lib/linux-u-boot-current-nanopineo3_21.02.1_arm64/
x ./usr/lib/linux-u-boot-current-nanopineo3_21.02.1_arm64/idbloader.bin
x ./usr/lib/linux-u-boot-current-nanopineo3_21.02.1_arm64/trust.bin
x ./usr/lib/linux-u-boot-current-nanopineo3_21.02.1_arm64/uboot.img
x ./usr/lib/u-boot/
x ./usr/lib/u-boot/LICENSE
x ./usr/lib/u-boot/nanopi-r2s-rk3328_defconfig
x ./usr/lib/u-boot/platform_install.sh

cd ./usr/lib/linux-u-boot-current-nanopineo3_21.02.1_arm64/
dd if=idbloader.bin of=/dev/sdb seek=64 conv=notrunc
dd if=uboot.img of=/dev/sdb seek=16384 conv=notrunc
dd if=trust.bin of=/dev/sdb seek=24576 conv=notrunc

Boot NanoPI NEO3 from this MicroSD.
 
Last edited by a moderator:

fdebene

New Member


Messages: 3

You can use last snapshots ISO for ROCK64 and MicroSD as /dev/sdb:

wget https://download.freebsd.org/ftp/snapshots/ISO-IMAGES/13.0/FreeBSD-13.0-ALPHA2-arm64-aarch64-ROCK64-20210122-02611ef8ee9-256201.img.xz
xz -d FreeBSD-13.0-ALPHA2-arm64-aarch64-ROCK64-20210122-02611ef8ee9-256201.img.xz
dd if=FreeBSD-13.0-ALPHA2-arm64-aarch64-ROCK64-20210122-02611ef8ee9-256201.img of=/dev/sdb bs=1M status=progress


wget https://mirrors.dotsrc.org/armbian-apt/pool/main/l/linux-u-boot-nanopineo3-current/linux-u-boot-current-nanopineo3_21.02.1_arm64.deb
ar x linux-u-boot-current-nanopineo3_21.02.1_arm64.deb
tar Jxpvf data.tar.xz
x ./
x ./usr/
x ./usr/lib/
x ./usr/lib/linux-u-boot-current-nanopineo3_21.02.1_arm64/
x ./usr/lib/linux-u-boot-current-nanopineo3_21.02.1_arm64/idbloader.bin
x ./usr/lib/linux-u-boot-current-nanopineo3_21.02.1_arm64/trust.bin
x ./usr/lib/linux-u-boot-current-nanopineo3_21.02.1_arm64/uboot.img
x ./usr/lib/u-boot/
x ./usr/lib/u-boot/LICENSE
x ./usr/lib/u-boot/nanopi-r2s-rk3328_defconfig
x ./usr/lib/u-boot/platform_install.sh

cd ./usr/lib/linux-u-boot-current-nanopineo3_21.02.1_arm64/
dd if=idbloader.bin of=/dev/sdb seek=64 conv=notrunc
dd if=uboot.img of=/dev/sdb seek=16384 conv=notrunc
dd if=trust.bin of=/dev/sdb seek=24576 conv=notrunc


Boot NanoPI NEO3 from this MicroSD.
I can reach my device providing it an ip address via ssh but i don't know the user and pass, would you guys tell me?
 

fdebene

New Member


Messages: 3

Maybe a stupid question, do you guys know the image password so I can ssh into my device?
 

JohnnySorocil

Active Member

Reaction score: 27
Messages: 121

IIRC, there is no password for root on serial console.
Ssh root login is possibly disabled, to enable it login as root (on serial or HDMI/video console), edit /etc/ssh/sshd_config
Code:
# temporary
PasswordAuthentication yes
PermitRootLogin yes
# when ssh key is generated and transferred:
# PermitRootLogin without-password

Restart sshd with service sshd restart
 
Last edited by a moderator:

fdebene

New Member


Messages: 3

This is headless system and I don't have a console cable to check what is going on, so logining in is not an option at this point but I am able to reach it via ssh and eventually I've found that all ARM images come with a freebsd user and freebsd password and root and root for the su. Thanks anyway.
 

RxD

New Member

Reaction score: 1
Messages: 1

I have created simple script for building NEO3 image with ZFS.


Actually investigating now several issues.

1) The USB does not work, there seems to be xhci driver integrated but need to find out why the actual USB port does not work

2) The mmc card is terribly slow, I have similar setup on my backup station with raspberry pi3 and the sdcard is way faster there.
 

SanPollo

New Member

Reaction score: 1
Messages: 6

I'm trying to get 13.0-RELEASE working on an Orange Pi R1 Plus as mentioned earlier in the thread. I downloaded the ROCK64 image, then the nanopine deb that felix mentioned. I wrote the FreeBSD image to the sdcard, and then ran the dd commands for idbloader.bin, uboot.img and trust.bin but when I power on the Pi, I just get the following message:

Code:
U-Boot TPL 2020.10 (Apr 09 2021 - 03:54:54)
data training error
col error
data training error
LPDDR3, 800MHz
BW=16 Col=12 Bk=8 CSO Row=16 CS=1 Die BW=8 Size=4096MB

What am I doing wrong? Have the offsets changed for the 'dd' command for the RELEASE image?

Thanks in advance,
SanPollo
 

diizzy

Well-Known Member

Reaction score: 124
Messages: 461

In order to not make it a mess and a nightmare to maintain there's only support for mainline u-boot and dts files from Linux mainline kernel (in 99.9% of all cases).
Please work with u-boot and linux-arm-kernel team to upstream proper dts files. You can of course work around this but you're on your own as far as support goes.

 

Szczepan

New Member

Reaction score: 2
Messages: 4

I'm trying to get 13.0-RELEASE working on an Orange Pi R1 Plus as mentioned earlier in the thread. I downloaded the ROCK64 image, then the nanopine deb that felix mentioned. I wrote the FreeBSD image to the sdcard, and then ran the dd commands for idbloader.bin, uboot.img and trust.bin but when I power on the Pi, I just get the following message:

Code:
U-Boot TPL 2020.10 (Apr 09 2021 - 03:54:54)
data training error
col error
data training error
LPDDR3, 800MHz
BW=16 Col=12 Bk=8 CSO Row=16 CS=1 Die BW=8 Size=4096MB

What am I doing wrong? Have the offsets changed for the 'dd' command for the RELEASE image?

Thanks in advance,
SanPollo
Did you used images from https://mirrors.dotsrc.org/armbian-apt/pool/main/l/linux-u-boot-orangepi-r1plus-current/ ?
 

SanPollo

New Member

Reaction score: 1
Messages: 6

I was using the wrong image! Thank you so much, it's booting now. :)

Just one question - there are two ethernet ports, and only the "1000M USB Ethernet" port in the diagram is working. The other one isn't recognised by FreeBSD. Do you think this is a hardware issue, or does FreeBSD not have drivers for this NIC? There are no lights on the NIC even when it is plugged into the router.
 

alfa

New Member

Reaction score: 3
Messages: 14

I was using the wrong image! Thank you so much, it's booting now. :)

Just one question - there are two ethernet ports, and only the "1000M USB Ethernet" port in the diagram is working. The other one isn't recognised by FreeBSD. Do you think this is a hardware issue, or does FreeBSD not have drivers for this NIC? There are no lights on the NIC even when it is plugged into the router.
FreeBSD does not have RTL8153B support yet.
 

SanPollo

New Member

Reaction score: 1
Messages: 6

FreeBSD does not have RTL8153B support yet.
Many thanks alfa. I'll crack on and set it up as an OpenVPN server. :)
 

SanPollo

New Member

Reaction score: 1
Messages: 6

Ooh thanks. :) The box is at my parents’ in the UK and it’s up and running nicely now with the other NIC. I’ve ordered another Orange Pi (same model) so I will check it out when it arrives.

Thanks again!
 
Top