Next Previous Contents

5. The development environment of Etherboot

Etherboot is written in C, with certain routines written in x86 assembler for access to machine resources or to do things not possible in C. The tools used are the GNU C compiler and GNU x86 assembler. ld is used to link the object files. objcopy is used to convert the output of the linker to pure binary, suitable for standalone execution. An auxiliary program called makerom converts this binary into a form suitable for writing into a ROM.

A Makefile coordinates all the building procedures. However there are many network adapters that differ only in the PCI vendor and device IDs. This information must be programmed into the ROM header using makerom. An auxiliary script called genrules.pl takes a file NIC, containing a tabular description of all the device names and IDs and outputs make rules to a file called Roms that is included by the main Makefile to generate all the ROM images. Another file included by Makefile is Config, which contains user configurable build parameters.

Let us take an example of a ROM image that we could build, mx987x5.lzrom. According to this line in the file NIC:


mx987x5         tulip           0x10d9,0x0531

the driver code is in tulip.c and the vendor ID is 0x10d9 and the device ID is 0x0531. If one were to say make bin32/mx987x5.lzrom, the following actions happen:


Next Previous Contents