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

Search This thread

fjsferreira

Senior Member
Nov 16, 2009
3,181
2,027
Ponta Delgada
Xiaomi Mi 11i
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://xdaforums.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.
 

Attachments

  • boot.img
    3 MB · Views: 145
Last edited:

fjsferreira

Senior Member
Nov 16, 2009
3,181
2,027
Ponta Delgada
Xiaomi Mi 11i
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:

birginioss

Senior Member
Dec 3, 2011
128
8
well i dont get any of that... :\
can we use your upload with any rom?
thanks in advance for your replies..
 

boss_y

Senior Member
Jun 27, 2006
585
92
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
 
May 5, 2011
26
9
Bandung

just want to explain about the pro version. every kernel needs a defconfig, it's like a configuration while compiling a kernel. but, the pro version have a different defconfig so you must pull it first, the file is /proc/config.gz

about the source, we all know the kernel source of .35 kernel for u8800 and pro version are the same but the defconfig is different. so as fjsferreira said, this source isn't compatible for pro version. unless someone port the 3.0.8 source into the pro version. i don't know how to port the kernel, i just want to tell you what is needed to build a kernel

sorry for my bad english
 

fjsferreira

Senior Member
Nov 16, 2009
3,181
2,027
Ponta Delgada
Xiaomi Mi 11i
Here, kernel from today, changelog is "Make button backlight even brighter", pretty self explanatory... Again, don't go to aurora thread posting bugs regarding this kernel as it wasn't an "official" dzo release, please...
 
Last edited:

Mr.Moriarty

Member
Feb 2, 2012
26
3
Here, kernel from today, changelog is "Make button backlight even brighter", pretty self explanatory... Again, don't go to aurora thread posting bugs regarding this kernel as it wasn't an "official" dzo release, please...

Should we put this boot.img file while on pink screen.
I read the first page.But i can't see that ,where is the place of boot.img.
Sorry about this silly question :eek:
Thank you fjsferreira.
 

fjsferreira

Senior Member
Nov 16, 2009
3,181
2,027
Ponta Delgada
Xiaomi Mi 11i
Should we put this boot.img file while on pink screen.
I read the first page.But i can't see that ,where is the place of boot.img.
Sorry about this silly question :eek:
Thank you fjsferreira.

Yes, if you have usb storage access in pink mode, you can put it in the "image" folder, or you can copy it directly with root explorer to ./cust_backup/image/ and then reboot. If you can't see that folder with root explorer, go to options and make sure it's set to show invisible files. It's in the root of filesystem, where /system/ and /etc/ folders are with all the others :D

Of course, in both cases, replace the original boot.img.
 

r1c4rd0

Senior Member
Jan 20, 2007
250
40
35
i have tryed the new kernel "Make button backlight even brighter" and the lights to turn on must change to autobright, but backlight are brighter...
 

Top Liked Posts

  • There are no posts matching your filters.
  • 13
    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://xdaforums.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.
    8
    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.
    2
    hi Blefish i think once you have wifi and sim network fixed you should open a thread here in xda abou you CM9 room...

    i have allready tryed it and its smooth and working great but no wifi and no network :(
    do you have any prevision?
    are you using 3.0.8 kernel in CM9?

    i apreciate tour work. thanks

    Yes, but I am using the very latest CAF code, could bring problems but also solve them. I'll open XDA thread once Wi-Fi and RIL is working, though I want to get calling working, so audio and microphone too. Then we'll see :).

    Let's keep the thread on topic, don't want this to get derailed too :/.
    1
    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
    1
    What do you mean? Deleting kernel_huawei and doing
    Code:
    git clone https://github.com/dzo/kernel_huawei.git
    again? As soon as I do checkout newkernel it fails to compile. Am I using the wrong command to switch branches?

    EDIT: Well, I figured it out, kind of.

    The reason I was having trouble updating the boot.img after compiling master is because I was using the boot.img attached in the first post. After using a boot.img from a updated Aurora build, it updates correctly. However, the problem with newkernel remains, except that now I can build it and have working telephony/USB/etc (I suppose it was a conflict with the old boot.img). However, it still fails to compile unless I resolve the conflicts manually, which is strange I suppose, but it does work. The OP should update the first post. Thanks for all your help, guys!

    There were a few files I forgot to commit, do a "git pull" now and it should compile fine.