It seems there are some files missing from SVN, and others that don't work as supplied... This short HOWTO explains how to make the SVN code compile on Kubuntu 8.04.1 LTS (and by extension most of the other Ubuntu respins).
This is a variation on the instructions in the "official" HOWTO at
http://cyberstorm.altervista.org/wag354 ... ild_en.txt, but based on the new floating-point toolchain and RPC-enabled ucLibC. Speaking of which, I'd love to see a HOWTO for building the FP toolchain from source... it seems to have some hard-coded paths which really need fixing.
What you need:
Toolchain setupFirst you need to get the TI toolchain working. Get the WAG54Gv2 GPL source tarball and untar it. In the 'tools' directory you'll find a file called TI-toolchains-2_1_0-cy07-Redhat7_1.tgz. Move that into a safe place, then delete the "WAG54GV2" directory. You only need the toolchain, not the WAG54 sources.
Now untar the TI toolchain and set up the symlinks for it:
Code:
sudo tar -zxf TI-toolchains-2_1_0-cy07-Redhat7_1.tgz -C /opt
cd /opt
sudo ln -s TI-toolchains-2_1_0-cy07 cy
Now you need to jump through a few hoops to make the FP toolchain work. Untar the FP toolchain:
Code:
sudo tar -jxf mipsel-linux-uclibc.tar.bz2 -C /opt/TI-toolchains-2_1_0-cy07/
Problem is, the FP toolchain is hard-coded to expect certain files to be in /home/marco/Desktop... We need to make some links to fix that.
Code:
sudo mkdir -p /home/marco/Desktop
sudo ln -s /opt/cy/mipsel-linux-uclibc /home/marco/Desktop
Now the toolchains should be functional. Unpack the Linksys WAG354G source (you'll need it to fix Neptune's copy of zebra):
Code:
tar -jxf WAG354G-EU-v1_01_11-00.tar.bz2
You'll also want to check out the Neptune354 source code:
Code:
svn co http://opensvn.csie.org/neptune354/trunk
There are a few bugs you need to fix in the Neptune sources. We'll start by fixing zebra:
Code:
cp -r WAG354G-EU-v1_01_11-00/src/router/zebra/* trunk/src/router/zebra
Now we also need to fix a bug in the make.sh script..
Code:
cd trunk
vim make.sh
You'll find three lines that look like this:
Code:
#make linux-clean
#make linux-dep
#make linux
Uncomment these lines (remove the # symbols), then save the file.
Last but not least, the "7zip" compression tool that's used to compress the kernel won't compile. On top of that, the compiled version included in the source archive depends on an absolutely ancient version of libstdc++. We need to fix this:
In router/7zip/LZMA/RangeCoder/RangeCoderBit.h on lines 64 and 70, replace the text "Probability" with "this->Probability"
In router/7zip/LZMA/RangeCoder/RangeCoderBit.h on line 65, replace "UpdateModel" with "this->UpdateModel"
Save the file, then build 7zip:
Code:
make -C router/7zip
cd linux/linux-2.4.17_mvl21_v1/tools
mv 7zip 7zip_old
cp ../../../router/7zip/7zip .
Now run the build script, follow the instructions and you should have a Neptune354 upgrade image in trunk/image/upgrade_code.bin.
For my next trick, I'll try and figure out why Neptune354 isn't starting snmpd at boot time, add IPv6 support and maybe look into adding "proper" LAN subnet mask support (i.e. allow netmasks like 255.0.0.0) to the web interface.