add a grub-specific tag into bootp/dhcp.
This commit is contained in:
parent
72bae78465
commit
55b7e8a890
3 changed files with 45 additions and 6 deletions
15
ChangeLog
15
ChangeLog
|
@ -1,3 +1,18 @@
|
||||||
|
2000-06-06 OKUJI Yoshinori <okuji@gnu.org>
|
||||||
|
|
||||||
|
* netboot/main.c (dhcprequest) [GRUB]: Set the length of the
|
||||||
|
Parameter Request List to (4 + 2).
|
||||||
|
Set the list to RFC1533_VENDOR_MAGIC and
|
||||||
|
RFC1533_VENDOR_CONFIGFILE in addition to the standard
|
||||||
|
parameters.
|
||||||
|
(decode_rfc1533) [GRUB]: If C is equal to
|
||||||
|
RFC1533_VENDOR_CONFIGFILE, copy the contents of the tag to
|
||||||
|
CONFIG_FILE.
|
||||||
|
If C is equal to RFC1533_VENDOR_MAGIC, increment
|
||||||
|
VENDOREXT_ISVALID.
|
||||||
|
* netboot/etherboot.h [GRUB] (RFC1533_VENDOR_CONFIGFILE): New
|
||||||
|
macro. Defined as 150.
|
||||||
|
|
||||||
2000-06-03 OKUJI Yoshinori <okuji@gnu.org>
|
2000-06-03 OKUJI Yoshinori <okuji@gnu.org>
|
||||||
|
|
||||||
* stage2/asm.S (check_int13_extensions): Check the bitmap only
|
* stage2/asm.S (check_int13_extensions): Check the bitmap only
|
||||||
|
|
|
@ -261,6 +261,10 @@ Author: Martin Renters
|
||||||
#define RFC1533_VENDOR_IMG 192
|
#define RFC1533_VENDOR_IMG 192
|
||||||
#define RFC1533_VENDOR_NUMOFIMG 16
|
#define RFC1533_VENDOR_NUMOFIMG 16
|
||||||
|
|
||||||
|
#ifdef GRUB
|
||||||
|
# define RFC1533_VENDOR_CONFIGFILE 150
|
||||||
|
#endif /* GRUB */
|
||||||
|
|
||||||
#define RFC1533_END 255
|
#define RFC1533_END 255
|
||||||
#define BOOTP_VENDOR_LEN 64
|
#define BOOTP_VENDOR_LEN 64
|
||||||
#ifndef NO_DHCP_SUPPORT
|
#ifndef NO_DHCP_SUPPORT
|
||||||
|
|
|
@ -91,21 +91,29 @@ static const char dhcprequest[] =
|
||||||
RFC2132_MAX_SIZE, 2, 2, 64,
|
RFC2132_MAX_SIZE, 2, 2, 64,
|
||||||
/* request parameters */
|
/* request parameters */
|
||||||
RFC2132_PARAM_LIST,
|
RFC2132_PARAM_LIST,
|
||||||
#ifdef IMAGE_FREEBSD
|
#ifdef GRUB
|
||||||
|
/* 4 standard + 2 vendortags */
|
||||||
|
4 + 2,
|
||||||
|
#else
|
||||||
|
# ifdef IMAGE_FREEBSD
|
||||||
/* 4 standard + 4 vendortags + 8 motd + 16 menu items */
|
/* 4 standard + 4 vendortags + 8 motd + 16 menu items */
|
||||||
4 + 4 + 8 + 16,
|
4 + 4 + 8 + 16,
|
||||||
#else
|
# else
|
||||||
/* 4 standard + 3 vendortags + 8 motd + 16 menu items */
|
/* 4 standard + 3 vendortags + 8 motd + 16 menu items */
|
||||||
4 + 3 + 8 + 16,
|
4 + 3 + 8 + 16,
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
/* Standard parameters */
|
/* Standard parameters */
|
||||||
RFC1533_NETMASK, RFC1533_GATEWAY,
|
RFC1533_NETMASK, RFC1533_GATEWAY,
|
||||||
RFC1533_HOSTNAME, RFC1533_EXTENSIONPATH,
|
RFC1533_HOSTNAME, RFC1533_EXTENSIONPATH,
|
||||||
/* Etherboot vendortags */
|
/* Etherboot vendortags */
|
||||||
RFC1533_VENDOR_MAGIC,
|
RFC1533_VENDOR_MAGIC,
|
||||||
#ifdef IMAGE_FREEBSD
|
#ifdef GRUB
|
||||||
|
RFC1533_VENDOR_CONFIGFILE,
|
||||||
|
#else /* ! GRUB */
|
||||||
|
# ifdef IMAGE_FREEBSD
|
||||||
RFC1533_VENDOR_HOWTO,
|
RFC1533_VENDOR_HOWTO,
|
||||||
#endif
|
# endif
|
||||||
RFC1533_VENDOR_MNUOPTS, RFC1533_VENDOR_SELECTION,
|
RFC1533_VENDOR_MNUOPTS, RFC1533_VENDOR_SELECTION,
|
||||||
/* 8 MOTD entries */
|
/* 8 MOTD entries */
|
||||||
RFC1533_VENDOR_MOTD,
|
RFC1533_VENDOR_MOTD,
|
||||||
|
@ -133,6 +141,7 @@ static const char dhcprequest[] =
|
||||||
RFC1533_VENDOR_IMG + 13,
|
RFC1533_VENDOR_IMG + 13,
|
||||||
RFC1533_VENDOR_IMG + 14,
|
RFC1533_VENDOR_IMG + 14,
|
||||||
RFC1533_VENDOR_IMG + 15,
|
RFC1533_VENDOR_IMG + 15,
|
||||||
|
#endif /* ! GRUB */
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* ! NO_DHCP_SUPPORT */
|
#endif /* ! NO_DHCP_SUPPORT */
|
||||||
|
@ -953,8 +962,6 @@ decode_rfc1533 (unsigned char *p, int block, int len, int eof)
|
||||||
}
|
}
|
||||||
#endif /* ! NO_DHCP_SUPPORT */
|
#endif /* ! NO_DHCP_SUPPORT */
|
||||||
|
|
||||||
/* GRUB needs not to use any vendor-specific extension. */
|
|
||||||
#ifndef GRUB
|
|
||||||
else if (c == RFC1533_VENDOR_MAGIC
|
else if (c == RFC1533_VENDOR_MAGIC
|
||||||
# ifndef IMAGE_FREEBSD /* since FreeBSD uses tag 128 for swap definition */
|
# ifndef IMAGE_FREEBSD /* since FreeBSD uses tag 128 for swap definition */
|
||||||
&& TAG_LEN(p) >= 6 &&
|
&& TAG_LEN(p) >= 6 &&
|
||||||
|
@ -963,6 +970,19 @@ decode_rfc1533 (unsigned char *p, int block, int len, int eof)
|
||||||
# endif
|
# endif
|
||||||
)
|
)
|
||||||
vendorext_isvalid++;
|
vendorext_isvalid++;
|
||||||
|
|
||||||
|
/* GRUB now handles its own tag. Get the name of a configuration
|
||||||
|
file from the network. Cool... */
|
||||||
|
#ifdef GRUB
|
||||||
|
else if (c == RFC1533_VENDOR_CONFIGFILE)
|
||||||
|
{
|
||||||
|
grub_memmove (config_file, p + 2, TAG_LEN (p));
|
||||||
|
|
||||||
|
/* FIXME: Is this below really necessary??? */
|
||||||
|
config_file[TAG_LEN (p)] = 0;
|
||||||
|
}
|
||||||
|
#else /* ! GRUB */
|
||||||
|
|
||||||
# ifdef IMAGE_FREEBSD
|
# ifdef IMAGE_FREEBSD
|
||||||
else if (c == RFC1533_VENDOR_HOWTO) {
|
else if (c == RFC1533_VENDOR_HOWTO) {
|
||||||
freebsd_howto = ((p[2]*256+p[3])*256+p[4])*256+p[5];
|
freebsd_howto = ((p[2]*256+p[3])*256+p[4])*256+p[5];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue