Thursday, March 27, 2008

iptables compile

1. check out a iptables from SVN
svn co https://svn.netfilter.org/netfilter/trunk/iptables
2. cd iptables
3. run autogen.sh, here is the content of autogen.sh
#!/bin/bash
autoreconf -fi;
rm -Rf autom4te*.cache;
--------------------------------------
This will generate configure

4. run ./configure with following option, or run_configure with content as below

./configure CC=powerpc-405-linux-gnu-gcc --build=powerpc-405-linux-gnu --target=powerpc-amcc-linux --host=powerpc-amcc-linux --with-kernel=/localhome/wli/linux-2.6.24 --with-ksource=/localhome/wli/linux-2.6.24 --with-gnu-ld

5. run ./made with content as below
#!/bin/bash
if [ -n "$1" ]; then
linux_path=$1
else
linux_path="/localhome/wli/linux-2.6.24"
fi
mv $linux_path/include/linux/errno.h $linux_path/include/linux/errno_org.h
ln -s $linux_path/include/asm-generic/errno.h $linux_path/include/linux/errno.h
make CC=powerpc-405-linux-gnu-gcc KERNEL_DIR=$linux_path KBUILD_OUTPUT=""
mv $linux_path/include/linux/errno_org.h $linux_path/include/linux/errno.h


No comments: