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

Search This thread

AceDroidX

Senior Member
May 18, 2011
257
31
Athens
Hey, i think u need to replace the first code with this. I bolded the changes. :highfive:

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 [B]lib32readline-gplv2-dev[/B] [B]lib32z1-dev[/B] libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc abootimg
 

PaulMilbank

Senior Member
May 1, 2011
457
214
Auckland

faekplastik3s

Senior Member
Oct 26, 2011
186
77
Can anyone help me? I never worked with git or really anything related to Android development, but I am trying to get into it. I followed this guide, but unfortunately I couldn't really make it work correctly, I always run into issues at compile time. I assume I am doing something wrong at checkout or something really simple, so maybe you guys can lend me a hand?

My issue is this: whenever I try to do
Code:
abootimg -u boot.img -k arch/arm/boot/zImage
I get
Code:
reading kernel from arch/arm/boot/zImage
boot.img: updated is too big for the Boot Image (4083712 vs 3100672 bytes)

Also, I wanted to checkout and compile the v5 version of dzo's kernel, and it seems like the "master" branch refers to the previous version based on the commit date, and that "newkernel" contains the source for the v5 kernel. However, when I try to build it, after doing
Code:
git checkout newkernel

It fails to compile:

Code:
CC      drivers/video/msm/vidc/common/vcd/vcd_api.o
drivers/video/msm/vidc/common/vcd/vcd_api.c:14:23: error: vidc_type.h: No such file or directory
In file included from drivers/video/msm/vidc/common/vcd/vcd_api.c:15:
drivers/video/msm/vidc/common/vcd/vcd.h:16:21: error: vcd_api.h: No such file or directory
In file included from drivers/video/msm/vidc/720p/ddl/vcd_ddl_api.h:15,
                 from drivers/video/msm/vidc/common/vcd/vcd.h:17,
                 from drivers/video/msm/vidc/common/vcd/vcd_api.c:15:
drivers/video/msm/vidc/720p/ddl/vcd_ddl_internal_property.h:45: error: expected specifier-qualifier-list before 'u32'
drivers/video/msm/vidc/720p/ddl/vcd_ddl_internal_property.h:50: error: expected specifier-qualifier-list before 'u32'
drivers/video/msm/vidc/720p/ddl/vcd_ddl_internal_property.h:54: error: expected specifier-qualifier-list before 'u32'
drivers/video/msm/vidc/720p/ddl/vcd_ddl_internal_property.h:64: error: expected specifier-qualifier-list before 'u32'
drivers/video/msm/vidc/720p/ddl/vcd_ddl_internal_property.h:68: error: expected specifier-qualifier-list before 'u32'
In file included from drivers/video/msm/vidc/common/vcd/vcd.h:17,
                 from drivers/video/msm/vidc/common/vcd/vcd_api.c:15:
drivers/video/msm/vidc/720p/ddl/vcd_ddl_api.h:19: error: expected specifier-qualifier-list before 'u8'
drivers/video/msm/vidc/720p/ddl/vcd_ddl_api.h:26: error: field 'vcd_frm' has incomplete type
drivers/video/msm/vidc/720p/ddl/vcd_ddl_api.h:27: error: expected specifier-qualifier-list before 'u32'
drivers/video/msm/vidc/720p/ddl/vcd_ddl_api.h:31: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ddl_device_init'
drivers/video/msm/vidc/720p/ddl/vcd_ddl_api.h:33: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ddl_device_release'
drivers/video/msm/vidc/720p/ddl/vcd_ddl_api.h:34: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ddl_open'
drivers/video/msm/vidc/720p/ddl/vcd_ddl_api.h:35: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ddl_close'
drivers/video/msm/vidc/720p/ddl/vcd_ddl_api.h:36: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ddl_encode_start'
drivers/video/msm/vidc/720p/ddl/vcd_ddl_api.h:37: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ddl_encode_frame'
drivers/video/msm/vidc/720p/ddl/vcd_ddl_api.h:40: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ddl_encode_end'
drivers/video/msm/vidc/720p/ddl/vcd_ddl_api.h:41: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ddl_decode_start'
drivers/video/msm/vidc/720p/ddl/vcd_ddl_api.h:43: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ddl_decode_frame'
drivers/video/msm/vidc/720p/ddl/vcd_ddl_api.h:45: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ddl_decode_end'
drivers/video/msm/vidc/720p/ddl/vcd_ddl_api.h:46: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ddl_set_property'
drivers/video/msm/vidc/720p/ddl/vcd_ddl_api.h:48: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ddl_get_property'
drivers/video/msm/vidc/720p/ddl/vcd_ddl_api.h:51: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ddl_process_core_response'
drivers/video/msm/vidc/720p/ddl/vcd_ddl_api.h:52: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ddl_reset_hw'
In file included from drivers/video/msm/vidc/common/vcd/vcd_core.h:20,
                 from drivers/video/msm/vidc/720p/resource_tracker/vcd_res_tracker_api.h:16,
                 from drivers/video/msm/vidc/common/vcd/vcd.h:18,
                 from drivers/video/msm/vidc/common/vcd/vcd_api.c:15:
drivers/video/msm/vidc/common/vcd/vcd_util.h:18:5: warning: "DEBUG" is not defined
error, forbidden warning: vcd_util.h:18
make[4]: *** [drivers/video/msm/vidc/common/vcd/vcd_api.o] Error 1
make[4]: *** Waiting for unfinished jobs....
drivers/video/msm/vidc/common/init/vidc_init.c:34:21: error: vcd_api.h: No such file or directory
drivers/video/msm/vidc/common/init/vidc_init.c:36:23: error: vidc_init.h: No such file or directory
In file included from drivers/video/msm/vidc/common/vcd/vcd_core.h:18,
                 from drivers/video/msm/vidc/720p/resource_tracker/vcd_res_tracker_api.h:16,
                 from drivers/video/msm/vidc/common/init/vidc_init.c:37:
drivers/video/msm/vidc/720p/ddl/vcd_ddl_api.h:26: error: field 'vcd_frm' has incomplete type
drivers/video/msm/vidc/720p/ddl/vcd_ddl_api.h:42: warning: 'struct vcd_sequence_hdr' declared inside parameter list
error, forbidden warning: vcd_ddl_api.h:42
make[4]: *** [drivers/video/msm/vidc/common/init/vidc_init.o] Error 1
make[3]: *** [drivers/video/msm/vidc] Error 2
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [drivers/video/msm] Error 2
make[1]: *** [drivers/video] Error 2
make: *** [drivers] Error 2

So, what's the issue? Do I have to merge the branches together or something? Shouldn't newkernel compile fine by itself?
Also, if I hand-replace the missing files and references I can get it to compile, and have no issue generating a boot.img, but the kernel doesn't have working telephony, USB, etc.

So, can anyone help me out? Sorry for the noobishness.
 

Blefish

Senior Member
Aug 19, 2011
1,035
2,942
To @faekplastik3s:
Did you do "make mrproper" or even "make distclean" before moving to newkernel branch? First move back to the old branch, do those commands, then move to the new one, do them again and then try to compile.
 

faekplastik3s

Senior Member
Oct 26, 2011
186
77
@faekplastik3s

The include files of vidc are missing. Did you try reclone it?

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!
 
Last edited:

Djuganight

Senior Member
Oct 26, 2012
1,140
218
Next time seat back a little, relax, drink 3 or 4 absints, and then start working again.
It worked like a charm with Cherloque Holmes and we always end up figuring out things
 

dzo

Senior Recognized Developer
Apr 3, 2008
2,487
5,086
Auckland
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.
 
  • Like
Reactions: faekplastik3s

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.