[XPERIA X8 General] viper001:
Reserved

Part 5: The code strikes back!

What are those files we downloaded:

1. FXP Kernel Source for MSM7227

2. Linux-GNU compiler

3. SE 2.1.1.A.0.6 Kernel Source.

What do we do with it?

Assuming you've got your VMBox Ubuntu running,

1. Open Home. This is like windows File Explorer.

2. Make a Folder and call it "Kernel".

3. Copy all your downloaded files into the Kernel Folder.

4. Extract those 3 files by right clicking on the archive and select "Open with Archive Manager".

5. Select "Extract" in the upper part of the Archive Manager window. Click "extract" again on the lower right of the window that appears.

are you done extracting? well, if you are then:

6. let's make our lives a bit easier: Rename the arm-2010q1-202-arn-none-linux-gnueabi-i686-pc folder into just arm-2010q1.

7-8 do the same thing with the other two.... No, not the same name as arm2919q1(noob!) but, for the FXP kernel source folder just rename it to FXP and the original SE Kernel Source folder to SeX8.

9. OK. crash helmets ready? Open up Terminal....

(hint: see that wierd symbol above the Home icon in the taskbar? click on it and in the search space type "terminal")

(hint: you can click and drag the Terminal Icon into the task bar for easier use.)

10. type this in exactly but without the double qoutes, Linux is picky about cases. "sudo apt-get install git unrar libncurses5-dev qt3-dev-tools"

remember your homework?

sudo is a command that basically says "hey, i'ma supauser, do what i tell you!" which in this case is to download and install, git, unrar, ncurse libraries and QT3. To be honest, i haven't found much use for Qmake (QT3).

You might be wondering (especially the command line experts) as to why i switch back and forth between the command line and the Home browser. Well, for us noobs, i find it easier to go with the familiar and spend as little time as possible in a super user terminal. Lot's of things can go wrong with a mis-typed command. As for now twiddle your fingers while we wait for the download and install to finish.

Done?

11. OK. since we're gonna be doing kernel stuff lets get super user access. again enter this with no qoutes: sudo /bin/bash

enter your password. don't worry it won't show those loveable asterisks. press enter. if everything's ok we'll see the command prompt again with a difference of root access ;-)

12. next. let's get to our Kernel directory by : "cd ~/Kernel/FXP" (thanks to dioxanh for the correction)

13. Heres where the fun begins:

we set up the environment by entering the following in Termial(NO QOUTES):

"export ARCH=arm"

"export CROSS_COMPILE=/home/viper001/Kernel/arm-2010q1/bin/arm-none-linux-gnueabi- "

BTW, change viper001 in the crosscompile to your user name

14. configuration definitions. this tells the compiler for what machine, what drivers to include, machine configuration etc to include into your kernel build.

so, if you want to see all the machines, for those with any machine with the MSM7227, (HEY, you with the E16) it is possible to compile a kernel for it also.

in this case, lets use the Home Folder explorer. and double-click on the following folders: Kernel >> FXP>> arch>> arm >> configs.

now we're in FXP's archive for the configuration of arm based machines. isn't it nicely logical.

of interest are two configs. fxp_shakira_defconfig and semc_shakira_defconfig. You can view them in gedit by double clicking. but please do not edit.

15. Back to the terminal. type in: "make fxp_shakira_defconfig"

did you see this after it was done? "# configuration written to .config". that means, so far so good.

16. let's see what we've got. This was the reason we downloaded ncurses. enter "make menuconfig"

Explore a bit, and see the settings, don't change any for now. once your done exit back to the terminal prompt.

17. type in: "make" and depending on your PC, it will take from 10 to 30 minutes. give or take a few hours on a pentium 1. (DIDn't i tell you to upgrade?)

18. If all went well, then in the Kernel >> FXP>> arch>> arm >> boot folder, you'll find the image and zimage files. congratulations, you've compiled your first kernel.

So, in summary once you've got all the stuff together you've got to:

sudo /bin/bash

to get superuser access

export ARCH=arm

ready your environment to compile for the arm based machione

export CROSS_COMPILE=/home/viper001/Kernel/arm-2010q1/bin/arm-none-linux-gnueabi-

ready your environment by specifying the location of your compiler

make "defconfig, menuconfig, oldconfig"

make "defconfig": where defconfig is the default configuration file of a specific machine base on the archive as specified by ARCH.

make menuconfig: give us a pseudo graphical user interface. best used after a make defconfig to do those tweaks. ;)

make oldconfig: you don't want to know. but if your curious just enter it and take a look and waste between 15 to 30 minutes of your life.

make: the final command to get your kernel image.

Here's a few helpfull commands after a failed compile: :D

make clean

make mrproper