Isl3893-Y.A.F.H - Yet another Firmware-HOWTO

From Appelwiki
Revision as of 21:15, 26 March 2006 by 134.58.253.131 (talk)

This is a step-by-step-HOWTO on "from scratch"-compiling the firmware for the AP-600. It has been tested several times on two different SuSE-10-PCs, each time deleting the source-tree and starting over.


It assumes fair Linux-knowledge on your part, and of course NO CLAIM of any kind concerning these instructions shall be made. There is NO CLAIM that these instructions will work in any beneficial way, nor that you will not completely fuck up your AP if you try them. If you do not have at least a basic idea on what to do if you toast you AP, then don't do anything described below. And don't bother your dealer or the customersupport if you blew it. OK?


The steps in this document have been tested by starting "from scratch", if necessary by deleting or renaming an already existing source-tree.

  • Tried, not tested: The firmware-sources from Medion are very similar and should work too. The building path has been hardcoded into the Makefile however (intentionally to harden homebrew development?), so the sources can only be compiled when installed in /home/paulfh.
  • Tried, not tested: The sources for the Sitecom WET-122-v1 can be compiled too, but you have to get the apps-nongpl-subtree elsewhere, for example from the AP-600-sources. Build the WL-122-v1-sources, then you will see where to copy the missing sub-tree.
  • wet54gs5: See http://www.student.kuleuven.ac.be/~s0169612/isl3893.html for more info.


Used current version of the linux-platform and linux-tools:

  • Linux opensuse 10.0 (german)
  • gcc, gcc-c++, cpp 4.02_20050901-31 (as included in SuSE 10.0)
  • flex 2.4.5a-297 (as included in SuSE 10.0)
  • bison 1.875-56 (as included in SuSE 10.0)
  • The binary /sbin/depmod.old is called by the build-scripts of some firmware-sources. Make a softlink from your existing /sbin/depmod, that works most of the time.


Building the toolchain

After Arco did some serious patching to the sources on sf.net this should work out of the box: http://osdn.dl.sourceforge.net/sourceforge/isl3893/isl3893-tools-20060321.tar.bz2 or: http://appeltaart.mine.nu/isl3893/isl3893-tools-20060321.tar.bz2 (both dated Mar 21 2006)

unpack cd tools cp depmod.old /sbin ./make-tools.sh

  1. takes a few minutes ...
  2. that was easy, wasn't it ? :-)


Building the firmware

Some steps may be unnecessary for the AP-600-sources, but can become necessary for other source-trees. They will not do any damage though.

The AP-600-sources were chosen because they are the easiest to build. They are not necessarily the best.

Also this HOWTO is not meant to be finished. You will have some basic functionality including shell-access. Then you can start making your own mods.

Get AP-600RP_GNU_source-code.zip. That should be the firmware-sources as released by Fujitsu-Siemens.

unzip AP-600RP_GNU_source-code.zip tar -xvzf Code.tgz cd v1010 chmod -Rv a+rwx * cd Software/firmware/uClinux/ make menuconfig

  1. change flash-layout to 10000/200000/360000
  2. leave "Accesspoint Features" as they are
  3. Development options: include shelld, additional command line tools, meminfo
  4. exit + save

cd kernel # Software/firmware/uClinux/kernel make menuconfig

  1. no changes, exit + save

make dep cd .. # Software/firmware cd ../apfw # Software/firmware/apfw make image

  1. takes a few minutes. You should then have a new firmware-image in file 'apfirmware.img'
  2. DO NOT UPLOAD THIS YET

Unfortunately there are a few bugs in the sources. I do not speculate on whether ZCom or Fujitsu-Siemens or whoever else might have planted these intentionally :-(

So now some patches:

cd ../uClinux/romfs/etc # Software/firmware/uClinux/romfs/etc/ vi startup.list

  1. comment out datastore and paed, they are somehow corrupt
  2. exit + save
  1. --- This part concerning /etc/passwd is only necessary for boa --- #
  2. passwd is normally softlinked to /usr/etc, here we replace it by a file in /etc

mv passwd passwd.old vi passwd

  1. enter these lines:

root::0:0:/:/bin/sh nobody::1234:1234::/:/bin/sh

  1. exit + save

cd init.d # Software/firmware/uClinux/romfs/etc/init.d/ vi network

  1. after the line 'ifconfig lo 127.0.0.1 up' add these lines

a) for having the AP get its IP by dhcp: ifup eth0 autoip ifup eth1 autoip ifup br0 autoip ifup br0 dhcp

  1. exit + save

b) Or for static IP: ifup eth0 autoip ifup eth1 autoip ifup br0 static 192.168.1.253 255.255.255.0

  1. exit + save

cd ../../.. # Software/firmware/uClinux/ cd ../apfw # Software/firmware/apfw make image

  1. wait a while ...

Then you can hopefully upload apfirmware.img. This is also known as the "Load-And-Pray"-Mode :-)

To upload put your AP in safe mode by turning on the power with the reset-button pressed. The AP now has the IP 192.0.2.93 and no firmware. It responds only to tftp and ping.

Connect it to your PC and

ifconfig eth0 192.0.2.99 tftp 192.0.2.93 verbose trace bin put apfirmware.img quit

  1. upload takes 1-2 minutes, led on AP flashes fast
  2. the AP should then reboot automatically
  1. then:

ifconfig eth0 192.168.1.99

The AP should come up and get an IP by dhcp or respond to ping 192.168.1.253. You can monitor what is happening if you start a sniffer on eth0.

You should be able to telnet 192.168.1.253

There may be trouble getting the webserver boa (/etc/init.d/boa and /bin/boa) running, and a webfilesystem has to be added later.