diff options
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 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) |