From owner-freebsd-arm@freebsd.org Wed Mar 23 19:03:35 2016 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 8955BADB8F8 for ; Wed, 23 Mar 2016 19:03:35 +0000 (UTC) (envelope-from russ.haley@gmail.com) Received: from mail-pa0-x235.google.com (mail-pa0-x235.google.com [IPv6:2607:f8b0:400e:c03::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5775C119F; Wed, 23 Mar 2016 19:03:35 +0000 (UTC) (envelope-from russ.haley@gmail.com) Received: by mail-pa0-x235.google.com with SMTP id tt10so2344614pab.3; Wed, 23 Mar 2016 12:03:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:content-transfer-encoding:message-id:date:subject:from :in-reply-to:references:to:cc; bh=Yn8DcvAW9Wn66/8bQLxQJsjqaqM5LUu4WYx5MaZivRE=; b=nfSHmfiXKzyJsv8t8rnHGXUpTm3Fh5rce+OTCSJP38utmExiPOEWJy78WM8WxPRmmn AZpxPqDQ1Ji2hBPPKcZ4IQfCKdWRXtsQqsXOpwKr2+77j+MNLPmBtHqAzHzQBHB6igzJ Rg3ssh3eDJng9XqTAdhwXuWTib5U9RNpMscytZL2mwltpeEXelRJM/mI7TxeFJpTYOYB t8MW55mfMS6YLYEaVtjildloumsQ3lXbCNT3CHu94QHPRghtWKqtVheTPYxeKeGvs6ps lfvp19oGM8sL7DyV3WqB2D7braeEZ2N5e8SszxJaUN48eN6KbGdl0ofPNsbW8eOsAAsC qbjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:content-transfer-encoding :message-id:date:subject:from:in-reply-to:references:to:cc; bh=Yn8DcvAW9Wn66/8bQLxQJsjqaqM5LUu4WYx5MaZivRE=; b=cjtT2LWAlb4v10Tc2s6XC+DrPu2v2QOTkLaFb0zfYnS1xG4gUu6JftV2k5GZYRGlz5 MinjghdIFRcFDlwyZMGh9LQHnLDLqh5NSTJY3KcsGgyU6+OvlKE/F0FxOVITwAy0JXWD jZ7AsloYNx5qhnTaQaC2RWS2YDEVp6ePzZHkdrWEZwJ5xeo0GiPp/kGZOyKorBPuxEge Pe5aOtpjX84P5FD4TLIGawFtW/nnqTr/ri+J3i9G2MsSmp9nyO5wEU3Pftr0Fb/DFFXR livlums4ng5EzBf0onMrCprkQAs7JjX3sbvGs8o0xmN+pb2Ked+Bk0S4zd1p3EqtoQBa TuDg== X-Gm-Message-State: AD7BkJIjHajFIdVGUrbFYJwQgSTvd0mU2IyTT8PjekZNwqWyYMxhZjmZsRykLcUrFbnEyw== X-Received: by 10.66.248.198 with SMTP id yo6mr6499445pac.54.1458759814826; Wed, 23 Mar 2016 12:03:34 -0700 (PDT) Received: from [127.0.0.1] (mail.questertangent.com. [184.69.10.202]) by smtp.gmail.com with ESMTPSA id u21sm5859776pfa.60.2016.03.23.12.03.33 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 23 Mar 2016 12:03:34 -0700 (PDT) Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailer: BlackBerry Email (10.3.2.2876) Message-ID: <20160323190333.4370514.70354.4134@gmail.com> Date: Wed, 23 Mar 2016 12:03:33 -0700 Subject: Re: about netbooting on armv6 [was: Fwd: SDIO Patch D4761.diff Not Building For Me] From: Russell Haley In-Reply-To: <1458751414.1091.47.camel@freebsd.org> References: <5432b449f37a481bc7099fbab25fbd2e@bakulin.de> <1458751414.1091.47.camel@freebsd.org> To: Ian Lepore , Ilya Bakulin Cc: freebsd-arm X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2016 19:03:35 -0000 Awesome. Thanks, Ian! Now I have to decide if I want to sleep tonight or tr= y netbooting. Nah, I'll sleep when I'm dead... Russ Sent=A0from=A0my=A0BlackBerry=A010=A0smartphone=A0on=A0the=A0Koodo=A0networ= k. =A0 Original Message =A0 From: Ian Lepore Sent: Wednesday, March 23, 2016 9:43 AM To: Russell Haley; Ilya Bakulin Cc: freebsd-arm Subject: Re: about netbooting on armv6 [was: Fwd: SDIO Patch D4761.diff Not= Building For Me] On Wed, 2016-03-23 at 09:09 -0700, Russell Haley wrote: > On Wed, Mar 23, 2016 at 4:00 AM, Ilya Bakulin > wrote: > > On 2016-03-23 06:16, Russell Haley wrote: > > >=20 > > > Hi Ilya, > > >=20 > > > Mixed success tonight. I tried to install the kernel but got an > > > error: > >=20 > >=20 > > You should give MODULES_OVERRIDE=3D to installkernel as well. > >=20 > Great, Thank you. > > >=20 > > > Well, it booted the kernel and then spewed output and eventually > > > ended > > > with a failed DHCP request (?). Here is the pastebin of said > > > output. > > >=20 > >=20 > > I never copy the newly built kernel to the SD card. > > Instead I configure U-Boot+ubldr to boot kernel from TFTP and mount > > root > > over NFS, it's much faster and it's impossible to crash filesystem > > if the > > kernel crashes. > > I guess you should set ROOTDEVNAME manually in the kernel config > > file and > > disable NFSCLIENT-related options. >=20 > Thanks for this advice. I have had something similar working before > (I > had rootfs on USB) so should be able to get that running this weekend >=20 > > From your boot log it's clear that the system boots and probes SD > > cards. >=20 > Yes, very exciting to see!!! I will be looking to try and match debug > output with code paths asap. >=20 > > There are two slots and none of them has SDIO card in it. > > From what I find about Hummingboard, it actually doesn't have WiFi > > SDIO > > chips on it. >=20 > I don't understand. It was booted using an SD card? Also, here is the > information about the board and the Wi-Fi (the Solid-Run site can be > hard to navigate): >=20 > Carrier Board spec: > http://wiki.solid-run.com/doku.php?id=3Dproducts:imx6:hummingboard:hbpr > o >=20 > This is my SOM: > http://wiki.solid-run.com/doku.php?id=3Dproducts:imx6:microsom:dual&s[] > =3Dbcm4330 >=20 > Schematic. I believe page 5 shows the SDIO WIFI module interface? > http://wiki.solid-run.com/lib/exe/fetch.php?media=3Dimx6:microsom:docs: > sr-usom-mx6-rev-1_3-simplified-schematics.pdf >=20 > Broadcom BCM4330 > http://linux-sunxi.org/images/0/05/4330-DS206-R.pdf >=20 > I have used it successfully through Kodi and Debian (Raspbian > specifically) >=20 > Thanks, > Russ The quick and easy config for netbooting armv6 these days is to set a few vars in your uboot env. This assumes that you let uboot load ubldr.bin from sdcard, and then have ubldr load the kernel and the kernel will mount nfsroot. If you have a dhcp server to provide an IP, this is all you need in uboot env: loaderdev=3Dnet rootpath=3D:/ If you manually configure the ip, add these: ipaddr=3D netmask=3D255.etc.etc.etc When ubldr loads the kernel via nfs, it also sets up all the info needed to mount root via nfs and passes the info to the kernel in env vars. It will also set vfs.root.mountfrom to the server:path you set in the rootpath var in uboot, which gets the initial root fs mount done. You still need an /etc/fstab that also has the nfs mount info for the nfsroot, so that the rc scripts can remount root writable. All you need in the kernel config is options NFSCL, NFSLOCKD, NFS_ROOT and all of those are already standard in all armv6 kernels. You don't need to change the ROOTDEVNAME option because the vfs.root.mountfrom overrides it (ROOTDEVNAME is used as a fallback if the nfs mount fails). -- Ian