Subject: Re: Diskless systems
To: Mark Randelhoff <MarkR@cat.co.za>
From: Matthias Drochner <drochner@zel459.zel.kfa-juelich.de>
List: port-i386
Date: 09/09/1999 19:39:16
MarkR@cat.co.za said:
> I have stopped trying to get my 3c905c-tx working in favour of a
> 3c905b.  

Watch out for buggy 3c905b models! There is some type number on
the ASIC, if it ends with "-1", you are out of luck. These cards
don't map the EPROM properly.
Perhaps the 905c works with the existing code, it would just
need an entry similar to the 905b in the "excards[]" table in
3c90xb.c, with the card's PCI id (0x9200).

> I managed without too much difficulty to get netboot and genprom to produce a  
> file of about 50K and a rom of 64K (512 kbit rom). I then programmed a (28pin)  
> 27C512 with what I presumed was the binary format

A 64k ROM image might be a bit too big for the BIOS. I've seen
cases where the BIOS ignored these, probably because it didn't
have enough space to map it. You could try something above
32k; it must be a multiple of 512. The "genprom" tool will
complain if the image doesn't fit, so you can easily try.
The "netboot.rom" file is what goes into the EPROM.
27c512 should be OK. I'm using 27c256 in most cases, if one
doesn't include all features, the image will fit into less
than 32k.

> I assume something is working because I dont get a boot error 
> problem from the BIOS

It rather seems that the ROM is ignored by the BIOS. This can be
for different reasons, eg image too large, the said broken
3com card, or a strange BIOS. You should also make sure the
PCI-PnP header is enabled in the Makefile and the PCI id matches
your card. Ie
USE_NETIF= 3c90xb
CPPFLAGS+= -DPCIROM -DPCI_VID=0x10b7 -DPCI_CLASS=0x020000
CPPFLAGS+= -DPCI_DID=0x9055 # 3c905b TX

(The id in the last line would have to be 0x9200 if you
use the 905c.)

> On my boot server, I compiled the ramdisk code under /usr/src/distrib/i386/floppies/ramdisk 
> and produced a /dev/vnd0a

You don't need this. The ROM code loads a plain kernel and starts it.
The kernel will get its root file system via NFS then. There is not
necessarily a ramdisk. (There can be one, if you load a kernel with
embedded ramdisk like the one on the install floppy.)

> I have previously set up a bootp & tftp server for a bootrom supplied for the 3c905c with the 
> 3com bootrom; this is still installed and pointing to the tftpboot directory. Is this still necessary 
> and if so should it point to /mnt? 

The ROM can load the kernel via NFS or TFTP. In many cases, NFS is easier 
because
there has to be an NFS exported root file system anyway. Then simply the 
/netbsd
kernel file will be loaded, like in a normal system.
For configuration, BOOTP is a good choice. You need to set the "root path" tag 
which
points to the NFS root directory. "tftpboot" isn't needed then.
A ROM for this boot method should be compiled with these lines uncommented:
CPPFLAGS+= -DSUPPORT_BOOTP -DSUPPORT_DHCP
CPPFLAGS+= -DSUPPORT_NFS
SRCS+= nfs.c
CPPFLAGS+= -I${.CURDIR}/../libsa

best regards
Matthias