Date: Thu, 24 Dec 2015 08:48:35 -0700 From: Ian Lepore <ian@freebsd.org> To: Sylvain Garrigues <sylgar@gmail.com> Cc: Tim Kientzle <tim@kientzle.com>, freebsd-arm <freebsd-arm@freebsd.org> Subject: Re: Booting the ELF kernel without ubldr on Raspberry Pi Message-ID: <1450972115.25138.253.camel@freebsd.org> In-Reply-To: <BD124AF0-68E2-457A-9B63-6BE312F218E5@gmail.com> References: <C6819C94-DF61-447F-AC61-FD3E061A6F76@gmail.com> <32849B9F-C7B8-4A86-B8F1-043F62D2E64C@kientzle.com> <8F62699C-126D-492D-8B7E-8C250ED5BC07@gmail.com> <1450970414.25138.238.camel@freebsd.org> <BD124AF0-68E2-457A-9B63-6BE312F218E5@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 2015-12-24 at 16:40 +0100, Sylvain Garrigues wrote: > Hello Ian, > > Iąm using u-boot from the ports (sysutils/u-boot-rpi2). It doesnąt > display anything about cache being enabled. > > I was just comparing the time it takes to have the Linux kernel > prints its first lines, and the time it takes for the FreeBSD kernel > to print its own (the « Copyright » line) when used with u > -boot+loader. > For the former, itąs under a second, for the latter itąs about 3-4 > seconds (mainly spent when the loader loads the elf kernel). > > So I was wondered how they made it and was led to believe the Linux > kernel is compressed (and self-extracting), leading to less loading > time from the SD card which apparently is the bottleneck. > > So since the FreeBSD kernel has no « self-extracting » feature, and > since ubldr doesnąt seem to support the extracting of a gzip kernel > (well it seems to work with LOADER_GZIP_SUPPORT but I see no gain), I > was trying to use the compression and extraction feature of u-boot > with the use of recent mkimage with support for lzma compression. I > thought I could boot directly a LZMA compressed kernel.bin with > mkimage, without ubldr. But I forgot about the kernel expecting a > variable with the DTB address, which is set up by ubldr, so I give up > and will wait to see if someone is interested in implementing a self > -extracting kernel in the future. > > Best, > Sylvain Don't hold your breath for a self-extracting armv6 kernel, that seems highly unlikely, especially considering that LOADER_GZIP_SUPPORT apparently works (I've been meaning to test that for months). Hmm, in our config patches for rpi2 u-boot I see +#define CONFIG_SYS_DCACHE_OFF that's probably why loading the kernel is so slow. It was probably disabled because it caused problems in ubldr, but I've developed some u -boot patches since then to do proper cache maintenance before launching standalone apps. -- Ian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1450972115.25138.253.camel>