FreeBSD 13-CURRENT on Rock Pi4

Yes Samsung is very reputed and have stable support in open source drivers.

Ignore lexar or pny and unbranded ones. Kingston A4000 had issues but should be fine.

@spykerguy, reason fo asking was the following comment on Radxaā€™s forum:

Known working under Linux kernel but not directly in bootloader(uSD/eMMC + NVMe booting)* Samsung EVO series( M key, NVMe ), work well on ROCK Pi 4, fast speed <-- Warning nvme boot via SPI is not possible (970 EVO Plus)

Could also imagine this issue has been solved by now.

Thatā€™s completed different issue.
Not able to boot from nvme has not much to do with nvme drive support instead it nvme interface support in uboot.

It is good point to consider all this buying buying indeed.

OK, received my Rock PI 4 yesterday and trying to boot FreeBSD-13 (on SD card) but failing so far. Flashed U-Boot in SPI (Radxa instruction) hence U-Boot starts but has difficulties in loading the kernel.

Was thinking that FreeBSD requires a specific U-Boot version to be flashed in the SPI to make this work. Any suggestion ?

FreeBSD image have its own uboot on the image.

Which uboot did you flash on SPI ?

Do you have any logs from uart debug port ?

This one https://dl.radxa.com/rockpi/images/loader/spi/rockpi4b-uboot-trust-spi_2017.09-2692-gdf20631bd8_20200824.img as I couldnā€™t find any newer. Would welcome a link in case a more recent version is available

In the console getting error messages related to partition not being valid.

Sounds like the uboot does not have support for partition type used by bsd or its a vendor uboot mostly used for android ?

Someone from Radxa team can advice on the latest spi uboot image.

For mainline u-boot, you can just use SF command in u-boot to write to spi flash.

Check the document here, SPI section:

https://u-boot.readthedocs.io/en/latest/board/rockchip/rockchip.html

I have now flashed the armbian u-boot to my 4c SPI which means FreeBSD ( FreeBSD-aarch64-13.0-RELEASE-Rock-Pi-4C-20211031.img ) gets a bit further towards booting but it still doesnā€™t boot as far as showing any FreeBSD kernel messages or getting to the login prompt:

U-Boot TPL 2020.10-armbian (Aug 08 2021 - 18:04:16)
Channel 0: LPDDR4, 50MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
Channel 1: LPDDR4, 50MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
256B stride
lpddr4_set_rate: change freq to 400000000 mhz 0, 1
lpddr4_set_rate: change freq to 800000000 mhz 1, 0
Trying to boot from BOOTROM
Returning to boot ROM...

U-Boot SPL 2020.10-armbian (Aug 08 2021 - 18:04:16 +0200)
Trying to boot from SPI
NOTICE:  BL31: v1.3(debug):42583b6
NOTICE:  BL31: Built : 07:55:13, Oct 15 2019
NOTICE:  BL31: Rockchip release version: v1.1
INFO:    GICv3 with legacy support detected. ARM GICV3 driver initialized in EL3
INFO:    Using opteed sec cpu_context!
INFO:    boot cpu mask: 0
INFO:    If lpddr4 need support multi frequency,
INFO:    please update loader!
INFO:    Current ctl index[0] freq=400MHz
INFO:    Current ctl index[1] freq=800MHz
INFO:    plat_rockchip_pmu_init(1190): pd status 3e
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
INFO:    SPSR = 0x3c9


U-Boot 2020.10-armbian (Aug 08 2021 - 18:04:16 +0200)

SoC: Rockchip rk3399
Reset cause: POR
Model: Radxa ROCK Pi 4B
DRAM:  3.9 GiB
PMIC:  RK808 
MMC:   mmc@fe310000: 2, mmc@fe320000: 1, sdhci@fe330000: 0
Loading Environment from SPIFlash... SF: Detected XT25F32B with page size 256 Bytes, erase size 4 KiB, total 4 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   vidconsole
Consoles: EFI console  
    Reading loader env vars from /efi/freebsd/loader.env
Setting currdev to disk0p1:
FreeBSD/arm64 EFI loader, Revision 1.1

   Command line arguments: loader.efi
   Image base: 0xf0dcd000
   EFI version: 2.80
   EFI Firmware: Das U-Boot (rev 8224.4096)
   Console: comconsole (0)
   Load Path: /efi\boot\bootaa64.efi
   Load Device: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/NVMe(0x1,00-25-38-5b-71-b1-96-59)/HD(1,GPT,6e98ca59-3a29-11ec-a958-d03745cd5653,0x800
0,0x19000)
Trying ESP: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/NVMe(0x1,00-25-38-5b-71-b1-96-59)/HD(1,GPT,6e98ca59-3a29-11ec-a958-d03745cd5653,0x8000,0x
19000)
Setting currdev to disk0p1:
Trying: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/NVMe(0x1,00-25-38-5b-71-b1-96-59)/HD(2,GPT,6e98ca59-3a29-11ec-a958-d03745cd5653,0x21000,0x800
00)
Setting currdev to disk0p2:
Trying: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/NVMe(0x1,00-25-38-5b-71-b1-96-59)/HD(3,GPT,6e98ca59-3a29-11ec-a958-d03745cd5653,0xa1000,0x21c
e00)
Setting currdev to disk0p3:
Loading /boot/defaults/loader.conf
Loading /boot/defaults/loader.conf
Loading /boot/device.hints
Loading /boot/loader.conf
Loading /boot/loader.conf.local
cLoading kernel...
/boot/kernel/kernel text=0x2a8 text=0x7bfc00 text=0x1c9eec data=0x184020 data=0x0+0x384000 syms=[0x8+0xfa788+0x8+0x11c7e5]
Loading configured modules...
can't find '/boot/entropy'
can't find '/etc/hostid'

Hit [Enter] to boot immediately, or any other key for command prompt.
Booting [/boot/kernel/kernel]...               
Using DTB provided by EFI at 0x80e8000.
EFI framebuffer information:
addr, size     0xf6000000, 0x1fa4000
dimensions     3840 x 2160
stride         3840
masks          0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000

Iā€™ve also tried booting:

http://ftp.freebsd.org/pub/FreeBSD/snapshots/arm64/aarch64/ISO-IMAGES/14.0/FreeBSD-14.0-CURRENT-arm64-aarch64-20220303-f266082f113-253578-memstick.img

Which gets to the same point as the personalbsd image.

NetBSD gets closer to booting:

http://nyftp.netbsd.org/pub/NetBSD-daily/HEAD/latest/evbarm-aarch64/binary/gzimg/arm64.img.gz

U-Boot TPL 2020.10-armbian (Aug 08 2021 - 18:04:16)
Channel 0: LPDDR4, 50MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
Channel 1: LPDDR4, 50MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
256B stride
lpddr4_set_rate: change freq to 400000000 mhz 0, 1
lpddr4_set_rate: change freq to 800000000 mhz 1, 0
Trying to boot from BOOTROM
Returning to boot ROM...

U-Boot SPL 2020.10-armbian (Aug 08 2021 - 18:04:16 +0200)
Trying to boot from SPI
NOTICE:  BL31: v1.3(debug):42583b6
NOTICE:  BL31: Built : 07:55:13, Oct 15 2019
NOTICE:  BL31: Rockchip release version: v1.1
INFO:    GICv3 with legacy support detected. ARM GICV3 driver initialized in EL3
INFO:    Using opteed sec cpu_context!
INFO:    boot cpu mask: 0
INFO:    If lpddr4 need support multi frequency,
INFO:    please update loader!
INFO:    Current ctl index[0] freq=400MHz
INFO:    Current ctl index[1] freq=800MHz
INFO:    plat_rockchip_pmu_init(1190): pd status 3e
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
INFO:    SPSR = 0x3c9


U-Boot 2020.10-armbian (Aug 08 2021 - 18:04:16 +0200)

SoC: Rockchip rk3399
Reset cause: POR
Model: Radxa ROCK Pi 4B
DRAM:  3.9 GiB
PMIC:  RK808 
MMC:   mmc@fe310000: 2, mmc@fe320000: 1, sdhci@fe330000: 0
Loading Environment from SPIFlash... SF: Detected XT25F32B with page size 256 Bytes, erase size 4 KiB, total 4 MiB
*** Warning - bad CRC, using default environment


  \\-__,------,___.
   \\        __,---`  NetBSD/evbarm efiboot (arm64)
    \\       `---,_.  Revision 2.11 (Fri Mar  4 21:12:04 UTC 2022)
     \\-,_____,.---`
      \\
       \\
        \\

Press return to boot now, any other key for boot prompt
booting netbsd - starting in 0 seconds.     
11953752+3878472+1731072 [583373+1137264+663182]=0x13a0328
[   1.0000000] NetBSD/evbarm (fdt) booting ...
[   1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
[   1.0000000]     2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
[   1.0000000]     2018, 2019, 2020, 2021, 2022
[   1.0000000]     The NetBSD Foundation, Inc.  All rights reserved.
[   1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
[   1.0000000]     The Regents of the University of California.  All rights reserved.

[   1.0000000] NetBSD 9.99.94 (GENERIC64) #0: Fri Mar  4 21:12:04 UTC 2022
[   1.0000000]  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/evbarm/compile/GENERIC64
[   1.0000000] total memory = 3916 MB
[   1.0000000] avail memory = 3780 MB
[   1.0000000] armfdt0 (root)
[   1.0000000] simplebus0 at armfdt0: Radxa ROCK Pi 4B
[   1.0000000] cpus0 at simplebus0
[   1.0000000] psci0 at simplebus0: PSCI 1.0
[   1.0000000] simplebus1 at simplebus0
[   1.0000000] cpu0 at cpus0: Arm Cortex-A53 r0p4 (v8-A), id 0x0
[   1.0000000] cpu0: package 0, core 0, smt 0
[   1.0000000] cpufreqdt0 at cpu0
[   1.0000000] cpu1 at cpus0: Arm Cortex-A53 r0p4 (v8-A), id 0x1
[   1.0000000] cpu1: package 0, core 1, smt 0
[   1.0000000] cpufreqdt1 at cpu1
[   1.0000000] cpu2 at cpus0: Arm Cortex-A53 r0p4 (v8-A), id 0x2
[   1.0000000] cpu2: package 0, core 2, smt 0
[   1.0000000] cpufreqdt2 at cpu2
[   1.0000000] cpu3 at cpus0: Arm Cortex-A53 r0p4 (v8-A), id 0x3
[   1.0000000] cpu3: package 0, core 3, smt 0
[   1.0000000] cpufreqdt3 at cpu3
[   1.0000000] cpu4 at cpus0: Arm Cortex-A72 r0p2 (v8-A), id 0x100
[   1.0000000] cpu4: package 1, core 0, smt 0
[   1.0000000] cpufreqdt4 at cpu4
[   1.0000000] cpu5 at cpus0: Arm Cortex-A72 r0p2 (v8-A), id 0x101
[   1.0000000] cpu5: package 1, core 1, smt 0
[   1.0000000] cpufreqdt5 at cpu5
[   1.0000000] gicvthree0 at simplebus0: GICv3
[   1.0000000] gicvthree0: ITS [#0] Devices table @ 0x271000/0x80000, Non-cacheable, Non-shareable
[   1.0000000] syscon0 at simplebus0: System Controller Registers
[   1.0000000] syscon1 at simplebus0: System Controller Registers
[   1.0000000] fclock0 at simplebus0: 125000000 Hz fixed clock (clkin_gmac)
[   1.0000000] syscon2 at simplebus0: System Controller Registers
[   1.0000000] syscon3 at simplebus0: System Controller Registers
[   1.0000000] syscon4 at simplebus0: System Controller Registers
[   1.0000000] syscon5 at simplebus0: System Controller Registers
[   1.0000000] syscon6 at simplebus0: System Controller Registers
[   1.0000000] syscon7 at simplebus0: System Controller Registers
[   1.0000000] syscon8 at simplebus0: System Controller Registers
[   1.0000000] syscon9 at simplebus0: System Controller Registers
[   1.0000000] syscon10 at simplebus0: System Controller Registers
[   1.0000000] syscon11 at simplebus0: System Controller Registers
[   1.0000000] syscon12 at simplebus0: System Controller Registers
[   1.0000000] syscon13 at simplebus0: System Controller Registers
[   1.0000000] syscon14 at simplebus0: System Controller Registers
[   1.0000000] syscon15 at simplebus0: System Controller Registers
[   1.0000000] syscon16 at simplebus0: System Controller Registers
[   1.0000000] syscon17 at simplebus0: System Controller Registers
[   1.0000000] syscon18 at simplebus0: System Controller Registers
[   1.0000000] syscon19 at simplebus0: System Controller Registers
[   1.0000000] syscon20 at simplebus0: System Controller Registers
[   1.0000000] syscon21 at simplebus0: System Controller Registers
[   1.0000000] syscon22 at simplebus0: System Controller Registers
[   1.0000000] syscon23 at simplebus0: System Controller Registers
[   1.0000000] fclock1 at simplebus0: 24000000 Hz fixed clock (xin24m)
[   1.0000000] syscon24 at simplebus0: System Controller Registers
[   1.0000000] syscon25 at simplebus0: System Controller Registers
[   1.0000000] syscon26 at simplebus0: System Controller Registers
[   1.0000000] syscon27 at simplebus0: System Controller Registers
[   1.0000000] rkcru0 at simplebus0: RK3399 CRU
[   1.0000000] rkcru1 at simplebus0: RK3399 PMU CRU
[   1.0000000] gtmr0 at simplebus0: Generic Timer
[   1.0000000] gtmr0: interrupting on GICv3 irq 27
[   1.0000000] armgtmr0 at gtmr0: Generic Timer (24000 kHz, virtual)
[   1.0000030] rkiomux0 at simplebus0: RK3399 IOMUX control
[   1.0000030] rkgpio0 at rkiomux0: GPIO (gpio0@ff720000)
[   1.0000030] gpio0 at rkgpio0: 32 pins
[   1.0000030] rkgpio1 at rkiomux0: GPIO (gpio1@ff730000)
[   1.0000030] gpio1 at rkgpio1: 32 pins
[   1.0000030] rkgpio2 at rkiomux0: GPIO (gpio2@ff780000)
[   1.0000030] gpio2 at rkgpio2: 32 pins
[   1.0000030] rkgpio3 at rkiomux0: GPIO (gpio3@ff788000)
[   1.0000030] gpio3 at rkgpio3: 32 pins
[   1.0000030] rkgpio4 at rkiomux0: GPIO (gpio4@ff790000)
[   1.0000030] gpio4 at rkgpio4: 32 pins
[   1.0000030] rkpwm0 at simplebus0: PWM
[   1.0000030] rkiic0 at simplebus0: Rockchip I2C (400000 Hz)
[   1.0000030] iic0 at rkiic0: I2C bus
[   1.0000030] rkpmic0 at iic0 addr 0x1b: RK808 Power Management and Real Time Clock IC
[   1.0000030] rkreg0 at rkpmic0: vdd_center
[   1.0000030] rkreg1 at rkpmic0: vdd_cpu_l
[   1.0000030] rkreg2 at rkpmic0: vcc_ddr
[   1.0000030] rkreg3 at rkpmic0: vcc_1v8
[   1.0000030] rkreg4 at rkpmic0: vcc1v8_codec
[   1.0000030] rkreg5 at rkpmic0: vcc1v8_hdmi
[   1.0000030] rkreg6 at rkpmic0: vcca_1v8
[   1.0000030] rkreg7 at rkpmic0: vcc_sdio
[   1.0000030] rkreg8 at rkpmic0: vcca3v0_codec
[   1.0000030] rkreg9 at rkpmic0: vcc_1v5
[   1.0000030] rkreg10 at rkpmic0: vcc0v9_hdmi
[   1.0000030] rkreg11 at rkpmic0: vcc_3v0
[   1.0000030] rkreg12 at rkpmic0: vcc_cam
[   1.0000030] rkreg13 at rkpmic0: vcc_mipi
[   1.0000030] fan53555reg0 at iic0 addr 0x40: Silergy SYR82X
[   1.0000030] fan53555reg1 at iic0 addr 0x41: Silergy SYR82X
[   1.0000030] fregulator0 at simplebus0: vcc_0v9
[   1.0000030] fregulator1 at simplebus0: vcc3v3_pcie
[   1.0000030] fregulator2 at simplebus0: vcc_lan
[   1.0000030] fregulator3 at simplebus0: vcc5v0_sys
[   1.0000030] fregulator4 at simplebus0: vcc3v3_sys
[   1.0000030] fregulator5 at simplebus0: vcc5v0_host
[   1.0000030] rkiic1 at simplebus0: Rockchip I2C (100000 Hz)
[   1.0000030] iic1 at rkiic1: I2C bus
[   1.0000030] fregulator6 at simplebus0: vcc12v_dcin
[   1.0000030] rkiic2 at simplebus0: Rockchip I2C (100000 Hz)
[   1.0000030] iic2 at rkiic2: I2C bus
[   1.0000030] com0 at simplebus0: DesignWare APB UART, 64-byte FIFO
[   1.0000030] com0: interrupting on GICv3 irq 131
[   1.0000030] com1 at simplebus0: DesignWare APB UART, 64-byte FIFO
[   1.0000030] com1: console
[   1.0000030] com1: interrupting on GICv3 irq 132
[   1.0000030] rkiic3 at simplebus0: Rockchip I2C (100000 Hz)
[   1.0000030] iic3 at rkiic3: I2C bus
[   1.0000030] fregulator7 at simplebus0: vcc5v0_typec
[   1.0000030] pregulator0 at simplebus0: vdd_log
[   1.0000030] mmcpwrseq0 at simplebus0: Simple MMC power sequence provider
[   1.0000030] rkdrm0 at simplebus0
[   1.0000030] rkpciephy0 at syscon0: RK3399 PCIe PHY
[   1.0000030] rkusb0 at syscon0: USB2 PHY
[   1.0000030] rkusbphy0 at rkusb0: USB2 host port
[   1.0000030] rkusbphy1 at rkusb0: USB2 OTG port
[   1.0000030] rkusb1 at syscon0: USB2 PHY
[   1.0000030] rkusbphy2 at rkusb1: USB2 host port
[   1.0000030] rkusbphy3 at rkusb1: USB2 OTG port
[   1.0000030] /opp-table0 at simplebus0 not configured
[   1.0000030] /opp-table1 at simplebus0 not configured
[   1.0000030] rkvop0 at simplebus0: RK3399 VOPL
[   1.0000030] rkvop0: interrupting on GICv3 irq 151
[   1.0000030] rkvop1 at simplebus0: RK3399 VOPB
[   1.0000030] rkvop1: interrupting on GICv3 irq 150
[   1.0000030] rkpcie0 at simplebus0: RK3399 PCIe
[   1.0000030] pci0 at rkpcie0 bus 0
[   1.0000030] ppb0 at pci0 dev 0 function 0: vendor 1d87 product 0100 (rev. 0x00)
[   1.0000030] ppb0: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x4 @ 2.5GT/s
[   1.0000030] pci1 at ppb0 bus 1
[   1.0000030] nvme0 at pci1 dev 0 function 0: vendor 144d product a804 (rev. 0x00)
[   1.0000030] nvme0: NVMe 1.2
[   1.0000030] nvme0: for admin queue interrupting at irq 8192 (MSI-X vec 0)
[   1.0000030] nvme0: Samsung SSD 960 EVO 250GB, firmware 3B7QCXE7, serial S3ESNX0JB49978N
[   1.0000030] nvme0: for io queue 1 interrupting at irq 8193 (MSI-X vec 1) affinity to cpu0
[   1.0000030] nvme0: for io queue 2 interrupting at irq 8194 (MSI-X vec 2) affinity to cpu1
[   1.0000030] nvme0: for io queue 3 interrupting at irq 8195 (MSI-X vec 3) affinity to cpu2
[   1.0000030] nvme0: for io queue 4 interrupting at irq 8196 (MSI-X vec 4) affinity to cpu3
[   1.0000030] nvme0: for io queue 5 interrupting at irq 8197 (MSI-X vec 5) affinity to cpu4
[   1.0000030] nvme0: for io queue 6 interrupting at irq 8198 (MSI-X vec 6) affinity to cpu5
[   1.0000030] ld4 at nvme0 nsid 1
[   1.0000030] ld4: 232 GB, 30401 cyl, 255 head, 63 sec, 512 bytes/sect x 488397168 sectors
[   1.0000030] /power-management@ff310000/power-controller at syscon1 not configured
[   1.0000030] rkemmcphy0 at syscon0: eMMC PHY
[   1.0000030] /phy@ff7c0000 at simplebus0 not configured
[   1.0000030] /phy@ff800000 at simplebus0 not configured
[   1.0000030] /dma-controller@ff6e0000 at simplebus0 not configured
[   1.0000030] /dma-controller@ff6d0000 at simplebus0 not configured
[   1.0000030] rktsadc0 at simplebus0: RK3399 Temperature Sensor ADC
[   1.0000030] rktsadc0: interrupting on GICv3 irq 129
[   1.0000030] /gpu@ff9a0000 at simplebus0 not configured
[   1.0000030] /iommu@ff650800 at simplebus0 not configured
[   1.0000030] /iommu@ff660480 at simplebus0 not configured
[   1.0000030] sdhc0 at simplebus0: Arasan SDHCI controller
[   1.0000030] sdhc0: interrupting on GICv3 irq 43
[   1.0000030] sdhc0: SDHC 3.0, rev 16, 32-bit ADMA2, 200000 kHz, embedded slot, HS SDR50 DDR50 SDR104 HS200 1.8V, re-tuning mode 1, 1024 byte blo
cks
[   1.0000030] sdmmc0 at sdhc0 slot 0
[   1.0000030] /iommu@ff8f3f00 at simplebus0 not configured
[   1.0000030] dwhdmi0 at simplebus0: HDMI TX
[   1.0000030] dwhdmi0: version 2.11a, phytype 0xf3
[   1.0000030] /iommu@ff903f00 at simplebus0 not configured
[   1.0000030] /iommu@ff914000 at simplebus0 not configured
[   1.0000030] rki2s0 at simplebus0: I2S/PCM controller
[   1.0000030] rki2s0: interrupting on GICv3 irq 73
[   1.0000030] /opp-table2 at simplebus0 not configured
[   1.0000030] awge0 at simplebus0: GMAC
[   1.0000030] awge0: Core version: 00001035
[   1.0000030] awge0: Ethernet address 56:13:b5:a2:e9:fb
[   1.0000030] awge0: HW feature mask: d0f17
[   1.0000030] rgephy0 at awge0 phy 0: RTL8211E 1000BASE-T media interface
[   1.0000030] rgephy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
[   1.0000030] rgephy1 at awge0 phy 1: RTL8211E 1000BASE-T media interface
[   1.0000030] rgephy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
[   1.0000030] awge0: interrupting on GICv3 irq 44
[   1.0000030] dwcmmc0 at simplebus0: DesignWare SD/MMC
[   1.0000030] dwcmmc0: interrupting on GICv3 irq 96
[   1.0000030] dwcmmc1 at simplebus0: DesignWare SD/MMC
[   1.0000030] dwcmmc1: interrupting on GICv3 irq 97
[   1.0000030] ehci0 at simplebus0: EHCI
[   1.0000030] ehci0: interrupting on GICv3 irq 58
[   1.0000030] ehci0: 1 companion controller, 1 port
[   1.0000030] ehci0: Using DMA subregion for control data structures
[   1.0000030] usb0 at ehci0: USB revision 2.0
[   1.0000030] ohci0 at simplebus0: OHCI
[   1.0000030] ohci0: interrupting on GICv3 irq 60
[   1.0000030] ohci0: OHCI version 1.0
[   1.0000030] usb1 at ohci0: USB revision 1.0
[   1.0000030] ehci1 at simplebus0: EHCI
[   1.0000030] ehci1: interrupting on GICv3 irq 62
[   1.0000030] ehci1: 1 companion controller, 1 port
[   1.0000030] ehci1: Using DMA subregion for control data structures
[   1.0000030] usb2 at ehci1: USB revision 2.0
[   1.0000030] ohci1 at simplebus0: OHCI
[   1.0000030] ohci1: interrupting on GICv3 irq 64
[   1.0000030] ohci1: OHCI version 1.0
[   1.0000030] usb3 at ohci1: USB revision 1.0
[   1.0000030] xhci0 at simplebus0: DesignWare USB3 XHCI (rev. 3.00a)
[   1.0000030] xhci0: interrupting on GICv3 irq 137
[   1.0000030] usb4 at xhci0: USB revision 3.0
[   1.0000030] usb5 at xhci0: USB revision 2.0
[   1.0000030] xhci1 at simplebus0: DesignWare USB3 XHCI (rev. 3.00a)
[   1.0000030] xhci1: interrupting on GICv3 irq 142
[   1.0000030] usb6 at xhci1: USB revision 3.0
[   1.0000030] usb7 at xhci1: USB revision 2.0
[   1.0000030] /saradc@ff100000 at simplebus0 not configured
[   1.0000030] /syscon@ff320000/io-domains at syscon23 not configured
[   1.0000030] /video-codec@ff650000 at simplebus0 not configured
[   1.0000030] /video-codec@ff660000 at simplebus0 not configured
[   1.0000030] /rga@ff680000 at simplebus0 not configured
[   1.0000030] /efuse@ff690000 at simplebus0 not configured
[   1.0000030] /syscon@ff770000/io-domains at syscon0 not configured
[   1.0000030] /rktimer@ff850000 at simplebus0 not configured
[   1.0000030] rki2s1 at simplebus0: I2S/PCM controller
[   1.0000030] rki2s1: interrupting on GICv3 irq 71
[   1.0000030] rki2s2 at simplebus0: I2S/PCM controller
[   1.0000030] rki2s2: interrupting on GICv3 irq 72
[   1.0000030] /iommu@ff924000 at simplebus0 not configured
[   1.0000030] ausoc0 at simplebus0: hdmi-sound
[   1.0000030] armpmu0 at simplebus0: Performance Monitor Unit
[   1.0000030] armpmu1 at simplebus0: Performance Monitor Unit
[   1.0000030] dwcwdt0 at simplebus0: DesignWare Watchdog Timer
[   1.0000030] dwcwdt0: default watchdog period is 15 seconds
[   1.0000030] warning: /usr/src/sys/external/bsd/drm2/dist/drm/drm_connector.c:218: drm_drv_uses_atomic_modeset(dev) && (!funcs->atomic_destroy_s
tate || !funcs->atomic_duplicate_state)
[   1.0000030] rkdrm0: reserved 64 MB DRAM for CMA
[   1.0000030] rkfb0 at rkdrm0
[   1.0000030] kern info: [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[   1.0000030] kern info: [drm] No driver support for vblank timestamp query.
[   1.0000030] kern info: [drm] Initialized rk 1.0.0 20191109 for rkdrm0 on minor 0
[   1.0000030] rkdrm0: initialized rk 1.0.0 20191109 on minor 0
[   1.0000030] panic: Trap: Instruction Abort (EL1): Translation Fault L0 for 0000000000000000: pc 0000000000000000: opcode unknown

[   1.0000030] cpu0: Begin traceback...
[   1.0000030] trace fp ffffc00000fba3d0
[   1.0000030] fp ffffc00000fba400 vpanic() at ffffc00000570aac netbsd:vpanic+0x14c
[   1.0000030] fp ffffc00000fba460 panic() at ffffc00000570ba4 netbsd:panic+0x44
[   1.0000030] fp ffffc00000fba4f0 data_abort_handler() at ffffc000000b035c netbsd:data_abort_handler+0x1ec
[   1.0000030] tf ffffc00000fba560 el1_trap() at ffffc000000b1784 netbsd:el1_vectors+0x784
[   1.0000030] ---- trapframe 0xffffc00000fba560 (304 bytes) ----
[   1.0000030]     pc=0000000000000000,   spsr=0000000080000005
[   1.0000030]    esr=0000000086000004,    far=0000000000000000
[   1.0000030]     x0=ffffc000402880f0,     x1=0000000000000000
[   1.0000030]     x2=ffff0000f3e9e050,     x3=0000000000000001
[   1.0000030]     x4=0000000000000001,     x5=0000000000000001
[   1.0000030]     x6=0000000000000000,     x7=0000000000000002
[   1.0000030]     x8=ffffc000010da000,     x9=0000000000000006
[   1.0000030]    x10=0000000000000040,    x11=0000000000001130
[   1.0000030]    x12=0000000000000fb0,    x13=0000000000091050
[   1.0000030]    x14=0000000000000020,    x15=ffff0000f3e9e078
[   1.0000030]    x16=ffffc00000004110,    x17=0606477008b48de7
[   1.0000030]    x18=0000000000001000,    x19=ffff0000f3f00690
[   1.0000030]    x20=0000000000000000,    x21=0000000000000000
[   1.0000030]    x22=ffffc000402880f0,    x23=ffff0000f3f00690
[   1.0000030]    x24=0000000000000028,    x25=ffff0000f4a24410
[   1.0000030]    x26=ffffc00000fba998,    x27=ffff0000f3f0c800
[   1.0000030]    x28=ffff0000f3f27c90, fp=x29=ffffc00000fba890
[   1.0000030] lr=x30=ffffc000003ac8c0,     sp=ffffc00000fba890
[   1.0000030] ------------------------------------------------
[   1.0000030] fp ffffc00000fba890 drm_atomic_get_connector_state() at ffffc000003ac8c0 netbsd:drm_atomic_get_connector_state+0x80
[   1.0000030] fp ffffc00000fba8e0 __drm_atomic_helper_set_config() at ffffc000003ad730 netbsd:__drm_atomic_helper_set_config+0x2d0
[   1.0000030] fp ffffc00000fba930 drm_client_modeset_commit_atomic() at ffffc000003bb788 netbsd:drm_client_modeset_commit_atomic+0x168
[   1.0000030] fp ffffc00000fba9f0 drm_client_modeset_commit_force() at ffffc000003bb90c netbsd:drm_client_modeset_commit_force+0x48
[   1.0000030] fp ffffc00000fbaa20 drm_fb_helper_restore_fbdev_mode_unlocked() at ffffc000003d5848 netbsd:drm_fb_helper_restore_fbdev_mode_unlocke
d+0x68
[   1.0000030] fp ffffc00000fbaa50 drmfb_genfb_setmode() at ffffc000003a8d2c netbsd:drmfb_genfb_setmode+0x18
[   1.0000030] fp ffffc00000fbaa60 genfb_attach() at ffffc0000040db10 netbsd:genfb_attach+0x130
[   1.0000030] fp ffffc00000fbab10 drmfb_attach() at ffffc000003a8ff4 netbsd:drmfb_attach+0x1c4
[   1.0000030] fp ffffc00000fbab90 rk_fb_init() at ffffc000000492b8 netbsd:rk_fb_init+0x54
[   1.0000030] fp ffffc00000fbabe0 rk_drm_init() at ffffc00000048a18 netbsd:rk_drm_init+0xa8
[   1.0000030] fp ffffc00000fbac00 config_process_deferred() at ffffc000005519c8 netbsd:config_process_deferred+0xb8
[   1.0000030] fp ffffc00000fbac40 config_attach_internal() at ffffc00000551e60 netbsd:config_attach_internal+0x1ec
[   1.0000030] fp ffffc00000fbaca0 config_found() at ffffc00000551fa0 netbsd:config_found+0x5c
[   1.0000030] fp ffffc00000fbad10 arm_fdt_attach() at ffffc0000006eb88 netbsd:arm_fdt_attach+0x94
[   1.0000030] fp ffffc00000fbad70 config_attach_internal() at ffffc00000551e2c netbsd:config_attach_internal+0x1b8
[   1.0000030] fp ffffc00000fbadd0 config_rootfound() at ffffc000005521f4 netbsd:config_rootfound+0x64
[   1.0000030] fp ffffc00000fbae30 cpu_configure() at ffffc0000006a614 netbsd:cpu_configure+0x54
[   1.0000030] fp ffffc00000fbae60 main() at ffffc000007fe290 netbsd:main+0x2e0
[   1.0000030] fp 0000000000000000 aarch64_start() at ffffc00000001898 netbsd:aarch64_start+0x1098
[   1.0000030] cpu0: End traceback...
Stopped in pid 0.0 (system) at  netbsd:cpu_Debugger+0x4:        ret
db{0}> 

Hi!

Unfortunately the current FreBSD kernel does not support HDMI video
via EFI FB in 4K(3840x2160) mode.
Maximum FULLHD supported.
This issue is fixed by forcing u-boot to 1920x1080 mode. If you try to load my image from an SD card or eMMC, I think it will work for you on a 4K monitor but in FULLHD mode.
So far, this is the only solution Iā€™ve found. Use mask rom mode.

Hi Sleepwalker

Unfortunately not. I tried booting your FreeBSD image off uSD, eMMC and NVME but all three failed.

Hi @Dan_MacDonald!

This may be because you have uboot on SPI FLASH and it starts first.
If you donā€™t see the FreeBSD orbit logo on the screen, that means itā€™s not my uboot that is starting.

Everything is very simple.

Booting from an SD card in mask rom mode has always helped me.
In any case, you can always get reliable startup if you turn on a FULL HD monitor.

1 Like

Yes I do have u-boot on SPI. I will try again in mask rom mode.

Is it possible to it install to and boot off the nvme disk using ZFS?

Hi @Dan_MacDonald.

Yes of course it is possible.

You need to use the bsdinstall utility after logging in as root from the console.
Or via ssh like
Username: admin
Password: admin
admin@rock-pi:~ % su -
root@rock-pi:~ # bsdinstall

In this case, bsdinstall should write the correct uboot to the eMMC,
this will happen automatically.

Donā€™t forget to clear the contents of the SPI FLASH after bsdinstall is complete.
Use command
dd if=/dev/zero of=/dev/flash/spi0 bs=4k status=progress
I hope everything will work for you.
If uboot is on eMMC and NVMe contains ZFS root FS, you will get successful OS boot from NVMe.

I havenā€™t tested this for a long time,
but I think Iā€™m not mistaken and everything should be exactly like this.

Good luck.

2 Likes

I have got it to boot now, off uSD. I had to enable maskrom mode and remove my nvme disk. I get a (full HD) HDMI display but unfortunately its cropped and doesnā€™t quite fit so I cannot see the whole of the bottom row of text ie the command line itself and so I can only really use its terminal via ssh or UART unless I type blind.

Iā€™ve not tried installing it yet - Iā€™m mainly interested to see if FreeBSD can utilise the full speed of the NVME interface ie PCIe 2.0 speeds. If the FreeBSD devs can get 4K output and the wifi working then I might consider switching from Manjaro.

Cool to see a BSD booting on the RockPi4!

1 Like

So far no one uses aarch64 on 4k FreeBSD displays :slight_smile:
But we hope that the drm for aarch4 project will be completed soon.

1 Like

I have successfully installed FreeBSD to NVME on my rockpi4.

FreeBSD manages over 300 MB/s read speeds using ZFS according to diskinfo so it looks like it does support PCIe-gen2.

I have armbian uboot on SPI and I was able to boot the freebsd image from nvme, but I didnā€™t know how to install. In this case, with bsdintall do I should boot a desktop simply?