Date: Sun, 10 Feb 2013 07:56:11 -0700 From: Warner Losh <imp@bsdimp.com> To: Andrew Turner <andrew@fubar.geek.nz> Cc: Tim Kientzle <tim@kientzle.com>, freebsd-arm@freebsd.org, Brett Wynkoop <wynkoop@wynn.com> Subject: Re: building RaspPi Images Message-ID: <ADEA1B10-6C17-43C8-B364-8819593D312E@bsdimp.com> In-Reply-To: <20130210212025.009ee482@bender> References: <5116CB50.9080303@ceetonetechnology.com> <7757848F-45C6-4DEF-A4A2-5F900EB10A06@kientzle.com> <20130210012052.4d7e1a46@ivory.local> <58DCA6BE-8C06-4F69-81A2-A3582FBB5B12@kientzle.com> <E691571B-EA19-4485-BB02-7486685B44C7@bsdimp.com> <EB4A0D67-9813-47DA-B3DB-F1309B2773F5@kientzle.com> <8087503F-BE98-45B9-888B-044D9DA58B80@bsdimp.com> <20130210212025.009ee482@bender>
next in thread | previous in thread | raw e-mail | index | archive | help
On Feb 10, 2013, at 1:20 AM, Andrew Turner wrote: > On Sun, 10 Feb 2013 00:47:38 -0700 > Warner Losh <imp@bsdimp.com> wrote: >=20 >>=20 >> On Feb 10, 2013, at 12:18 AM, Tim Kientzle wrote: >>=20 >>> On Feb 9, 2013, at 11:07 PM, Warner Losh wrote: >>>=20 >>>>> * For RPi, this already happens: the first-stage boot >>>>> loads a DTB, ubldr uses "fdt addr" to access that DTB >>>>> in a known location and then passes it to the kernel. >>>>=20 >>>> Doesn't the RPi's boot loader give our /boot/loader enough info to >>>> get this without the fdt addr command? >>>=20 >>> I haven't dug into this yet, but there's a mismatch somewhere >>> between the RPi first-stage boot loader, U-Boot, and our ubldr. >>>=20 >>> I briefly tried loading our kernel straight from the RPi >>> first stage boot loader (dropping U-Boot and ubldr >>> phases) but didn't get very far with it. >>=20 >> Our ubldr currently ignores r2 on boot, and tries to get the FDT via >> a different uboot interface, but I'm thinking that part is broken...=20= >=20 > As I understand it ubldr is an elf image. We use the bootelf command > from U-Boot to jump into it. This command executes entry(argc, argv); > to run ubldr. As argc is an int and argv is a pointer these will be in > r0 and r1 respectively, as such is shouldn't look at r2. Right, we're doing it wrong. Or rather, we're using the standalone = interface when we should be using the linux interface. The stand alone = interface should, in theory, provide us with the DTB, but the code that = is in ubldr doesn't seem to be reliably getitng this image. If we can't = get it reliably from the standalone interface, we should switch to the = linux interface, where it should be trivial to get it. > It looks like ubldr doesn't look at argc and argv, and should have no > need to unless we decide to have it take the address of the dtb on the > command line, or have some other data passed in from U-Boot. uboot is supposed pass dtb to us. We're using the self-hosted interface, = rather than the linux interface, to boot. uboot is supposed to have a = jump table that we find and use to get the dtb from it, but that code = seems to not be working reliably. uboot gives linux images the DTB w/o = any problem today, but you have to run mkimage to get the image file to = load into uboot for that to work. We sure shouldn't be passing an address of the dtb via a command line = argument. Warner=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ADEA1B10-6C17-43C8-B364-8819593D312E>