Isl3893-Y.A.F.H - Yet another Firmware-HOWTO: Difference between revisions

From Appelwiki
No edit summary
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=Isl3893-Y.A.F.H - Yet another Firmware-HOWTO=
=Isl3893-Y.A.F.H - Yet another Firmware-HOWTO=


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.
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.
Line 29: Line 28:
(both dated Mar 21 2006)
(both dated Mar 21 2006)


<pre>
unpack
unpack
cd tools
cd tools
Line 35: Line 35:
# takes a few minutes ...
# takes a few minutes ...
# that was easy, wasn't it ? :-)
# that was easy, wasn't it ? :-)
 
</pre>


==Building the firmware==
==Building the firmware==
Line 45: Line 45:
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.
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.


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


===Config and Building===
<pre>
unzip AP-600RP_GNU_source-code.zip
unzip AP-600RP_GNU_source-code.zip
#the source tree expects the tools that were compiled by the toolchain in
# /opt/uclinux_tools_1.6.0.0/bin so you should link them there
tar -xvzf Code.tgz
tar -xvzf Code.tgz
cd v1010
cd v1010
Line 66: Line 71:
# takes a few minutes. You should then have a new firmware-image in file 'apfirmware.img'
# takes a few minutes. You should then have a new firmware-image in file 'apfirmware.img'
# DO NOT UPLOAD THIS YET
# DO NOT UPLOAD THIS YET
</pre>


===Patching===
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 :-(
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:
So now some patches:
 
<pre>
cd ../uClinux/romfs/etc  # Software/firmware/uClinux/romfs/etc/
cd ../uClinux/romfs/etc  # Software/firmware/uClinux/romfs/etc/
vi startup.list
vi startup.list
Line 87: Line 94:
cd init.d  # Software/firmware/uClinux/romfs/etc/init.d/
cd init.d  # Software/firmware/uClinux/romfs/etc/init.d/
vi network
vi network
# after the line 'ifconfig lo 127.0.0.1 up' add these lines
after the line 'ifconfig lo 127.0.0.1 up' add these lines
a) for having the AP get its IP by dhcp:
a) for having the AP get its IP by dhcp:
ifup eth0 autoip
ifup eth0 autoip
Line 105: Line 112:
make image
make image
# wait a while ...
# wait a while ...
</pre>


===Upload to the AP===
Then you can hopefully upload apfirmware.img. This is also known as the "Load-And-Pray"-Mode :-)
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.
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.


<pre>
Connect it to your PC and
Connect it to your PC and


Line 124: Line 134:
# then:
# then:
ifconfig eth0 192.168.1.99
ifconfig eth0 192.168.1.99
</pre>


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.
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.
Line 132: Line 143:


==Recovery==
==Recovery==
Just in case something went wrong, see [[isl3893-Y.A.R.C - Yet another ReCovery-HOWTO]]
Just in case something went wrong, see [[isl3893-Y.A.R.C - Yet another ReCovery-HOWTO]] http://www.smiley-channel.de/grafiken/smiley/idee/smiley-channel.de_idee004.gif
 
==[[ISL3893|Back to ISL3893]]==

Latest revision as of 12:50, 7 August 2006

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

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.

Software/Tools

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
# takes a few minutes ...
# 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.

Sources

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

Config and Building

unzip AP-600RP_GNU_source-code.zip
#the source tree expects the tools that were compiled by the toolchain in
# /opt/uclinux_tools_1.6.0.0/bin so you should link them there
tar -xvzf Code.tgz
cd v1010
chmod -Rv a+rwx *
cd Software/firmware/uClinux/
make menuconfig
# change flash-layout to 10000/200000/360000
# leave "Accesspoint Features" as they are
#   Development options: include shelld, additional command line tools, meminfo
# exit + save
cd kernel     # Software/firmware/uClinux/kernel
make menuconfig
# no changes, exit + save
make dep
cd ..            # Software/firmware
cd ../apfw  # Software/firmware/apfw
make image
# takes a few minutes. You should then have a new firmware-image in file 'apfirmware.img'
# DO NOT UPLOAD THIS YET

Patching

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
# comment out datastore and paed, they are somehow corrupt
# exit + save

# --- This part concerning /etc/passwd is only necessary for boa --- #
# passwd is normally softlinked to /usr/etc, here we replace it by a file in /etc
mv passwd passwd.old
vi passwd
# enter these lines:
root::0:0:/:/bin/sh
nobody::1234:1234::/:/bin/sh
# exit + save

cd init.d   # Software/firmware/uClinux/romfs/etc/init.d/
vi network
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
# exit + save

b) Or for static IP:
ifup eth0 autoip
ifup eth1 autoip
ifup br0 static 192.168.1.253 255.255.255.0
# exit + save

cd ../../..    # Software/firmware/uClinux/
cd ../apfw    # Software/firmware/apfw
make image
# wait a while ...

Upload to the AP

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
# upload takes 1-2 minutes, led on AP flashes fast
# the AP should then reboot automatically

# 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.

Recovery

Just in case something went wrong, see isl3893-Y.A.R.C - Yet another ReCovery-HOWTO http://www.smiley-channel.de/grafiken/smiley/idee/smiley-channel.de_idee004.gif

Back to ISL3893