From owner-freebsd-arm@freebsd.org Fri Sep 25 23:24:49 2015 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B170A08EC5 for ; Fri, 25 Sep 2015 23:24:49 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-jnhn.mail.uoguelph.ca (esa-jnhn.mail.uoguelph.ca [131.104.91.44]) by mx1.freebsd.org (Postfix) with ESMTP id 288121C38; Fri, 25 Sep 2015 23:24:48 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) IronPort-PHdr: 9a23:hesTqBHOPxXLB972JSSph51GYnF86YWxBRYc798ds5kLTJ75ocWwAkXT6L1XgUPTWs2DsrQf27aQ7vmrAjBIyK3CmU5BWaQEbwUCh8QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYsExnyfTB4Ov7yUtaLyZ/ni6bvotaIP01hv3mUX/BbFF2OtwLft80b08NJC50a7V/3mEZOYPlc3mhyJFiezF7W78a0+4N/oWwL46pyv+YJa6jxfrw5QLpEF3xmdjltvIy4/SXEGCqG4DM4X30RiBcAVwnM6jn0RJr8uDD28O1n13/JE9fxSOUOWD+hp4JiQxzshSJPYyQ8+WrUjsF1pL9crw+sowR/hYXdNtLGfMFid7/QKItJDVFKWdxcAmkYWtux X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2DWAQD51gVW/61jaINdg3hpBoMkug4BDYFzhgECgV4UAQEBAQEBAQGBCYIdggcBAQEDASNWBQsCAQgYERkCAlcCBIg5CLgUlCIBAQEHAQEBAQEdhnOEfYRCFzQHgmmBQwWMf4hthRSKDoxtjCoCHwEBQoIRHIFwIjOIHIEFAQEB X-IronPort-AV: E=Sophos;i="5.17,589,1437451200"; d="scan'208";a="239321374" Received: from nipigon.cs.uoguelph.ca (HELO zcs1.mail.uoguelph.ca) ([131.104.99.173]) by esa-jnhn.mail.uoguelph.ca with ESMTP; 25 Sep 2015 19:23:39 -0400 Received: from localhost (localhost [127.0.0.1]) by zcs1.mail.uoguelph.ca (Postfix) with ESMTP id C365E15F55D; Fri, 25 Sep 2015 19:23:39 -0400 (EDT) Received: from zcs1.mail.uoguelph.ca ([127.0.0.1]) by localhost (zcs1.mail.uoguelph.ca [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id cdeC8hgbmtOn; Fri, 25 Sep 2015 19:23:39 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by zcs1.mail.uoguelph.ca (Postfix) with ESMTP id 0BF6315F563; Fri, 25 Sep 2015 19:23:39 -0400 (EDT) X-Virus-Scanned: amavisd-new at zcs1.mail.uoguelph.ca Received: from zcs1.mail.uoguelph.ca ([127.0.0.1]) by localhost (zcs1.mail.uoguelph.ca [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 3oBkE4_0ZJsh; Fri, 25 Sep 2015 19:23:38 -0400 (EDT) Received: from zcs1.mail.uoguelph.ca (zcs1.mail.uoguelph.ca [172.17.95.18]) by zcs1.mail.uoguelph.ca (Postfix) with ESMTP id D44C115F55D; Fri, 25 Sep 2015 19:23:38 -0400 (EDT) Date: Fri, 25 Sep 2015 19:23:38 -0400 (EDT) From: Rick Macklem To: Ian Lepore Cc: Hans Petter Selasky , Randy Westlund , freebsd-arm@freebsd.org, Rick Macklem Message-ID: <1384966087.11358042.1443223418540.JavaMail.zimbra@uoguelph.ca> In-Reply-To: <1443142468.1224.322.camel@freebsd.org> References: <20150922052522.GA62140@gmail.com> <91AAC64E-4C38-47AA-8910-48F7654A7524@cs.huji.ac.il> <20150923174445.GE43653@gmail.com> <1443105426.1224.272.camel@freebsd.org> <20150924163658.GC32257@gmail.com> <560438C5.3090404@selasky.org> <1443142468.1224.322.camel@freebsd.org> Subject: Re: NFS Root with Raspberry Pi (nfs_diskless: no interface) MIME-Version: 1.0 X-Originating-IP: [172.17.95.11] X-Mailer: Zimbra 8.0.9_GA_6191 (ZimbraWebClient - FF34 (Win)/8.0.9_GA_6191) Thread-Topic: NFS Root with Raspberry Pi (nfs_diskless: no interface) Thread-Index: wwsSQnpDMom4KjIkEFzE5jobUOnjEw== Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Sep 2015 23:24:49 -0000 Ian Lepore wrote: > On Thu, 2015-09-24 at 19:54 +0200, Hans Petter Selasky wrote: > > On 09/24/15 18:36, Randy Westlund wrote: > > > On Thu, Sep 24, 2015 at 08:37:06AM -0600, Ian Lepore wrote: > > > > >>>[orig problem description: basically nfsroot without BOOTP fails] > > > > >> Try setting boot.netif.name="ue0" in loader.conf. I've never tried > > >> that, but in looking at the code, there's some chance it could work. :) > > >> > > >> What I do is put these options into my RPi kernel config: > > >> > > >> options BOOTP > > >> options BOOTP_NFSROOT > > >> options BOOTP_NFSV3 > > >> options BOOTP_WIRED_TO=ue0 > > >> > > >> But this requires configuring a bootp or dhcp server to provide the > > >> info. It should be possible to netboot without using BOOTP. > > >> > > >> -- Ian > > > > > > No luck with boot.netif.name. > > > > > > I'm using the kernel that comes in the FreeBSD RPI-B disk image. Is > > > there a way to see what it was built with? I tried running strings on > > > the kernel, but I'm not sure what to look for. Otherwise I guess I'll > > > build one myself. > > > > > > Randy > > > > > > > Hi, > > > > The problem is that the code in: > > > > sys/nfs/bootp_subr.c: SYSINIT(bootp_rootconf, SI_SUB_ROOT_CONF, > > SI_ORDER_FIRST, bootpc_init, NULL); > > > > doesn't wait for the USB ethernet device to be enumerated. Only the > > vfs_mountroot() code which is running from the init-process does so. > > > > Not sure what the best way to solve this is. Try putting: > > > > pause("W", hz * 4); > > > > Into the beginning of the "bootpc_init()" function. > > > > --HPS > > I had time to look into this today. The bootpc_init() routine *does* > wait for an interface to appear. The problem in this case is that BOOTP > isn't involved, and the nfs_setup_diskless() routine doesn't have a > similar wait loop for slow interfaces. The attached patch adds it, and > with it I can nfsmount root on my RPi without using the BOOTP_foo > options I listed above. > > Rick, does this patch look okay to you? If no objections, I'll commit > this asap. > Looks fine to me. (I might have selected a name for the timeout with NFS in it, just in case someone defines IFACE_TIMEOUT_SECS for something else, but I'll leave it up to you.) Thanks for patching this, rick > -- Ian > > > > [Text Documents:nfs_diskless_iface_timeout.diff] >