From owner-freebsd-arm@freebsd.org Wed Apr 13 15:37:19 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 4EDE1B0EE6C for ; Wed, 13 Apr 2016 15:37:19 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "raven.bwct.de", Issuer "BWCT" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id DA7BE19F1; Wed, 13 Apr 2016 15:37:17 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id u3DFanfu076292 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Wed, 13 Apr 2016 17:36:56 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.5/8.14.4) with ESMTP id u3DFaiQI008542 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 13 Apr 2016 17:36:44 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.15.2/8.15.2) with ESMTP id u3DFaiVo032369; Wed, 13 Apr 2016 17:36:44 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.15.2/8.15.2/Submit) id u3DFaf17032368; Wed, 13 Apr 2016 17:36:41 +0200 (CEST) (envelope-from ticso) Date: Wed, 13 Apr 2016 17:36:41 +0200 From: Bernd Walter To: Ian Lepore Cc: Tim Kientzle , Hal Murray , freebsd-arm Subject: Re: Booting FreeBSD on BeagleBone Black from microSD by default Message-ID: <20160413153641.GB31903@cicely7.cicely.de> Reply-To: ticso@cicely.de References: <20160411040655.632D3406076@ip-64-139-1-69.sjc.megapath.net> <3BC5A04D-79DD-4820-A44F-B0A921D2FAA9@kientzle.com> <1460470770.52955.14.camel@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1460470770.52955.14.camel@freebsd.org> X-Operating-System: FreeBSD cicely7.cicely.de 10.2-RELEASE amd64 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED=-1, BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 autolearn=ham version=3.3.0 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on spamd.cicely.de 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, 13 Apr 2016 15:37:19 -0000 On Tue, Apr 12, 2016 at 08:19:30AM -0600, Ian Lepore wrote: > On Mon, 2016-04-11 at 06:33 -0700, Tim Kientzle wrote: > > > On Apr 10, 2016, at 9:06 PM, Hal Murray > > > wrote: > > > > > > > > > Does anybody have the recipe for setting things up so that power on > > > boots > > > from the microSD card without holding down the button? > > > > If the ROM cannot boot from eMMC, it will try to boot from microSD. > > > > The easiest way to make the eMMC not bootable is to zero out the > > boot sectors using dd: > > > > dd if=/dev/zero of= count=100 > > > > Of course, this makes the eMMC entirely unusable. I think you > > can then reformat the eMMC (make sure it does not have a FAT > > partition and does not have boot blocks) so it can be used without > > the ROM trying to boot from it. > > > > This way, the ROM will load U-Boot from microSD. > > > > > > > > I'm pretty sure it will be simple after I know how to do it. > > > Google found info on the idea, but I couldn't find the file that > > > needs editing. It's off in uBoot land. > > > > Even if the ROM loads U-Boot from eMMC, the default Linux > > U-Boot setup on the eMMC can be configured to then load > > the Linux kernel from microSD. > > > > If you install the FreeBSD version of U-Boot to eMMC, you might be > > able to > > do the same thing. Personally, I find the recipe above much > > simpler. > > > > Cheers, > > > > Tim > > No need to zero out the onboard emmc or mess with its too-complicated > linux-centric env vars... The AM335x ROM boot code loads u-boot from > the first FAT partition it finds with the active/bootable flag set. > Normally that's the emmc, but you can turn it off and then it'll look > for a partition on the external sdcard. Once you've booted to freebsd > normally, do > > gpart unset -a active -i 1 mmcsd1 > > And now it will boot from the sdcard unless you turn the active flag > back on on the emmc. Good to know - that's so much better than erasing the old content, -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.