Building (only) a custom kernel for pfsense for 2.1 …



  • I want to add:

    options  SC_PIXEL_MODE

    to pfsense 2.1.  Nothing else.  No custom userland, nothing special, just that one option.

    Can someone point me to docs on compiling my own pfsense kernel ?

    I'm thinking something along the lines of "here's the /usr/src/sys/i386 directory that the pfsense team uses, download that, edit your conf file, and then make cleandepend ; make depend ; make"

    Can it be that easy ?



  • … I've been poking around with my own research ...

    I see these instructions:

    http://devwiki.pfsense.org/DevelopersBootStrapAndDevIso

    However, I already have a running system that I like (stock 2.1) and just need to alter a single option in the kernel.

    So, I wonder, can I install a FreeBSD 8.3 system, skip all the ports updating and things like that (since I am not building a dev system nor an ISO, etc.) and then:

    cd /home/pfsense/tools/builder_scripts

    (make my little edit to the kernel conf file here)

    ./apply_kernel_patches.sh

    Or am I badly misreading that wiki page ?

    Thanks.


  • Rebel Alliance Developer Netgate

    You won't save that much time skipping the other steps. Just follow it all the way through as written and let it give you an .iso, you don't need the .iso, but the files you want will be left in /usr/local/pfsense-fs/kernels/ once the image has been built.

    You could take shortcuts, but you'd likely spend longer working out the kinks in that than you would with letting it make you a full iso.



  • Ok, thank you.  I will take your advice and just follow the entire procedure.

    Should I build the ISO first and then go in and edit kernel conf and rebuild the kernel, or should I edit the kernel conf file before I run this command:

    ./apply_kernel_patches.sh

    If so, where is the kernel conf file for the ISO that will be built ?


  • Rebel Alliance Developer Netgate

    It is safest to make a stock image first, test it, and make sure you have everything working. Then make changes. Otherwise you don't know if something went wrong because of your changes, or because of the builder in general.

    There was just a recent thread where I explained the various ways to tweak the kernel options (e.g. EXTRA_OPTIONS in pfsense-build.conf) and I updated the doc here:
    http://devwiki.pfsense.org/BuildTimeOptions

    What you want to do can be accomplished by just adding one line to your pfsense-build.conf once you have made a good ISO.

    I mentioned the path to the resulting kernels in a previous post in this thread already.


Log in to reply