Archive for the ‘Boards’ Category

OPNsense on NanoPI 4SE

February 7th, 2023

Guide to install OPNsense ARM-edition on small router.

This guide cover an attempt to power the small computer with OPNsense system image. The target placement for the system is the internal eMMC module. This selection is made with keeping in mind the most important thing: no one microSD card can not present a significant I/O speed due to nature of operation system with base requirement for a lot of small input/output transactions. In other words, any OS wants to read and especially write a tons of small files and data. May be not exactly the “OS” (kernel), but the subsystems of OS. Log files, configurations, working artefacts on so on. This is more important for OPNsense system which is main purpose – work with networks, routing networks, filtering networks and of course – collecting a telemetry for what is going on while these processes is on going.

Table of contents

  1. Prerequisites
  2. Understanding u-boot “partitioning”
  3. Preparing bootable image
  4. Boot the R4SE device with freshly prepared image
  5. Install on eMMC
  6. Patching eMMC partitions footprint for u-boot requirements


  • microSD card enough capacity to fit an OPNSense image (8 gigabytes is fine enough)
  • (optional) TTL/UART adapter to establish serial console connection
  • Linux or BSD powered computer
  • time 🙂

Understanding u-boot “partitioning”

To be able for booting with using u-boot loader, first we need to understand for “u-boot” is a complex boot-loader which is consists of two parts, placed in different places of bootable drive’s surface. Describing for roots of purpose for each of u-boot’s parts is out of the scope for current letter. There we need to consolidate the next understanding: each part of u-boot loader need to be placed into the specific area of drive and none of the “neighbors” should newer overwrite them.
This means, that the area for u-boot placement should be formed as a separate “slice” of the disk surface. Easy way to reach this – is a reserve for dedicated free space before any other partitions placed into the drive surface.
This is the document where mentioned above is claimed as a technical table:
“Two parts” of u-boot loader in a terms of this document is a “loader1” and “loader2” partitions. Thus, we need to guarantee to reserve a space for first 16 megabytes of the disk surface and place any partitions only after that gap.

Preparing bootable image

The author of OPNsense images are not prepare dedicated image for R4SE device. This is not a problem – we can made dedicated image by ourself. “Dedicated” – means that image contain an adapted u-boot loaders especially for desired hardware. This is by nature of u-boot: every sample of u-boot is “designed” only for the hardware on which it should run loading an OS. In other words, trying to boot a device with wrong u-boot will lead a “bricked” device after boot process is done or device run into the boot-loop.

Obtain requirements
  1. Download an image.

  2. Unpack the image.
    unxz -v OPNsense-22.1.9-OpenSSL-aarch64-NanoPi-R4S-20220626.img.xz

    Resulting image file after unpack are done is

  3. Download dedicated for R4SE u-boot package.

  4. Unpack the archive.
    tar xvzf u-boot-nanopi-r4se-2020.07.pkg

    After unpack the u-boot bodies are placed into the path: usr/local/share/u-boot/u-boot-nanopi-r4se/
    Be aware, that the path is the relative path from the your current working directory
    Inside this directory you will find next two files:

    Where idbloader.img is the “loader1” and u-boot.itb is the “loader2” in the terms of u-boot “partitions”

Work with image (BSD)

If you have BSD equipped computer, this section is for use. If not – skip to next section describing universal steps

  1. Mount an image as root
    sudo mdconfig OPNsense-22.1.9-OpenSSL-aarch64-NanoPi-R4S-20220626.img

    this command after done should print the name of fresh mounted “device”. For example:

  2. Rewrite the u-boot parts
    sudo dd if=usr/local/share/u-boot/u-boot-nanopi-r4se/idbloader.img of=/dev/md0 seek=64 bs=512 conv=sync

    After a short while we got a result:
    353+0 records in
    353+0 records out
    180736 bytes transferred in 0.436434 secs (414120 bytes/sec)

    sudo dd if=usr/local/share/u-boot/u-boot-nanopi-r4se/u-boot.itb of=/dev/md0 seek=16384 bs=512 conv=sync

    After a short while we got a result:
    1688+0 records in
    1688+0 records out
    864256 bytes transferred in 1.960308 secs (440878 bytes/sec)

  3. Finish works with an image:
    sudo mdconfig -d -u 0

  4. Burn an image onto the SD-card
    sudo dd if=./OPNsense-22.1.9-OpenSSL-aarch64-NanoPi-R4S-20220626.img of=/dev/da0 bs=4096 status=progress conv=sync

    After a while we got a result:
    786432+0 records in
    786432+0 records out
    3221225472 bytes transferred in 3386.892073 secs (951086 bytes/sec)

Work with image (universal)

This is universal steps for any Linux/BSD computer

  1. Burn an image onto the SD-card (assume we have SD card appeared in the system as da0 device)
    sudo dd if=./OPNsense-22.1.9-OpenSSL-aarch64-NanoPi-R4S-20220626.img of=/dev/da0 bs=4096 status=progress conv=sync

    After a while we got a result:
    786432+0 records in
    786432+0 records out
    3221225472 bytes transferred in 3386.892073 secs (951086 bytes/sec)

  2. Rewrite the u-boot parts
    sudo dd if=usr/local/share/u-boot/u-boot-nanopi-r4se/idbloader.img of=/dev/da0 seek=64 bs=512 conv=sync

    After a short while we got a result:
    353+0 records in
    353+0 records out
    180736 bytes transferred in 0.436434 secs (414120 bytes/sec)

    sudo dd if=usr/local/share/u-boot/u-boot-nanopi-r4se/u-boot.itb of=/dev/da0 seek=16384 bs=512 conv=sync

    After a short while we got a result:
    1688+0 records in
    1688+0 records out
    864256 bytes transferred in 1.960308 secs (440878 bytes/sec)

Boot the R4SE device with freshly prepared image

  1. Put SD-card with burned image into the Nano pi R4SE
  2. Plug Ethernet-cabled
  3. (optional) Plug the Serial adapter
  4. Hold the MASK button with the pen
  5. Power the R4SE device by the USB-C cable
  6. Release the MASK button
  7. If we have pluged in a serial adapter, watch the boot process from SD-card (examples attached below)
  8. After boot is done, enter into the WEB-Gui and perform an initial configuration

u-boot loader output:

Efi-loader output:

BSD-loader output:

BSD-kernel output:

Install on eMMC

  1. Inside WEB-Gui, enable ssh. How to perform that is showed on followed image:

Required to modify options is marked with the red rectangle.

  1. Establish connection with the R4SE device within the ssh
    ssh root@

    when establishing an initial connection, we can face with the following:
    The authenticity of host ' (' can't be established.
    ED25519 key fingerprint is SHA256:[long-hexadecimal-string-with-key-fingerprint].
    No matching host key fingerprint found in DNS.
    This key is not known by any other names
    Are you sure you want to continue connecting (yes/no/[fingerprint])?

    We need to answer “yes” by manually typing a letters and press “Enter”
    Right after the answer, system inform us about adding the key in well-known-hosts file and prompts us to enter for the root password:
    Warning: Permanently added '' (ED25519) to the list of known hosts.
    (root@ Password:

    initial password’s value is “opnsense”, so after entering the password next menu are shown:

  1. Reach the shell by selecting item 8 in the menu showed above
  2. Prepare the eMMC device with the command:
    gpart destroy -F mmcsd1

    Command execution will give the output:
    mmcsd1 destroyed

  3. Launch an OPNsense installation process by exec the command:

  4. Now, we need to proceed within the installation process shown on the following steps

This is the initial step. We can setup the desired keymap.
There we need to select a custom install due to some adjusting options. SWAP size for example
Proceed with ZFS/Root-on-ZFS mode
Update the SWAP size and proceed to select pool type and disk selection
Type of ZFS configuration is the “stripe”
Select an our eMMC module here
Now we ready to perform an installation itself
Last chance to …
There is a progress of installation job
Done. After selection “Exit” be ready to press Ctrl-C combination. There only frame with five seconds length to press.
  1. Once installation process is finished, right after exit from the installer program, we need to press Ctrl-C keys combination and exit to the shell

Patching eMMC partitions footprint for u-boot requirements

Due to installer of OPNsense system is know nothing about u-boot, we need to update partitions placement.

  1. Perform EFI partition backup with the following set of commands:
    mkdir /mnt/efi
    mount_msdosfs /dev/mmcsd1p1 /mnt/efi
    cp -Rv /mnt/efi /root
    /mnt/efi -> /root/efi
    /mnt/efi/efi -> /root/efi/efi
    /mnt/efi/efi/freebsd -> /root/efi/efi/freebsd
    /mnt/efi/efi/freebsd/loader.efi -> /root/efi/efi/freebsd/loader.efi
    /mnt/efi/efi/boot -> /root/efi/efi/boot
    /mnt/efi/efi/boot/bootaa64.efi -> /root/efi/efi/boot/bootaa64.efi

    umount /mnt/efi

  2. Destroy the EFI partition:
    gpart delete -i 1 mmcsd1

    When done system prints out:
    mmcsd1p1 deleted

  3. Create back EFI partition but with the shrinked size and adjusted starting place
    gpart add -t efi -b 16M -s 244M -i 1 -l EFI mmcsd1

    When done system prints out:
    mmcsd1p1 added

    newfs_msdos -F 16 -L EFI /dev/mmcsd1p1

  4. Restore the EFI partition from previously created backup
    mount_msdosfs /dev/mmcsd1p1 /mnt/efi
    mv -v /root/efi/* /mnt/efi/

    /root/efi/efi -> /mnt/efi/efi
    /root/efi/efi/freebsd -> /mnt/efi/efi/freebsd
    /root/efi/efi/freebsd/loader.efi -> /mnt/efi/efi/freebsd/loader.efi
    /root/efi/efi/boot -> /mnt/efi/efi/boot
    /root/efi/efi/boot/bootaa64.efi -> /mnt/efi/efi/boot/bootaa64.efi

    umount /mnt/efi

  5. Enable debug flag on filesystem
    sysctl kern.geom.debugflags=16

  6. Copy the u-boot from booted SD-card into the eMMC placement
    dd if=/dev/mmcsd0 of=/dev/mmcsd1 bs=512 skip=64 seek=64 count=7104 conv=sync

    After a short while we got a result:
    7104+0 records in
    7104+0 records out
    3637248 bytes transferred in 18.275839 secs (199019 bytes/sec)

    dd if=/dev/mmcsd0 of=/dev/mmcsd1 bs=512 skip=16384 seek=16384 count=8192 conv=sync

    After a short while we got a result:
    8192+0 records in
    8192+0 records out
    4194304 bytes transferred in 7.278221 secs (576281 bytes/sec)

  7. Shut down the R4SE device
    shutdown -h now

    Wait until the device is stop responding (for example on a ping command)

  8. Unplug the power cable
  9. Remove the SD-card from R4SE device
  10. Plug the power cable back
  11. Boot process will start from the eMMC module. If you have the serial adapter cable plugged in, you can see the difference in outputs which is produced by the u-boot loader. The difference is the device used to boot-process.

U-boot output when boot starts from eMMC module:

The end.


Opnsense 22.7.x

November 30th, 2022

Do you have any plans to release Opnsense 22.7.x for R4S?

As far as I understand auto-update from 22.1.9 won’t work.

Thx Ryker

The update works great in my opinion.
If anyone wants to have an install image for OPNsense 22.7 just email me about it.

Installation images for RK356x devices will only be made if requested.

If you want to contribute to the process of creating a convenient and reliable FreeBSD-based system
for SBCs on the Rockchip RK 35XX SoC, welcome to our telegram group: .

— SleepWalker


FriendlyElec NanoPi R5S

June 24th, 2022
Comments Off on FriendlyElec NanoPi R5S
  • The NanoPi R5S (as “R5S“) is an open source platform with two 2.5Gb and one 1Gb Ethernet ports designed and developed by FriendlyElec for IoT applications.

  • The NanoPi R5S uses the RockChip RK3568B2 SoC. It has and 2G/4G RAM, eMMC, USB, HDMI and M.2 NVMe socket.

  • It is a good platform for developing IoT applications, NAS applications, smart home gateways etc.

  • This is a great product that is ideal for use as an Internet gateway.




Porting FreeBSD to Rockchip SoC RK356x is ongoing and if you want to take part in it and are ready to contribute, welcome to our telegram group.


OPNsense on MOCHAbin Promo!

June 2nd, 2022
Comments Off on OPNsense on MOCHAbin Promo!

Here’s what a custom build of OPNsense for MOCHAbin looks like.
It remains to add support for native Ethernet.


Run FreeBSD on MOCHAbin #2

May 31st, 2022
Comments Off on Run FreeBSD on MOCHAbin #2

Second try UEFI in FDT mode..

Copyright (c) 1992-2021 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 13.1-RELEASE #0 releng/13.1-n250148-fc952ac2212-dirty: Tue May 24 10:52:10 MSK 2022 arm64
FreeBSD clang version 13.0.0 ( llvmorg-13.0.0-0-gd7b669b3a303)
VT: init without driver.
module firmware already present!
module ure already present!
real memory  = 8564830208 (8168 MB)
avail memory = 8321847296 (7936 MB)
Starting CPU 1 (1)
Starting CPU 2 (100)
Starting CPU 3 (101)
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
random: unblocking device.
random: entropy device external interface
MAP bf810000 mode 2 pages 992
MAP bfde0000 mode 2 pages 512
MAP f2284000 mode 0 pages 1
MAP f2700000 mode 0 pages 1
MAP f93c0000 mode 0 pages 48
kbd0 at kbdmux0
ofwbus0: <Open Firmware Device Tree>
simplebus0: <Flattened device tree simple bus> on ofwbus0
simplebus1: <Flattened device tree simple bus> on simplebus0
simplebus2: <Flattened device tree simple bus> on ofwbus0
simplebus3: <Flattened device tree simple bus> on simplebus2
regfix0: <Fixed Regulator> on ofwbus0
simple_mfd0: <Simple MFD (Multi-Functions Device)> mem 0x6f4000-0x6f5fff on simplebus1
simple_mfd1: <Simple MFD (Multi-Functions Device)> mem 0x6f8000-0x6f8fff on simplebus1
simple_mfd2: <Simple MFD (Multi-Functions Device)> mem 0x440000-0x441fff on simplebus3
simple_mfd3: <Simple MFD (Multi-Functions Device)> mem 0x400000-0x400fff on simplebus3
psci0: <ARM Power State Co-ordination Interface Driver> on ofwbus0
mv_ap806_clock0: <Marvell AP806 Clock Controller> mem 0x6f4000-0x6f5fff on simple_mfd0
mv_cp110_clock0: <Marvell CP110 Clock Controller> mem 0x440000-0x441fff on simple_mfd2
mv_cp110_icu_bus0: <Marvell Interrupt Consolidation Unit Bus> mem 0x1e0000-0x1e043f on simplebus3
gic0: <ARM Generic Interrupt Controller> mem 0x210000-0x21ffff,0x220000-0x23ffff,0x240000-0x25ffff,0x260000-0x27ffff irq 0 on simplebus1
gic0: pn 0x2, arch 0x2, rev 0x1, implementer 0x43b irqs 352
gicv2m0: <ARM Generic Interrupt Controller MSI/MSIX> mem 0x280000-0x280fff on gic0
gicv2m1: <ARM Generic Interrupt Controller MSI/MSIX> mem 0x290000-0x290fff on gic0
gicv2m2: <ARM Generic Interrupt Controller MSI/MSIX> mem 0x2a0000-0x2a0fff on gic0
gicv2m3: <ARM Generic Interrupt Controller MSI/MSIX> mem 0x2b0000-0x2b0fff on gic0
mv_ap806_gicp0: <Marvell GICP> mem 0x3f0040-0x3f004f on simplebus1
mv_ap806_sei0: <Marvell SEI> mem 0x3f0200-0x3f023f irq 7 on simplebus1
mv_pinctrl0: <Marvell Pinctrl controller> mem 0x6f4000-0x6f5fff on simple_mfd0
mv_cp110_icu0: <Marvell Interrupt Consolidation Unit> mem 0x1e0000-0x1e043f on mv_cp110_icu_bus0
mv_cp110_icu1: <Marvell Interrupt Consolidation Unit> mem 0x1e0000-0x1e043f on mv_cp110_icu_bus0
generic_timer0: <ARMv8 Generic Timer> irq 1,2,3,4 on simplebus1
Timecounter "ARM MPCore Timecounter" frequency 25000000 Hz quality 1000
Event timer "ARM MPCore Eventtimer" frequency 25000000 Hz quality 1000
gpio0: <Marvell Integrated GPIO Controller> mem 0x6f4000-0x6f5fff on simple_mfd0
gpiobus0: <OFW GPIO bus> on gpio0
gpio1: <Marvell Integrated GPIO Controller> mem 0x440000-0x441fff irq 37,38,39,40 on simple_mfd2
gpiobus1: <OFW GPIO bus> on gpio1
gpio2: <Marvell Integrated GPIO Controller> mem 0x440000-0x441fff irq 41,42,43,44 on simple_mfd2
gpiobus2: <OFW GPIO bus> on gpio2
efirtc0: <EFI Realtime Clock>
efirtc0: registered as a time-of-day clock, resolution 1.000000s
pmu0: <Performance Monitoring Unit> irq 5 on simplebus1
pmu0: Cannot get interrupt
device_attach: pmu0 attach returned 6
uart0: <16550 or compatible> mem 0x512000-0x5120ff irq 10 on simplebus1
uart0: console (114678,n,8,1)
sdhci_xenon0: <Armada Xenon SDHCI controller> mem 0x6e0000-0x6e02ff irq 13 on simplebus1
mmc0: <MMC/SD bus> on sdhci_xenon0
gpioc0: <GPIO controller> on gpio0
mv_thermal0: <Marvell Thermal Sensor Controller> mem 0x6f8000-0x6f8fff irq 36 on simple_mfd1
cpulist0: <Open Firmware CPU Group> on ofwbus0
cpu0: <Open Firmware CPU> on cpulist0
cpu1: <Open Firmware CPU> on cpulist0
cpu2: <Open Firmware CPU> on cpulist0
cpu3: <Open Firmware CPU> on cpulist0
rtc0: <Marvell Integrated RTC> mem 0x284000-0x28401f,0x284080-0x2840a3 irq 17 on simplebus3
rtc0: registered as a time-of-day clock, resolution 1.000000s
gpioc1: <GPIO controller> on gpio1
gpioc2: <GPIO controller> on gpio2
mv_thermal1: <Marvell Thermal Sensor Controller> mem 0x400000-0x400fff irq 45 on simple_mfd3
xhci0: <Generic USB 3.0 controller> mem 0x500000-0x503fff irq 18 on simplebus3
xhci0: 32 bytes context size, 32-bit DMA
usbus0 on xhci0
xhci1: <Generic USB 3.0 controller> mem 0x510000-0x513fff irq 19 on simplebus3
xhci1: 32 bytes context size, 32-bit DMA
usbus1 on xhci1
ahci0: <AHCI SATA controller> mem 0x540000-0x56ffff irq 20 on simplebus3
ahci0: AHCI v1.00 with 2 6Gbps ports, Port Multiplier supported with FBS
ahcich0: <AHCI channel> at channel 0 on ahci0
ahcich1: <AHCI channel> at channel 1 on ahci0
twsi0: <Marvell Integrated I2C Bus Controller> mem 0x701000-0x70101f irq 21 on simplebus3
iicbus0: <OFW I2C bus> on twsi0
iic0: <I2C generic I/O> on iicbus0
iicbus0: <unknown card> at addr 0x72
twsi1: <Marvell Integrated I2C Bus Controller> mem 0x701100-0x70111f irq 22 on simplebus3
iicbus1: <OFW I2C bus> on twsi1
iic1: <I2C generic I/O> on iicbus1
iicbus1: <unknown card> at addr 0xc8
uart1: <Non-standard ns8250 class UART with FIFOs> mem 0x702000-0x7020ff irq 23 on simplebus3
pcib0: <Marvell Armada8K PCI-E Controller> mem 0xf2640000-0xf264ffff,0xf8f00000-0xf8f7ffff irq 16 on simplebus2
pcib0: Cannot get phy[0]
pci0: <PCI bus> on pcib0
pcib1: <PCI-PCI bridge> at device 0.0 on pci0
pcib0: failed to reserve resource for pcib1
pcib1: failed to allocate initial I/O port window: 0-0xfff
pcib0: failed to reserve resource for pcib1
pcib1: failed to allocate initial memory window: 0-0xfffff
pcib0: failed to reserve resource for pcib1
pcib1: failed to allocate initial prefetch window: 0-0xfffff
pci1: <PCI bus> on pcib1
armv8crypto0: <AES-CBC,AES-XTS,AES-GCM>
Timecounters tick every 1.000 msec
ZFS filesystem version: 5
ZFS storage pool version: features support (5000)
usbus0: 5.0Gbps Super Speed USB v3.0
usbus1: 5.0Gbps Super Speed USB v3.0
ugen1.1: <Generic XHCI root HUB> at usbus1
uhub0 on usbus1
uhub0: <Generic XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus1
ugen0.1: <Generic XHCI root HUB> at usbus0
uhub1 on usbus0
uhub1: <Generic XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0
uhub0: 2 ports with 2 removable, self powered
uhub1: 2 ports with 2 removable, self powered
ugen0.2: <SMSC USB5434> at usbus0
uhub2 on uhub1
uhub2: <SMSC USB5434, class 9/0, rev 3.00/41.00, addr 1> on usbus0
uhub2: 4 ports with 4 removable, self powered
mmc0: Failed to set VCCQ for card at relative address 2
mmcsd0: 16GB <MMCHC DF4016 0.1 SN F174770C MFG 03/2019 by 69 0x0000> at mmc0 50.0MHz/4bit/65535-block
mmcsd0boot0: 4MB partition 1 at mmcsd0
mmcsd0boot1: 4MB partition 2 at mmcsd0
mmcsd0rpmb: 4MB partition 3 at mmcsd0
Trying to mount root from zfs:zroot/ROOT/default []...
CPU  0: ARM Cortex-A72 r0p1 affinity:  0  0
                   Cache Type = <64 byte D-cacheline,64 byte I-cacheline,PIPT ICache,64 byte ERG,64 byte CWG>
 Instruction Set Attributes 0 = <CRC32,SHA2,SHA1,AES+PMULL>
 Instruction Set Attributes 1 = <>
         Processor Features 0 = <AdvSIMD,FP,EL3 32,EL2 32,EL1 32,EL0 32>
         Processor Features 1 = <>
      Memory Model Features 0 = <TGran4,TGran64,SNSMem,BigEnd,16bit ASID,16TB PA>
      Memory Model Features 1 = <8bit VMID>
      Memory Model Features 2 = <32bit CCIDX,48bit VA>
             Debug Features 0 = <DoubleLock,2 CTX BKPTs,4 Watchpoints,6 Breakpoints,PMUv3,Debugv8>
             Debug Features 1 = <>
         Auxiliary Features 0 = <>
         Auxiliary Features 1 = <>
AArch32 Instruction Set Attributes 5 = <CRC32,SHA2,SHA1,AES+VMULL,SEVL>
AArch32 Media and VFP Features 0 = <FPRound,FPSqrt,FPDivide,DP VFPv3+v4,SP VFPv3+v4,AdvSIMD>
CPU  1: ARM Cortex-A72 r0p1 affinity:  0  1
CPU  2: ARM Cortex-A72 r0p1 affinity:  1  0
CPU  3: ARM Cortex-A72 r0p1 affinity:  1  1
Release APs...ada0 at ahcich1 bus 0 scbus1 target 0 lun 0
ada0: <NT-256 SN9596> ACS-4 ATA SATA 3.x device
ada0: Serial Number xxxxxxxx
ada0: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 512bytes)
ada0: Command Queueing enabled
ada0: 244198MB (500118192 512 byte sectors)
GEOM: mmcsd0: the primary GPT table is corrupt or invalid.
GEOM: mmcsd0: using the secondary instead -- recovery strongly advised.
ugen0.3: <Realtek USB 10/100/1G/2.5G LAN> at usbus0
usb_alloc_device: set address 4 failed (USB_ERR_IOERROR, ignored)
Root mount waiting for: usbus0
usbd_set_config_index: could not read device status: USB_ERR_STALLED
ugen0.4: <SMSC USB2134> at usbus0
uhub3 on uhub1
uhub3: <SMSC USB2134, class 9/0, rev 2.10/41.00, addr 3> on usbus0
uhub3: MTT enabled
Root mount waiting for: usbus0
uhub3: 4 ports with 4 removable, self powered
Dual Console: Serial Primary, Video Secondary
lo0: link state changed to UP
cdce0 on uhub2
cdce0: <CDC Communications Control> on usbus0
ue0: <USB Ethernet> on cdce0
ue0: Ethernet address: xx:xx:xx:xx:xx:xx
ue0: link state changed to UP
Security policy loaded: MAC/ntpd (mac_ntpd)

Boards, Promo, Vendors

Run FreeBSD on MOCHAbin #1

May 29th, 2022
Comments Off on Run FreeBSD on MOCHAbin #1

First try u-boot..

BootROM - 2.03
Starting AP IOROM 1.02
Booting from eMMC 0
Found valid image at boot postion 0x002
lmv_ddr: mv_ddr-devel-18.12.0-g2e20f5d (May 27 2022 - 18:06:24)
mv_ddr: completed successfully
BL2: Initiating SCP_BL2 transfer to SCP

U-Boot 2018.03-devel-18.12.3-g926d08c7ce (May 27 2022 - 17:55:54 +0000)

Model: Marvell Armada 7040 Mochabin development board
SoC: Armada7040-B0; AP806-B0; CP115-A0
Clock:  CPU     1400 [MHz]
        DDR     800  [MHz]
        FABRIC  800  [MHz]
        MSS     200  [MHz]
LLC Enabled (Exclusive Mode)
DRAM:  8 GiB
Bus spi@700680 CS0 configured for direct access 00000000f9000000:0x1000000
SF: Detected w25q32bv with page size 256 Bytes, erase size 4 KiB, total 4 MiB
EEPROM configuration pattern not detected.
Comphy chip #0:
Comphy-0: SGMII1        3.125 Gbps
Comphy-1: USB3_HOST0
Comphy-2: SATA0
Comphy-3: SATA1
Comphy-4: SFI0          10.3125 Gbps
Comphy-5: PEX2
UTMI PHY 0 initialized to USB Host0
UTMI PHY 1 initialized to USB Host1
SATA link 0 timeout.
Target spinup took 0 ms.
AHCI 0001.0000 32 slots 2 ports 6 Gbps 0x3 impl SATA mode
flags: 64bit ncq led only pmp fbss pio slum part sxs
PCIE-0: Link up (Gen1-x1, Bus0)
MMC:   sdhci@6e0000: 0
Loading Environment from SPI Flash... OK
Model: Marvell Armada 7040 Mochabin development board
Net:   eth0: mvpp2-0 [PRIME], eth1: mvpp2-1, eth2: mvpp2-2
Hit any key to stop autoboot:  0
Marvell>> scsi scan
scanning bus for devices...
  Device 0: (1:0) Vendor: ATA Prod.: NT-256 Rev: SN95
            Type: Hard Disk
            Capacity: 244198.3 MB = 238.4 GB (500118192 x 512)

Marvell>> load scsi 0 $kernel_addr_r  efi/boot/bootaa64.efi
262620 bytes read in 26 ms (46.3 MiB/s)
Marvell>> bootefi  $kernel_addr_r
## Starting EFI application at 07000000 ...
Scanning disk sdhci@6e0000.blk...
Scanning disk ahci_scsi.id1lun0...
Found 5 disks
"Synchronous Abort" handler, esr 0x96000046
elr: 0000000000063728 lr : 000000000005b51c (reloc)
elr: 000000007ff9c728 lr : 000000007ff9451c
x0 : 00000000bffff000 x1 : 0000000000000000
x2 : 000000000000001f x3 : 00000000bffff018
x4 : 00000000bffff008 x5 : 0000000000000000
x6 : 0000000000000003 x7 : 00000000bffff020
x8 : 000000007f900000 x9 : 0000000000000008
x10: 0000000000000006 x11: 0000000000000006
x12: 000000000001869f x13: 0000000000000022
x14: 0000000000000000 x15: 00000000ffffffff
x16: 0000000000000001 x17: 0000000000000008
x18: 000000007f628dd0 x19: 00000000bffff000
x20: 000000007e620040 x21: 000000007e61f040
x22: 0000000007000000 x23: 0000000000000000
x24: 000000007f6249e0 x25: 000000007ffa4000
x26: 0000000000000000 x27: 0000000000000000
x28: 000000007f6c4670 x29: 000000007f624980
Resetting CPU ...

resetting ...

GlobalScale U-boot does not work correctly with efi.

Boards, SoCs, Vendors

CPU clock and temperature on NanoPi R2S

October 25th, 2021

Dear all,

I am using Nanopi R2S with image OPNsense-21.7.3-OpenSSL-aarch64-NanoPi-R2S-20211012.img.xz and was wondering if there is a way to display CPU clockrate and CPU temperature, either on the WebGui or via console?

The R2S seems to run a bit hot and I would like to monitor how it behaves under higher load.


Hi Ryker!

Thanks – found it – R2S in yellow plastic enclosure running at 91 degree (idle) with 21 degree ambient. I guess need to drill holes now and/or check bigger heatsink.

Hi Ryker!

I recommend using the R2S images for reference only, not for real work, as the ure driver is far from ideal.
If you want to have real pleasure, you need to buy the Nano-PI-R4S in an iron case, this is an almost ideal device for home use controlled by OPNsense.

Sleep Walker.

Thanks a lot, just received a 10USD metal housing for R2S and it now runs at 59 degree max.

I have not experienced any issues with ure/RTL8153B so far, but Internet line is running at 40mbps max. So I hope you will continue maintain the R2S images, as the device now does a really perfect job – it is a real magic being able to run OPNsense on these little ARM boxes. BR Ryker

Hi there, can you please briefly explain how ure driver issues will be recognised? I do see some instability in my setup with R2S even at very low throughput rates, but cannot judge if this is related to ure/LAN interface. Please let me know. R4S is quite expensive in the meantime, I am willing to spend the money, but want to be sure there will be a real benefit coming from it compared to R2S. BR



October 13th, 2021
Comments Off on MOCHAbin


Globalscale Technologies has created a new open source quad core networking board designed to provide users with high-speed connectivity using the Wi-Fi, 5G, 1Gbit and 10Gbit Ethernet.

The Mochabin is designed for a variety of Firewall, Networking and NAS applications.

Mochabin is designed to support 4G and 5G applications via the M.2 interface. These can be used for cellular backhaul and communications to replace the ISP modem.

With the OpenWRT and Replica One software.

We are interested in installing FreeBSD/OPNsense/TrueNAS
on this board.

МochaBin-5G SBC diagram.


Board Specifications  

SoC Model

Marvell Armada 7040 quad-core Corex-A72 processor Product Breaf
SoC Architecture ARMv8 64-bit
CPU Frequency UP to 1.4GHz
RAM 4GB or 8GB DDR4 (soldered down)
eMMC flash 16GB
SPI NOR flash 4MB for bootloader
External Interfaces  
LAN Port (10Gbe) 1x 10GbE SFP+, 1x 1GbE SFP (via 88E1512 PHY)
LAN Port (1Gbe) 4x Gigabit Ethernet RJ45 via Topaz 88E6141 switch
WAN Port (1Gbe) 1x Gigabit Ethernet RJ45 WAN port (via 88E1512 PHY) with PoE support, multiplexed with 1GbE SFP, so only one can be used at any time
USB 3.0 2xType-A
Internal Interfaces  
M.2 2280 socket Optional SATA III SSD
M.2 2250 socket Optional 4G or 5G cellular modem
Mini PCIe socket Optional wireless card for WiFi and Bluetooth
Developer Interfaces  
Console micro USB port for serial console
Debugging 10-pin JTAG header
Battery CR2032 battery holder for RTC
LEDs 4 x GPIO Controlled LED
Power supply 12V DC or PoE
Power button 1



Mochabin Wiki:

GlobalScale GitHub:

FreeBSD startup log via standard U-Boot

FreeBSD startup log via custom EDK2 UEFI BootLoader

Here’s what a custom build of OPNsense for MOCHAbin looks like.
It remains to add support for native Ethernet.

Boards, NAS, SoCs

Motherboard TF307

August 23rd, 2021
Comments Off on Motherboard TF307

Материнскую плату TF307 совместно разработали компании «Эдельвейс», «Базальт СПО» и «Байкал Электроникс»

Компактный и унифицированный дизайн, совместим с форм-фактором mini-iTX.

Процессор Baikal-M (BE-M1000) разработан российской компанией «Байкал Электроникс» на базе современной архитектуры ARMv8, совместимой с широким спектром системного и прикладного ПО, что существенно облегчает внедрение устройств на его базе.

Baikal-M является высокопроизводительной и совместимой основой для универсальных рабочих станций, обеспечивая максимально высокий уровень безопасности благодаря отсутствию аппаратных уязвимостей и недекларированных возможностей.

Устройство предполагает работу под управлением ОС Linux и может оснащаться любыми совместимыми с ней прикладными программами, такими как пакет офисных приложений LibreOffice, браузер Firefox и многие другие.

Тип устройства Системная плата в форм-факторе mini-ITX
Габариты устройства Д х Ш: 170мм х 170мм
Процессор Архитектурная модель SoC Baikal-M
Количество ядер 8 (4 кластера по 2 ядра)
Максимальная частота, ГГЦ 1,5 ГГц
Оперативная память Тип До DDR4 2133 (в том числе с ECC)
Количество каналов 2
Поддерживаемый объем До 64 ГБ (До 2 модулей DIMM)
Слоты расширения
  • M.2 M Key  – NVMe SSD
  • PCIe3.0 x8
Внешние входы/выходы на задней панели
  • 1x HDMI OUT
  • 4x USB 2.0
  • 2x PS/2
  • 2x RJ45 1000BASE-T
  • 1x линейный аудио выход
  • 1x линейный аудио вход
  • 1х вход микрофона
Входы/Выходы для подключения передней панели
  • 1х разъем HD Audio
  • Разъем передней панели 
  • 2x USB 3.0
Внутренние разъемы
  • 2x SATA 3.0 6 Gbit/s
  • 2x 4-pin разъема для вентиляторов
  • 1x LVDS 4 канала
  • 1x разъем подсветки дисплея
  • 3x USB 2.0
  • 24-pin разъем питания
Питание ATX 24

Это отличный продукт, который идеально подходит для использования в качестве Интернет-шлюза. Мне удалось создать собственную сборку популярного брандмауэра OPNsense для этого устройства. И это прекрасно работает. Демонстрационныю версию (только одно ядро, без PCIe) можно cкачать по ссылке.



Firefly Station P2

May 12th, 2021

Overview of Station P2

RK3568 quad-core 64-bit processor
RK3568 quad-core 64-bit Cortex-A55 processor, with brand new ARM v8.2-A architecture, has frequency up to 2.0GHz — the efficiency is greatly improved. With 22nm lithography process, it features low power consumption and high performance.

8GB large RAM, all-data-link ECC
Supporting up to 8GB RAM, with up to 32Bit width and frequency up to 1600MHz, it supports all-data-link ECC, making data safer and more reliable. The large RAM fits the needs of smoothly running apps with large amount of data and high speed requirements.

Integrated co-processors — GPU, VPU, NPU

It is integrated with dual-core GPU, high-performance VPU and high-efficiency NPU. The GPU supports OpenGL ES3.2/2.0/1.1, Vulkan1.1. The VPU can achieve 4K 60fps H.265/H.264/VP9 video decoding and 1080P 100fps H.265/ H.264 video encoding. The NPU supports one-click switching of mainstream frameworks like Caffe/TensorFlow.

4K HDR vision
The new video engine VPU can easily decode H.265/HEVC/VP9 4K HDR videos, supports 3840×2160@60Hz ultra-HD output and HDR10 — optimizes the dynamic range and details of the image frame by frame, enhances the image quality and color performance, delivering clear and vibrant vision experience.

Dual Gigabit Ethernet ports
The dual adaptive RJ45 Gigabit Ethernet ports, through which internal and external network data can be accessed and transmitted, improves the network transmission efficiency. Dual Gigabit Ethernet ports deliver better network scalability, and can be used in scenarios such as setting up family gigabit network, DIY gigabit router, soft router, OpenWrt.

Powerful wireless network communication
WiFi 6 (802.11ax) wireless network communication is supported, with the maximum bandwidth reaches 160MHz and the highest speed reaches 9.6Gbps — the speed is greatly improved than WiFi 5. And, WiFi 6 delivers lower packet loss rate and retransmission rate, making the transmission more stable and secure.

Onboard M.2 and SATA3.0 interfaces
The onboard M.2 PCIe3.0 and SATA3.0 interfaces can be connected with an M.2 NVMe SSD and a 2.5-inch SATA SSD/HDD respectively, owning the advantages of high-speed reading and writing and large capacity.

RS485 and RS232 interface extension
The configured Control Port (RJ45) provides one RS485 and two RS232, through which you can connect to external devices with RS485/RS232 serial port to control more external devices flexibly and create more fun ways to play.

Excellent heat dissipation

Toothed aluminium alloy case in matte black under high-precision CNC machining and with good air flow design makes excellent heat dissipation, even without fans.

A variety of interfaces
HDMI2.0, USB3.0, USB2.0 x 2, Control Port (RS485 x 1, RS232 x 2), Type-C (OTG), LAN x 2, TF CARD and other interfaces are provided.

Configured with Geek System

Station OS (Firefly Geek System) brings you living room playing experience. Just connect the TV or display at home to build a home entertainment center to enjoy movies and games with high-definition and big-screen viewing.

Various systems and boot ways supported
It supports to upgrade to Android, Ubuntu, Linux+QT, Station OS and other systems, and supports to boot the system via TF card, U disk, EMMC, etc. Diverse supporting systems make entertainment, work, programming learning, creative development all easy.

Station application programs and forums
Station application programs, including WeChat mini program, app and website, through which you can play videos, remotely control, remotely download and so on, enable you to play the geek computer anywhere anytime. Besides, forums with tremendous creative ideas and fun are waiting for you.