pfSense developer building bootstrapping - building a custom pfSense image
This document will go over the steps necessary in order to produce an environment where pfSense images can be built.
0. Install
FreeBSD 7.0 or
FreeBSD 7.1 (
http://www.freebsd.org/doc/en/books/handbook/install.html∞ ) ... or 8.0 if you want to build 2.0 related builds.
0a. (OPTIONAL) Create a Jail or chroot environment to build pfSense in. Building pfSense can intrude in a lot of areas of your
FreeBSD box and some folks prefer to keep the builder process seperate (pfSense developers included).
1. Begin pfSense bootstrap by running these shell commands:
echo "WITHOUT_X11=yo" >> /etc/make.conf
mkdir -p /home/pfsense/pfSenseGITREPO /home/pfsense/installer /usr/pfSensesrc
2. Grab ports and build GIT
portsnap fetch extract
cd /usr/ports/textproc/expat2 && make depends install
cd /usr/ports/devel/git && make depends install
cd /usr/ports/sysutils/fastest_cvsup/ && make depends install
# tcsh requires reloading available binaries - if you run this command and it fails -- don't worry.
rehash
3. Continue on with the GIT repo checkouts:
cd /home/pfsense && git clone http://gitweb.pfsense.org/pfsense-tools/mainline.git tools
cd /home/pfsense && git clone http://gitweb.pfsense.org/freesbie2/mainline.git freesbie2
cd /home/pfsense/tools/builder_scripts && chmod a+rx *.sh
4. Ensure FreeBSD sources are present
Some ports require sources in /usr/src to build correctly.
csup -h `fastest_cvsup -c tld -q` /usr/share/examples/cvsup/standard-supfile
5. Invoke our new menu system by running:
cd /home/pfsense/tools/builder_scripts
./menu.sh
5.1. After invoking the menu system set the version you would like to build
Versions available are in the radio box or select custom and enter one of:
| RELENG_1_2 |
pfSense RELENG_1_2 + FreeBSD RELENG_7_2 |
| RELENG_2_0 |
pfSense HEAD (2.0) + FreeBSD RELENG_7_2 |
| RELENG_7_2 |
pfSense RELENG_1_2 + FreeBSD RELENG_7_2 |
| RELENG_8_0 |
pfSense HEAD + FreeBSD 8-CURRENT |
|
5.2. Invoke the Apply patches option
This will fetch the version of
FreeBSD required and apply our patches. You should not see any errors during this step.
5.3 Invoke the Build ISO option
pfSense will now build an iso. Sit back and wait while the operation proceeds.
6. Testing
If all goes well you should have a pfSense.iso in /usr/obj.pfSense ... Test it.
7. After testing final DevISO test
Does everything work (installer, too)? If so you can move on to building a deviso by invoking the Build
DevIso menu option.
8. Keeping in sync with pfSense Repo's
Invoke the Sync command to update tools and freesbie sources with rcs.pfsense.org.
9. Other images available for building
Once you have a working
DevISO you can build pretty much any pfSense image listed in the menu system.
Troubleshooting
If for some reason the build goes wrong you can whipe out *ALL* of /usr/local/ and restore back to a after installation state and start over completely by invoking the Clean option of menu system.
Further Reading
Please note that only
GeekGod has write privileges to this page. Please coordinate changes with him.
There are no comments on this page. [Add comment]