FORUMS

[Developer] Guide to compile kernel for Sony Xperia L.

651 posts
Thanks Meter: 521
 
Post Reply Subscribe to Thread Email Thread
How to compile kernel from source for Sony Xperia L

Things needed :

A PC

Ubuntu on VM or Main Os

Android Phone/Tab :P, In this case XL unlocked

Brain (Be sure you get it).


I suggest to get Hells-Kitchen Ubuntu distro it has all the basic things installed for compiling kernels/modding/and ROMS.

Distro Link : http://forum.xda-developers.com/show....php?t=2152398

> Then proceed further by getting the opensource archives from Sony developer website.

> I suggest you to download within Ubuntu distro for ease.

> Extract it.

> Now we need to setup and fix some sh*ts before we can rven think of compiling.

> To start of setup the toolchains, In my case I used Linaro you can use the ones posted here

http://forum.xda-developers.com/show....php?t=2098133

> Then setup the toolchains in your Makefile.

> Now the real work begins we need to fix the source before compilation.

>> Commits regarding the fixes :

https://github.com/varunchitre15/and...6ba711984d9343 - CCI Klog Fix

https://github.com/varunchitre15/and...6ba711984d9343 - Some more

https://github.com/varunchitre15/and...fa4d65a2c2de8c - Increase Frame warn limit

https://github.com/varunchitre15/and...6a88982c29f135 - Fix Frame Buffer


> After applying all the fixes : Now you can start with compiling the kernel.

> Go to your extracted ARCHIVE folder.

> Then start by initiating these commands.

> ARCH=arm make sa77_defconfig -Makes Config files

> ARCH=arm make menuconfig -Opens menus to edit configurations(In laymans language)

> ARCH=arm make -jX -Starts compiling, J x stands for no. of jobs for my PC i use -j3 and for first time use -j1 it lessens the scroll time if any major bug occurs.

> After you get the zimage , Now we can make boot.img.

> Get the ramdisk from stock or any other kernel (Be sure you give credits to the kernel author if you use it).

> Get Anikets Packing tool : https://github.com/aniketroxx/Aniket_Packer

> Pack your kernel get all the modules search for .ko files.

> Flash you kernel with Fastboot mode.

> Flash your modules or replace them manually and set permissions accordingly.

> You are done with your kernel if all goes well Xperia Should boot up :P


I may not have covered all topic and would update guide soon with more topics covered.

"If your kernel doesnt boot dont PM/spam me Instead post your problems here in this thread."

Credits :

@varun.chitre15 for Commits.
@h311sdr0id for his awesome Distro.
@Christopher83 for His GCC Toolchains Thread
Sorry if I forgot to credit anybody, who's work is used in my thread, PM me I will add it.
Last edited by Navneet Suresh; 4th May 2014 at 04:25 AM.
The Following 8 Users Say Thank You to Navneet Suresh For This Useful Post: [ View ]
 
 
4th May 2014, 04:22 AM |#2  
FantasticalX's Avatar
Senior Member
Flag Yogyakarta
Thanks Meter: 389
 
Donate to Me
More
Hey? Don't forget "credits" at me

Sent from my android-taoshan
4th May 2014, 04:23 AM |#3  
Navneet Suresh's Avatar
OP Senior Member
Flag /Universe/Earth/India/
Thanks Meter: 521
 
More
Quote:
Originally Posted by FantasticalX

Hey? Don't forget "credits" at me

Sent from my android-taoshan

for ?
4th May 2014, 04:26 AM |#4  
FantasticalX's Avatar
Senior Member
Flag Yogyakarta
Thanks Meter: 389
 
Donate to Me
More
Quote:
Originally Posted by Navneet Suresh

for ?

Lol, you don't get it. I will try this! Thanks!

Sent from my android-taoshan
4th May 2014, 04:28 AM |#5  
Navneet Suresh's Avatar
OP Senior Member
Flag /Universe/Earth/India/
Thanks Meter: 521
 
More
Reserved for now
Last edited by Navneet Suresh; 6th May 2014 at 06:27 AM.
4th May 2014, 11:43 AM |#6  
david makarove's Avatar
Senior Member
Flag Moscow
Thanks Meter: 1,336
 
More
Thank you for this guide
i should be c++ programmer for start with this right?

Sent from my taoshan using XDA Premium 4 mobile app
4th May 2014, 12:27 PM |#7  
Navneet Suresh's Avatar
OP Senior Member
Flag /Universe/Earth/India/
Thanks Meter: 521
 
More
Quote:
Originally Posted by david makarove

Thank you for this guide
i should be c++ programmer for start with this right?

Sent from my taoshan using XDA Premium 4 mobile app

Having some knowledge on c is enough.

Sent from my Nexus 7 using XDA Free mobile app
The Following User Says Thank You to Navneet Suresh For This Useful Post: [ View ]
7th May 2014, 04:10 PM |#9  
Navneet Suresh's Avatar
OP Senior Member
Flag /Universe/Earth/India/
Thanks Meter: 521
 
More
Quote:
Originally Posted by Levered

I dont understand what you write this tutorial

I have tried to be as simple as possible ... Be more clear with your question what part of the tutorial you didn't understand i mean setup, compiling, ??

Sent from my Nexus 7 using XDA Free mobile app
7th May 2014, 06:08 PM |#10  
Levered's Avatar
Recognized Contributor
Flag Malaysia
Thanks Meter: 2,109
 
Donate to Me
More
Quote:
Originally Posted by Navneet Suresh

I have tried to be as simple as possible ... Be more clear with your question what part of the tutorial you didn't understand i mean setup, compiling, ??

Sent from my Nexus 7 using XDA Free mobile app

Yup, i know you make it's simple..,btw please wrap command..maybe will confuse others member to read this...

btw i've problem to setup...
7th May 2014, 06:14 PM |#11  
Navneet Suresh's Avatar
OP Senior Member
Flag /Universe/Earth/India/
Thanks Meter: 521
 
More
Quote:
Originally Posted by Levered

Yup, i know you make it's simple..,btw please wrap command..maybe will confuse others member to read this...

btw i've problem to setup...

What problem in setting up ?

Sent from my Nexus 7 using XDA Free mobile app
Last edited by Navneet Suresh; 15th May 2014 at 09:04 AM.
The Following User Says Thank You to Navneet Suresh For This Useful Post: [ View ]

Read More
Post Reply Subscribe to Thread

Tags
guide, kernel, noob guide, sony, xperia l
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes