First we need to grab some sources, including the kernel source (don't worry - we're not going to do the lengthy compiling of all the existing modules). The source is now a package also, but it's not in the standard tree. We'll add that and let the package run its course.
Code: Select all
# become root first
su -
# enable the source package tree
change_distribution -s elvin
apt-get update
# change to where the source should be kept (/usr/src) and grab the kernel source
cd /usr/src
apt-get source bubba3-kernel
Code: Select all
# attempt to auto-determine the correct source folder (one-liner!)
sourcedir=`find /usr/src/ -maxdepth 1 -type d -name "linux*" | sort -r | awk 'BEGIN{FS="/"};{print $4;exit}'`
# it's customary to have a symbolic link named 'linux' to the current kernel's source,
# so let's create that
rm -f linux && ln -s ${sourcedir} linux
# change to the current kernel's module tree
cd /lib/modules/`uname -r`
# create symbolic links named 'build' and 'source' towards the kernel source
ln -s ../../../usr/src/${sourcedir} build
ln -s ../../../usr/src/${sourcedir} source
Code: Select all
# enter the kernel source directory
cd /usr/src/linux
# Verify the config file - standard docs tell to run "make oldconfig", but that
# can be very tedious.
make menuconfig
# => this will pop up an ASCII "graphic" screen. Navigate, using 'down' cursor key,
# to the first line that has either an empty space or a star (*) between brackets in
# front of it. Press space to toggle its value and then again to reset it to original.
# Use 'right' cursor key to select "exit" and press 'enter' - save the configuration.
# We need to generate some build scripts based on the content of the config file
make prepare && make modules_prepare

So now let's get the Openswan source (at time of writing, version 2.6.38 is the latest) and compile the KLIPS module. No comments here - it's the same as in the original post.
Code: Select all
cd /usr/src
wget http://www.openswan.org/download/openswan-2.6.38.tar.gz
tar xjf openswan-2.6.38.tar.gz
cd openswan-2.6.38
make KERNELSRC=/lib/modules/`uname -r`/build module minstall