2002-01-03 Yoshinori K. Okuji <okuji@gnu.org>

Update the netboot stuff to Etherboot-5.0.5.

	* configure.in (--enable-3c590): Removed. This was a mistake.
	(--enable-davicom): New option.
	(--enable-eepro): Likewise.
	(--enable-natsemi): Likewise.
	(--enable-ni5010): Likewise.
	(--enable-sis900): Likewise.
	(--enable-w89c840): Likewise.
	(--enable-3c509-hack): Removed.
	(--enable-ns8390-force-16bit): Likewise.

	* netboot/Makefile.am (libdrivers_a_SOURCES): Added timer.c and
	timer.h.
	(EXTRA_libdrivers_a_SOURCES): Added davicom.c, eepro.c, fa311.c,
	natsemi.c, ni5010.c, sis900.c, sis900.h, tlan.c and w89c840.c.
	(EXTRA_DIST): Added sis900.txt.
	(3c595_drivers): Remove 3c590.o from this.
	(davicom_drivers): New variable.
	(eepro_drivers): Likewise.
	(natsemi_drivers): Likewise.
	(ni5010_drivers): Likewise.
	(sis900_drivers): Likewise.
	(w89c840_drivers): Likewise.
	(3c590_o_CFLAGS): Removed.
	(davicom_o_CFLAGS): New variable.
	(eepro_o_CFLAGS): Likewise.
	(natsemi_o_CFLAGS): Likewise.
	(ni5010_o_CFLAGS): Likewise.
	(sis900_o_CFLAGS): Likewise.
	(w89c840_o_CFLAGS): Likewise.

	* netboot/davicom.c: New file, from Etherboot-5.0.5.
	* netboot/eepro.c: Likewise.
	* netboot/natsemi.c: Likewise.
	* netboot/ni5010.c: Likewise.
	* netboot/sis900.c: Likewise.
	* netboot/sis900.h: Likewise.
	* netboot/sis900.txt: Likewise.
	* netboot/timer.c: Likewise.
	* netboot/timer.h: Likewise.
	* netboot/w89c840.c: Likewise.
	* netboot/fa311.c: Likewise.
	* netboot/tlan.c: Likewise.

	* netboot/3c509.c: Copied from Etherboot-5.0.5.
	* netboot/3c509.h: Likewise.
	* netboot/3c595.c: Likewise.
	* netboot/3c90x.c: Likewise.
	* netboot/3c90x.txt: Likewise.
	* netboot/cards.h: Likewise.
	* netboot/cs89x0.c: Likewise.
	* netboot/depca.c: Likewise.
	* netboot/eepro100.c: Likewise.
	* netboot/epic100.c: Likewise.
	* netboot/i82586.c: Likewise.
	* netboot/lance.c: Likewise.
	* netboot/linux-asm-string.h: Likewise.
	* netboot/nic.h: Likewise.
	* netboot/ns8390.c: Likewise.
	* netboot/ns8390.h: Likewise.
	* netboot/otulip.c: Likewise.
	* netboot/pci.h: Likewise.
	* netboot/rtl8139.c: Likewise.
	* netboot/sk_g16.c: Likewise.
	* netboot/smc9000.c: Likewise.
	* netboot/tiara.c: Likewise.
	* netboot/tulip.c: Likewise.
	* netboot/via-rhine.c: Likewise.

	* netboot/config.c: Applied a diff between Etherboot-4.6.18 and
	Etherboot-5.0.5 manually.
	* netboot/main.c: Likewise.
	* netboot/pci.c: Likewise.
	* netboot/etherboot.h: Rewritten mostly from scratch, based on
	the same file in Etherboot-5.0.5.
	* netboot/misc.c: Likewise.
	* netboot/osdep.h: Likewise.
	* netboot/fsys_tftp.c (GRUB): Defined.
	(buf_fill): Use rfc2131_sleep_interval instead of rfc951_sleep.

	* stage2/builtins.c [SUPPORT_NETBOOT] (GRUB): Defined.
	(boot_func) [SUPPORT_NETBOOT]: Call cleanup_net.
	* stage2/cmdline.c [SUPPORT_DISKLESS] (GRUB): Defined.
	* stage2/common.c [SUPPORT_DISKLESS] (GRUB): Likewise.
This commit is contained in:
okuji committed 2002-01-02 21:56:40 +00:00
1 parent daa965eccc
commit 973e6f4129
54 files changed
+13400 -3545

No files matched your search

+10 -12
View File
@@ -43,7 +43,7 @@ static struct txdesc txd;
#define NRXD 4
static struct rxdesc rxd[NRXD];
static int rxd_tail = 0;
#ifndef USE_INTERNAL_BUFFER
#ifdef USE_LOWMEM_BUFFER
#define rxb ((char *)0x10000 - NRXD * BUFLEN)
#define txb ((char *)0x10000 - NRXD * BUFLEN - BUFLEN)
#else
@@ -51,7 +51,7 @@ static unsigned char rxb[NRXD * BUFLEN];
static unsigned char txb[BUFLEN];
#endif
static unsigned char ehdr[ETHER_HDR_SIZE]; /* buffer for ethernet header */
static unsigned char ehdr[ETH_HLEN]; /* buffer for ethernet header */
enum tulip_offsets {
CSR0=0, CSR1=0x08, CSR2=0x10, CSR3=0x18, CSR4=0x20, CSR5=0x28,
@@ -270,17 +270,17 @@ static void tulip_transmit(struct nic *nic, const char *d, unsigned int t, unsig
/* setup ethernet header */
memcpy(ehdr, d, ETHER_ADDR_SIZE);
memcpy(&ehdr[ETHER_ADDR_SIZE], nic->node_addr, ETHER_ADDR_SIZE);
ehdr[ETHER_ADDR_SIZE*2] = (t >> 8) & 0xff;
ehdr[ETHER_ADDR_SIZE*2+1] = t & 0xff;
memcpy(ehdr, d, ETH_ALEN);
memcpy(&ehdr[ETH_ALEN], nic->node_addr, ETH_ALEN);
ehdr[ETH_ALEN*2] = (t >> 8) & 0xff;
ehdr[ETH_ALEN*2+1] = t & 0xff;
/* setup the transmit descriptor */
memset(&txd, 0, sizeof(struct txdesc));
txd.buf1addr = &ehdr[0]; /* ethernet header */
txd.buf1sz = ETHER_HDR_SIZE;
txd.buf1sz = ETH_HLEN;
txd.buf2addr = p; /* packet to transmit */
txd.buf2sz = s;
@@ -350,7 +350,7 @@ struct nic *otulip_probe(struct nic *nic, unsigned short *io_addrs, struct pci_d
membase = (unsigned int *)pci->membase;
/* wakeup chip */
pcibios_write_config_dword(0,pci->devfn,0x40,0x00000000);
pcibios_write_config_dword(pci->bus,pci->devfn,0x40,0x00000000);
/* Stop the chip's Tx and Rx processes. */
/* outl(inl(ioaddr + CSR6) & ~0x2002, ioaddr + CSR6); */
@@ -359,12 +359,10 @@ struct nic *otulip_probe(struct nic *nic, unsigned short *io_addrs, struct pci_d
srom_read();
for (i=0; i < 6; i++)
for (i=0; i < ETH_ALEN; i++)
nic->node_addr[i] = srom[20+i];
printf("Tulip %b:%b:%b:%b:%b:%b at ioaddr 0x%x\n",
srom[20],srom[21],srom[22],srom[23],srom[24],srom[25],
ioaddr);
printf("Tulip %! at ioaddr %#hX\n", nic->node_addr, ioaddr);
tulip_reset(nic);