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
+49
-39
@@ -8,14 +8,51 @@
|
||||
* your option) any later version.
|
||||
*/
|
||||
|
||||
#if defined(__linux__) || defined(__FreeBSD__) || defined(GRUB)
|
||||
#define ETHERBOOT32
|
||||
#define ntohl(x) swap32(x)
|
||||
#define htonl(x) swap32(x)
|
||||
#define ntohs(x) swap16(x)
|
||||
#define htons(x) swap16(x)
|
||||
#define __LITTLE_ENDIAN /* x86 */
|
||||
|
||||
static inline unsigned long int swap32(unsigned long int x)
|
||||
/* Taken from /usr/include/linux/hfs_sysdep.h */
|
||||
#if defined(__BIG_ENDIAN)
|
||||
# if !defined(__constant_htonl)
|
||||
# define __constant_htonl(x) (x)
|
||||
# endif
|
||||
# if !defined(__constant_htons)
|
||||
# define __constant_htons(x) (x)
|
||||
# endif
|
||||
#elif defined(__LITTLE_ENDIAN)
|
||||
# if !defined(__constant_htonl)
|
||||
# define __constant_htonl(x) \
|
||||
((unsigned long int)((((unsigned long int)(x) & 0x000000ffU) << 24) | \
|
||||
(((unsigned long int)(x) & 0x0000ff00U) << 8) | \
|
||||
(((unsigned long int)(x) & 0x00ff0000U) >> 8) | \
|
||||
(((unsigned long int)(x) & 0xff000000U) >> 24)))
|
||||
# endif
|
||||
# if !defined(__constant_htons)
|
||||
# define __constant_htons(x) \
|
||||
((unsigned short int)((((unsigned short int)(x) & 0x00ff) << 8) | \
|
||||
(((unsigned short int)(x) & 0xff00) >> 8)))
|
||||
# endif
|
||||
#else
|
||||
# error "Don't know if bytes are big- or little-endian!"
|
||||
#endif
|
||||
|
||||
#define ntohl(x) \
|
||||
(__builtin_constant_p(x) ? \
|
||||
__constant_htonl((x)) : \
|
||||
__swap32(x))
|
||||
#define htonl(x) \
|
||||
(__builtin_constant_p(x) ? \
|
||||
__constant_htonl((x)) : \
|
||||
__swap32(x))
|
||||
#define ntohs(x) \
|
||||
(__builtin_constant_p(x) ? \
|
||||
__constant_htons((x)) : \
|
||||
__swap16(x))
|
||||
#define htons(x) \
|
||||
(__builtin_constant_p(x) ? \
|
||||
__constant_htons((x)) : \
|
||||
__swap16(x))
|
||||
|
||||
static inline unsigned long int __swap32(unsigned long int x)
|
||||
{
|
||||
__asm__("xchgb %b0,%h0\n\t"
|
||||
"rorl $16,%0\n\t"
|
||||
@@ -25,7 +62,7 @@ static inline unsigned long int swap32(unsigned long int x)
|
||||
return x;
|
||||
}
|
||||
|
||||
static inline unsigned short int swap16(unsigned short int x)
|
||||
static inline unsigned short int __swap16(unsigned short int x)
|
||||
{
|
||||
__asm__("xchgb %b0,%h0"
|
||||
: "=q" (x)
|
||||
@@ -33,38 +70,11 @@ static inline unsigned short int swap16(unsigned short int x)
|
||||
return x;
|
||||
}
|
||||
|
||||
#ifndef GRUB
|
||||
# include "linux-asm-string.h"
|
||||
#endif /* ! GRUB */
|
||||
/* Make routines available to all */
|
||||
#define swap32(x) __swap32(x)
|
||||
#define swap16(x) __swap16(x)
|
||||
|
||||
#include "linux-asm-io.h"
|
||||
#ifndef GRUB
|
||||
#define _edata edata /* ELF does not prepend a _ */
|
||||
#define _end end
|
||||
#endif /* ! GRUB */
|
||||
#endif
|
||||
|
||||
#ifdef __BCC__
|
||||
#define ETHERBOOT16
|
||||
#define inline
|
||||
#define const
|
||||
#define volatile
|
||||
#define setjmp _setjmp /* they are that way in libc.a */
|
||||
#define longjmp _longjmp
|
||||
|
||||
/* BCC include files are missing these. */
|
||||
typedef unsigned char u_char;
|
||||
typedef unsigned short u_short;
|
||||
typedef unsigned int u_int;
|
||||
typedef unsigned long u_long;
|
||||
#endif
|
||||
|
||||
#if !defined(ETHERBOOT16) && !defined(ETHERBOOT32)
|
||||
Error, neither ETHERBOOT16 nor ETHERBOOT32 defined
|
||||
#endif
|
||||
|
||||
#if defined(ETHERBOOT16) && defined(ETHERBOOT32)
|
||||
Error, both ETHERBOOT16 and ETHERBOOT32 defined
|
||||
#endif
|
||||
|
||||
typedef unsigned long Address;
|
||||
|
||||
|
||||
Reference in new issue
Block a user