[OLPC-devel] Flash driver status.

Ronald G Minnich rminnich at lanl.gov
Wed May 17 15:07:49 EDT 2006


Marcelo Tosatti wrote:

> First of all, one question:
> How to enable execution of the 512KB flash on powerup? After
> that, how to reenable the Insyde BIOS?

Insyde? What's that :-)

linuxbios enables all 512k on startup.

> 
> About size, I guess that for the moment you can use a kernel without
> networking/USB, which results in (with ld garbage collection enabled)
> 360k kernel, with JFFS2 and MTD drivers enabled. Later on new
> wireless/USB support can be added, following progress on code shrinkage.

I've got a tiny kernel now, it's not bad:
-r--r--r--  1 rminnich rminnich 449536 May 17 13:02 /tmp/bzImage.elf

This is the .elf format we use for linuxbios, from mkelfImage.

So if I keep the vsa+linuxbios size down to 64k (doable) we have room 
for a 10k initrd ... oog ... a little small eh?


> 
> Follows an outline of the ideas we had:
> 
> Objective: “advanced” boot loader, able to start OS images from the
> wireless network or from USB storage.

I call this a linux kernel :-)
> 
> 1) Standard Mode: Load kernel from NAND boot partition, kexec() to it.

yeah.
> 
> 2) External boot device: network or USB.

ueaj/
> 
> Structure:
> 
> - Compressed RAMDISK containing the bootloader (/sbin/init?).

sure.
> 
> - Need basic wireless tools, maybe linked statically into the bootloader
> program.

sure.
> 
> - Define user interface. What language? 

ash? forth? tcl? any comments?

> 
> Standard Mode:
> 
> - Define format and size of boot partition (JFFS2).
> 
> - Should support selection of kernel image filename from partition (keep
> a failsafe image during upgrade, or for kernel hacking purposes).
> 
> - Should support additional kernel parameters. 

this all makes sense to me.

> 
> External device mode:
> 
> - Triggered with set of special keys during bootup.
> 
> - USB: load boot sector, shutdown to realmode, execute.
> 
> - Network: Bring up wireless, startup PXE procedure (request bootserver,
> bootserver selection, Network Bootstrap Program (NBP) download, shutdown
> to realmode, execute).

do we use USB modules on the NAND for this? How do we do this in the 
worst case -- IDE dead?

> 
> http://www.pix.net/software/pxeboot/archive/pxespec.pdf
> 
> Maybe DHCP+TFTP is enough?

I don't much like PXE. It's really not that great. Can we avoid it? We 
avoid here on quite a large number of cluster nodes.

> 
> Size considerations:
> 
>  At the moment a minimalistic Linux kernel takes about 700k in size,
> gzip compressed.

My bzImage is
-rw-rw-r--  1 rminnich rminnich 450380 May 17 13:01 arch/i386/boot/bzImage

> 
> - Several features can be removed (-tiny patchset). A lot of features in
> this particular build are not required.
> 
> - -ffunction-sections -gc-sections (GCC garbage collect unused
> functions) shrinks ~= 50k (dwmw2).

good one, I will try it out.

I'm going to attach my .config so you can see what can be made better.

oh, wow, thunderbird won't let me attach . files. Who writes this stuff :-)


ron
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: olpcconfig
URL: <http://lists.laptop.org/pipermail/devel/attachments/20060517/17fa0b10/attachment.ksh>


More information about the Devel mailing list