mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-27 09:39:22 +00:00
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:
1 parent
daa965eccc
commit
973e6f4129
54 files changed
+13400
-3545
No files matched your search
+11
-18
@@ -125,7 +125,7 @@ static void tiara_reset(struct nic *nic)
|
||||
while ((inb(ioaddr + DLCR_RECV_MODE) & BUF_EMPTY) == 0)
|
||||
inb(ioaddr + BMPR_MEM_PORT);
|
||||
/* Set node address */
|
||||
for (i = 0; i < ETHER_ADDR_SIZE; ++i)
|
||||
for (i = 0; i < ETH_ALEN; ++i)
|
||||
outb(nic->node_addr[i], ioaddr + DLCR_NODE_ID + i);
|
||||
outb(CLR_RCV_STATUS, ioaddr + DLCR_RECV_STAT);
|
||||
outb(CARD_ENABLE, ioaddr + DLCR_ENABLE);
|
||||
@@ -145,11 +145,11 @@ static int tiara_poll(struct nic *nic)
|
||||
len = inw(ioaddr + BMPR_MEM_PORT); /* throw away status */
|
||||
len = inw(ioaddr + BMPR_MEM_PORT);
|
||||
/* Drop overlength packets */
|
||||
if (len > ETH_MAX_PACKET)
|
||||
if (len > ETH_FRAME_LEN)
|
||||
return (0); /* should we drain the buffer? */
|
||||
insw(ioaddr + BMPR_MEM_PORT, nic->packet, len / 2);
|
||||
/* If it's our own, drop it */
|
||||
if (memcmp(nic->packet + ETHER_ADDR_SIZE, nic->node_addr, ETHER_ADDR_SIZE) == 0)
|
||||
if (memcmp(nic->packet + ETH_ALEN, nic->node_addr, ETH_ALEN) == 0)
|
||||
return (0);
|
||||
nic->packetlen = len;
|
||||
return (1);
|
||||
@@ -168,17 +168,17 @@ const char *p) /* Packet */
|
||||
unsigned int len;
|
||||
unsigned long time;
|
||||
|
||||
len = s + ETHER_HDR_SIZE;
|
||||
if (len < ETH_MIN_PACKET)
|
||||
len = ETH_MIN_PACKET;
|
||||
len = s + ETH_HLEN;
|
||||
if (len < ETH_ZLEN)
|
||||
len = ETH_ZLEN;
|
||||
t = htons(t);
|
||||
outsw(ioaddr + BMPR_MEM_PORT, d, ETHER_ADDR_SIZE / 2);
|
||||
outsw(ioaddr + BMPR_MEM_PORT, nic->node_addr, ETHER_ADDR_SIZE / 2);
|
||||
outsw(ioaddr + BMPR_MEM_PORT, d, ETH_ALEN / 2);
|
||||
outsw(ioaddr + BMPR_MEM_PORT, nic->node_addr, ETH_ALEN / 2);
|
||||
outw(t, ioaddr + BMPR_MEM_PORT);
|
||||
outsw(ioaddr + BMPR_MEM_PORT, p, s / 2);
|
||||
if (s & 1) /* last byte */
|
||||
outb(p[s-1], ioaddr + BMPR_MEM_PORT);
|
||||
while (s++ < ETH_MIN_PACKET - ETHER_HDR_SIZE) /* pad */
|
||||
while (s++ < ETH_ZLEN - ETH_HLEN) /* pad */
|
||||
outb(0, ioaddr + BMPR_MEM_PORT);
|
||||
outw(len | (TMST << 8), ioaddr + BMPR_PKT_LEN);
|
||||
/* wait for transmit complete */
|
||||
@@ -206,20 +206,13 @@ static int tiara_probe1(struct nic *nic)
|
||||
static char all_ones[] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ETHER_ADDR_SIZE; ++i)
|
||||
for (i = 0; i < ETH_ALEN; ++i)
|
||||
nic->node_addr[i] = inb(ioaddr + PROM_ID + i);
|
||||
if (memcmp(nic->node_addr, vendor_prefix, sizeof(vendor_prefix)) != 0)
|
||||
return (0);
|
||||
if (memcmp(nic->node_addr, all_ones, sizeof(all_ones)) == 0)
|
||||
return (0);
|
||||
printf("\nTiara ioaddr 0x%x, addr ", ioaddr);
|
||||
for (i = 0; i < ETHER_ADDR_SIZE; ++i)
|
||||
{
|
||||
printf("%b", nic->node_addr[i]);
|
||||
if (i < ETHER_ADDR_SIZE - 1)
|
||||
printf(":");
|
||||
}
|
||||
putchar('\n');
|
||||
printf("\nTiara ioaddr %#hX, addr %!\n", ioaddr, nic->node_addr);
|
||||
return (1);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user