2001-02-06 15:03:01

by Robert Kaiser

[permalink] [raw]
Subject: Re: Disk is cheap?

On Sam, 03 Feb 2001 you wrote:
> > Usually most of the startup time is spent by the BIOS doing
> > extensive self-test stuff and for firing up services (http,
> > inetd, sendmail, ...) that many embedded systems have little use
> > for.
>
> Actually, most of that time is spent running bash/sleep 1. Startup
> scripts tend to be poorly designed.

Yes!

> > I have a 25MHz 386EX (~2.2 Bogomips) here that boots Linux out of ROM
> > in roughly 30 seconds. Most of _that_ time however is spent decompressing
> > the kernel.
>
> You might want to set up XIP and run kernel directly off the ROM...
>

Hmm, that board has only 512KB ROM. I can fit a minimal Linux kernel
and root-FS in that, but only if it's compressed. ROM, in my experience,
is more expensive than RAM, so it often makes sense to save ROM space
even at the expense of using a little more RAM.

But I'm curious: is there a simple procedure to set up a linux Kernel
to execute from ROM ?


----------------------------------------------------------------
Robert Kaiser email: [email protected]
SYSGO RTS GmbH
Am Pfaffenstein 14 phone: (49) 6136 9948-762
D-55270 Klein-Winternheim / Germany fax: (49) 6136 9948-10


2001-02-06 15:29:30

by Hacksaw

[permalink] [raw]
Subject: Re: Disk is cheap?

> On Sam, 03 Feb 2001 you wrote:
> > Actually, most of that time is spent running bash/sleep 1. Startup
> > scripts tend to be poorly designed.
>
> Yes!

I'm not so sure. I'm using RedHat 6.2, and it seems the only time a startup script calls sleep is when it gives you a chance to do interactive startup, and when you are looking for an NIS server. You could certainly remove those.

All the other calls to sleep are in the stop sections, where you want to make sure the thing died before proceeding.

But paring down the startup scripts is a good idea. For something like an embedded device, you might even want to go with a custom init, that just runs your main program.

2001-02-06 15:36:10

by Robert Kaiser

[permalink] [raw]
Subject: Re: Disk is cheap?

On Die, 06 Feb 2001 you wrote:
> But paring down the startup scripts is a good idea. For something like an embedded
> device, you might even want to go with a custom init,

Yes, I'm using busybox (see busybox.lineo.com). It's a multi-call binary that
contains a simplified init, a shell and a host of other nice things.

> that just runs your main program.

Well the _very_ minimal approach is to have your main program _be_ init :-)



----------------------------------------------------------------
Robert Kaiser email: [email protected]
SYSGO RTS GmbH
Am Pfaffenstein 14 phone: (49) 6136 9948-762
D-55270 Klein-Winternheim / Germany fax: (49) 6136 9948-10

2001-02-06 20:39:43

by John Fremlin

[permalink] [raw]
Subject: Re: Disk is cheap?

Robert Kaiser <[email protected]> writes:

> On Die, 06 Feb 2001 you wrote:
> > But paring down the startup scripts is a good idea. For something like an embedded
> > device, you might even want to go with a custom init,

Plug: How about jinit (my init) ;-)

http://www.penguinpowered.com/~vii/programs/linux/jinit
http://john.snoop.dk/programs/linux/jinit

Boot script time with the supplied example scripts is 12-13 seconds to
login prompt under 2.4 on my old K6-2. Jinit has integrated service
stop/start functionality. Also on the page are links to other source
available inits.

[...]

--

http://www.penguinpowered.com/~vii