mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-25 16:49:23 +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
+13
-9
@@ -30,6 +30,7 @@ Author: Martin Renters
|
||||
|
||||
#include <filesys.h>
|
||||
|
||||
#define GRUB 1
|
||||
#include <etherboot.h>
|
||||
#include <nic.h>
|
||||
|
||||
@@ -56,13 +57,15 @@ buf_fill (int abort)
|
||||
while (! buf_eof && (buf_read + packetsize <= FSYS_BUFLEN))
|
||||
{
|
||||
struct tftp_t *tr;
|
||||
|
||||
long timeout;
|
||||
|
||||
#ifdef CONGESTED
|
||||
if (! await_reply (AWAIT_TFTP, iport, NULL,
|
||||
block ? TFTP_REXMT : TIMEOUT))
|
||||
timeout = rfc2131_sleep_interval (block ? TFTP_REXMT : TIMEOUT, retry);
|
||||
#else
|
||||
if (! await_reply (AWAIT_TFTP, iport, NULL, TIMEOUT))
|
||||
timeout = rfc2131_sleep_interval (TIMEOUT, retry);
|
||||
#endif
|
||||
|
||||
if (! await_reply (AWAIT_TFTP, iport, NULL, timeout))
|
||||
{
|
||||
if (ip_abort)
|
||||
return 0;
|
||||
@@ -73,7 +76,6 @@ buf_fill (int abort)
|
||||
#ifdef TFTP_DEBUG
|
||||
grub_printf ("Maybe initial request was lost.\n");
|
||||
#endif
|
||||
rfc951_sleep (retry);
|
||||
if (! udp_transmit (arptable[ARP_SERVER].ipaddr.s_addr,
|
||||
++iport, TFTP_PORT, len, &tp))
|
||||
return 0;
|
||||
@@ -98,7 +100,7 @@ buf_fill (int abort)
|
||||
return 0;
|
||||
}
|
||||
|
||||
tr = (struct tftp_t *) &nic.packet[ETHER_HDR_SIZE];
|
||||
tr = (struct tftp_t *) &nic.packet[ETH_HLEN];
|
||||
if (tr->opcode == ntohs (TFTP_ERROR))
|
||||
{
|
||||
grub_printf ("TFTP error %d (%s)\n",
|
||||
@@ -161,7 +163,9 @@ buf_fill (int abort)
|
||||
tp.u.err.errcode = 8;
|
||||
len = (grub_sprintf ((char *) tp.u.err.errmsg,
|
||||
"RFC1782 error")
|
||||
+ TFTP_MIN_PACKET + 1);
|
||||
+ sizeof (tp.ip) + sizeof (tp.udp)
|
||||
+ sizeof (tp.opcode) + sizeof (tp.u.err.errcode)
|
||||
+ 1);
|
||||
udp_transmit (arptable[ARP_SERVER].ipaddr.s_addr,
|
||||
iport, ntohs (tr->udp.src),
|
||||
len, &tp);
|
||||
@@ -413,7 +417,7 @@ tftp_dir (char *dirname)
|
||||
grub_printf ("tftp_dir (%s)\n", dirname);
|
||||
#endif
|
||||
|
||||
/* In TFTP, there is no way to know what files exis. */
|
||||
/* In TFTP, there is no way to know what files exist. */
|
||||
if (print_possibilities)
|
||||
return 1;
|
||||
|
||||
@@ -429,7 +433,7 @@ tftp_dir (char *dirname)
|
||||
len = (grub_sprintf ((char *) tp.u.rrq,
|
||||
"%s%coctet%cblksize%c%d%ctsize%c0",
|
||||
dirname, 0, 0, 0, TFTP_MAX_PACKET, 0, 0)
|
||||
+ sizeof (struct iphdr) + sizeof (struct udphdr) + 2 + 1);
|
||||
+ sizeof (tp.ip) + sizeof (tp.udp) + sizeof (tp.opcode) + 1);
|
||||
/* Restore the original DIRNAME. */
|
||||
dirname[grub_strlen (dirname)] = ch;
|
||||
/* Save the TFTP packet so that we can reopen the file later. */
|
||||
|
||||
Reference in new issue
Block a user