D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Linux booting in less than 1.5 seconds

 

On Thu, 16 Jul 2009, tom wrote:

> Gordon Henderson wrote:
>> On Thu, 16 Jul 2009, Paul Hirst wrote:
>>
>>> On Wed, 2009-07-15 at 11:06 +0100, Rob Beard wrote:
>>>
>>>> As far as I know (after watching the demo video) they use an
>>>> uncompressed kernel with only drivers which the hardware requires and
>>>> use DMA access to transfer the stuff into memory, I gather too that the
>>>> hardware is pretty limited due to it being designed for in-car use.
>>>>
>>> I would have thought a gzip compressed kernel would make the most sense.
>>> They are bzip2 compressed by default aren't they? Which is pretty slow
>>> to decompress compared to gzip.
>>>
>>> Can you still do 'make zImage' rather than 'make bzImage'? I haven't
>>> compiled a kernel in a number of years now. The last one must have been
>>> the last Gentoo system I built.
>>>
>>
>> I'll give it a try soon, but the current kernels now support LZMA
>> compression which is supposed to be much faster to uncompress.
>>
> Just wondering if this is a legacy feature or whether loading and
> decompressing is faster than just loading an already decompressed
> kernel? Obviously system dependent but intrigued to see any figures...

If you can uncompress and write to RAM at the same speed as you can read 
from storage media, then having a compressed kernel should always be 
faster as you're reading less in from the chosen media (Flash, hard-drive, 
cd-rom, usb key, etc.) It will all boil down to the efficiency of the 
uncompression.

Another factor to consider is cost - especially if you're making 1000's of 
units - I have a friend who works for a certian "data robot" storage 
device company and they want as little flash on-board as they can get away 
with - because it costs more when building millions of them, so you might 
find that you have no choice but to compress.

When I first put together the process I use today for my "embedded" 
devices, 32MB Flash IDE drives were expensive. These days 256MB ones are 
cheaper, so that's what I use, but I still compress because it's easier...

Actually, in the grand scheme of things, for my own units, having a boot 
time of a minute or so is more than acceptable. Snom VoIP phones which 
also run Linux take about a minute to startup themselves anyway.

Gordon

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html