From owner-freebsd-arm@FreeBSD.ORG Sun Mar 10 14:53:41 2013 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3A29563A for ; Sun, 10 Mar 2013 14:53:41 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) by mx1.freebsd.org (Postfix) with ESMTP id 10FA2F70 for ; Sun, 10 Mar 2013 14:53:40 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1UEhd6-000KYO-30; Sun, 10 Mar 2013 14:53:40 +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 r2AErbUs008808; Sun, 10 Mar 2013 08:53:37 -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: U2FsdGVkX19H3kwcTLu4Cw8DgBKkXisk Subject: Re: RPi booting problem From: Ian Lepore To: Mats Mellstrand In-Reply-To: <0C96F8AF-4876-4FA2-8473-8A0A36422883@exmandato.se> References: <0C96F8AF-4876-4FA2-8473-8A0A36422883@exmandato.se> Content-Type: text/plain; charset="windows-1251" Date: Sun, 10 Mar 2013 08:53:37 -0600 Message-ID: <1362927217.1291.257.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by damnhippie.dyndns.org id r2AErbUs008808 Cc: Tim Kientzle , "freebsd-arm@freebsd.org" X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Mar 2013 14:53:41 -0000 On Sun, 2013-03-10 at 09:40 +0100, Mats Mellstrand wrote: > On 10 mar 2013, at 03:45, Tim Kientzle wrote: >=20 > >=20 > > On Mar 9, 2013, at 6:29 AM, Mats Mellstrand wrote: > >=20 > >> Hi > >>=20 > >> I have checked out the latest from head and built world and kernel (= conf/RPI-B) and finally created and image that I written to a flash. > >> I have used freebsd-uboot-20130201.tar.gz=20 > >>=20 > >> When I try to boot, the uboot goes in to a cyclic restart... > >>=20 > >> U-Boot 2013.01-rc1-g6709570-dirty (Nov 30 2012 - 19:09:28) > >>=20 > >> DRAM: 448 MiB > >> WARNING: Caches not enabled > >> MMC: bcm2835_sdhci: 0 > >> Using default environment > >>=20 > >> In: serial > >> Out: lcd > >> Err: lcd > >> bcm2835: USB power in ON > >> Net: Net Initialization Skipped > >> No ethernet found. > >> Hit any key to stop autoboot: 0=20 > >> reading uEnv.txt > >> reading boot.scr > >> 137 bytes read in 9023 ms (0 Bytes/s) > >> Running bootscript from mmc0 ... > >> ## Executing script at 00200000 > >> reading ubldr > >> 238023 bytes read in 60497 ms (2.9 KiB/s) > >> ## Starting application at 0x02000054 ... > >>=20 > >>=20 > >> U-Boot 2013.01-rc1-g6709570-dirty (Nov 30 2012 - 19:09:28) > >>=20 > >> over and over =85. > >=20 > > Seems like your ubldr is broken. >=20 >=20 > Yes, that was the problem. Thank's! >=20 > Now, what compiler flags should I use to build the ubldr? > I have rebuilt ubldr many times. >=20 >=20 The only flag I use that's specifically related to ubldr is UBLDR_LOADADDR=3D which has to be set differently for each SoC. It's the physical address at which ubldr is loaded and runs, and it has to avoid overlapping the addresses used by the kernel it's going to load. A value of UBLDR_LOADADDR=3D0x81000000 works for both BeagleBone and RPi due to an RPi quirk where 1 GB of address space is mapped to all four 1 GB windows, with different caching attributes in each mapping. The caching differences are not significant in terms of the bootloader, so ubldr built for BB "just works" on RPi even though the normal ram mapping for RPi starts at 0x0 rather than 0x80000000. -- Ian