summaryrefslogtreecommitdiffstats
path: root/sys/ia64
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2004-07-08 13:40:33 +0000
committerbrian <brian@FreeBSD.org>2004-07-08 13:40:33 +0000
commit2821a50eaafae3e4c7204aef9e58c6f40d221bbb (patch)
treeebac46b3b358807a8144fabd366380413a43366c /sys/ia64
parent7c245468ef2fa07526f2540ec91012b5c7f4e9c8 (diff)
downloadFreeBSD-src-2821a50eaafae3e4c7204aef9e58c6f40d221bbb.zip
FreeBSD-src-2821a50eaafae3e4c7204aef9e58c6f40d221bbb.tar.gz
Change the following kernel options to environment variables:
BOOTP -> bootp BOOTP_NFSROOT -> bootp.nfsroot BOOTP_NFSV3 -> bootp.nfsv3 BOOTP_COMPAT -> bootp.compat BOOTP_WIRED_TO -> bootp.wired_to This lets you PXE boot with a GENERIC kernel by putting this sort of thing in loader.conf: bootp="YES" bootp.nfsroot="YES" bootp.nfsv3="YES" bootp.wired_to="bge1" or even setting the variables manually from the OK prompt.
Diffstat (limited to 'sys/ia64')
-rw-r--r--sys/ia64/ia64/autoconf.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/sys/ia64/ia64/autoconf.c b/sys/ia64/ia64/autoconf.c
index dcfd1b0..df2e03b 100644
--- a/sys/ia64/ia64/autoconf.c
+++ b/sys/ia64/ia64/autoconf.c
@@ -26,7 +26,6 @@
* $FreeBSD$
*/
-#include "opt_bootp.h"
#include "opt_isa.h"
#include "opt_nfs.h"
#include "opt_nfsroot.h"
@@ -54,9 +53,7 @@
static void configure(void *);
SYSINIT(configure, SI_SUB_CONFIGURE, SI_ORDER_THIRD, configure, NULL)
-#ifdef BOOTP
void bootpc_init(void);
-#endif
#ifdef DEV_ISA
#include <isa/isavar.h>
@@ -99,18 +96,18 @@ configure(void *dummy)
void
cpu_rootconf()
{
-#if defined(NFSCLIENT) && defined(NFS_ROOT)
- int order = 0;
-#endif
+ char *cp;
-#ifdef BOOTP
- bootpc_init();
-#endif
+ if ((cp = getenv("bootp")) != NULL) {
+ bootpc_init();
+ freeenv(cp);
+ cp = NULL;
+ }
#if defined(NFSCLIENT) && defined(NFS_ROOT)
-#if !defined(BOOTP_NFSROOT)
- if (nfs_diskless_valid)
-#endif
- rootdevnames[order++] = "nfs:";
+ if (nfs_diskless_valid || (cp = getenv("bootp.nfsroot")) != NULL)
+ rootdevnames[0] = "nfs:";
+ if (cp != NULL)
+ freeenv(cp);
#endif
}
SYSINIT(cpu_rootconf, SI_SUB_ROOT_CONF, SI_ORDER_FIRST, cpu_rootconf, NULL)
OpenPOWER on IntegriCloud