Index of /
Linux tools for Alteon Tigon firmware development
Last updated 20/May/2003
Jamie Lokier, <email@example.com>
For people developing Alteon firmware on Linux.
Currently located at:
Note that the latter URL has a more recent version of the genfw
script, and it also has copies of the original Alteon firmware source.
Here you will find tools to build Alteon AceNIC firmware on Linux. You
used to be able to get the firmware source itself from Alteon, but they
stopped giving it out so the copies I obtained are given here. Look at
the source files yourself to understand any licensing restrictions on
their use. Alteon's license may be summarised like this: you may share
and develop the firmware, but it is only for use with Alteon NIC
The tools here are built and packaged for Red Hat 6.2. This is probably
a bit old now (2003), but the sources and patches are provided and it's
easy enough to rebuild the tools in another environment.
GNU C, GNU C++, GNU Binutils and a replacement for genfw are included.
These are similar to the Alteon-supplied tools that run on Solaris.
However there are a few important differences from the supplied Solaris
- GCC 2.95.2 is used instead of GCC 2.7.2.
This newer compiler seems to generate faster code.
However, it may miscompile the "pri;joff" event loop in the
standard Alteon firmware. Beware! (We fixed that for our
application by changing the event loop code).
- If you are compiling the standard Alteon firmware with this newer
GCC, you must apply the patch in "firmware.patch".
- GNU Binutils 22.214.171.124.29 is used instead of Binutils 2.6.
- The target name is now "mips-alteon-elf", not "mips-sgi-irix5.3".
This means all the tool names are written e.g. "mips-alteon-elf-gcc".
- I've rewritten genfw in Perl. It simply calls readelf and objcopy
from Binutils to get the data. It has a some new features but it's
compatible with the Alteon genfw.
- One important new feature of genfw is that it will, by default,
align section sizes to a multiple of 4 bytes. This is required
because the newer tools sometimes pack data more tightly than the
old tools did, and if the section sizes are not aligned in the
output from genfw, some device drivers crash or fail to load the
I've added some nice extra features:
- The compiler defaults to -mips2 -mcpu=r6000 -G 0, which is
appropriate for the Tigon.
- Software integer multiplication and division are supported.
There are some new GCC flags: -msoft-mul, -msoft-div options,
enabled by default.
For multiplication or division by a constant, GCC will generate
an optimised sequence of shifts and adds (and subtracts and xors)
which is nice. Where neither operands are constant, a library call
is used. The functions are included in libgcc.a.
(In contrast the Alteon-supplied GCC sometimes simply fails at the
assembler stage if you use a multiply or divide).
- The rest of libgcc.a is built -- long long support, profiling etc.,
even exception handling if you want.
- C++ is included if you want to use that.
- Software floating point is enabled, and the accompanying floating
point library is included in libgcc.a. This is slow, but
- The assembler accepts li.d and li.s, for floating point constants.
It still rejects all MIPS floating point instructions.
- The assembler accepts some other macros (the ones for unaligned
loads and stores I think). The Tigon-2 documentation says it
provides these instructions, so we may as well support them in the
- The assembler has a flag -APIC (inherited from the Alteon source
patches but not supplied with the Solaris tools). GCC has a flag
-mAPIC which passes -APIC to the assembler. (Though, -Wa,-APIC has
the same effect).
- Using mips-alteon-elf-objcopy -O binary, you can make a raw binary
image of the firmware instead of using genfw and compiling the
These tools aren't really supported; they're a snapshot of what I'm
using day to day. RPMs (binary packages) for Red Hat 6.2, SRPMS, and
the patches to standard sources are provided and freely distributable
under the same terms as the GNU tools.
Note that the RPMs require Glibc 2.1. They can be installed with Glibc
2.0 using rpm --force but the tools will crash when run, so don't try.
If you're using a Linux based on Glibc 2.0 or Libc 5 (which is older),
it should work to rebuild the packages from the SRPMS or directly from