From owner-freebsd-arm@FreeBSD.ORG Fri May 2 13:27:36 2014 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6382C61D for ; Fri, 2 May 2014 13:27:36 +0000 (UTC) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 35093173B for ; Fri, 2 May 2014 13:27:35 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1WgDUv-00042l-7x; Fri, 02 May 2014 13:27:29 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id s42DRO3E020150; Fri, 2 May 2014 07:27:24 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+kQpFailf3EPxhzWQlidoK Subject: Re: FreeBSD-10-STABLE hangs when booting from BeagleBone Black eMMC From: Ian Lepore To: "Sulev-Madis Silber (ketas)" In-Reply-To: <53635ED5.6060508@hot.ee> References: <1398618984.61646.165.camel@revolution.hippie.lan> <1398624759.61646.174.camel@revolution.hippie.lan> <1398648505.61646.189.camel@revolution.hippie.lan> <1398732508.61646.245.camel@revolution.hippie.lan> <1398784968.22079.13.camel@revolution.hippie.lan> <53635ED5.6060508@hot.ee> Content-Type: text/plain; charset="us-ascii" Date: Fri, 02 May 2014 07:27:24 -0600 Message-ID: <1399037244.22079.167.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: FreeBSD ARM X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 May 2014 13:27:36 -0000 On Fri, 2014-05-02 at 12:01 +0300, Sulev-Madis Silber (ketas) wrote: > On 2014-04-29 18:22, Ian Lepore wrote: > > This may be the problem -- ubldr's behavior for finding and using dtb > > files is more complex than it used to be. It may be that it used to > > claim to find and use the u-boot dtb, but it was really using a static > > dtb compiled into the kernel. Now if u-boot provides a valid dtb it'll > > actually get used, even if kernel has a static dtb compiled in. > > > > If you remove the u-boot env var 'fdtaddr' then it will fall back to > > using a compiled-in dtb file instead of a loaded one. > > > > What I've been doing these days is installing my dtb files > > in /boot/modules or /boot/kernel and then setting the dtb file name in a > > u-boot env var named fdtfile. That makes ubldr find and load the named > > file in the place it finds the kernel. > > > > -- Ian > > > Nice, good suggestion. Now I have this "hack" in bb-uenv.txt: > > > ------------------------------------------------------ > uenvcmd=echo "[environment] delete fdtaddr"; env delete fdtaddr; setenv > loadfdt ''; setenv fdtfile "/boot/kernel/${fdtfile}"; echo > "[environment] loadfdt=${loadfdt}"; echo "[environment] fdtfile=${fdtfile}" > ------------------------------------------------------ > Just use the plain filename, not /boot/kernel/filename. ubldr knows where to look for them. > > Not sure where FDT file should go? First I though maybe /boot/fdt... > then /boot/kernel seemed good place... > Right now it searches for dtb files the same way as for modules, so it will look in /boot/kernel and /boot/modules. There's been some talk of adding a /boot/dtb directory as the first place to search, and having the build system never automatically install anything to there. That gives users somewhere to put a customized dtb file that won't get wiped out every time a new kernel is installed. > > Also, maybe we should use this way of loading FDT in every platform it's > possible? No static FDT in kernel too. Ruins NFS boot, however... Yeah, when I started down this path my vision was a single IMX6 image that could boot on any imx6-based system because it comes with a collection of dtb files. The user just has to choose the right dtb file on the first boot by setting an env var. That would also require a pretty flexible u-boot, which may or may not be possible. -- Ian