Craig's pfSense Page

Toolchain Notes

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 23.09 it's "14.0-CURRENT@0c783a37d5d5". However, it's not possible to give poudriere a specific hash (at least I could not figure out how to do this) so I used:

poudriere jail -x -c -j pfsense2309 -a arm64.aarch64 -m git+https \
    -U https://git.freebsd.org/src.git -b releng/14.0 -v main

Check out the ports tree; poudriere defaults to master 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/pfsense2309@clean
vi /usr/local/poudriere/jails/pfsense2309/root/.cshrc
zfs snapshot tank/poudriere/jails/pfsense2309@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 23.09 use 3.11:

echo 'DEFAULT_VERSIONS+= python=3.11' >> /usr/local/etc/poudriere.d/pfsense-make.conf

Build something:

poudriere bulk -C -j pfsense2309 -p pfsense net-mgmt/pfSense-pkg-arpwatch

GitHub Forking


Copyright © 2019, 2020, 2021, 2022, 2023
Craig Leres