summaryrefslogtreecommitdiffstats
path: root/sys/amd64
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/amd64
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/amd64')
-rw-r--r--sys/amd64/amd64/autoconf.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/sys/amd64/amd64/autoconf.c b/sys/amd64/amd64/autoconf.c
index c646741..f5a4164 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)
OpenPOWER on IntegriCloud