Compiling your own kernel

From Xbox-Linux

NOTE: THIS is a wip as i am building the kernel myself right now so there are going to be missing step like how to install it and such till i get to that part on my xbox everything that its down here u can start doing it ;)

Table of contents

Intro:

This guide will help you patch the kernel downloadeble from kernel.org and apply the latest xbox-linux patch to it. u know i feel intimidate when i knew i had to compile the kernel myself i tought woo lot of .c files and c++ coding style files but actually its not intimidating its easy but a little extensive and the only part u are going to get tire its when u have to awnser all the question about what do u want to get in the kernel.


Things u need:

the only thing you should need will be the following ones:
kernel from kernel.org matching version number kenel patch if u dont have rpm-build install it the following way

 yum install rpm-build

and matching kernel version
what this means it that u have to patch same version kernels example if u download a kernel version
2.6.16 from here ftp://ftp.kernel.org/pub/linux/kernel/v2.6
u should download the same kernel version from xbox-linux sourceforge site
http://sourceforge.net/project/showfiles.php?group_id=54192&package_id=147485
we should get the most recent kernel that has a patch for the xbox in this case 2.6.16 without
subnumber so its 2.6.16 not 2.6.16.1 now that u have downloaded the patches.

Extracting the files

u should extract the kernel first to /usr/src/
u can download the kernel in 2 compresion formats gz and bz2. check wich one u downloaded and look for
the method on how to extracting then
for bz2 u can use this

 bunzip2 spankythefish.bz2 

then move the content of the extrated file to /usr/src/ using mv

 mv /where_the_kernel_is/ /usr/src/

now we need to extract the patch file its in .gz format

 tar -zxf compressed-patch-file-name-here.gz

then we move the content of that folder to....[have to check where did i extracted them]

 mv /xbox-patch.patch /usr/src/......<have to look where dit i extracted this>

Or, you can do the following:

 cd /usr/src/<kernel source>
 cat <path to xbox-patch.patch> | patch -p1

Patching the Kernel

then once we have the .patch file extracted we need to patch the kernel with that file how the
following way

 patch -p1 xbox-patch.patch

this command what will do its run patch and the -p1 will strip directorys from that path so if u have /usr/src/ u apply -p1
the the patch will search in /src/ instead of /usr/src

Thanks Too

Shallax and the guys on xbox-linux irc channel Getty ;) and google you dont know how much i have used google while doing this as i am new to linux i have to google every command :P