Here are some notes on setting up to cross compile pfSense ports on a FreeBSD poudriere build box.
Use poudriere to build and install the qemu-user-static package. Add configuration to /etc/rc.conf:
qemu_user_static_enable="YES"
Run the rc.d script:
service qemu_user_static start
Build the jail; use the Versions of pfSense and FreeBSD page to map your pfsense target version to the git branch. For 25.11 it's "16.0-CURRENT@44f3e9f7f6c9". It's not possible to give poudriere a specific hash (at least I could not figure out how to do this) so I built from a local source tree:
zfs create -o mountpoint=/usr/src/16-CURRENT -o compress=lz4 tank/16-CURRENT cd /usr/src git clone https://git.freebsd.org/src.git 16-CURRENT cd 16-CURRENT git checkout 44f3e9f7f6c9 poudriere jail -x -c -j pfsense2511 -a arm64.aarch64 -m src=/usr/src/16-CURRENT -b
Check out the ports tree; poudriere defaults to master or main so specify the "devel" branch:
poudriere ports -v -c -m git+https -B devel -p pfsense
To update the ports tree use:
git stash poudriere ports -v -u -m git+https -B devel -p pfsense git stash pop
I like to tweak root's dot files in the jail:
# Edit dot files zfs list -t snapshot zfs destroy tank/poudriere/jails/pfsense2511@clean vi /usr/local/poudriere/jails/pfsense2511/root/.cshrc zfs snapshot tank/poudriere/jails/pfsense2511@clean
Create a jail specific poudriere make.conf.
cd /usr/src && git clone https://github.com/pfsense/pfsense.git
cp -i /usr/src/pfsense/tools/conf/pfPorts/make.conf \
/usr/local/etc/poudriere.d/pfsense-make.conf
Turn off warning sleep delays:
echo WARNING_WAIT=0 >> /usr/local/etc/poudriere.d/pfsense-make.conf echo DEV_WARNING_WAIT=0 >> /usr/local/etc/poudriere.d/pfsense-make.conf
Set the default Python versions to match for 25.11 use 3.11:
echo 'DEFAULT_VERSIONS+= python=3.11' >> /usr/local/etc/poudriere.d/pfsense-make.conf
Build something:
poudriere bulk -C -j pfsense2511 -p pfsense net-mgmt/pfSense-pkg-arpwatch
git clone -b devel git@github.com:leres/FreeBSD-ports.git leres-FreeBSD-ports
git remote -v git remote add upstream https://github.com/pfsense/FreeBSD-ports.git git remote -v
Copyright © 2019, 2020, 2021, 2022, 2023, 2024, 2025
Craig Leres