OPNsense Forum

English Forums => Development and Code Review => Topic started by: gondox on June 08, 2022, 10:07:23 am

Title: How to build 22.7 with opnsense tools?
Post by: gondox on June 08, 2022, 10:07:23 am
Hi,

I found out that freebsd 13.0 works well with a raspberry pi 4 but has problems to boot on a raspberry pi 4 CM.
Freebsd 13.1 does not have that problem and boots fine.
22.7 is supposed to be based on 13.1 and I would like to compile it with opnsense tools.
What would I need to do to build a 22.7 version of OPNsense?
make arm VER="22.7" DEVICE="ARM64" ?

kind regards,
Gondox
Title: Re: How to build 22.7 with opnsense tools?
Post by: gondox on June 08, 2022, 10:09:03 am
rackg writes in his post:
"I have tried to build code base of FreeBSD 13.1 by switching the /usr/src branch to volatile/22.7."
what would I need to do to change that as well? Would that work for me?
Title: Re: How to build 22.7 with opnsense tools?
Post by: franco on June 08, 2022, 10:12:59 am
Use override SRCBRANCH=stable/22.7 with default 22.1 configuration for now.


Cheers,
Franco
Title: Re: How to build 22.7 with opnsense tools?
Post by: gondox on June 08, 2022, 11:08:27 am
thanks for the advice,

I did "make update SRCBRANCH=stable/22.7" and then "make arm DEVICE=ARM64 SRCBRANCH=stable/22.7" afterwards and it seems to be working.

The stdout of make update looks like the download is mostly the 22.1 branch and then the switch to 22.7 seems to be done without any additional downloads, is that "normal" / to be expected? I would have assumed that additional data would have to be downloaded to get the sources for 22.7?

Code: [Select]
Cloning into '/usr/core'...
remote: Enumerating objects: 166064, done.
remote: Counting objects: 100% (1079/1079), done.
remote: Compressing objects: 100% (485/485), done.
remote: Total 166064 (delta 655), reused 882 (delta 551), pack-reused 164985
Receiving objects: 100% (166064/166064), 75.62 MiB | 15.35 MiB/s, done.
Resolving deltas: 100% (119315/119315), done.
>>> Fetching /usr/core:
>>> Updating branch stable/22.1 of /usr/core:
branch 'stable/22.1' set up to track 'origin/stable/22.1'.
Switched to a new branch 'stable/22.1'
Already up to date.
>>> Cloning /usr/plugins:
Cloning into '/usr/plugins'...
remote: Enumerating objects: 56561, done.
remote: Counting objects: 100% (538/538), done.
remote: Compressing objects: 100% (327/327), done.
remote: Total 56561 (delta 156), reused 421 (delta 124), pack-reused 56023
Receiving objects: 100% (56561/56561), 10.66 MiB | 25.92 MiB/s, done.
Resolving deltas: 100% (22487/22487), done.
>>> Fetching /usr/plugins:
>>> Updating branch stable/22.1 of /usr/plugins:
branch 'stable/22.1' set up to track 'origin/stable/22.1'.
Switched to a new branch 'stable/22.1'
Already up to date.
>>> Cloning /usr/ports:
Cloning into '/usr/ports'...
remote: Enumerating objects: 1536325, done.
remote: Counting objects: 100% (22675/22675), done.
remote: Compressing objects: 100% (17762/17762), done.
remote: Total 1536325 (delta 4882), reused 20691 (delta 4729), pack-reused 1513650
Receiving objects: 100% (1536325/1536325), 493.12 MiB | 24.51 MiB/s, done.
Resolving deltas: 100% (721154/721154), done.
Updating files: 100% (146561/146561), done.
>>> Fetching /usr/ports:
>>> Updating branch master of /usr/ports:
Already on 'master'
Your branch is up to date with 'origin/master'.
Already up to date.
>>> Resetting /usr/src... done
>>> Cloning /usr/src:
Cloning into '/usr/src'...
remote: Enumerating objects: 2949346, done.
remote: Counting objects: 100% (345/345), done.
remote: Compressing objects: 100% (204/204), done.
remote: Total 2949346 (delta 196), reused 215 (delta 141), pack-reused 2949001
Receiving objects: 100% (2949346/2949346), 1.35 GiB | 16.10 MiB/s, done.
Resolving deltas: 100% (2258810/2258810), done.
Updating files: 100% (87406/87406), done.
>>> Fetching /usr/src:
>>> Updating branch stable/22.7 of /usr/src:
branch 'stable/22.7' set up to track 'origin/stable/22.7'.
Switched to a new branch 'stable/22.7'
Already up to date.
>>> Fetching /usr/tools:
>>> Updating branch master of /usr/tools:
Already on 'master'
Your branch is up to date with 'origin/master'.
Already up to date.
root@freebsd:/usr/tools # screen
Title: Re: How to build 22.7 with opnsense tools?
Post by: franco on June 08, 2022, 11:19:53 am
That's fine, git clones and fetches all branches and checkout is local.


Cheers,
Franco
Title: Re: How to build 22.7 with opnsense tools?
Post by: gondox on June 08, 2022, 11:26:19 pm
It worked, I could build a 13.1-RELEASE stable/22.7-n250199-ae7318c31b7 Image, but I get the same error as before:

Has someone seen an error like this before?

This happens when I use ACPI:
Code: [Select]
---<<BOOT>>---
KDB: debugger backends: ddb
KDB: current backend: ddb
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 stable/22.7-n250199-ae7318c31b7 SMP arm64
FreeBSD clang version 13.0.0 (git@github.com:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a303)
VT: init without driver.
module firmware already present!
real memory  = 2062684160 (1967 MB)
avail memory = 1983131648 (1891 MB)
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 1d0000 mode 2 pages 32
MAP 33960000 mode 2 pages 96
MAP 33a20000 mode 2 pages 256
MAP 37000000 mode 2 pages 400
MAP 37190000 mode 2 pages 592
kbd0 at kbdmux0
acpi0: <RPIFDN RPI4>
acpi0: Power Button (fixed)
acpi0: Could not update all GPEs: AE_NOT_CONFIGURED
psci0: <ARM Power State Co-ordination Interface Driver> on acpi0
gic0: <ARM Generic Interrupt Controller> iomem 0xff841000-0xff841fff,0xff842000-0xff842fff on acpi0
gic0: pn 0x2, arch 0x2, rev 0x1, implementer 0x43b irqs 256
generic_timer0: <ARM Generic Timer> irq 20,21,22 on acpi0
Timecounter "ARM MPCore Timecounter" frequency 54000000 Hz quality 1000
Event timer "ARM MPCore Eventtimer" frequency 54000000 Hz quality 1000
efirtc0: <EFI Realtime Clock>
efirtc0: registered as a time-of-day clock, resolution 1.000000s
cpu0: <ACPI CPU> on acpi0
acpi_syscontainer0: <System Container> on acpi0
acpi_syscontainer1: <System Container> iomem 0xfe340000-0xfe3400ff on acpi0
pcib0: <Generic PCI host controller> on acpi0
pcib0: could not map memory.
device_attach: pcib0 attach returned 6
dwcotg0: <DWC OTG 2.0 integrated USB controller> iomem 0xfe980000-0xfe98ffff irq 0 on acpi0
usbus0 on dwcotg0
uart0: <PrimeCell UART (PL011)> iomem 0xfe201000-0xfe201fff irq 14 on acpi0
uart0: console (115200,n,8,1)
acpi_tz0: <Thermal Zone> on acpi0
armv8crypto0: CPU lacks AES instructions
Timecounters tick every 1.000 msec
usbus0: 480Mbps High Speed USB v2.0
CPU  0: ARM Cortex-A72 r0p3 affinity:  0
                   Cache Type = <64 byte D-cacheline,64 byte I-cacheline,PIPT ICache,64 byte ERG,64 byte CWG>
 Instruction Set Attributes 0 = <CRC32>
 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,SEVL>
AArch32 Media and VFP Features 0 = <FPRound,FPSqrt,FPDivide,DP VFPv3+v4,SP VFPv3+v4,AdvSIMD>
AArch32 Media and VFP Features 1 = <SIMDFMAC,FPHP DP Conv,SIMDHP SP Conv,SIMDSP,SIMDInt,SIMDLS,FPDNaN,FPFtZ>
CPU  1: ARM Cortex-A72 r0p3 affinity:  1
CPU  2: ARM Cortex-A72 r0p3 affinity:  2
CPU  3: ARM Cortex-A72 r0p3 affinity:  3
Release APs...done
Trying to mount root from ufs:/dev/ufs/OPNsense [rw]...
ugen0.1: <DWCOTG OTG Root HUB> at usbus0
uhub0 on usbus0
uhub0: <DWCOTG OTG Root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0
uhub0: 1 port with 1 removable, self powered
Root mount waiting for: CAM
Root mount waiting for: CAM
Root mount waiting for: CAM
Root mount waiting for: CAM
Root mount waiting for: CAM
Root mount waiting for: CAM
Root mount waiting for: CAM
Root mount waiting for: CAM
Root mount waiting for: CAM
mountroot: waiting for device /dev/ufs/OPNsense...
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>

And this happens when I use ACPI+DeviceTree:
Code: [Select]
Hit [Enter] to boot immediately, or any other key for command prompt.
Booting [/boot/kernel/kernel]...
Using DTB provided by EFI at 0x35b44000.
EFI framebuffer information:
addr, size     0x0, 0x0
dimensions     0 x 0
stride         0
masks          0x00000000, 0x00000000, 0x00000000, 0x00000000
---<<BOOT>>---
KDB: debugger backends: ddb
KDB: current backend: ddb
WARNING: Cannot find freebsd,dts-version property, cannot check DTB compliance
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 stable/22.7-n250199-ae7318c31b7 SMP arm64
FreeBSD clang version 13.0.0 (git@github.com:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a303)
VT: init without driver.
module firmware already present!
real memory  = 2062684160 (1967 MB)
avail memory = 1983057920 (1891 MB)
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 1d0000 mode 2 pages 32
MAP 33960000 mode 2 pages 96
MAP 33a20000 mode 2 pages 256
MAP 37000000 mode 2 pages 400
MAP 37190000 mode 2 pages 592
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
clk_fixed2: <Fixed clock> on ofwbus0
clk_fixed3: <Fixed clock> on ofwbus0
simplebus1: <Flattened device tree simple bus> on ofwbus0
simplebus2: <Flattened device tree simple bus> on ofwbus0
regfix0: <Fixed Regulator> on ofwbus0
regfix1: <Fixed Regulator> on ofwbus0
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
regfix2: <Fixed Regulator> on ofwbus0
regfix3: <Fixed Regulator> on ofwbus0
regfix4: <Fixed Regulator> on ofwbus0
simplebus3: <Flattened device tree simple bus> on ofwbus0
simple_mfd0: <Simple MFD (Multi-Functions Device)> mem 0x7d5d2000-0x7d5d2eff on simplebus0
bcm2835_firmware0: <BCM2835 Firmware> on simplebus0
ofw_clkbus1: <OFW clocks bus> on bcm2835_firmware0
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
psci0: <ARM Power State Co-ordination Interface Driver> on ofwbus0
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
gic0: <ARM Generic Interrupt Controller> mem 0x40041000-0x40041fff,0x40042000-0x40043fff,0x40044000-0x40045fff,0x40046000-0x40047fff irq 30 on simplebus0
gic0: pn 0x2, arch 0x2, rev 0x1, implementer 0x43b irqs 256
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
gpio0: <BCM2708/2835 GPIO controller> mem 0x7e200000-0x7e2000b3 irq 14,15 on simplebus0
gpiobus0: <OFW GPIO bus> on gpio0
gpio1: <Raspberry Pi Firmware GPIO controller> on bcm2835_firmware0
gpiobus1: <GPIO bus> on gpio1
regfix0: Cannot set GPIO pin: 6
REGNODE_INIT failed: 6
regfix0: Cannot register regulator.
regfix1: Cannot configure GPIO pin: 5
REGNODE_INIT failed: 6
regfix1: Cannot register regulator.
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
mbox0: <BCM2835 VideoCore Mailbox> mem 0x7e00b880-0x7e00b8bf irq 13 on simplebus0
gpioregulator0: <GPIO controlled regulator> on ofwbus0
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
generic_timer0: <ARMv8 Generic Timer> irq 4,5,6,7 on ofwbus0
Timecounter "ARM MPCore Timecounter" frequency 54000000 Hz quality 1000
Event timer "ARM MPCore Eventtimer" frequency 54000000 Hz quality 1000
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
usb_nop_xceiv0: <USB NOP PHY> on ofwbus0
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
efirtc0: <EFI Realtime Clock>
efirtc0: registered as a time-of-day clock, resolution 1.000000s
gpioc0: <GPIO controller> on gpio0
uart0: <PrimeCell UART (PL011)> mem 0x7e201000-0x7e2011ff irq 16 on simplebus0
uart0: console (115200,n,8,1)
uart1: <BCM2835 Mini-UART> mem 0x7e215040-0x7e21507f irq 21 on simplebus0
bcm283x_dwcotg0: <DWC OTG 2.0 integrated USB controller (bcm283x)> mem 0x7e980000-0x7e98ffff,0x7e00b200-0x7e00b3ff irq 28,29 on simplebus0
usbus1 on bcm283x_dwcotg0
bcm_dma0: <BCM2835 DMA Controller> mem 0x7e007000-0x7e007aff irq 31,32,33,34,35,36,37,38,39,40,41 on simplebus0
bcmwd0: <BCM2708/2835 Watchdog> mem 0x7e100000-0x7e100113,0x7e00a000-0x7e00a023,0x7ec11000-0x7ec1101f on simplebus0
bcmrng0: <Broadcom BCM2835/BCM2838 RNG> mem 0x7e104000-0x7e104027 on simplebus0
gpioc1: <GPIO controller> on gpio1
sdhci_bcm0: <Broadcom 2708 SDHCI controller> mem 0x7e300000-0x7e3000ff irq 74 on simplebus0
mmc0: <MMC/SD bus> on sdhci_bcm0
fb0: <BCM2835 VT framebuffer driver> disabled on simplebus0
fb0: changing fb bpp from 0 to 24
mbox0: mbox response error
fb0: bcm2835_mbox_fb_init failed, err=5
device_attach: fb0 attach returned 6
sdhci_bcm1: <Broadcom 2708 SDHCI controller> mem 0x7e340000-0x7e3400ff irq 79 on simplebus1
mmc1: <MMC/SD bus> on sdhci_bcm1
pmu0: <Performance Monitoring Unit> irq 0,1,2,3 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
pcib0: <BCM2838-compatible PCI-express controller> mem 0x7d500000-0x7d50930f irq 80,81 on simplebus2
pcib0: hardware identifies as revision 0x304.
pci1: <PCI bus> on pcib0
pcib1: <PCI-PCI bridge> irq 91 at device 0.0 on pci1
pci2: <PCI bus> on pcib1
re0: <RealTek 8168/8111 B/C/CP/D/DP/E/F/G PCIe Gigabit Ethernet> at device 0.0 on pci2
re0: Using 1 MSI message
re0: Chip rev. 0x54000000
re0: MAC rev. 0x00100000
miibus0: <MII bus> on re0
rgephy0: <RTL8251/8153 1000BASE-T media interface> PHY 1 on miibus0
rgephy0:  none, 10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, 100baseTX-FDX, 100baseTX-FDX-flow, 1000baseT-FDX, 1000baseT-FDX-master, 1000baseT-FDX-flow, 1000baseT-FDX-flow-master, auto, auto-flow
re0: Using defaults for TSO: 65518/35/2048
re0: netmap queues/slots: TX 1/256, RX 1/256
pci0: <PCI bus> on pcib0
pci0: failed to allocate bus number
device_attach: pci0 attach returned 6
genet0: <RPi4 Gigabit Ethernet> mem 0x7d580000-0x7d58ffff irq 82,83 on simplebus2
genet0: GENET version 5.0 phy 0x0000
miibus1: <MII bus> on genet0
brgphy0: <BCM54213PE 1000BASE-T media interface> PHY 0 on miibus1
brgphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto
genet0: Ethernet address: e4:5f:01:8d:e1:3a
gpioled0: <GPIO LEDs> on ofwbus0
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
clk_fixed4: <Fixed clock> disabled on ofwbus0
clk_fixed4: Cannot FDT parameters.
device_attach: clk_fixed4 attach returned 6
armv8crypto0: CPU lacks AES instructions
Title: Re: How to build 22.7 with opnsense tools?
Post by: franco on June 09, 2022, 12:20:04 pm
Same thing reported here https://github.com/opnsense/tools/issues/297 but it's probably something device-specific in the arm image build that needs debugging.


Cheers,
Franco
Title: Re: How to build 22.7 with opnsense tools?
Post by: gondox on June 09, 2022, 12:56:22 pm
yep, thats me.
The issue of the missing image was solved in the ticket, but now I am back to square one   :-\
I am a bit lost because I do not know where I can find out more about this behaviour.

This is why I copied a plain Freebsd 13.1 image to the emmc and reported the error here: https://github.com/pftf/RPi4/issues/219 .
I did not use the OPNsense image as to not to overcomplicate the ticket. It seems to be a general Freebsd problem.
Title: Re: How to build 22.7 with opnsense tools?
Post by: franco on June 09, 2022, 01:04:03 pm
Oh hello again then :)

Code: [Select]
?

List of GEOM managed disk devices:


mountroot>

This is a bit funky. Is this a SD card or USB stick?
Title: Re: How to build 22.7 with opnsense tools?
Post by: gondox on June 09, 2022, 02:11:32 pm
it is an emmc, but I get the same when I use an usb drive

edit, it looks like this:

Code: [Select]
---<<BOOT>>---
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 releng/13.1-n250148-fc952ac2212 GENERIC arm64
FreeBSD clang version 13.0.0 (git@github.com:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a303)
VT: init without driver.
module firmware already present!
real memory  = 2062696448 (1967 MB)
avail memory = 1986211840 (1894 MB)
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 1d0000 mode 2 pages 32
MAP 33930000 mode 2 pages 112
MAP 33a20000 mode 2 pages 256
MAP 37000000 mode 2 pages 400
MAP 37190000 mode 2 pages 592
kbd0 at kbdmux0
acpi0: <RPIFDN RPI4>
acpi0: Power Button (fixed)
acpi0: Could not update all GPEs: AE_NOT_CONFIGURED
psci0: <ARM Power State Co-ordination Interface Driver> on acpi0
gic0: <ARM Generic Interrupt Controller> iomem 0xff841000-0xff841fff,0xff842000-0xff842fff on acpi0
gic0: pn 0x2, arch 0x2, rev 0x1, implementer 0x43b irqs 256
generic_timer0: <ARM Generic Timer> irq 20,21,22 on acpi0
Timecounter "ARM MPCore Timecounter" frequency 54000000 Hz quality 1000
Event timer "ARM MPCore Eventtimer" frequency 54000000 Hz quality 1000
efirtc0: <EFI Realtime Clock>
efirtc0: registered as a time-of-day clock, resolution 1.000000s
cpu0: <ACPI CPU> on acpi0
acpi_syscontainer0: <System Container> on acpi0
acpi_syscontainer1: <System Container> iomem 0xfe340000-0xfe3400ff on acpi0
pcib0: <Generic PCI host controller> on acpi0
pcib0: could not map memory.
device_attach: pcib0 attach returned 6
dwcotg0: <DWC OTG 2.0 integrated USB controller> iomem 0xfe980000-0xfe98ffff irq 0 on acpi0
usbus0 on dwcotg0
uart0: <PrimeCell UART (PL011)> iomem 0xfe201000-0xfe201fff irq 14 on acpi0
uart0: console (115200,n,8,1)
acpi_tz0: <Thermal Zone> on acpi0
armv8crypto0: CPU lacks AES instructions
Timecounters tick every 1.000 msec
CPU  0: ARM Cortex-A72 r0p3 affinity:  0
                   Cache Type = <64 byte D-cacheline,64 byte I-cacheline,PIPT ICache,64 byte ERG,64 byte CWG>
 Instruction Set Attributes 0 = <CRC32>
 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,SEVL>
AArch32 Media and VFP Features 0 = <FPRound,FPSqrt,FPDivide,DP VFPv3+v4,SP VFPv3+v4,AdvSIMD>
AArch32 Media and VFP Features 1 = <SIMDFMAC,FPHP DP Conv,SIMDHP SP Conv,SIMDSP,SIMDInt,SIMDLS,FPDNaN,FPFtZ>
CPU  1: ARM Cortex-A72 r0p3 affinity:  1
CPU  2: ARM Cortex-A72 r0p3 affinity:  2
CPU  3: ARM Cortex-A72 r0p3 affinity:  3
Release APs...done
usbus0: 480Mbps High Speed USB v2.0
Trying to mount root from ufs:/dev/ufs/FreeBSD_Install [ro,noatime]...
ugen0.1: <DWCOTG OTG Root HUB> at usbus0
uhub0 on usbus0
uhub0: <DWCOTG OTG Root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0
uhub0: 1 port with 1 removable, self powered
mountroot: waiting for device /dev/ufs/FreeBSD_Install...
Mounting from ufs:/dev/ufs/FreeBSD_Install failed with error 19.

Loader variables:
  vfs.root.mountfrom=ufs:/dev/ufs/FreeBSD_Install
  vfs.root.mountfrom.options=ro,noatime

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> ?

List of GEOM managed disk devices:


mountroot>

Title: Re: How to build 22.7 with opnsense tools?
Post by: gondox on June 09, 2022, 05:46:07 pm
For anyone interested: this seems to be an issue of the bcm2835_sdhci driver, that doesn't support ACPI attachments. Mitchell Horne was nice enough to explain it in the FreeBSD bug ticket. Maybe someone is able to change that, but I wouldn't count on it. This is way out of scope for me to fix it. :-(