Kernel development setup for XO-1.75

Martin Langhoff martin at laptop.org
Wed Jun 6 16:54:10 EDT 2012


{ Maybe someone can polish it further and put it into a wikipage. Note
that the process and tools change over time a bit... }

Hi new kernel developer,

Here are some hints, meant for a self-sufficient kernel developer to
find her/his own way. Some you may know already :-)

- You will want to be on devel at lists.laptop.org for general hacking
questions. This is an open list, so no NDA topics. You will see build
announcements there.

 - We also use irc -- #olpc-devel on OFTC

- You need to know how to download and install a build (grab the zd
file, look in the install instructions for "fs-update").

 - You will want to have your XO setup with a serial port - search our
wiki for the Serial adapter page...

 - The kernel that _actually_ boots is in /bootpart/boot/vmlinuz, it
then uses an initramfs that invokes dark magic before it invokes a
"normal" userland. You can only boot into a usable system through this
magic initramfs.

Our current development practice is to provide a kernel via USB (or
even WLAN) so
that the XO ignores the one on the internal disk. Put the attached
olpc.fth file in a FAT formatted USB, inside a "boot" directory. Then
put a "zimage" file in the root of the USB disk.

This olpc.fth file controls the boot process, you can tweak boot
parameters in there, or tell it to boot a kernel fetched via http over
wlan. It is written in Forth.

 - You'll want our git tree: git://dev.laptop.org/olpc-kernel -
"master" there follows Linus' kernel. We are currently working on
arm-3.0-wip
for XO-1.75.

 - Our defconfig file is in arch/arm/configs/xo_175_defconfig. I
normally copy it to .config and then perl -pi -e 's/=m/=y/' to make a
monolithic kernel that Just Boots.

 - We currently crosscompile our kernels for development  --
     Untar http://dev.laptop.org/~cjb/gcc-4.6.0-from-x86_64-to-armv7.tar.bz2
to /opt, then

PATH=$PATH:/opt/crosstool/gcc-4.6.0/bin/
make ARCH=arm CROSS_COMPILE=armv7-unknown-linux-gnueabi-  <your make
target here>

 - We have an autobuilder that makes nice RPMs of the kernels based
on our git branches. Once you have a well tested patch, spam someone
in our team to get it into the official git repo so that it gets into
our RPM'd kernels...

This is merely a start.



m
--
 martin at laptop.org -- Software Architect - OLPC
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff


-- 
 martin at laptop.org -- Software Architect - OLPC
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OLPC.FTH
Type: application/octet-stream
Size: 2505 bytes
Desc: not available
URL: <http://lists.laptop.org/pipermail/devel/attachments/20120606/cace48fc/attachment.obj>


More information about the Devel mailing list