Date: Tue, 18 Feb 2014 15:52:04 -0300 From: Luiz Otavio O Souza <lists.br@gmail.com> To: Ian Lepore <ian@freebsd.org> Cc: Glen Barber <gjb@freebsd.org>, "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org> Subject: Re: "No valid device tree blob found" error Message-ID: <CAB=2f8zbJW0obNL709nRq=-VteA6D23P5QT_%2BUWqE9k6P=1MGw@mail.gmail.com> In-Reply-To: <1392659595.1145.15.camel@revolution.hippie.lan> References: <20140216213001.GF1667@glenbarber.us> <CAB=2f8yUW29aZ-nddUF17ae-BvTiUHg4MUAHpo2UAf2RsVOUKg@mail.gmail.com> <1392659595.1145.15.camel@revolution.hippie.lan>
next in thread | previous in thread | raw e-mail | index | archive | help
--bcaec53d550db40fd404f2b2c4d2 Content-Type: text/plain; charset=ISO-8859-1 On 17 February 2014 14:53, Ian Lepore wrote: > On Mon, 2014-02-17 at 10:08 -0300, Luiz Otavio O Souza wrote: >> On 16 February 2014 18:30, Glen Barber wrote: >> > Images for RPI-B and BEAGLEBONE (and I suspect PANDABOARD) are failing >> > to boot this week. >> > >> > The images are built against r261948. Console messages during boot: >> > >> > ## Starting application at 0x88000054 ... >> > Consoles: U-Boot console >> > Compatible API signature found @9f242240 >> > MMC Device 2 not found >> > MMC Device 3 not found >> > Number of U-Boot devices: 2 >> > >> > FreeBSD/armv6 U-Boot loader, Revision 1.2 >> > (root@grind.freebsd.org, Sun Feb 16 18:10:43 UTC 2014) >> > DRAM: 512MB >> > >> > Device: disk >> > Loading /boot/defaults/loader.conf >> > /boot/kernel/kernel data=0x460bc8+0x2c7438 >> > syms=[0x4+0x85a60+0x4+0x50c89] >> > >> > Hit [Enter] to boot immediately, or any other key for command prompt. >> > Booting [/boot/kernel/kernel]... >> > Using DTB provided by U-Boot. >> > No valid device tree blob found!WARNING! Trying to fire up the kernel, >> > but no device tree blob found! >> > >> > Any ideas if this is error on my part, or a problem in head/ ? The >> > stable/10/ images boot fine, so I do not suspect any code changes in the >> > build process. >> > >> >> >> Glen, >> >> I think it is related to r261819. Looking at the code it looks like >> the attached patch may fix it (i'm still updating my images to the >> latest -head and would probably need a few hours before i can test it >> myself). >> >> Can you check if it works for you ? >> >> Thanks, >> >> Luiz > > I believe your patch is correct; when I copied the code to do the header > check it came from a context where the header variable was the struct > itself, not a pointer to it. Odd that the error message doesn't seem to > match, though. > > -- Ian The patch does indeed fix the issue. The error message has two different usage cases, when called from the fdt_copy() the output of command_errbuf/command_errmsg isn't displayed. An error from fdt_copy() is printed instead. When called from fdt_fixup() the error message was being overwritten. The attached patch fix all these issues. Now, when called from fdt_copy() i've added a missing '\n' at end of the error message: Hit [Enter] to boot immediately, or any other key for command prompt. Booting [/boot/kernel/kernel]... Using DTB provided by U-Boot. No valid device tree blob found! WARNING! Trying to fire up the kernel, but no device tree blob found! And from fdt_fixup() now it doesn't overwrite the error from fdt_load_dtb[_addr]() anymore: Hit [Enter] to boot immediately, or any other key for command prompt. Booting [/boot/kernel/kernel] in 9 seconds... Type '?' for a list of commands, 'help' for more detailed help. loader> fdt ls Using DTB provided by U-Boot. error validating blob: FDT_ERR_BADMAGIC loader> Does the attached patch looks fine ? Luiz --bcaec53d550db40fd404f2b2c4d2 Content-Type: text/plain; charset=US-ASCII; name="fdt-loader.diff" Content-Disposition: attachment; filename="fdt-loader.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hrtiss0b0 SW5kZXg6IHN5cy9ib290L2ZkdC9mZHRfbG9hZGVyX2NtZC5jCj09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIHN5cy9i b290L2ZkdC9mZHRfbG9hZGVyX2NtZC5jCShyZXZpc2lvbiAyNjIxODMpCisrKyBzeXMvYm9vdC9m ZHQvZmR0X2xvYWRlcl9jbWQuYwkod29ya2luZyBjb3B5KQpAQCAtMjMwLDcgKzIzMCw3IEBACiAJ aW50IGVycjsKIAogCWZkdHBfc2l6ZSA9IGZkd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yB2YWxpZCBkZXZpY2UgdHJl ZSBibG9iIGZvdW5kISIpOworCQkJcHJpbnRmKCJObyB2YWxpZCBkZXZpY2UgdHJlZSBibG9iIGZv dW5kIVxuIik7CiAJCQlyZXR1cm4gKDApOwogCQl9CiAJfQo= --bcaec53d550db40fd404f2b2c4d2--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAB=2f8zbJW0obNL709nRq=-VteA6D23P5QT_%2BUWqE9k6P=1MGw>