Kernel Building: Difference between revisions

From OLPC
Jump to navigation Jump to search
(suggesting merge with Kernel page)
(Redirected page to Kernel)
 
(9 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{Merge | Kernel}}
#REDIRECT [[Kernel]]

;Note: it is recommended that you build an RPM ([[Rebuilding OLPC kernel]]) unless you are already familiar with kernel development!

== Building an OLPC kernel ==

After obtaining the OLPC source (and if desired, making changes), the following steps can be taken to build a kernel on any Fedora Core 6 machine:

make oldconfig
make
make modules_install # as root
tar zcvf kern.tar.gz arch/i386/boot/bzImage System.map /lib/modules/$VERS

;Warning!:this needs root and will trash your /lib/modules, if you happen to already have same version. Use "make INSTALL_MOD_PATH=/somewhere modules_install" if you want to avoid using root).
;Note: for current olpc-2.6/master (2.6.26-rcX) <tt>x86</tt> must be used instead of <tt>i386</tt> in these instructions.

Replace $VERS above with the proper kernel version that has been built.

Assuming everything builds correctly, you will be left with kern.tar.gz. This can be copied over to an XO laptop, and the following steps will install the kernel (again, replacing $VERS with the kernel version):

cd /
tar zxvf .../kern.tar.gz
mv System.map /versions/boot/current/boot/System.map-$VERS
mv arch/i386/boot/bzImage /versions/boot/current/boot/vmlinuz-$VERS
ln -sf /versions/boot/current/boot/vmlinuz-$VERS /versions/boot/current/boot/vmlinuz

If not booting off NAND, you'll probably want to skip the /versions/boot/current/ prefix on the paths above. A limited number of kernel modules are required by the ramdisk during the boot process; if you need to update the ramdisk, these additional steps are also necessary:

# mkdir /tmp/X ; cd /tmp/X
# zcat /versions/boot/current/boot/olpcrd.img | cpio -i
# rm -r lib/modules
# cp -r /lib/modules lib/
# find . -print | cpio -H newc -o | gzip -9 > /versions/boot/current/boot/olpcrd.img

[[Category:Developers]]
[[Category:OS]]
[[Category:Software]]
[[Category:Build system]]

Latest revision as of 14:52, 21 February 2011

Redirect to: