Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

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

OP Navneet Suresh

4th May 2014, 05:19 AM   |  #1  
Navneet Suresh's Avatar
OP Senior Member
Flag /Universe/Earth/India/
Thanks Meter: 491
 
619 posts
Join Date:Joined: Jun 2013
More
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 05:25 AM.
The Following 8 Users Say Thank You to Navneet Suresh For This Useful Post: [ View ]
4th May 2014, 05:22 AM   |  #2  
FantasticalX's Avatar
Senior Member
Flag here
Thanks Meter: 372
 
486 posts
Join Date:Joined: Jan 2013
Donate to Me
More
Hey? Don't forget "credits" at me

Sent from my android-taoshan
4th May 2014, 05:23 AM   |  #3  
Navneet Suresh's Avatar
OP Senior Member
Flag /Universe/Earth/India/
Thanks Meter: 491
 
619 posts
Join Date:Joined: Jun 2013
More
Quote:
Originally Posted by FantasticalX

Hey? Don't forget "credits" at me

Sent from my android-taoshan

for ?
4th May 2014, 05:26 AM   |  #4  
FantasticalX's Avatar
Senior Member
Flag here
Thanks Meter: 372
 
486 posts
Join Date:Joined: Jan 2013
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, 05:28 AM   |  #5  
Navneet Suresh's Avatar
OP Senior Member
Flag /Universe/Earth/India/
Thanks Meter: 491
 
619 posts
Join Date:Joined: Jun 2013
More
Reserved for now
Last edited by Navneet Suresh; 6th May 2014 at 07:27 AM.
4th May 2014, 12:43 PM   |  #6  
david makarove's Avatar
Senior Member
Flag Moscow
Thanks Meter: 1,150
 
623 posts
Join Date:Joined: Apr 2014
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, 01:27 PM   |  #7  
Navneet Suresh's Avatar
OP Senior Member
Flag /Universe/Earth/India/
Thanks Meter: 491
 
619 posts
Join Date:Joined: Jun 2013
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, 06:29 AM   |  #8  
Levered's Avatar
Recognized Contributor
Flag Malaysia
Thanks Meter: 1,796
 
1,778 posts
Join Date:Joined: Feb 2012
Donate to Me
More
I dont understand what you write this tutorial
7th May 2014, 05:10 PM   |  #9  
Navneet Suresh's Avatar
OP Senior Member
Flag /Universe/Earth/India/
Thanks Meter: 491
 
619 posts
Join Date:Joined: Jun 2013
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, 07:08 PM   |  #10  
Levered's Avatar
Recognized Contributor
Flag Malaysia
Thanks Meter: 1,796
 
1,778 posts
Join Date:Joined: Feb 2012
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...

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