[OLPC-devel] just verified: 2306 + olpc + linux kernel works.
Marcelo Tosatti
marcelo at kvack.org
Wed May 31 20:49:52 EDT 2006
On Thu, May 25, 2006 at 08:00:06PM -0300, Marcelo Tosatti wrote:
> On Tue, May 23, 2006 at 10:59:09AM -0300, Marcelo Tosatti wrote:
> > On Mon, May 22, 2006 at 03:12:20PM -0300, Marcelo Tosatti wrote:
> > > On Thu, May 18, 2006 at 09:03:08PM -0600, Ronald G Minnich wrote:
> > > > version 2306 will boot a linux kernel.
> > > >
> > > > What would help is if one of you wants to build the absolute minimum
> > > > kernel and initrd and send me a source tree pointer and .config. I'm
> > > > using 2.6.14 with tiny linux patches right now.
> > >
> > > Ron,
> > >
> > > FYI:
> > >
> > > I'm writing a small program to mount the flash partition with JFFS2,
> > > read the kernel from there, and sys_kexec() it.
> >
> > Ok, not so easy. Latest versions of kexec-tools include a "purgatory"
> > stage which contains ~= 40k of code (intermediate state between two
> > running kernels).
> >
> > Will need to come up with a slim version of the userspace kexec
> > procedure, shouldnt be very hard either.
>
> Ron,
>
> I've uploaded a tarball with code to load a kernel from flash and boot
> it via the kexec() system call (ripped from kexec-tools 1.98).
>
> http://hera.kernel.org/~marcelo/olpc/olpc-boot-loader-idea.tar.gz
>
> Inside it you can find:
>
> - the uClibc .config file used
> - the kernel .config file used
> - three kernel patches: small kexec issue, module to enable NAND via MSRs,
> usage of ld's -gc-sections.
>
> The statically linked program results in 37112 bytes, and compressed
> ext2 rootfs used as RAMDISK (olpc-boot-loader + necessary /dev files)
> results in 19458 bytes.
Hi,
Cleaned up the "mount-and-kexec" hack somehow, so we have _something_ to
flash along with LinuxBIOS. I'm running out of ideas now - don't expect
a children usable interface from me :)
Done:
- Support selection of kernel/ramdisk/command line
- Support mounting of ext2 filesystems from /proc/partitions devices
(boots from USB!).
Have been wondering if a graphical interface is really needed, given
that in 99.9% of cases the system should boot pretty fast into Linux (a
nice image can be drawn by the real kernel).
TODO:
- Make NAND boot the default, selection of "expert" mode triggered
by set of special keys.
- Must report partition->(vendor id, product id)
- Write decent user interface, with edition of text, etc.
- Add support for remote execution of images (later on, higher
priority issues first).
- Fit BusyBox along!
http://hera.kernel.org/~marcelo/olpc/kexec-boot-loader.tar.gz
Now that 1MB SPI flash is being used, all of this can be obsoleted by a
simple shell script which invokes "mount" and "kexec", hopefully.
Sample session:
Kexec boot loader
Select option:
1 - boot from NAND flash (JFFS2)
2 - boot from USB device (EXT2)
2
kernel file is: bzImage
kernel cmdline is: root=/dev/ram rw
kernel initrd is not set
change any option? (Y/N)
Y
kernel is: bzImage
change? (Y/N)
N
kernel cmdline is: root=/dev/ram rw
change? (Y/N)
N
kernel initrd is not set
change? (Y/N)
Y
new initrd file: rootfs.gz
kernel initrd is: rootfs.gz
change? (Y/N)
N
kernel file is: bzImage
kernel cmdline is: root=/dev/ram rw
kernel initrd is: rootfs.gz
change any option? (Y/N)
kernel file is: bzImage
kernel cmdline is: root=/dev/ram rw
kernel initrd is: rootfs.gz
change any option? (Y/N)
N
Select USB partition
0: sda
1: sdb
3: dm-0
4: dm-1
5: loop0
6: loop1
...
More information about the Devel
mailing list