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

GUIDE - Compile latest Dzo's 3.0.8 kernel (Aurora)

OP fjsferreira

2nd April 2012, 04:37 PM   |  #1  
fjsferreira's Avatar
OP Senior Member
Flag Ponta Delgada
Thanks Meter: 1,422
 
2,231 posts
Join Date:Joined: Nov 2009
More
Ok, in this guide, we'll build our development environment so we can start compiling aurora's kernel (3.0.8) in ubuntu.

NOTES:

- Every command is to be used in the terminal (Applications-Accessories-Terminal).
- There are scripts you can use to automate stuff, I'll post them in the second post on this thread.
- Sorry, I won't guide you on how to install Ubuntu or Android SDK, there are guides on the web all over the place.


1 - First things first, here's what we need:

a) Ubuntu 10.04 LTS x64 (this is recommended by google, it might work in other ubuntu versions, but I didn't tried it). To download it, go to:

http://releases.ubuntu.com/lucid/

And select the 64-bit PC (AMD64) desktop CD version. Your processor must support 64bits (most modern ones support it, else, use the x86 iso, not tested though).
Install ubuntu, you can use dual-boot with windows. I won't post a guide to this, as it's very easy and there are guides all over the net.

b) Install android sdk, to use adb (this is optional, but you really should if you use adb).
Follow this guide:
http://forum.xda-developers.com/showthread.php?t=921169
Note: Eclipse is not needed

c) Install some tools that are needed, like git, compiler stuff etc (this is a single command, copy and paste everythin):

Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc abootimg
NOTE: If abootimg doesn't install (It didn't for me, for some reason) go in here, download and install the deb package.

d) Install the toolchain (it's a set of tools used to compile the kernel, I think. This takes a while):

Code:
git clone https://android.googlesource.com/platform/prebuilt
e) Download dzo's kernel from git and set the git branch to "master":

Code:
git clone https://github.com/dzo/kernel_huawei.git
git checkout master

2 - Getting to the fun stuff...

a) First, copy the boot.img attached to this post to your /home/kernel_huawei folder.

b) Set up the environment. Do this, in the terminal (must be done for each compilation session, I'll post scripts in the end, to automate this stuff):

Code:
cd kernel_huawei
export ARCH=arm
export CROSS_COMPILE=/home/username/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
make u8800_defconfig
Note, replace /username/ in the third command with your username.

c) Compile. This takes like 10 minutes, depending on your pc:

Code:
make
TIP - Speedup compilation (thanks to Unrealized)

You can use
Code:
make -jx
to speed up the compilation.
ie, if you have 2 cores, use
Code:
make -j3
for 4
Code:
use -j5


3 - Create the boot.img. If you aren't already in the kernel_huawei folder, do this:

Code:
cd kernel_huawei
Then:

Code:
abootimg -u boot.img -k arch/arm/boot/zImage
After this, the boot.img in your kernel_huawei folder is updated. You can copy that to your phone.

_________________________________________

That's it. In the second post, I'll tell you how to check for latest version, check changelogs and scripts to automate stuff.

If you find any errors, please let me know.
Attached Files
File Type: img boot.img - [Click for QR Code] (2.96 MB, 141 views)
Last edited by fjsferreira; 12th April 2012 at 05:02 PM. Reason: New link for guide to installing android sdk
The Following 13 Users Say Thank You to fjsferreira For This Useful Post: [ View ]
2nd April 2012, 04:38 PM   |  #2  
fjsferreira's Avatar
OP Senior Member
Flag Ponta Delgada
Thanks Meter: 1,422
 
2,231 posts
Join Date:Joined: Nov 2009
More
ADDITIONAL STUFF

CHECK FOR UPDATES AND CHANGELOG's

In the terminal:

Code:
cd kernel_huawei
git pull
git log

SCRIPTS

To create a script, create an empty document (no extension), copy the commands and save it. Then right click it, go to "Properties-Permissions" and set it to execute.

To run the script, use the therminal and do:

Code:
cd /path/to/script/file/
./scriptfilename
OR, you can create a shortcut to the script in the panel, for example:

- Right click on the panel and select "Add to panel - Custom application launcher"
- Then, in type, select "Application in terminal"; give it any name, and then browse to the script file.

To run the script just click in the icon in the panel.

a) Automatically download the latest updated files and see what has changed, without compiling:

Code:
cd ~/kernel_huawei
git pull
git log
$SHELL
b) Automatically download the latest updated files, immediately compile and create a new boot.img in the kernel_huawei folder:

Code:
cd ~/kernel_huawei
git pull
export ARCH=arm
export CROSS_COMPILE=/home/username/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
make u8800_defconfig
make
abootimg -u boot.img -k arch/arm/boot/zImage
$SHELL
In this script, you must change the /username/ in the 4th command to your username.


Installing the kernel on the phone

a) Use adb to put the boot.img, (assuming it is on the kernel_huawei folder) in the phone and reboot the phone:

Code:
cd kernel_huawei
adb shell mount -o rw,remount /dev/block/mmcblk0p1 /.cust_backup
adb push boot.img /.cust_backup/image/boot.img
adb shell mount -o ro,remount /dev/block/mmcblk0p1 /.cust_backup
adb reboot
c) Manual installation:
- Copy the updated boot.img to your sdcard.
- Use root explorer (make sure it is set to show hidden files) and copy the boot.img to ./cust_backup/image, replace the original and reboot.
Last edited by fjsferreira; 5th April 2012 at 02:06 AM. Reason: Removed flash zip method as I'm not sure the update script is error-free...
The Following 8 Users Say Thank You to fjsferreira For This Useful Post: [ View ]
3rd April 2012, 08:57 AM   |  #3  
Senior Member
Thanks Meter: 23
 
203 posts
Join Date:Joined: Apr 2011
Thank you for this! gonna try it!
3rd April 2012, 10:32 AM   |  #4  
Junior Member
Thanks Meter: 0
 
27 posts
Join Date:Joined: Feb 2012
whats about pro?
3rd April 2012, 02:54 PM   |  #5  
birginioss's Avatar
Senior Member
Thanks Meter: 9
 
127 posts
Join Date:Joined: Dec 2011
well i dont get any of that... :\
can we use your upload with any rom?
thanks in advance for your replies..
3rd April 2012, 03:37 PM   |  #6  
fjsferreira's Avatar
OP Senior Member
Flag Ponta Delgada
Thanks Meter: 1,422
 
2,231 posts
Join Date:Joined: Nov 2009
More
Quote:
Originally Posted by birginioss

well i dont get any of that... :\
can we use your upload with any rom?
thanks in advance for your replies..

What do you mean? There's no upload here for any ROM... the files here are just for compiling Dzo kernel to use in Aurora... I suggest you ignore this thread if you don't know what this is all about :)

Sent from my U8800
The Following User Says Thank You to fjsferreira For This Useful Post: [ View ]
3rd April 2012, 03:39 PM   |  #7  
fjsferreira's Avatar
OP Senior Member
Flag Ponta Delgada
Thanks Meter: 1,422
 
2,231 posts
Join Date:Joined: Nov 2009
More
Quote:
Originally Posted by Matoxas

whats about pro?

Sorry, this is only for Dzo kernel for Aurora, I know nothing about U8800 pro...

Sent from my U8800
3rd April 2012, 03:51 PM   |  #8  
Senior Member
Thanks Meter: 91
 
577 posts
Join Date:Joined: Jun 2006
Can you post latest 3.0.8 kernel so we can flash it over cwm. Thx

Sent from my U8800 using Tapatalk 2 Beta-5
3rd April 2012, 04:11 PM   |  #9  
fjsferreira's Avatar
OP Senior Member
Flag Ponta Delgada
Thanks Meter: 1,422
 
2,231 posts
Join Date:Joined: Nov 2009
More
Quote:
Originally Posted by boss_y

Can you post latest 3.0.8 kernel so we can flash it over cwm. Thx

Sent from my U8800 using Tapatalk 2 Beta-5

It's in Aurora's thread, search posts by Dzo, it's 3.0.8 v2...

Sent from my U8800
3rd April 2012, 05:01 PM   |  #10  
Member
Thanks Meter: 2
 
51 posts
Join Date:Joined: Apr 2010
More
Smile Thanks
Good Work!

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes