[OLPC-devel] Flash driver status.
Marcelo Tosatti
marcelo at kvack.org
Wed May 17 13:02:27 EDT 2006
On Tue, May 16, 2006 at 04:19:13PM -0600, Ronald G Minnich wrote:
> Jim Gettys wrote:
> >How big are the vsa modules (each?)
> >
> >We will be punting VESA emulation ASAP (and moving to a fbdev native
> >driver).
> > Regards,
>
>
> that's fine, but we need 128k or so of flash for vsa. I can get
> linuxbios down to < 32k, I think, and I can get linux kernel down to <
> 450K, but that VSA (not VESA, VSA) just kills us. And, AMD tells me that
> dumping VSA completely is very, very hard.
>
> I may see if I can make vesa compress ... hmm. why did I not try this. DUH!
>
> [rminnich at q GX2]$ ls -l vsa_test.bin*
> -rw-rw-r-- 1 rminnich rminnich 131072 Apr 25 14:24 vsa_test.bin
> -rw-rw-r-- 1 rminnich rminnich 35687 May 16 16:17 vsa_test.bin.nrv
>
> and, linuxbios knows how to decode this compression. I can compress
> vmlinux and vsa with same compressor, so we only need one decompressor,
> which also saves space.
>
> So ... < 64K for vsa+linuxbios, I think we can get the kernel in flash.
> 512KB may work out. I'll start looking at this tonight.
Hi Ron,
I've been talking to Christopher and David about some ideas related to
embedding Linux on the 512KB flash.
First of all, one question:
How to enable execution of the 512KB flash on powerup? After
that, how to reenable the Insyde BIOS?
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.
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.
1) Standard Mode: Load kernel from NAND boot partition, kexec() to it.
2) External boot device: network or USB.
Structure:
- Compressed RAMDISK containing the bootloader (/sbin/init?).
- Need basic wireless tools, maybe linked statically into the bootloader
program.
- Define user interface. What language?
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.
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).
http://www.pix.net/software/pxeboot/archive/pxespec.pdf
Maybe DHCP+TFTP is enough?
Size considerations:
At the moment a minimalistic Linux kernel takes about 700k in size,
gzip compressed.
- 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).
http://hera.kernel.org/~marcelo/olpc/garbage-collect.patch
- JFFS2 read-only support (dwmw2).
- LZMA compression allows ~= 100k to be saved, resulting in longer
decompression time.
- Personal feeling is that its hard to get below 400k.
More information about the Devel
mailing list