Difference between revisions of "HowTo Build Your Own Custom Kernel"

From NAS-Central Buffalo - The Linkstation Wiki
Jump to: navigation, search
(Roll your own custom kernel from scratch... (well almost).)
 
(Assigned some random categories.)
Line 44: Line 44:
  
 
Enjoy!
 
Enjoy!
 +
 +
[[Category:Development]]
 +
[[Category:Howto]]
 +
[[Category:Kernel]]
 +
[[Category:LSPro]]

Revision as of 04:45, 24 July 2007

Contents

Prerequisite

An i686 host running some flavor of Linux.

Download All the Required Tarballs

First, download the cross toolchain (arm-2005q3-2-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2), mkimage, and the source archive (linux-2.6.12_lsp.1.7.8.tgz):

$ cd /some_directory
$ wget -H -c http://downloads.linkstationwiki.net/Uploads/OldUploads/LS_Pro_temporary/CrossToolchains/CodeSourcery/arm-2005q3-2-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
$ wget -H -c http://downloads.linkstationwiki.net/Uploads/OldUploads/LS_Pro_temporary/CrossToolchains/mkimage
$ wget -H -c http://downloads.linkstationwiki.net/LSPro_ARM9/GPL/gpl_ls-gl/linux-2.6.12_lsp.1.7.8.tgz

If the files were not at the locations indicated above, fear not! Just look in every directory on the server (like I did).

Prepare the Environment

Then, install (i.e., untar) the toolchain and mkimage:

$ cd /some_path
$ tar -xjf /some_directory/arm-2005q3-2-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
$ cd bin
$ export PATH=`pwd`:$PATH
$ cp -p /some_directory/mkimage .
$ chmod a+rx mkimage

Strictly speaking mkimage should not go into /some_path/bin. But, hey...

Now untar the source of the kernel in some directory:

$ cd /some_directory
$ tar -xzf linux-2.6.12_lsp.1.7.8.tgz
$ cd linux-2.6.12_lsp.1.7.8

Ready, Get Set, Build!

While still in some_directory, type the following:

$ make menuconfig
[pick and choose the desired features...]
$ make uImage

The kernel will be ready at arch/arm/boot/uImage.

Enjoy!