diff options
author | Brian Somers <brian@FreeBSD.org> | 2004-07-08 13:40:33 +0000 |
---|---|---|
committer | Brian Somers <brian@FreeBSD.org> | 2004-07-08 13:40:33 +0000 |
commit | 59e1ebc9b560e3cadb9ef32eafa3ead5282cdac6 (patch) | |
tree | ebac46b3b358807a8144fabd366380413a43366c /sys/amd64 | |
parent | 390f67839aa3e11c19ac171022ddb3c813b3de70 (diff) | |
download | src-59e1ebc9b560e3cadb9ef32eafa3ead5282cdac6.tar.gz src-59e1ebc9b560e3cadb9ef32eafa3ead5282cdac6.zip |
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.
Notes
Notes:
svn path=/head/; revision=131814
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/amd64/autoconf.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/sys/amd64/amd64/autoconf.c b/sys/amd64/amd64/autoconf.c index c646741c0412..f5a4164090ce 100644 --- a/sys/amd64/amd64/autoconf.c +++ b/sys/amd64/amd64/autoconf.c @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); * devices are determined (from possibilities mentioned in ioconf.c), * and the drivers are initialized. */ -#include "opt_bootp.h" #include "opt_isa.h" #include "opt_nfs.h" #include "opt_nfsroot.h" @@ -143,15 +142,19 @@ configure_final(dummy) void cpu_rootconf() { -#ifdef BOOTP - bootpc_init(); -#endif + char *cp; + + if ((cp = getenv("bootp")) != NULL) { + bootpc_init(); + freeenv(cp); + } #if defined(NFSCLIENT) && defined(NFS_ROOT) -#if !defined(BOOTP_NFSROOT) - nfs_setup_diskless(); - if (nfs_diskless_valid) -#endif + if ((cp = getenv("bootp.nfsroot")) == NULL) + nfs_setup_diskless(); + if (cp != NULL || nfs_diskless_valid) rootdevnames[0] = "nfs:"; + if (cp != NULL) + freeenv(cp); #endif } SYSINIT(cpu_rootconf, SI_SUB_ROOT_CONF, SI_ORDER_FIRST, cpu_rootconf, NULL) |