Date: Fri, 25 Mar 2016 12:22:50 -0600 From: Ian Lepore <ian@freebsd.org> To: Warner Losh <imp@bsdimp.com>, Sylvain Garrigues <sylgar@gmail.com> Cc: freebsd-arm <freebsd-arm@freebsd.org>, ticso@cicely.de Subject: Re: Booting kernel.bin directly on Raspberry Pi / external DTB support Message-ID: <1458930170.1091.65.camel@freebsd.org> In-Reply-To: <CANCZdfpB3EX7YS-4qi_mgRx23y62Gpki8EVP0Mjp=Z9u5O911w@mail.gmail.com> References: <1CCA59DC-5539-4CFB-81BA-0112E2120B3B@gmail.com> <20160325052509.GE48704@cicely7.cicely.de> <CANCZdfrhm5NSCXehkDc%2BDa4cxYhbU_NnEopR__e_a0CgajEL3A@mail.gmail.com> <97BB142C-D335-469B-9514-D1210E869C5D@gmail.com> <CANCZdfpB3EX7YS-4qi_mgRx23y62Gpki8EVP0Mjp=Z9u5O911w@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 2016-03-25 at 12:01 -0600, Warner Losh wrote: > On Fri, Mar 25, 2016 at 11:55 AM, Sylvain Garrigues <sylgar@gmail.com > > > wrote: > > > Thank you. > > > > I wanted to boot the kernel directly so as to: > > 1/ remove the dependency on a 3rd party loader > > 2/ reduce boot time and make it comparable with NetBSD and Linux > > (which > > don¢t use u-boot) > > > > NetBSD and Linux on the Pi boot so much faster than our FreeBSD > > image: > > less than 1 second after power-up, the first kernel copyright line > > appears > > on my LCD. For the FreeBSD images, the longest part is ubldr > > loading the > > kernel. It takes around 4/5 seconds (with the same SD card). > > > > I used recent u-boot versions (the current u-boot-rpi2 port is > > getting old > > and is not in sync with the u-boot-rpi port recently updated), > > tried with > > dcache enabled, but the boot process still takes several seconds, > > most of > > the time being spent in ubldr loading the kernel. > > > > I have no idea how we could improve the booting time? I wanted to > > experiment with booting the kernel directly as the first ARM > > program on my > > Pi, but as you explained I need some init code. I managed to > > compile > > Andrew¢s one ( > > https://github.com/freebsd/freebsd/commit/074d37d46c3f9b282cd2d849d > > 997b1b39acd710c) > > but I don¢t know how to use it. Andrew, if you read this ;-) > > > > I wonder if the loader could be more efficient at loading off the > > SD card. > The SD cards can do 10-20MB/s easily, and the ARM kernel is around > 5MB last > time I checked. 5 seconds is 1MB/s, which is much slower than we know > the > hardware can do. I don't know if that's because the callback > mechanism in > u-boot.bin is so slow (that's what ubldr uses to load the kernel), or > there's something inherently slow about our loader. Some analysis > here > might be quite useful. I'm guessing that we're not getting all the > benefits > from streaming read mode because we're doing I/Os that are tiny for > some > reason. But I haven't looked to make sure. > > What's the speed when booting directly from u-boot.bin? > > Warner To be clear here, the time it takes to get from hitting reset to the freebsd copyright on my rpi using u-boot and ubldr is 2.5 - 3 seconds. Considering some of the serious bugs we haven't had time to fix yet, this is just not a thing we need to waste a lot of effort on. -- Ian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1458930170.1091.65.camel>