[Work In Progress] OPNsense Ported into ARM Devices

Started by nekoprog, March 25, 2019, 11:55:58 AM

Previous topic - Next topic
FreeBSD 12.2 boots just fine...

root@generic:~ # usbconfig
ugen0.1: <DWCOTG OTG Root HUB> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen0.2: <vendor 0x0424 product 0x9514> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE)
ugen0.3: <vendor 0x0424 product 0xec00> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON ()
ugen0.4: <ASIX Elec. Corp. AX88x72A> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (250)
ugen0.5: <ASIX Elec. Corp. AX88x72A> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (250)
root@generic:~ #
kind regards
chemlud
____
"The price of reliability is the pursuit of the utmost simplicity."
C.A.R. Hoare

felix eichhorns premium katzenfutter mit der extraportion energie

A router is not a switch - A router is not a switch - A router is not a switch - A rou....

Hi

Could this work with Orange Pi R1 Plus? It has dual gigabit, easier to get and cheap.

Thanks
rega

Quote from: chemlud on February 21, 2021, 04:41:13 PM
Took the image by @yrzr and copied over from FreeBSD 12.1 ARM the /dtb as well as  bcm2710-rpi-3-b.dtb,  bcm2710-rpi-3-b-plus.dtb.

Now USB detected but won't mount OPPNsense...

Consoles: EFI console 
    Reading loader env vars from /efi/freebsd/loader.env
Setting currdev to disk0p1:
FreeBSD/arm64 EFI loader, Revision 1.1
(Thu Jan  7 07:14:48 UTC 2021 root@releng1.nyi.freebsd.org)

   Command line arguments: loader.efi
   Image base: 0x39e17000
   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)/SD(0)/SD(0)/HD(1,0x01,0,0x800,0)
Trying ESP: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/SD(0)/SD(0)/HD(1,0x01,0,0x800,0x100)
Setting currdev to disk0p1:
Trying: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/SD(0)/SD(0)/HD(2,0x01,0,0x10800,0x3ef80)
Setting currdev to disk0p2:
Loading /boot/defaults/loader.conf
Loading /boot/device.hints
Loading /boot/loader.conf
Loading /boot/loader.conf.local
[0;37;40m[H[J[9;47H[muKOS2qsmkfe38kEuXLimP+7XoBiuIt5k[10;47HBM[36mHardened[34mBSD[mxfOL9Qwv5
[25;0H[23;4HAutoboot in 0 seconds, hit [Enter] to boot or any other key to stop     
[25;0HLoading kernel...
/boot/kernel/kernel text=0x9857d0 data=0x19b1f0+0x7a3084 syms=[0x8+0x142260+0x8+0x12dbac]
Loading configured modules...
/boot/kernel/if_bridge.ko text=0x351e text=0x69a0 data=0x10428+0xfbe0 syms=[0x8+0x1a40+0x8+0]
loading required module 'bridgestp'
/boot/kernel/bridgestp.ko text=0xe44 text=0x402c data=0x170 data=0x158+0x28 syms=[0x8+0xb10+]
/boot/kernel/if_enc.ko text=0x1602 text=0x8d0 data=0x10168 syms=[0x8+0xc90+0x8+0xb66]
/boot/kernel/carp.ko text=0x34c0 text=0x63d0 data=0x10258+0xfdf0 syms=[0x8+0x1980+0x8+0x121f]
/boot/kernel/if_lagg.ko text=0x35c0 text=0x7c30 data=0x10440+0xfbc8 syms=[0x8+0x1a70+0x8+0x1]
/boot/kernel/pfsync.ko text=0x2e14 text=0x6ad0 data=0x102e8+0xfd20 syms=[0x8+0x1758+0x8+0x10]
loading required module 'pf'
/boot/kernel/pf.ko text=0x6061 text=0x2cb90 data=0x10490+0xfd38 syms=[0x8+0x4170+0x8+0x308c]
/boot/kernel/pflog.ko text=0xfb0 text=0x830 data=0x10148 syms=[0x8+0x9f0+0x8+0x716]
/boot/kernel/if_tap.ko text=0x2613 text=0x2b90 data=0x10160+0xff18 syms=[0x8+0x1260+0x8+0xbc]
/boot/entropy size=0x1000
/boot/kernel/if_gre.ko text=0x2458 text=0x4640 data=0x10228+0xfe18 syms=[0x8+0x1668+0x8+0xf1]
Using DTB provided by EFI at 0x7ef6000.
EFI framebuffer information:
addr, size     0x3e536000, 0x6baa80
dimensions     1680 x 1050
stride         1680
masks          0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000
---<<BOOT>>---
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 2013-2019 The HardenedBSD Project.
Copyright (c) 1992-2019 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 12.1-RELEASE-p13-HBSD #0  5a4151730(stable/21.1)-dirty: Fri Jan  8 01:33:30 UTC 2021
    root@generic:/usr/obj/usr/src/arm64.aarch64/sys/SMP-ARM arm64
FreeBSD clang version 8.0.1 (tags/RELEASE_801/final 366581) (based on LLVM 8.0.1)
VT(efifb): resolution 1680x1050
HardenedBSD: initialize and check features (__HardenedBSD_version 1200059 __FreeBSD_version .
Starting CPU 1 (1)
Starting CPU 2 (2)
Starting CPU 3 (3)
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
random: unblocking device.
random: entropy device external interface
MAP 39f48000 mode 2 pages 1
MAP 39f4c000 mode 2 pages 3
MAP 39f50000 mode 2 pages 4
MAP 3b360000 mode 2 pages 16
MAP 3f100000 mode 1 pages 1
000.000021 [4336] netmap_init               netmap: loaded module
kbd0 at kbdmux0
ofwbus0: <Open Firmware Device Tree>
simplebus0: <Flattened device tree simple bus> on ofwbus0
ofw_clkbus0: <OFW clocks bus> on ofwbus0
clk_fixed0: <Fixed clock> on ofw_clkbus0
clk_fixed1: <Fixed clock> on ofw_clkbus0
regfix0: <Fixed Regulator> on ofwbus0
regfix1: <Fixed Regulator> on ofwbus0
psci0: <ARM Power State Co-ordination Interface Driver> on ofwbus0
lintc0: <BCM2836 Interrupt Controller> mem 0x40000000-0x400000ff on simplebus0
intc0: <BCM2835 Interrupt Controller> mem 0x7e00b200-0x7e00b3ff irq 20 on simplebus0
gpio0: <BCM2708/2835 GPIO controller> mem 0x7e200000-0x7e2000b3 irq 23,24 on simplebus0
gpiobus0: <OFW GPIO bus> on gpio0
generic_timer0: <ARMv7 Generic Timer> irq 0,1,2,3 on ofwbus0
Timecounter "ARM MPCore Timecounter" frequency 19200000 Hz quality 1000
Event timer "ARM MPCore Eventtimer" frequency 19200000 Hz quality 1000
usb_nop_xceiv0: <USB NOP PHY> on ofwbus0
bcm_dma0: <BCM2835 DMA Controller> mem 0x7e007000-0x7e007eff irq 4,5,6,7,8,9,10,11,12,13,14,0
bcmwd0: <BCM2708/2835 Watchdog> mem 0x7e100000-0x7e100027 on simplebus0
bcmrng0: <Broadcom BCM2835 RNG> mem 0x7e104000-0x7e10400f irq 21 on simplebus0
mbox0: <BCM2835 VideoCore Mailbox> mem 0x7e00b880-0x7e00b8bf irq 22 on simplebus0
gpioc0: <GPIO controller> on gpio0
uart0: <PrimeCell UART (PL011)> mem 0x7e201000-0x7e201fff irq 25 on simplebus0
sdhost_bcm0: <Broadcom 2708 SDHOST controller> mem 0x7e202000-0x7e2020ff irq 26 on simplebus0
sdhost_bcm0-slot0: Hardware doesn't specify timeout clock frequency, setting BROKEN_TIMEOUT .
mmc0: <MMC/SD bus> on sdhost_bcm0
spi0: <BCM2708/2835 SPI controller> mem 0x7e204000-0x7e204fff irq 27 on simplebus0
spibus0: <OFW SPI bus> on spi0
spibus0: <unknown card> at cs 0 mode 0
spibus0: <unknown card> at cs 1 mode 0
uart1: <BCM2835 Mini-UART> mem 0x7e215040-0x7e21507f irq 33 on simpuart1: console (115200,n,)
iichb0: <BCM2708/2835 BSC controller> mem 0x7e804000-0x7e804fff irq 40 on simplebus0
bcm283x_dwcotg0: <DWC OTG 2.0 integrated USB controller (bcm283x)> mem 0x7e980000-0x7e98ffff0
usbus0 on bcm283x_dwcotg0
sdhci_bcm0: <Broadcom 2708 SDHCI controller> mem 0x7e300000-0x7e3000ff irq 49 on simplebus0
mmc1: <MMC/SD bus> on sdhci_bcm0
fb0: <BCM2835 VT framebuffer driver> on simplebus0
fbd0 on fb0
VT: Replacing driver "efifb" with new "fb".
fb0: 1680x1050(1680x1050@0,0) 24bpp
fb0: fbswap: 1, pitch 5040, base 0x3e6e7000, screen_size 5322240
pmu0: <Performance Monitoring Unit> irq 53 on simplebus0
cpulist0: <Open Firmware CPU Group> on ofwbus0
cpu0: <Open Firmware CPU> on cpulist0
bcm2835_cpufreq0: <CPU Frequency Control> on cpu0
cpu1: <Open Firmware CPU> on cpulist0
cpu2: <Open Firmware CPU> on cpulist0
cpu3: <Open Firmware CPU> on cpulist0
gpioled0: <GPIO LEDs> on ofwbus0
gpioled0: <led0> failed to map pin
gpioled0: <led1> failed to map pin
cryptosoft0: <software crypto>
Timecounters tick every 1.000 msec
usbus0: 480Mbps High Speed USB v2.0
ugen0.1: <DWCOTG OTG Root HUB> at usbus0
uhub0: <DWCOTG OTG Root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0
mmcsd0: 16GB <SDHC SL16G 8.0 SN 682835FD MFG 04/2016 by 3 SD> at mmc0 50.0MHz/4bit/65535-blok
iicbus0: <OFW I2C bus> on iichb0
iic0: <I2C generic I/O> on iicbus0
mmc1: No compatible cards found on bus
mbox0: mbox response error
bcm2835_cpufreq0: can't get max voltage
bcm2835_cpufreq0: ARM 600MHz, Core 400MHz, SDRAM 400MHz, Turbo OFF
mbox0: mbox response error
bcm2835_cpufreq0: can't set clock rate (id=3)
mbox0: mbox response error
bcm2835_cpufreq0: can't set clock rate (id=4)
uhub0: 1 port with 1 removable, self powered
ugen0.2: <vendor 0x0424 product 0x9514> at usbus0
uhub1 on uhub0
uhub1: <vendor 0x0424 product 0x9514, class 9/0, rev 2.00/2.00, addr 2> on usbus0
uhub1: MTT enabled
uhub1: 5 ports with 4 removable, self powered
ugen0.3: <vendor 0x0424 product 0xec00> at usbus0
smsc0 on uhub1
smsc0: <vendor 0x0424 product 0xec00, rev 2.00/2.00, addr 3> on usbus0
smsc0: chip 0xec00, rev. 0002
miibus0: <MII bus> on smsc0
smscphy0: <SMC LAN8700 10/100 interface> PHY 1 on miibus0
smscphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
ue0: <USB Ethernet> on smsc0
ue0: Ethernet address: b8:27:eb:16:56:a8
ugen0.4: <ASIX Elec. Corp. AX88x72A> at usbus0
ugen0.5: <ASIX Elec. Corp. AX88x72A> at usbus0
ugen0.6: <vendor 0x1a40 USB 2.0 Hub> at usbus0
uhub2 on uhub1
uhub2: <vendor 0x1a40 USB 2.0 Hub, class 9/0, rev 2.00/1.11, addr 6> on usbus0
uhub2: 4 ports with 4 removable, self powered
ugen0.7: <vendor 0x046a product 0x0023> at usbus0
ukbd0 on uhub2
ukbd0: <vendor 0x046a product 0x0023, class 0/0, rev 2.00/2.20, addr 7> on usbus0
kbd1 at ukbd0
ugen0.8: <Primax Kensington Eagle Trackball> at usbus0
Release APs...done
CPU  0: ARM Cortex-A53 r0p4 affinity:  0
Trying to mount root from ufs:/dev/ufs/OPNsense [rw]...
Instruction Set Attributes 0 = <CRC32>
mountroot: waiting for device /dev/ufs/OPNsense...
Instruction Set Attributes 1 = <>
         Processor Features 0 = <AdvSIMD,Float,EL3 32,EL2 32,EL1 32,EL0 32>
         Processor Features 1 = <0>
      Memory Model Features 0 = <4k Granule,64k Granule,S/NS Mem,MixedEndian,16bit ASID,1TB >
      Memory Model Features 1 = <>
      Memory Model Features 2 = <32b CCIDX,48b VA>
             Debug Features 0 = <2 CTX Breakpoints,4 Watchpoints,6 Breakpoints,PMUv3,Debug v>
             Debug Features 1 = <0>
         Auxiliary Features 0 = <0>
         Auxiliary Features 1 = <0>
CPU  1: ARM Cortex-A53 r0p4 affinity:  1
CPU  2: ARM Cortex-A53 r0p4 affinity:  2
CPU  3: ARM Cortex-A53 r0p4 affinity:  3
Mounting from ufs:/dev/ufs/OPNsense failed with error 19.

Loader variables:
  vfs.root.mountfrom=ufs:/dev/ufs/OPNsense
  vfs.root.mountfrom.options=rw

Manual root filesystem specification:
  <fstype>:<device> [options]
      Mount <device> using filesystem <fstype>
      and with the specified (optional) option list.

    eg. ufs:/dev/da0s1a
        zfs:zroot/ROOT/default
        cd9660:/dev/cd0 ro
          (which is equivalent to: mount -t cd9660 -o ro /dev/cd0 /)

  ?               List valid disk boot devices
  .               Yield 1 second (for background tasks)
  <empty line>    Abort manual input

mountroot>


I'm not that BSD skilled person, I'm afraid. But it is strange,  you're almost there with final RW mount.
Whats the error=19 means ? filesystem damage ?
Your boot log seems alright . What if you diff compare it with the previous one ?

T.

@testo_cz I have tested that the image is working under both qemu and esxi. Therefore, the code is running on aarch64 properly, while works need to be done with the firmware and boot-related configs.

Quote from: testo_cz on February 17, 2021, 10:50:57 AM
Quote from: yrzr on February 09, 2021, 11:04:24 AM
I have recently built a version 21.1 test image for rpi3 (may also work on rpi4).

Feel free to try it, and don't forget to modify config.txt before the first run ;).

Hi

Thanks for sharing.

I got lost in this thread about How to build RPi3 image. There's too many forks of codes. Which git/source or git/crochet you actually used to build your image pls ?

I'd like to reuse my RPi3, simply.


Update: my RPi 3b+ does not boot with your test-image and using config_rpi3.txt.
Gets stucked after:
CPU  3: ARM Cortex-A53 r0p4 affinity:  3

BTW: the screenshot shows Cortex-A72 , does that mean you successfully run in on RPi 4 too ?

BTW2: It seem there might be a progress soon:
https://github.com/opnsense/tools/pull/203

Thanks
T.

@chemlud Thanks for your great news.

I have figured out that the problem of boot failure after the second boot issue is caused by the `hw.uart.console` configuration in /boot/loader.conf. As it is auto-generated by opnsense, modification on /boot/loader.conf will be flushed. You can add `hw.uart.console=""` in /boot/loader.conf.local as a temporarily solution.

Quote from: chemlud on February 18, 2021, 04:08:28 PM
Quote from: yrzr on February 09, 2021, 11:04:24 AM
I have recently built a version 21.1 test image for rpi3 (may also work on rpi4).

Feel free to try it, and don't forget to modify config.txt before the first run ;).

Edited config.txt and opnsense up and running, but no Interfaces detected, not the built-in RJ45, not the wifi, not the USB2-RJ45. All hardware OK, as everything works as expected with opensuse Leap on the raspi 3b (not 3b+). I tried with raspi 3 config.txt, with 64bit version etc. and added uart=1 to have serial consol over GPIO.

Did anybody get this running?

PS: some info

dmesg
---<<BOOT>>---
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 2013-2019 The HardenedBSD Project.
Copyright (c) 1992-2019 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 12.1-RELEASE-p13-HBSD #0  5a4151730(stable/21.1)-dirty: Fri Jan  8 01:33:30 UTC 2021
    root@generic:/usr/obj/usr/src/arm64.aarch64/sys/SMP-ARM arm64
FreeBSD clang version 8.0.1 (tags/RELEASE_801/final 366581) (based on LLVM 8.0.1)
VT(efifb): resolution 656x416
HardenedBSD: initialize and check features (__HardenedBSD_version 1200059 __FreeBSD_version 1201000).
Starting CPU 1 (1)
Starting CPU 2 (2)
Starting CPU 3 (3)
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
random: unblocking device.
random: entropy device external interface
MAP 39f47000 mode 2 pages 1
MAP 39f4b000 mode 2 pages 3
MAP 39f4f000 mode 2 pages 4
MAP 3b360000 mode 2 pages 16
MAP 3f100000 mode 1 pages 1
000.000021 [4336] netmap_init               netmap: loaded module
kbd0 at kbdmux0
ofwbus0: <Open Firmware Device Tree>
simplebus0: <Flattened device tree simple bus> on ofwbus0
ofw_clkbus0: <OFW clocks bus> on ofwbus0
clk_fixed0: <Fixed clock> on ofw_clkbus0
clk_fixed1: <Fixed clock> on ofw_clkbus0
regfix0: <Fixed Regulator> on ofwbus0
regfix1: <Fixed Regulator> on ofwbus0
simple_mfd0: <Simple MFD (Multi-Functions Device)> on simplebus0
ofw_clkbus1: <OFW clocks bus> on simple_mfd0
psci0: <ARM Power State Co-ordination Interface Driver> on ofwbus0
lintc0: <BCM2836 Interrupt Controller> mem 0x40000000-0x400000ff on simplebus0
intc0: <BCM2835 Interrupt Controller> mem 0x7e00b200-0x7e00b3ff irq 39 on simplebus0
gpio0: <BCM2708/2835 GPIO controller> mem 0x7e200000-0x7e2000b3 irq 7,8 on simplebus0
gpiobus0: <OFW GPIO bus> on gpio0
generic_timer0: <ARMv7 Generic Timer> irq 1,2,3,4 on ofwbus0
Timecounter "ARM MPCore Timecounter" frequency 19200000 Hz quality 1000
Event timer "ARM MPCore Eventtimer" frequency 19200000 Hz quality 1000
usb_nop_xceiv0: <USB NOP PHY> on ofwbus0
mbox0: <BCM2835 VideoCore Mailbox> mem 0x7e00b880-0x7e00b8bf irq 6 on simplebus0
gpioc0: <GPIO controller> on gpio0
uart0: <PrimeCell UART (PL011)> mem 0x7e201000-0x7e2011ff irq 9 on simplebus0
uart0: console (115200,n,8,1)
spi0: <BCM2708/2835 SPI controller> mem 0x7e204000-0x7e2041ff irq 11 on simplebus0
spibus0: <OFW SPI bus> on spi0
spibus0: <unknown card> at cs 0 mode 0
spibus0: <unknown card> at cs 1 mode 0
iichb0: <BCM2708/2835 BSC controller> mem 0x7e804000-0x7e804fff irq 19 on simplebus0
bcm283x_dwcotg0: <DWC OTG 2.0 integrated USB controller (bcm283x)> mem 0x7e980000-0x7e98ffff,0x7e006000-0x7e006fff irq 21,20
usbus0 on bcm283x_dwcotg0
bcm_dma0: <BCM2835 DMA Controller> mem 0x7e007000-0x7e007eff irq 23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38 on simpleb0
bcmwd0: <BCM2708/2835 Watchdog> mem 0x7e100000-0x7e100113,0x7e00a000-0x7e00a023 on simplebus0
bcmrng0: <Broadcom BCM2835 RNG> mem 0x7e104000-0x7e10400f irq 40 on simplebus0
sdhci_bcm0: <Broadcom 2708 SDHCI controller> mem 0x7e300000-0x7e3000ff irq 48 on simplebus0
mmc0: <MMC/SD bus> on sdhci_bcm0
fb0: <BCM2835 VT framebuffer driver> on simplebus0
fbd0 on fb0
VT: Replacing driver "efifb" with new "fb".
fb0: 656x416(656x416@0,0) 24bpp
fb0: fbswap: 1, pitch 1968, base 0x3eb33000, screen_size 818688
pmu0: <Performance Monitoring Unit> irq 0 on ofwbus0
cpulist0: <Open Firmware CPU Group> on ofwbus0
cpu0: <Open Firmware CPU> on cpulist0
bcm2835_cpufreq0: <CPU Frequency Control> on cpu0
cpu1: <Open Firmware CPU> on cpulist0
cpu2: <Open Firmware CPU> on cpulist0
cpu3: <Open Firmware CPU> on cpulist0
gpioled0: <GPIO LEDs> on ofwbus0
gpioled0: <led0> failed to map pin
gpioled0: <led1> failed to map pin
cryptosoft0: <software crypto>
Timecounters tick every 1.000 msec
usbus0: 480Mbps High Speed USB v2.0
iicbus0: <OFW I2C bus> on iichb0
iic0: <I2C generic I/O> on iicbus0
ugen0.1: <DWCOTG OTG Root HUB> at usbus0
uhub0: <DWCOTG OTG Root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0
mmcsd0: 16GB <SDHC SL16G 8.0 SN 682835FD MFG 04/2016 by 3 SD> at mmc0 50.0MHz/4bit/65535-block
bcm2835_cpufreq0: ARM 600MHz, Core 250MHz, SDRAM 400MHz, Turbo OFF
uhub0: 1 port with 1 removable, self powered
Release APs...done
CPU  0: ARM Cortex-A53 r0p4 affinity:  0
Trying to mount root from ufs:/dev/ufs/OPNsense [rw]...
Instruction Set Attributes 0 = <CRC32>
Instruction Set Attributes 1 = <>
         Processor Features 0 = <AdvSIMD,Float,EL3 32,EL2 32,EL1 32,EL0 32>
         Processor Features 1 = <0>
      Memory Model Features 0 = <4k Granule,64k Granule,S/NS Mem,MixedEndian,16bit ASID,1TB PA>
      Memory Model Features 1 = <>
      Memory Model Features 2 = <32b CCIDX,48b VA>
             Debug Features 0 = <2 CTX Breakpoints,4 Watchpoints,6 Breakpoints,PMUv3,Debug v8>
             Debug Features 1 = <0>
         Auxiliary Features 0 = <0>
         Auxiliary Features 1 = <0>
CPU  1: ARM Cortex-A53 r0p4 affinity:  1
CPU  2: ARM Cortex-A53 r0p4 affinity:  2
CPU  3: ARM Cortex-A53 r0p4 affinity:  3
Warning: no time-of-day clock registered, system time will not be set accurately
lo0: link state changed to UP
pflog0: promiscuous mode enabled
pflog0: promiscuous mode disabled
pflog0: promiscuous mode enabled
pflog0: promiscuous mode disabled
pflog0: promiscuous mode enabled


and

usbconfig
ugen0.1: <DWCOTG OTG Root HUB> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)


Fun fact: If you choose "reboot" the install never comes back (tried about 20 times), but stops before booting

*** OPNsense.localdomain: OPNsense 21.1_25 (aarch64/OpenSSL) ***

        No network interfaces are assigned.

  0) Logout                              7) Ping host
  1) Assign interfaces                   8) Shell
  2) Set interface IP address            9) pfTop
  3) Reset the root password            10) Firewall log
  4) Reset to factory defaults          11) Reload all services
  5) Power off system                   12) Update from console
  6) Reboot system                      13) Restore a backup

Enter an option: 6

The system will reboot. Do you want to proceed? [y/N]: y

>>> Invoking stop script 'beep'
>>> Invoking stop script 'freebsd'
>>> Invoking stop script 'backup'
>>> Invoking backup script 'captiveportal'
>>> Invoking backup script 'dhcpleases'
>>> Invoking backup script 'duid'
>>> Invoking backup script 'netflow'
>>> Invoking backup script 'rrd'
>>> Invoking stop script 'config'
shutdown: [pid 9305]
Shutdown NOW!
Consoles: EFI console 
    Reading loader env vars from /efi/freebsd/loader.env
Setting currdev to disk0p1:
FreeBSD/arm64 EFI loader, Revision 1.1
(Thu Jan  7 07:14:48 UTC 2021 root@releng1.nyi.freebsd.org)

   Command line arguments: loader.efi
   Image base: 0x39e16000
   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)/SD(2)/SD(0)/HD(1,0x01,0,0x800,0x10000)
Trying ESP: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/SD(2)/SD(0)/HD(1,0x01,0,0x800,0x10000)
Setting currdev to disk0p1:
Trying: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/SD(2)/SD(0)/HD(2,0x01,0,0x10800,0x3ef800)
Setting currdev to disk0p2:
Loading /boot/defaults/loader.conf
Loading /boot/device.hints
Loading /boot/loader.conf
Loading /boot/loader.conf.local
[H[J[4;46H uKOS2qsmkfe38kEuXLimP+7XoBiuIt5k[5;46H BMHardenedBSDxfOL9QwvfA6yxGHkNMG[6;46H 2I7ADmw7Mp/P8Y4wjnBFDNKvNzdZa/uu[5
[25;0H[23;4HAutoboot in 2 seconds, hit [Enter] to boot or any other key to stop     
[25;0H[23;4HAutoboot in 1 seconds, hit [Enter] to boot or any other key to stop     
[25;0H[23;4HAutoboot in 0 seconds, hit [Enter] to boot or any other key to stop     
[25;0HLoading kernel...
/boot/kernel/kernel text=0x9857d0 data=0x19b1f0+0x7a3084 syms=[0x8+0x142260+0x8+0x12dbac]
Loading configured modules...
/boot/kernel/pflog.ko text=0xfb0 text=0x830 data=0x10148 syms=[0x8+0x9f0+0x8+0x716]
loading required module 'pf'
/boot/kernel/pf.ko text=0x6061 text=0x2cb90 data=0x10490+0xfd38 syms=[0x8+0x4170+0x8+0x308c]
/boot/kernel/if_enc.ko text=0x1602 text=0x8d0 data=0x10168 syms=[0x8+0xc90+0x8+0xb66]
/boot/kernel/pfsync.ko text=0x2e14 text=0x6ad0 data=0x102e8+0xfd20 syms=[0x8+0x1758+0x8+0x10f0]
/boot/kernel/carp.ko text=0x34c0 text=0x63d0 data=0x10258+0xfdf0 syms=[0x8+0x1980+0x8+0x121f]
/boot/kernel/if_bridge.ko text=0x351e text=0x69a0 data=0x10428+0xfbe0 syms=[0x8+0x1a40+0x8+0x14a3]
loading required module 'bridgestp'
/boot/kernel/bridgestp.ko text=0xe44 text=0x402c data=0x170 data=0x158+0x28 syms=[0x8+0xb10+0x8+0x690]
/boot/kernel/if_tap.ko text=0x2613 text=0x2b90 data=0x10160+0xff18 syms=[0x8+0x1260+0x8+0xbc4]
/boot/kernel/if_lagg.ko text=0x35c0 text=0x7c30 data=0x10440+0xfbc8 syms=[0x8+0x1a70+0x8+0x1325]
/boot/kernel/if_gre.ko text=0x2458 text=0x4640 data=0x10228+0xfe18 syms=[0x8+0x1668+0x8+0xf17]
/boot/entropy size=0x1000
Using DTB provided by EFI at 0x7ef5000.
EFI framebuffer information:
addr, size     0x3eaf0000, 0x10a800
dimensions     656 x 416
stride         656
masks          0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000


@yrzr

Thanks,
this new image https://forum.opnsense.org/index.php?topic=12186.msg100319#msg100319
works nice over HDMI. Modified hw.uart.console="" too.

It seems the best to keep 12.1-RELEASE MSDOSBOOT files for RPI3 with the current OPNsense kernel.

I didn't manage to run your image with serial console, but nevermind, I rather build arm image by myself (from your tools fork up to commit d15d63475220a7d9f16762b80720744394fe9685) , Thanks,  getting version 21.1.2_8 now.
Note w.r.t. serial console: 
When I took nekoprog's arm_hook (config/21.1/extras.conf)  and applied to your fork , I got nice serial console. Both things a) load.conf variables and b) opnsense default xml config matters.

Some minor steps optionally done after the first boot - to have a nicely polished image:

kldxref -R /boot

cat >>/boot/loader.conf.local <<EOF
hw.uart.console=""
bcm283x_clkman_load="YES"
EOF

echo 'powerd_enable="YES"' >/etc/rc.conf.d/powerd



T.

hi guys! will give it a try :-D

would be cool if you could post SHA512 for the images here... ;-)
kind regards
chemlud
____
"The price of reliability is the pursuit of the utmost simplicity."
C.A.R. Hoare

felix eichhorns premium katzenfutter mit der extraportion energie

A router is not a switch - A router is not a switch - A router is not a switch - A rou....

First boot was OK with HDMI, had interfaces this time. Configured serial console in GUI, but on reboot it never finishes

U-Boot 2020.10 (Feb 02 2021 - 23:40:41 +0000)

DRAM:  948 MiB
RPI 3 Model B (0xa02082)
MMC:   mmc@7e300000: 1
Loading Environment from FAT... *** Warning - bad CRC, using default environment

In:    serial
Out:   vidconsole
Err:   vidconsole
Net:   No ethernet found.
starting USB...
Bus usb@7e980000: USB DWC2
scanning bus usb@7e980000 for devices... 5 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot:  0
MMC Device 0 not found
no mmc device at slot 0
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
Found EFI removable media binary efi/boot/bootaa64.efi
-       _    _               _                     _ ____   _____ _____ 
       | |  | |             | |                   | |  _ \ / ____|  __ \
       | |__| | __ _ _ __ __| | ___ _ __   ___  __| | |_) | (___ | |  | |
       |  __  |/ _` | '__/ _` |/ _ \ '_ \ / _ \/ _` |  _ < \___ \| |  | |uIt5k
       | |  | | (_| | | | (_| |  __/ | | |  __/ (_| | |_) |____) | |__| |HkNMG
       |_|  |_|\__,_|_|  \__,_|\___|_| |_|\___|\__,_|____/|_____/|_____/ Za/uu
                                              7jx0/j28DcHs1oTUiFxDezXj0+bYBAjk
                                              M/WeI4vOFPUZQcUiqAhCItlLY/1/YsdU
????????????????????????????????????????????????????????????????????????      ??  bYCu3JOWsOA/Ctw0oVmHA+jY6Z8RJnsT                            ??
??                                         ??  NTm3YVdJVYQ+O2ltoSwHardenedBSDVD
??  1. Boot Multi user [Enter]             ??  vji9p89gQvsPgS9hh9ekUCw/0TnSeQ1W
??  2. Boot Single user                    ??  NHcmBLfiNO7mU9D4rCxiSQfifcIZzC78
??  3. Escape to loader prompt             ??  uwaNYp+XGq+qEt7pQ+aX2nsJ2juBCGai
??  4. Reboot                              ??  fTclPrFDFBNSqyrmOEI3Lrkn3eudPbJU
??                                         ??  NlHardenedBSDvCOXT59dcSRw9mB3bOl
??  Options:                               ??  gEcyCwdlh1xWKOu9qGWcmsAhOVReHec4\
??  5. Kernel: default/kernel (1 of 1)     ??
??  6. Boot Options                        ??
??                                         ??
??                                         ??
??                                         ??
????????????????????????????????????????????????????????????????????????      ??                                                              ??
   Autoboot in 0 seconds, hit [Enter] to boot or any other key to stop     

Loading kernel...
/boot/kernel/kernel text=0x97f010 data=0x19b1f0+0x7a3084 syms=[0x8+0x141c30+0x8+0x12dbaa]
Loading configured modules...
/boot/kernel/pflog.ko text=0xfb0 text=0x830 data=0x10148 syms=[0x8+0x9f0+0x8+0x716]
/boot/kernel/pfsync.ko text=0x2e14 text=0x6ad0 data=0x102e8+0xfd20 syms=[0x8+0x1758+0x8+0x10f0]
/boot/kernel/carp.ko text=0x34c0 text=0x63d0 data=0x10258+0xfdf0 syms=[0x8+0x1980+0x8+0x121f]
/boot/kernel/bcm283x_clkman.ko text=0xcf7 text=0x680 data=0x10150+0xfeb8 syms=[0x8+0x6d8+0x8+0x4f2]
/boot/kernel/pf.ko text=0x6061 text=0x2cb90 data=0x10490+0xfd38 syms=[0x8+0x4170+0x8+0x308c]
/boot/kernel/if_tap.ko text=0x2613 text=0x2b90 data=0x10160+0xff18 syms=[0x8+0x1260+0x8+0xbc4]
/boot/kernel/if_lagg.ko text=0x35c0 text=0x7c30 data=0x10440+0xfbc8 syms=[0x8+0x1a70+0x8+0x1325]
/boot/kernel/if_gre.ko text=0x2458 text=0x4640 data=0x10228+0xfe18 syms=[0x8+0x1668+0x8+0xf17]
/boot/kernel/if_bridge.ko text=0x351e text=0x69a0 data=0x10428+0xfbe0 syms=[0x8+0x1a40+0x8+0x14a3]
/boot/kernel/if_enc.ko text=0x1602 text=0x8d0 data=0x10168 syms=[0x8+0xc90+0x8+0xb66]
/boot/entropy size=0x1000
Using DTB provided by EFI at 0x7ef6000.
EFI framebuffer information:
addr, size     0x3e536000, 0x6baa80
dimensions     1680 x 1050
stride         1680
masks          0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000
---<<BOOT>>---
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 2013-2019 The HardenedBSD Project.
Copyright (c) 1992-2019 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 12.1-RELEASE-p13-HBSD #0  5a4151730(stable/21.1)-dirty: Mon Feb 22 22:06:31 HKT 2021
    root@freebsd12:/usr/obj/usr/src/arm64.aarch64/sys/SMP-ARM arm64
FreeBSD clang version 8.0.1 (tags/RELEASE_801/final 366581) (based on LLVM 8.0.1)
VT(efifb): resolution 1680x1050
HardenedBSD: initialize and check features (__HardenedBSD_version 1200059 __FreeBSD_version 1201000).
KLD file if_bridge.ko is missing dependencies
Starting CPU 1 (1)
Starting CPU 2 (2)
Starting CPU 3 (3)
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
random: unblocking device.
random: entropy device external interface
MAP 39f48000 mode 2 pages 1
MAP 39f4c000 mode 2 pages 3
MAP 39f50000 mode 2 pages 4
MAP 3b360000 mode 2 pages 16
MAP 3f100000 mode 1 pages 1
000.000021 [4336] netmap_init               netmap: loaded module
kbd0 at kbdmux0
ofwbus0: <Open Firmware Device Tree>
simplebus0: <Flattened device tree simple bus> on ofwbus0
ofw_clkbus0: <OFW clocks bus> on ofwbus0
clk_fixed0: <Fixed clock> on ofw_clkbus0
clk_fixed1: <Fixed clock> on ofw_clkbus0
regfix0: <Fixed Regulator> on ofwbus0
regfix1: <Fixed Regulator> on ofwbus0
psci0: <ARM Power State Co-ordination Interface Driver> on ofwbus0
lintc0: <BCM2836 Interrupt Controller> mem 0x40000000-0x400000ff on simplebus0
intc0: <BCM2835 Interrupt Controller> mem 0x7e00b200-0x7e00b3ff irq 20 on simplebus0
gpio0: <BCM2708/2835 GPIO controller> mem 0x7e200000-0x7e2000b3 irq 23,24 on simplebus0
gpiobus0: <OFW GPIO bus> on gpio0
generic_timer0: <ARMv7 Generic Timer> irq 0,1,2,3 on ofwbus0
Timecounter "ARM MPCore Timecounter" frequency 19200000 Hz quality 1000
Event timer "ARM MPCore Eventtimer" frequency 19200000 Hz quality 1000
usb_nop_xceiv0: <USB NOP PHY> on ofwbus0
bcm_dma0: <BCM2835 DMA Controller> mem 0x7e007000-0x7e007eff irq 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,190
bcmwd0: <BCM2708/2835 Watchdog> mem 0x7e100000-0x7e100027 on simplebus0
bcm2835_clkman0: <BCM283x Clock Manager> mem 0x7e101000-0x7e102fff on simplebus0
bcmrng0: <Broadcom BCM2835 RNG> mem 0x7e104000-0x7e10400f irq 21 on simplebus0
mbox0: <BCM2835 VideoCore Mailbox> mem 0x7e00b880-0x7e00b8bf irq 22 on simplebus0
gpioc0: <GPIO controller> on gpio0
uart0: <PrimeCell UART (PL011)> mem 0x7e201000-0x7e201fff irq 25 on simplebus0
spi0: <BCM2708/2835 SPI controller> mem 0x7e204000-0x7e204fff irq 27 on simplebus0
spibus0: <OFW SPI bus> on spi0
spibus0: <unknown card> at cs 0 mode 0
spibus0: <unknown card> at cs 1 mode 0
uart1: <BCM2835 Mini-UART> mem 0x7e215040-0x7e21507f irq 33 on simpuart1: console (115200,n,8,1)
iichb0: <BCM2708/2835 BSC controller> mem 0x7e804000-0x7e804fff irq 40 on simplebus0
bcm283x_dwcotg0: <DWC OTG 2.0 integrated USB controller (bcm283x)> mem 0x7e980000-0x7e98ffff,0x7e006000-0x0
usbus0 on bcm283x_dwcotg0
sdhci_bcm0: <Broadcom 2708 SDHCI controller> mem 0x7e300000-0x7e3000ff irq 49 on simplebus0
mmc0: <MMC/SD bus> on sdhci_bcm0
fb0: <BCM2835 VT framebuffer driver> on simplebus0
fbd0 on fb0
VT: Replacing driver "efifb" with new "fb".
fb0: 1680x1050(1680x1050@0,0) 24bpp
fb0: fbswap: 1, pitch 5040, base 0x3e6e7000, screen_size 5322240
pmu0: <Performance Monitoring Unit> irq 53 on simplebus0
cpulist0: <Open Firmware CPU Group> on ofwbus0
cpu0: <Open Firmware CPU> on cpulist0
bcm2835_cpufreq0: <CPU Frequency Control> on cpu0
cpu1: <Open Firmware CPU> on cpulist0
cpu2: <Open Firmware CPU> on cpulist0
cpu3: <Open Firmware CPU> on cpulist0
gpioled0: <GPIO LEDs> on ofwbus0
gpioled0: <led0> failed to map pin
gpioled0: <led1> failed to map pin
ZX??????7??T??????V5Z????PY??????TX????7??)y??I????????RR??Q????K??-????)yI????????X??@RR\??????I????x????????R??Y????????


This is the output from serial console. On monitor I saw some messages on ue1 and ue2 going down and up, the boot hang and then the monitor went into power saving. No DHCP on the configured LAN.

So rebooting is still an issue here...
kind regards
chemlud
____
"The price of reliability is the pursuit of the utmost simplicity."
C.A.R. Hoare

felix eichhorns premium katzenfutter mit der extraportion energie

A router is not a switch - A router is not a switch - A router is not a switch - A rou....

Still no serial console, tried various config from GUI, serial first etc...

btw, no nano in packages? vi is still a pain :-D
kind regards
chemlud
____
"The price of reliability is the pursuit of the utmost simplicity."
C.A.R. Hoare

felix eichhorns premium katzenfutter mit der extraportion energie

A router is not a switch - A router is not a switch - A router is not a switch - A rou....

Hmm, still no driver for the wifi module of the raspi 3b in BSD? Strange...
kind regards
chemlud
____
"The price of reliability is the pursuit of the utmost simplicity."
C.A.R. Hoare

felix eichhorns premium katzenfutter mit der extraportion energie

A router is not a switch - A router is not a switch - A router is not a switch - A rou....

Quote from: chemlud on March 07, 2021, 05:52:39 PM
Still no serial console, tried various config from GUI, serial first etc...

btw, no nano in packages? vi is still a pain :-D

Had to admit , I didnt have enough patience and skills to setup YRZR's image to work with serial console.  Mostly because I built my own from his fork (little extended by Nekoprog's).

If you feel like doing it , have a look on Nekoprog's arm_hook() function here https://github.com/nekoprog/tools/blob/master/config/20.7/extras.conf
This particular piece helped me with my build.

T.

Quote from: chemlud on March 07, 2021, 08:24:36 PM
Hmm, still no driver for the wifi module of the raspi 3b in BSD? Strange...

I web-searched for the RPI3 Wifi recently. It seems to me that the problem is in HW implementation, as its Broadcom Wifi chip is normally supported, but not behind SDIO pins. https://wiki.freebsd.org/SDIO work in progress, they say.

T.

March 08, 2021, 01:30:27 PM #237 Last Edit: March 09, 2021, 10:32:25 PM by TheSilentKid
I am trying to cross compile on freebsd 14.0 using tools from nekoprog to compile it for rpi4, but I am getting errors related to duplicate symbol.

Using Freebsd 14 becoz freebsd > 12 are running in rpi4.

Any solutions or should I compile it in rpi ?

I had the sense now running on my raspi 3B for about one week, then the SD-card slot broke, lots of

vm_fault pager read error, pid 1

in the console.

Tried new SD-card, new power supply, but finally ended with enabeling boot from USB... Now it's stable for some hours. Could not get it to work from a brand new Sandisk Cruzer USB3-stick (never ending stream of "CAM status: CDB request completed with error"),

https://forums.freebsd.org/threads/usb-disks-unusable-ccb-request-completed-with-an-error.60419/

only older USB2 Sandisk Cruzer works. And sometimes some random USB-port won't boot. Have to change to other USB-port. Never had such a pain with any raspberry pi and I have a lot of them (but no other 3B). Pain!
kind regards
chemlud
____
"The price of reliability is the pursuit of the utmost simplicity."
C.A.R. Hoare

felix eichhorns premium katzenfutter mit der extraportion energie

A router is not a switch - A router is not a switch - A router is not a switch - A rou....

The raspi 2B v1.2 has the same 64bit CPU as the 3B and 3B+

https://en.wikipedia.org/wiki/Raspberry_pi

but I could not get the image working on this machine. Any ideas what is needed? .dtb?
kind regards
chemlud
____
"The price of reliability is the pursuit of the utmost simplicity."
C.A.R. Hoare

felix eichhorns premium katzenfutter mit der extraportion energie

A router is not a switch - A router is not a switch - A router is not a switch - A rou....