Next Previous Contents

2. Unpacking, compiling and testing the package

This section is Etherboot specific.

2.1 Unpacking the distribution

Unpack the distribution using gunzip and tar, using one of the following commands, where you replace x by the patchlevel number:


        tar zxvf etherboot-4.4.x.tar.gz
        gunzip < etherboot-4.4.x.tar.gz | tar xvf -
        bunzip2 < etherboot-4.4.x.tar.bz2 | tar xvf -

2.2 Compiling the ROM images

To build the ROM images you need a recent release of gcc and the binutils tools. This package was compiled with the tools from a RedHat 6.0 distribution but it should work with any recent Linux or FreeBSD distribution. For the 16 bit version you need the bcc tools from the Embedded Linux Kernel Subset (ELKS) project, for more details see the notes on 16 bit Etherboot. You need the 16 bit version only if you intend to run Etherboot on a 286 or 086/088 PC.

Assuming you have decided to make the 32 bit version, you only have to go to src-32/, edit the options in Config and say make. This will create all the ROM images available. The .lzrom images are the same as the .rom images. Since the .lzrom images are smaller and work exactly the same, there is no real reason to use .rom images any more, unless you are nervous about compression algorithm patents. We believe the algorithm used does not infringe patents, having been in public use for some time, but we do not know all the legal ramifications. See here for more details.

Here is a brief description of the options available:


Basic options:

-DNO_DHCP_SUPPORT-Use BOOTP instead of DHCP
-DIMAGE_MENU    - Allow to interactively chose between different
                  bootimages; read vendortags.html for further
                  information.
-DMOTD          - Display message of the day; read vendortags.html
                  for further information.
-DASK_BOOT=n    - Ask "Boot from Network or from Local? " at startup,
                  timeout after n seconds (0 = no timeout); this
                  can be done in a more generic way by using the
                  IMAGE_MENU, but it requires that the "bootp"
                  server is accessible, even when booting locally.
-DANS_DEFAULT=ANS_NETWORK
                - Assume Network to previous question
                  (alternative: ANS_LOCAL) on timeout or Return key
                  See etherboot.h for prompt and answer strings.
-DEMERGENCYDISKBOOT
                - if no BOOTP server can be found, then boot from
                  local disk. The accessibility of the TFTP server
                  has no effect, though! So configure your BOOTP
                  server properly.  You should probably reduce
                  MAX_BOOTP_RETRIES to a small number like 3.

Basic options only on Etherboot/32:

-DAOUT_IMAGE    - Add FreeBSD boot support (a.out kernels)
-DELF_IMAGE     - Add FreeBSD boot support (ELF kernels)
-DPASSWD        - enable password protection for boot images; this
                  requires -DIMAGE_MENU
-DUSRPARMS      - allow the user to interactively edit parameters
                  that are passed to the booted kernel; you should
                  probably enable -DPASSWD as well; this feature
                  requires -DIMAGE_MENU
-DANSIESC       - evaluate a subset of common ANSI escape sequences
                  when displaying the message of the day; this
                  probably does not make sense unless you also
                  define -DMOTD or at least -DIMAGE_MENU.
                  Combine this option with -DSERIAL_CONSOLE
                  only if you are using DUAL
-DGFX           - support extensions to the ANSI escape sequences for
                  displaying graphics (icons or logos); this
                  requires -DANSIESC
-DFLOPPY        - boot from floppy/hd if bootimage matches the
                  pattern "/dev/[fh]d*"; if you do not have
                  enough space in the EPROM, then disable this
                  feature and use "mknbi-blkdev" for booting
                  from a local blockdevice.
-DCONFIG_PCI_DIRECT
                - define this for PCI BIOSes that do not implement
                  BIOS32 or not correctly
-DINTERNAL_BOOTP_DATA
                - define if the area 0x93C00-0x93FFF is not available
                  for use for bootpd_data by the loader for some reason

These options should normally not need to be touched:

-DNOINT19H      - Take control as soon as BIOS detects the ROM
                  Normally hooks onto INT19H
-DMOVEROM       - if your motherboard does not cache adapter memory
                  space, then this option can speed up loading of
                  compressed BOOT-Prom images. It has no effect on
                  uncompressed images. Unless you are very tight on
                  free space, you will usually want to define this
                  option.
-DDELIMITERLINES - print a line of = characters at the start
                  and also just before starting an image.
-DSIZEINDICATOR - update a running total of the amount of code
                  loaded so far, in kilobytes.
-DT509HACK      - send two bootp packets before waiting for a 
                  reply to the first. Makes a 3c509 do bootp
                  quicker.
-DMCA           - Compile 3c529 (MCA version) support in 3c509 driver.
-DT503_AUI      - Use AUI by default on 3c503 cards.
-DCONGESTED     - Define this to enable TFTP retransmissions which may be
                  needed on congested networks.

These options are only for a serial console for Etherboot/32:

-DSERIAL_CONSOLE
                - set for serial console, set to DUAL for serial
                 and CRT console
-DCOMCONSOLE    - set port, e.g. 0x378
CONSPEED        - set speed. Note, not -DCONSPEED, this is a Make
                 define.
-DCOMPARM       - set Line Control Register value for data bits, stop
                 bits and parity. See a National Semiconductor 8250/
                 16450/16550 data sheet for bit meanings.
                 If undefined, defaults to 0x03 = 8N1.

You may also wish to examine file NIC for other options that may need adjustment. If you find you need to adjust the PCI vendor and device IDs, add the appropriate line to this file (and send me a copy). If you do set the IDs correctly, the floppy version will work, but the ROM will not. The PCI IDs are usually displayed by the BIOS on booting up. They can also be read out from a running Linux system using the Linux PCI Utilities.

2.3 Testing the ROM images

You can test the image with a floppy before programming an EPROM. On Linux just put a blank floppy in fd0 and say make card.fd0 where card is the name of your network card and it will copy a bootable image onto the floppy. If you wish to do this by hand, it's easy, just make floppyload.bin and prepend floppyload.bin to card.rom (or card.lzrom) and write this combined binary to the floppy raw, i.e. starting at the boot block. Like this:


        cat floppyload.bin 3c509.lzrom > /dev/fd0

When you boot with this floppy it will load the Etherboot ROM image from floppy and execute it. It should be able to detect your card. To get the bootrom to acquire an IP address and load the intended code, you need to set up bootp, tftp and NFS services, which we will discuss next.

We suggest you continue to use floppy booting until you have completed the setup of the server and are satisfied that diskless booting works.


Next Previous Contents