next up previous contents index
Next: Setting up IP forwarding Up: Setting up routing and Previous: Preparing the Linux kernel   Contents   Index


Compiling iptables-1.2.7a

This source package contains the essential tool for controlling every packet leaving or arriving the SEGA Dreamcast.

First, we need to download the appropriate source package:


Table 6.2: Source package, size and URL for iptables.
Package Size License URL
iptables-1.2.7a 115 KB GPLv2 http://www.netfilter.org/files/iptables-1.2.7a.tar.bz2


Next, fetch the needed patch (assuming your pwd points to $\sim$/Dreamcast/SRC):

$ wget http://www.tu-bs.de/~y0018536/dc/src/\
  iptables-1.2.7a-uclibc-dreamcast.patch

The patch forces the build of a statically linked version due to the lack of a dynamic loader. Furthermore, it disables the IPv6 support. Last, but not least, it corrects problems with the strip command.

Now, we're ready to compile iptables-1.2.7a:

$ cd ../BUILD
$ bunzip -c ../SRC/iptables-1.2.7a.tar.bz2 | \
  tar -xv -C .
$ cd iptables-1.2.7a
$ patch -p1 < ../../SRC/\
  iptables-1.2.7a-uclibc-dreamcast.patch
$ ./configure
$ make CROSS=$UCLIBC/usb/bin/ \
       KERNEL_DIR=/home/christian/Dreamcast/KERNEL/linux \
       DESTDIR=/home/christian/Dreamcast/INITRD

That's all. Now, copy the file iptables to your initial ramdisk and ensure it's executable:

$ su -c "cp iptables ../../INITRD/sbin"
$ su -c "chmod 744 ../../INITRD/sbin/iptables"



Christian Berger 2004-10-19