[OLPC-devel] Flash driver status.

Marcelo Tosatti marcelo at kvack.org
Wed May 17 15:45:12 EDT 2006


On Wed, May 17, 2006 at 01:07:49PM -0600, Ronald G Minnich wrote:
> 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 :-)

Hehe :) 

> linuxbios enables all 512k on startup.

Err.. What I meant is: how to program the board to execute the 512KB
flash instead of the Insyde code? 

How are you testing LinuxBIOS? 

> >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?

Yeap... Need to shrink that down.

> >
> >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?

I suspect that the final version might use some sort of visual interface
such as icons...

Better abstract that away from the main bootloader code.

> >
> >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?

We don't - the aim is to fit the wireless driver _and_ wireless firmware (~120k 
uncompressed) inside the flash :)

Otherwise a corrupted module could result in unfixable system, as you note.

> >
> >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.

Not an expert really... You tell me.

> >
> >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

> #
> # Automatically generated make config: don't edit
> # Linux kernel version: 2.6.14-tiny1
> # Fri May  5 15:43:00 2006
> #
> CONFIG_ARCH_MAY_HAVE_PC_FDC=y

Disable

> # CONFIG_PRINTK is not set
> # CONFIG_BUG is not set

You might want to enable PRINTK and BUG to see whats going on :) 

> # CONFIG_XATTR is not set
> # CONFIG_FILE_LOCKING is not set
> CONFIG_UID16=y
Disable

> CONFIG_IDE=y
> # CONFIG_BLK_DEV_IDE is not set
> CONFIG_BLK_DEV_HD_ONLY=y
> CONFIG_BLK_DEV_HD=y

Disable

> # CONFIG_ETH16I is not set
> CONFIG_NE2000=y

Disable (all of networking BTW, no use for it at the moment
right?)

> CONFIG_HWMON=y

Disable

> CONFIG_EXT2_FS=y

Disable




More information about the Devel mailing list