Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Feb 2013 10:58:56 -0700
From:      Ian Lepore <ian@FreeBSD.org>
To:        Tim Kientzle <kientzle@FreeBSD.org>
Cc:        freebsd-arm@FreeBSD.org
Subject:   Re: RPi hangs in bootloader
Message-ID:  <1361296736.1164.75.camel@revolution.hippie.lan>
In-Reply-To: <AAC6DACE-6E21-4311-AE1D-9BFB02263550@FreeBSD.org>
References:  <51227033.3070304@thieprojects.ch> <A63BA7A1-50C7-4C17-A3F2-D7ADDBCA3001@freebsd.org> <1361235912.1164.55.camel@revolution.hippie.lan> <AAC6DACE-6E21-4311-AE1D-9BFB02263550@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 2013-02-19 at 09:35 -0800, Tim Kientzle wrote:
> On Feb 18, 2013, at 5:05 PM, Ian Lepore wrote:
> > On Mon, 2013-02-18 at 11:47 -0800, Tim Kientzle wrote:
> >>> I do not understand the FDT_ERR_BADMAGIC, the page http://www.denx.de/wiki/DULG/UBootCmdFDT has a lot of those errors listed in an example session but does not explain what the message conveys?
> >> 
> >> To help me clarify my own understanding, I wrote a brief
> >> explanation of where we are with FDT handling that
> >> digs into how RPi boot handles FDT today and points
> >> out some of the work that still remains.
> >> 
> > 
> > While you're digging around in that area of the code... is there any way
> > ubldr can find out from u-boot how it was loaded?  I would love it if
> > ubldr could automatically set currdev=net0: if it was loaded via dhcp or
> > tftp, and automatically use net0:/boot/loader.rc in that case as well.
> 
> I believe this is possible, but it would require some C-level
> work on ubldr.  (And I'm not using netbooting in my current
> dev environment, so I don't have a good way to test this
> right now.)
> 
> The U-Boot API does provide a way to access the U-Boot
> environment variables.   My work on ubldr right now is
> using this to get the FDT information from U-Boot.
> 
> If I stumble across the specific hooks needed for this,
> I'll let you know.
> 
> > The general thing I'm up to today is learning enough about ubldr to use
> > it effectively, and ultimately to see if it can be used to load a
> > (semi-)generic kernel plus a set of modules you configure in loader.rc.
> > I've just managed to do that by hand, now to see if loader.rc will
> > cooperate.
> 
> Modulo bugs, this should all work.  ubldr is just loader(8) with
> U-Boot API grafted underneath instead of a PC BIOS.
> So module loading and all the boot-time configuration
> hooks that people are used to on x86 should Just Work.
> 
> A couple of folks have talked about turning on FICL
> in ubldr, that would open even more automation
> possibilities.

That's what I'm testing at this very moment.  So far it seems to be
working fine, except that I notice "fdt addr 0x0100" has to be in the
loader.rc file, it doesn't work if it's in the loader.conf file.  So I'm
off to see what's up with that...

-- Ian





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1361296736.1164.75.camel>