A PHP script and additional files which automate nearly all of the steps required to build a working m0n0wall image from SVN (only the FreeBSD 6 branch is supported).
Code
Latest available at:
svn co https://svn.askozia.com:9000/repos/m0n0dev/trunk
Usage
Help is available for most of the commands by placing help before the command name:
./m0n0dev.php help build kernel
The basic usage is:
./m0n0dev.php new image_name start a new image ./m0n0dev.php patch something patch a target ./m0n0dev.php build something build a target ./m0n0dev.php parsecheck check for stupid mistakes ./m0n0dev.php populate something image populate an image with a target ./m0n0dev.php package platform image package image for specified platform
Getting Started - Introduction
After “Installing FreeBSD 6 for m0n0wall Development” you can use m0n0dev to start building your own m0n0wall images.
All of the following steps are to be executed in your development jail!
1. Checking out the m0n0wall Sources
The first thing we need is, of course, the m0n0wall sources from the FreeBSD 6 branch.
First, install subversion from ports in your jail.
# cd /usr/ports/devel/subversion # make WITHOUT_BDB=yes install clean # rehash
Then, check the appropriate branch out to wherever you wish (we’ll use /root/m0n0wall).
# svn co http://svn.m0n0.ch/wall/branches/freebsd6/ /root/m0n0wall
2. Installing m0n0dev
Since m0n0dev is a php script, it would probably be good to have a php interpreter in our jail. So, let’s build one from ports (you can use php 4 or 5).
# cd /usr/ports/lang/php4 # make install clean # uncheck everything except 'CLI'
To build the .iso cd-rom images, we need mkisofs. We’ll install that from ports as well.
# cd /usr/ports/sysutils/cdrtools # make install clean
Finally, we need m0n0dev.
# cd /where/you/want/m0n0dev/ # svn co https://svn.askozia.com:9000/repos/m0n0dev/trunk m0n0dev # cd m0n0dev
3. Your First Image
Creating your first image can be done with the following.
# cd /path/to/m0n0dev/ # ./m0n0dev.php patch everything # ./m0n0dev.php build everything # ./m0n0dev.php new myfirstimage # ./m0n0dev.php populate everything myfirstimage # ./m0n0dev.php package all myfirstimage
Your new images (along with their source directory) are in ./work/images/ and the mfsroot is in ./work/mfsroots/.




