Running netfilter/iptables on your cellphone
Yes, you're reading this right. I've managed to build iptables.o, ipt_*.o,
iptable_filter.o, iptable_nat.o, ip_conntrack.o and the like for my Motorola
A780 cellphone.
As of now, there's not really all that much need for it... but when I start running dozens of applications on the device, I better make sure to have a decent packet filter to the GPRS/HSCSD world.
But even then, in theory it should now be possible to NAT between the GPRS
device one one side, and the usb-lan on the other side. Maybe I should try to
bring my whole home network online via the A780 :)
OTOTH this doesn't fix the various security issues on the horizon. The A780
apparently ships zlib-1.1.3. I don't even know how many security
vulnerabilities were fixed since then...
Bringing ftp.gpl-devices.org live
ftp.gpl-devices.org has been up and
running for a number of months now. As usual, I never really had the time to
take care of it (i.e. feed it with all the vendor-released and 3rd party source
code for embedded devices running GPL licensed software).
Luckily, Imre Kaloz was interested in helping me out. He's now in charge of at least putting all the TI AR7 related source tar-balls on the ftp site.
I've already dedicated a 300GB hard disk for the source code, which should be fairly sufficient for some time. At this point, I have no more than 40GB of vendor-supplied source code images at home.. ftp.gpl-devices.org has only some 3GB as of now.
Thanks go to noris.net, the innternet provider where like for almost all of my projects, the server ftp.gpl-devices.org is colocated.
More fun with the Motorola A780
I've now successfully built a compatible toolchain for the Motorola A780,
thanks to this good site with
instructions.
Obviously, one of the first things to do was to build busybox with a config that enables all the
missing tools. For some strange reason, the A780 does not ship with the usual
uClibc/busybox combination, but with the straight GNU tools (glibc, fileutils,
...). Unfortunately important bits such as less, top, strace, etc. were missing.
I've also managed to build matching ext2,jbd,ext3,sunrpc,nfsd and af_packet
kernel modules. The VFAT partition on the TransFlash card was shrunk, and an
ext3 partition added. Some hooks into the startup scripts, and now the ext3 is
mounted when the phone is switched on. Some PATH and LD_LIBRARY_PATH mangling
in .profile, and I have a very workable environment on the phone.
Obviously the most important goal would be to port the EZX arm architecture
support into a recent 2.6.x kernel, and then run a full-fledged 2.6.x kernel on
the device. With embedded IPsec, packet filtering, etc. That goal is very
far, due to stupid proprietary device drivers.
So for now, I'll be looking into the kernel/userspace API's and the
userspace/userspace API's in order to develop native userspace applications
that can actually use the phone (i.e. make voice/data calls, use the
headset/speaker/microphone, ...