From owner-cvs-all Fri Apr 5 4:17:33 2002 Delivered-To: cvs-all@freebsd.org Received: from Awfulhak.org (gw.Awfulhak.org [217.204.245.18]) by hub.freebsd.org (Postfix) with ESMTP id 83A5737B41A; Fri, 5 Apr 2002 04:17:11 -0800 (PST) Received: from hak.lan.Awfulhak.org (root@hak.lan.Awfulhak.org [IPv6:fec0::1:12]) by Awfulhak.org (8.12.2/8.11.6) with ESMTP id g35CH8Cu003943; Fri, 5 Apr 2002 13:17:08 +0100 (BST) (envelope-from brian@freebsd-services.com) Received: from hak.lan.Awfulhak.org (brian@localhost [127.0.0.1]) by hak.lan.Awfulhak.org (8.12.2/8.12.2) with ESMTP id g35CH3q7029711; Fri, 5 Apr 2002 13:17:03 +0100 (BST) (envelope-from brian@freebsd-services.com) Message-Id: <200204051217.g35CH3q7029711@hak.lan.Awfulhak.org> X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Doug Rabson Cc: Brian Somers , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/i386/i386 autoconf.c src/sys/ia64/ia64 autoconf.c In-Reply-To: Message from Doug Rabson of "Fri, 05 Apr 2002 09:49:02 BST." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 05 Apr 2002 13:17:02 +0100 From: Brian Somers Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > On Thu, 4 Apr 2002, Brian Somers wrote: > > > > brian 2002/04/04 09:58:21 PST > > > > > > Modified files: > > > sys/i386/i386 autoconf.c > > > sys/ia64/ia64 autoconf.c > > > Log: > > > Back out the previous commit. > > > > > > In the i386 case, options BOOTP requires options NFS_ROOT as well as > > > options NFSCLIENT. With *both* the NFS options, a bootpc_init() > > > prototype is brought in by nfsclient/nfsdiskless.h. > > > > > > In the ia64 case, it just doesn't work and my change just pushes it > > > further away from working. > > > > > > Suggested to be wrong by: bde > > > > > > Revision Changes Path > > > 1.166 +0 -1 src/sys/i386/i386/autoconf.c > > > 1.13 +0 -1 src/sys/ia64/ia64/autoconf.c > > > > Methinks that options BOOTP hasn't been tested much on non-i386 > > platforms. The call to bootpc_init() isn't present on alpha or > > powerpc and I'm suspicious about ia64 & sparc64. > > I use BOOTP, BOOTP_NFSROOT and BOOTP_NFSV3 options on ia64 and they work > fine (I also have NFSCLIENT and NFS_ROOT). It seems that BOOTP works ok, but only when certain conditions are met. BOOTP on it's own seems to insist on a root device being given by the bootp server at runtime in bootpc_call() - unless BOOTP_TIMEOUT is defined and >0. This should probably depend on BOOTP_NFSROOT. -Werror has broken BOOTP on it's own on some archs due to the missing bootpc_init() prototype: sparc64 declares it's own bootpc_init() prototype in autoconf.c and never includes nfsclient/nfsdiskless.h. i386 requires NFSCLIENT and NFS_ROOT so that it includes nfsclient/nfsdiskless.h. ia64 doesn't prototype bootpc_init or include nfsclient/nfsdiskless.h, so it's *probably* broken by -Werror. alpha and powerpc don't even call bootpc_init() from cpu_rootconf(). I have a patch for i386 (attached), but I can't test it with much more than a compile at the moment as I triple-panic: panic: Assertion (opts & ~(MTX_SPIN | MTX_QUIET | MTX_RECURSE | MTX_SLEEPABLE | MTX_NOWITNESS | MTX_DUPOK)) == 0 failed at /usr/src/sys/kern/kern_mutex.c:807 Uptime: 0s panic: Assertion mtx_unowned(m) failed at /usr/src/sys/kern/kern_mutex.c:856 Uptime: 0s panic: _sx_xlock (shutdown_post_sync): xlock already held @ /usr/src/sys/kern/kern_shutdown.c:332 Uptime: 0s > -- > Doug Rabson Mail: dfr@nlsystems.com > Phone: +44 20 8348 6160 -- Brian http://www.freebsd-services.com/ Don't _EVER_ lose your sense of humour ! Index: conf/NOTES =================================================================== RCS file: /home/ncvs/src/sys/conf/NOTES,v retrieving revision 1.1017 diff -u -r1.1017 NOTES --- conf/NOTES 4 Apr 2002 18:01:55 -0000 1.1017 +++ conf/NOTES 5 Apr 2002 11:46:00 -0000 @@ -1637,7 +1637,6 @@ # Kernel BOOTP support options BOOTP # Use BOOTP to obtain IP address/hostname - # Requires NFSCLIENT and NFS_ROOT options BOOTP_NFSROOT # NFS mount root filesystem using BOOTP info options BOOTP_NFSV3 # Use NFS v3 to NFS mount root options BOOTP_COMPAT # Workaround for broken bootp daemons. Index: i386/i386/autoconf.c =================================================================== RCS file: /home/ncvs/src/sys/i386/i386/autoconf.c,v retrieving revision 1.166 diff -u -r1.166 autoconf.c --- i386/i386/autoconf.c 4 Apr 2002 17:58:18 -0000 1.166 +++ i386/i386/autoconf.c 5 Apr 2002 11:28:23 -0000 @@ -63,16 +63,17 @@ #include #include -#if defined(NFSCLIENT) && defined(NFS_ROOT) -#include -#include +#if defined(NFSCLIENT) && defined(NFS_ROOT) && !defined(BOOTP_NFSROOT) #include #include -#include #include -#include -#include +#endif + +#if defined(BOOTP) +#include +#include #include +#include #include #include #endif Index: nfsclient/bootp_subr.c =================================================================== RCS file: /home/ncvs/src/sys/nfsclient/bootp_subr.c,v retrieving revision 1.36 diff -u -r1.36 bootp_subr.c --- nfsclient/bootp_subr.c 13 Mar 2002 09:23:11 -0000 1.36 +++ nfsclient/bootp_subr.c 5 Apr 2002 11:53:29 -0000 @@ -679,7 +679,10 @@ ifctx = ifctx->next) { ifctx->outstanding = 0; if (bootpc_ifctx_isresolved(ifctx) != 0 && - gotrootpath != 0) { +#ifndef BOOTP_NFSROOT + gotrootpath != 0 +#endif + ) { continue; } if (bootpc_ifctx_isfailed(ifctx) != 0) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message