uboot vs bootlets with Debian

Started by KD6PAG, January 16, 2014, 08:30:17 AM

Previous topic - Next topic

KD6PAG

I find Debian to be unexpectedly slow on the iMX233-OLinuXino-MICRO,
and i'm trying to understand why.  One thing i found was that it runs
ALOT faster using boot partition from 'iMX233-OLinuXino-SD', which
uses 'bootlets' instead of 'uboot'.

Under Linux 3.11.0, it takes 00:02:04 to boot, and 00:03:15 to start
'aptitude'. 

On the Olimex supplied kernel, Linux-2.6.35-8-ARCH+, it takes 00:02:08
to start 'aptitude' and boots up in 00:01:39 (and that also includes a
30 second pause because CONFIG-SYS-DEPRECATED is defined in that kernel,
or it would be about twice as fast).

For comparison purpose, i'll point out that it takes about 12 seconds to
start up 'aptitude' on an old 'G4' (PowerPC), about 1/15 of the time.

Unfortunately, i have not been successful in booting up Linux 2.6.3x
using 'uboot'.  I finally was able to get 'bootlets' to be build, but
the only kernel that it seems to boot is the binary in the '/boot'
directory on iMX233-OLinuXino-SD (and i've tried over a half-dozen
kernels of various vintages).  And 'uboot' won't boot that kernel
(it doesn't recognize its format).

So i can't tell if 'Linux-2.6.35-8-ARCH+' makes things run much faster
than a modern kernel, or if 'bootlets' configures the processor to run
faster than 'uboot'

Does anyone have an idea what might be going on here and/or how to find
out more about this?

And where do i get Linux sources which would correspond exactly to
'Linux-2.6.35-8-ARCH+' (as one would expects with GPL), so that kernel
could be built to include other Linux supported I/O devices?

Or how does one build a kernel that 'bootlets' will boot?

lambda

I don't know about any speed benchmarks, so can't help there.
(using OpenWRT built kernels myself, but all my applications
need low processing power only)

But I can provide two hints:
As for aptitude: My experience is that aptitude+recent debian
archive need lot's of RAM for the package cache. The board
only has 64MB of RAM, so maybe that's part of the problem.
Make sure you have exactly the same apt.sources list and
localization settings to make your tests clearer.

As for uboot: There is some tool mkimage (included in
debian), that adds proper headers to kernel images so that
uboot can load them. I posted the necessary command line
parameters in some other message in this forum.

HTH,
Harald

KD6PAG

With respect to speed: Yes, i do expect that 'aptitude' is paging a lot,
but why should things take 1.5 - 2 times as long with a current kernel
as compared to the one which Olimex distributed in binary form?

The 'uboot' that i got from Robert Nelson already handles 'zImage'
format and i don't think it knows what to do with a legacy 'uImage'.
I found a 'uboot' which expects that.  It would likewise boot the
two 2.6.3x kernels that i built in 'uImage' format, but again,
nothing is printed after the 'starting' message.

So i still think i need sources that correspond to the one which
was supplied by Olimix, e.g. Linux-2.6.35-8-ARCH+ .

And  i still want to find out how to get 'imx-bootlets' to boot
anything besides the binary kernel that Olimex supplied.  So i
can figure out if it's something that 'imx-bootlets' is doing
different, or something that Olimex's kernel is doing to make
things run much faster.

lambda

Quote from: KD6PAG on January 17, 2014, 04:22:21 AM
The 'uboot' that i got from Robert Nelson already handles 'zImage'
format and i don't think it knows what to do with a legacy 'uImage'.
I found a 'uboot' which expects that.  It would likewise boot the
two 2.6.3x kernels that i built in 'uImage' format, but again,
nothing is printed after the 'starting' message.

Likely your uImage files have bad headers or something. Maybe check
if load address and entry point are actually correct. Also some
problem with the .dtb files might cause this.

Quote
And  i still want to find out how to get 'imx-bootlets' to boot
anything besides the binary kernel that Olimex supplied.  So i
can figure out if it's something that 'imx-bootlets' is doing
different, or something that Olimex's kernel is doing to make
things run much faster.

Most things I know about the imx-bootlets, elftosb, etc.
comes from reading the OpenWRT Makefiles. They are reasonably
clear. The best I can help you is to suggest you do the same.

(And BTW, I did start with Debian myself, but settled with
OpenWRT because it was much less work. I'd still like to see
some proper Debian support for these boards though ...)

HTH,
Harald

Sjef

QuoteAnd  i still want to find out how to get 'imx-bootlets' to boot
anything besides the binary kernel that Olimex supplied

Have a look at: https://github.com/koliqi/imx23-olinuxino




KD6PAG

Thank you very much.  That copy of 'bootlets' worked just fine with Linux-2.6.35-8-ARCH+ and
included a copy of Linux 3.7.1, which worked with 'bootlets' and mostly wored with 'u-boot'
as well.  The command:

    dd if=/dev/sda1 of=/dev/null count=102400

Produced similar results with the same USB disk under Linux 3.7.1 with 'u-boot' and 'bootlets'
but ran about twice as fast under 'Linux-2.6.35-8-ARCH+' with 'bootlets'.  I got a similar
speed difference comparing 2.6.35-8-ARCH+ and Linux 3.7.1 using '/dev/mmcblk0p2' with
'bootlets' (but could not get '3.7.1' to recognize '/dev/mmcblk0' when booting with 'u-boot').

But '2.6.35-8-ARCH+' won't boot with 'u-boot', so i'm not absolutely sure the booter doesn't
have an effect.  But it seems unlikely at this point.