[TUTORIAL]How to compile Lollipop kernel for Zenfone 5 (x86 chip) - Zenfone 5 General

Good afternoon, guys, I created a tutorial how to compile Lollipop kernel for Zenfone 5 (x86 chip).
i am not expert in this but anyway....
STEP 1
Download official kernel sources from here:
http://dlcdnet.asus.com/pub/ASUS/ZenFone/A500CG/zenfone3_24_40_tar_gz.zip
STEP 2
Open folder with Android sources and unpack all stuff from archive with kernel sources to folder with Android sources.
STEP 3
Open KernelMakefile. (it will be in the root of folder with Android sources)
And find this line:
Code:
TARGET_DEVICE ?= hd
Delete it.
Add this line:
Code:
TARGET_DEVICE=hd (A500CG/A501CG/A600CG - default)
STEP 4
Open Linux Terminal.
Cd to folder with Android sources.
Run this command:
Code:
source build/envsetup.sh
lunch aosp_x86-eng
make -j4 minigzip openssl
STEP 4
Build zImage:
Code:
make -f KernelMakefile TARGET_DEVICE=hd modules_install
STEP 5
Build modules:
Code:
make -f KernelMakefile TARGET_DEVICE=hd copy_modules_to_root
STEP 6
Get modules and zImage from out/target/product/asusctp_hd/ folder.
Reboot to Windows.
STEP 7
Download AndImg Tool:
https://drive.google.com/file/d/0B-Fin8UxrD6PTFpuWlYtMTE3LVk/view
STEP 8
Unpack boot.img for CM/RR using AndImg Tool.
STEP 9
Open unpacked fodler.
Go to PARTS folder. Delete BZIMAGE file. Add your built zImage and rename it to BZIMAGE.
STEP 10
Open unpacked fodler.
Open ramdisk/lib/modules folder.
Add you compiled modules.
STEP 11
Build boot.img using AndImgTool.
THATS IT.
How to enable DT2W:​Go to linux/kernel folder.
Go here: (thx @Borets24)
drivers/input/touchscreen/synaptics_dsx_core.c
Uncomment this lines:
Code:
#define ASUS_TOUCH_PROXIMITY_NODE //<ASUS_Proximity+>
#define ASUS_TOUCH_DTP_WAKEUP //<ASUS_DTP+>
XDA:DevDB Information
How to compile Lollipop kernel for Zenfone 5 (x86 chip), Tool/Utility for the Asus Zenfone 5
Contributors
tank0412
Version Information
Status: Testing
Created 2016-02-11
Last Updated 2016-02-11

Thanks for the guide!
You also forgot that on lines
Code:
make -f KernelMakefile TARGET_DEVICE=hd modules_install
and
Code:
make -f KernelMakefile TARGET_DEVICE=hd copy_modules_to_root
you can use the -j option for faster building.

if only add DT2W, is my phone freeze, tks???

@tank0412 if I wanna build a cm 13 kernel I need a cm 13 kernel to replace the bzimg?

Nice dude. Will try it for sure. I have already had my zimage.
---------- Post added at 09:40 AM ---------- Previous post was at 09:38 AM ----------
dgadelha said:
Thanks for the guide!
You also forgot that on lines
Code:
make -f KernelMakefile TARGET_DEVICE=hd modules_install
and
Code:
make -f KernelMakefile TARGET_DEVICE=hd copy_modules_to_root
you can use the -j option for faster building.
Click to expand...
Click to collapse
Sir, i use your device tree to build the mokee lollipop. I develope it now. It gives me amazing battery backup. Thanjs for your device tree. .

Related

[Guide] How to compile and install CM10 for Samsung i9000

This guide is an adaptation/update of the following guides to CM10:
http://wiki.cyanogenmod.com/wiki/Samsung_Galaxy_S:_Compile_CyanogenMod_(Linux)
http://forum.xda-developers.com/showthread.php?t=1505006
http://forum.xda-developers.com/showthread.php?t=1533711
DISCLAMER
Although the procedures in this guide were tested on 2012-08-03 and produced a working build on the i9000, I take no responsibility for any consequences derived from their use.
Thanks:
stbenz
rycus86
kasper_h
gmhafiz
Requirements:
Linux - Ubuntu 12.04 - 64bit (AFAIK, a 64 bit host is needed to compile JB)
An i9000 with cm10 already installed - Get the latest nightly here: http://get.cm/?device=galaxysmtd
About 14GB of storage for the repository plus about 15GB for building
If you're using Windows or another OS, grab Virtual Box and install Ubuntu on a VM. It makes a nice development environment.
(Give the VM enough resources - A few cores and 2-4GB of RAM)
Building in other Linux distributions?
Here are some contibutions from fellow members:
Arch Linux: Replace steps 1 to 3 with gmhafiz's instructions
________________________________________________________________________________________________________
1 - Install Ubuntu Packages
1.1 - In terminal:
Code:
sudo apt-get install git-core gnupg flex bison python rar original-awk gawk p7zip-full gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev pngcrush schedtool
sudo apt-get install libc6-dev x11proto-core-dev libx11-dev libgl1-mesa-dev mingw32 tofrodos python-markdown libxml2-utils
sudo apt-get install g++-multilib lib32z1-dev ia32-libs lib32ncurses5-dev lib32readline-gplv2-dev gcc-multilib g++-multilib xsltproc
2 - Install JAVA
NOTE: Must be JDK 1.6 - Don't use other versions.
2.1 - Download Java JDK for Linux 64-bit from Java site: (http://www.oracle.com/technetwork/java/javase/downloads/index.html)
Correct file will be something like: jdk-6u##-linux-x64.bin , where ## is the version number and will change with updates.​
2.2 - Move jdk-6u##-linux-x64.bin to your home directory
2.3 - Remove any other java packages from system:
Code:
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
2.4 - Install Java JDK:
Code:
sudo mkdir -p /opt/java/64/
sudo cp jdk-6u##-linux-x64.bin /opt/java/64
sudo su -
cd /opt/java/64
chmod +x jdk-6u##-linux-x64.bin
./jdk-6u##-linux-x64.bin
exit
2.5 - Add JDK PATH to .bashrc:
Code:
vi ~/.bashrc
Add these lines to .bashrc:​
Code:
# Java PATHs
export JAVA_HOME=/opt/java/64/jdk1.6.0_##
export PATH=$PATH:$JAVA_HOME/bin
3 - Install Android SDK
3.1 - Setup directories:
Code:
cd ~
mkdir android
cd android
mkdir sdk
3.2 - Download Android SDK from http://developer.android.com/sdk/index.html
3.3 - Extract SDK contents to ~/android/sdk
3.4 - Add Android SDK Path:
Code:
vi ~/.bashrc
Enter the Following:​
Code:
#Android PATH
export PATH=$PATH:~/android/sdk
export PATH=$PATH:~/android/sdk/platform-tools
export PATH=$PATH:~/android/sdk/tools
3.5 - Add Extra Path For Device:
Code:
sudo vi /etc/udev/rules.d/99-android.rules
Enter this:​
Code:
#Samsung
SUBSYSTEM==usb, SYSFS{idVendor}==04e8, MODE=0666
SUBSYSTEM=="usb", ATTRS{idVendor}=="####:####", SYMLINK+="android_adb", MODE="0666" GROUP="plugdev"
TEST=="/var/run/ConsoleKit/database", \
RUN+="udev-acl --action=$env{action} --device=$env{DEVNAME}"
Save/close file and run:​
Code:
sudo chmod +x /etc/udev/rules.d/99-android.rules
3.6 - Close and open new terminal.
3.7 - Install Android SDK Tools
Code:
android
Check Android SDK Tools and Android SDK platform-tools and Install them​
4 - Install Repository
4.1 - Download Repo:
Code:
mkdir -p ~/bin
mkdir -p ~/android/system
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
4.2 - Add Repo Path:
Code:
vi ~/.bashrc
Enter the following:​
Code:
export PATH=$PATH:~/bin
4.3 - Close and open new terminal.
4.4 - Initialize Repository & Sync:
Code:
cd ~/android/system/
repo init -u git://github.com/CyanogenMod/android.git -b jellybean
repo sync -j16
NOTE: If you have trouble syncing due to connection issues, try repo sync -j1. It's slower but some ISPs have issues with -j16
Want to make sure you didn't get any connection errors and have the complete repository? Just run the repo sync command again. It can't give you ANY errors.​Go get a beer. And another. And another...​
4.5 - Get Device Specific Repos:
Code:
. build/envsetup.sh && breakfast galaxysmtd
Get more beer...​
4.6 - Extract files from phone:
NOTE: You need to have cm10 installed on the phone.
Connect phone to pc and in terminal type:​
Code:
adb root
cd ~/android/system/device/samsung/galaxysmtd/
./extract-files.sh
4.7 - Download Extra Files:
Code:
~/android/system/vendor/cm/get-prebuilts
4.8 - Add Toolchain PATH:
Code:
vi ~/.bashrc
Enter the following:​
Code:
#Android Toolchain PATH
export ARCH=arm
export CCOMPILE=$CROSS_COMPILE
export CROSS_COMPILE=arm-eabi-
export PATH=$PATH:/home/YOUR-USERNAME/android/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin
4.9 - Close and open new terminal.
5 - Building Android
Code:
cd ~/android/system
. build/envsetup.sh && brunch galaxysmtd
Go get a beer. And another. And another...​
6 - Install on Phone
6.1 - Copy your .zip file from ~/android/system/out/target/product/galaxysmtd/cm-10-XXXXXXXXX-UNOFFICIAL-galaxysmtd.zip to the root of the SD card.
6.2 - Optional: Download Google Apps for Jelly Bean from http://goo.im/gapps and place it on the root of the SD card.
6.3 - Flash both of these .zip files from recovery.
Call your mother. She misses you.​
...and that's it.
________________________________________________________________________________________________________
How to update?
Code:
cd ~/android/system
repo sync -j16
make installclean
find ./out/ -name 'build.prop' | xargs rm
find ./out/ -name 'cm_galaxysmtd-target_files-eng.*.zip' | xargs rm
NOTE: If you have trouble syncing due to connection issues, try repo sync -j1. It's slower but some ISPs have issues with -j16​
...get beer, build and install.
Want to go "Steve Jobs" on the Android build? (Warning: Will take a gazillion years to re-build everything again)
Run:
Code:
make clobber
________________________________________________________________________________________________________
Want to customize the kernel?
Look here: [Guide] How to customize the CM10 i9000 kernel
.
will try this soon... thankx
Can you also write a small paragraph where you explain how compile a single application like Mms, Phone...
Thank you
a0a0 said:
Can you also write a small paragraph where you explain how compile a single application like Mms, Phone...
Thank you
Click to expand...
Click to collapse
You get all the application apks in the produced build.
From there you can extract any single one you want...
Sent from my GT-I9000 using Tapatalk 2
Yes but if i will try a small change in a code i must compile every time all the rom
a0a0 said:
Yes but if i will try a small change in a code i must compile every time all the rom
Click to expand...
Click to collapse
Not really.
Only changed files are compiled (and affected dependencies)
Sent from my GT-I9000 using Tapatalk 2
With mmm you can build single apk files, see the cm9 compile thread for details...
Verstuurd van mijn GT-I9000
Thanks man
Verstuurd van mijn GT-I9000
Requirements:
Linux - Ubuntu 12.04...
Click to expand...
Click to collapse
Does it have to be Ubuntu, provided I can find all listed packages for CentOS, for example?
Also, do you recommend the desktop or the server version?
elitevet said:
Does it have to be Ubuntu, provided I can find all listed packages for CentOS, for example?
Also, do you recommend the desktop or the server version?
Click to expand...
Click to collapse
Doesn't have to be Ubuntu, as long as you can find the equivalent packages.
It can be the desktop or server version, as long as you have X in it.
The android SDK setup uses a GUI. (but perhaps there's a way to run it from the CLI)
Sent from my GT-I9000 using Tapatalk 2
Thanks!
Already built it from the info from the CM9 thread, but this is always welcome
and very useful! Great +++++
Is step 4.5 (Setup Manifest) really required? Can't test it at the moment, but I know, it isn't required for building CM9 anymore, despite it is mentioned in the guide for building CM9. As I understand it, its a relict from when the Galaxy S specific sources weren't yet merged to the CyanogenMod repository.
stbenz said:
Is step 4.5 (Setup Manifest) really required? Can't test it at the moment, but I know, it isn't required for building CM9 anymore, despite it is mentioned in the guide for building CM9. As I understand it, its a relict from when the Galaxy S specific sources weren't yet merged to the CyanogenMod repository.
Click to expand...
Click to collapse
It's not needed.
Gesendet von meinem GT-I9000 mit Tapatalk 2
stbenz said:
Is step 4.5 (Setup Manifest) really required? Can't test it at the moment, but I know, it isn't required for building CM9 anymore, despite it is mentioned in the guide for building CM9. As I understand it, its a relict from when the Galaxy S specific sources weren't yet merged to the CyanogenMod repository.
Click to expand...
Click to collapse
The local manifest is still needed to download the device specific files & kernel source (also for CM9).
The thing not needed for CM9 after some time was using the teamhacksung buildscript.
---------- Post added at 05:27 PM ---------- Previous post was at 05:27 PM ----------
DerTeufel1980 said:
It's not needed.
Gesendet von meinem GT-I9000 mit Tapatalk 2
Click to expand...
Click to collapse
Sure? I don't see the device-files in the default.xml manifest file...
DerTeufel1980 said:
It's not needed.
Gesendet von meinem GT-I9000 mit Tapatalk 2
Click to expand...
Click to collapse
It shouldn't be, if it is like that, but I didn't get those sources until I added the manifest.
Perhaps a quirk, but that's how it worked.
The thing is, I had to put in the guide, as it was the way it worked, starting from a fresh, completely clean system.
Sent from my GT-I9000 using Tapatalk 2
Thanks again!
I was looking for something like this for quite a while now. Now I can finally compile my own builds
I compiled a build using this exact method 2 days ago, flashed the build to the phone and it went into constant pre-recovery bootloops. I had to flash GB with Odin to get back.
One thing was that I compile on a seperate box at home and transferred the file using scp. Maybe that corrupted, so I'm gonna try again tomorrow.
Could it be possible that the codebase itself was broken when I compiled? :-/
Did anybody have anythign similar? :S
K****iz_Indian said:
Could it be possible that the codebase itself was broken when I compiled? :-/
Did anybody have anythign similar? :S
Click to expand...
Click to collapse
Don't think so. The repo is not left with a broken code base.
The thing is, sometimes users get into the boot loop state even when installing the (un)official cm10 builds, so other factors cause them.
Sent from my GT-I9000 using Tapatalk 2
Could anyone refer me to a good guide about commit picking, please?
elitevet said:
Could anyone refer me to a good guide about commit picking, please?
Click to expand...
Click to collapse
http://forum.xda-developers.com/showpost.php?p=23715982&postcount=64

[Q] Help compiling kernel 2.6.38.8-tiamat-ics+ for HTC Desire

Hello,
I am trying to apply some patches to the currently running kernel:
Code:
[email protected]:/ # uname -a
Linux localhost 2.6.38.8-tiamat-ics+ #1 PREEMPT Fri May 25 21:49:58 CDT 2012 armv7l GNU/Linux
Is this the correct process?
1) Download the kernel source (I'm downloading this branch now, do you think this is correct : http : // git.tiamat-dev.com/htc-kernel-msm8x50/log/?h=android-msm-2.6.38-ics-tiamat ? )
Code:
cd ~/kernel/
git clone git://git.tiamat-dev.com/htc-kernel-msm8x50 -b android-msm-2.6.38-ics-tiamat
2) Grab the current config from the android device /proc/config.gz over to my laptop
Code:
adb pull /proc/config.gz /tmp/config.gz && gzip -d /tmp/config.gz && cp /tmp/config ~/kernel/htc-kernel-msm8x50/.config
3) Follow android kernel compiling instructions (from showthread.php?t=1774035 )
Code:
cd ~/kernel/
git clone https://android.googlesource.com/platform/prebuilt -b ics-plus-aosp
export PATH=~/kernel/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin:$PATH
export ARCH=arm
export SUBARCH=arm
### export CROSS_COMPILE=arm-eabi- (WRONG! this gave me a "sorry, unimplemented: -mfloat-abi=hard and VFP" error, use the below line instead)
export CROSS_COMPILE=arm-linux-androideabi-
make ARCH=arm oldconfig
make
edit: currently compiling here.. see how it goes
4) Copy the compiled kernel into a zip archive (in similar format to current installable kernel zip file) and install custom kernel via recovery
Am I missing anything here?
Thanks!
Dave (android kernel compiling newb)

How to built Kitkat rom for htc desire 616 ??

the update file released by htc for htc desire 616 contains a read me file showing how to use the update but i cannot understand it if someone can explain i would be so greatful
defconfig file: a3ul_defconfig (arm-eabi-4.7)
Download:
=========
If you are not already using an AOSP toolchain (included in an AOSP build tree), download the corresponding official android toolchain for the arm-eabi specified above for this device:
git clone https://android.googlesource.com/platform/prebuilt for 4.4.3
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6 for 4.6
git clone https://android.googlesource.com/platform/prebuilts/gcc/darwin-x86/arm/arm-eabi-4.7 for 4.7
(use darwin-x86 in place of linux-x86 for mac)
Build the kernel:
=================
set the following environment variables:
export TOP= [where you installed the toolchain or top of android AOSP code base]
export PATH=$TOP/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin:$PATH (use corresponding arm-eabi bin path)
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=arm-eabi-
make [the defconfig file for this device above]
make clean (for subsequent builds)
make -j4 (in this example 4 is the number of processors of your build machine)
Output Binary Files:
====================
After the build process is finished, there should be a file named "zImage" found in arch/arm/boot/
If you are building a rom with this kernel ZImage, copy it into your build's output folder and rename it to "kernel".
You will also need the following kernel modules. These will eventually be installed into /system/lib/modules on the device.
kernel modules:
./driver/*.ko
If you have already built and installed a boot.img with root access you can also install the modules directly into the device using "adb remount" and "apb push [file] system/lib/modules/" for each file listed above. After installing files set permissions with "adb shell chmod 0644 system/lib/modules/*" and "adb reboot"
For additional information:
===========================
http://htcdev.com
honeyman_1989 said:
the update file released by htc for htc desire 616 contains a read me file showing how to use the update but i cannot understand it if someone can explain i would be so greatful
defconfig file: a3ul_defconfig (arm-eabi-4.7)
Download:
=========
If you are not already using an AOSP toolchain (included in an AOSP build tree), download the corresponding official android toolchain for the arm-eabi specified above for this device:
git clone https://android.googlesource.com/platform/prebuilt for 4.4.3
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6 for 4.6
git clone https://android.googlesource.com/platform/prebuilts/gcc/darwin-x86/arm/arm-eabi-4.7 for 4.7
(use darwin-x86 in place of linux-x86 for mac)
Build the kernel:
=================
set the following environment variables:
export TOP= [where you installed the toolchain or top of android AOSP code base]
export PATH=$TOP/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin:$PATH (use corresponding arm-eabi bin path)
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=arm-eabi-
make [the defconfig file for this device above]
make clean (for subsequent builds)
make -j4 (in this example 4 is the number of processors of your build machine)
Output Binary Files:
====================
After the build process is finished, there should be a file named "zImage" found in arch/arm/boot/
If you are building a rom with this kernel ZImage, copy it into your build's output folder and rename it to "kernel".
You will also need the following kernel modules. These will eventually be installed into /system/lib/modules on the device.
kernel modules:
./driver/*.ko
If you have already built and installed a boot.img with root access you can also install the modules directly into the device using "adb remount" and "apb push [file] system/lib/modules/" for each file listed above. After installing files set permissions with "adb shell chmod 0644 system/lib/modules/*" and "adb reboot"
For additional information:
===========================
http://htcdev.com
Click to expand...
Click to collapse
This procedure will give you a kernel,not a ROM.
Sent from a Cool Phone stuck with crappy KingUser
checkout these links
for rom compiling
http://xda-university.com/as-a-developer/getting-started-building-android-from-source
https://source.android.com/source/building.html
http://forum.xda-developers.com/showthread.php?t=2223690
http://forum.xda-developers.com/showthread.php?t=2754145
http://forum.xda-developers.com/showthread.php?t=2320007
https://www.youtube.com/watch?v=fN0v5H0Eoe4
if still have any question feel free to ask.
or pm me
Give the full build rom from HTC 616 for kitkat

[TOOL] Honor 6 Kernel Toolbox for Lollipop

For creating custom lollipop bootimages.
Get it:
Code:
git clone https://github.com/honor6-dev/h60_kernel_toolbox.git
Use it:
Code:
cd h60_kernel_toolbox
- modify ramdisk
./build.sh bootimage l04

Fixing stock kernel sources for H30-U10

Github repo: https://github.com/kernel-killer/android_kernel_huawei_h30u10
All changes I made since last commit are in my private repo.
Install packages (Not sure if it's right):
Code:
sudo apt-get install build-essential
Note: Please run ./mk ckeck-env to verify your build enviroment (Newer GNU MAKE will fail but the code compiles the same with new or older version)
Build:
Code:
./mk bm_new k
Testing your new kernel:
Download both attachments (KernelSwapper and BootimgRestore).
Append headers from stock kernel to zImage (which can be found at ./out/target/product/huawei82_cwet_kk/obj/KERNEL_OBJ/arch/arm/boot/zImage)
In KernelSwapper update 'kernel' with your own generated zImage rename it to 'kernel' and replace it inside zip.
In BootimgRestore replace 'boot.img' with your current ROM's boot.img in case that something goes wrong (e.g.: Phone not booting).
Copy the two new zips into phone's memory (or SD card) and flash KernelSwapper.
===== Reserved #1 =====
Thanks for the awesome work KK. I am on CM 13 3.4.67 kernel. Can i use this or do i have to be in stock rom for testing the kernal?
Sent from my Honor 3C using Tapatalk
---------- Post added at 06:12 AM ---------- Previous post was at 06:02 AM ----------
Update : Flashed the kernel, phone booted but felt laggish while using. I am still testing, will let you know what happens
Sent from my Honor 3C using Tapatalk
karkeankit said:
Thanks for the awesome work KK. I am on CM 13 3.4.67 kernel. Can i use this or do i have to be in stock rom for testing the kernal?
Sent from my Honor 3C using Tapatalk
---------- Post added at 06:12 AM ---------- Previous post was at 06:02 AM ----------
Update : Flashed the kernel, phone booted but felt laggish while using. I am still testing, will let you know what happens
Sent from my Honor 3C using Tapatalk
Click to expand...
Click to collapse
Yes, I'm sure that the kernel has multiple bugs. The phone may feel laggish because there is enabled low-level kernel debugging over UART.
Thank you for testing...
kernel.killer said:
Yes, I'm sure that the kernel has multiple bugs. The phone may feel laggish because there is enabled low-level kernel debugging over UART.
Thank you for testing...
Click to expand...
Click to collapse
You are welcome, wishint you good luck for further development
Sent from my Honor 3C using Tapatalk
Hi, tnx for The kernel
if i Update my kernel VPN bug in CM12.1 will fix?
hamadk said:
Hi, tnx for The kernel
if i Update my kernel VPN bug in CM12.1 will fix?
Click to expand...
Click to collapse
Nope, it's ROM bug not a kernel bug plus I have released only development preview version which has enabled many debugging options and it may be quite buggy.
Thanks, but can this process led to a suitable kernel for CM13?
Does this kernel fixes the video playback problem and the recording problem?(Can't play or capture 720p videos, screen recorder works fine, just the camera.)
Sent from my Huawei Honor 3C using XDA Labs
Lumpbloom7 said:
Does this kernel fixes the video playback problem and the recording problem?(Can't play or capture 720p videos, screen recorder works fine, just the camera.)
Sent from my Huawei Honor 3C using XDA Labs
Click to expand...
Click to collapse
http://forum.xda-developers.com/showpost.php?p=67848925&postcount=8
mhxygh said:
Thanks, but can it this process led to a suitable kernel for CM13?
Click to expand...
Click to collapse
Aim of this project is to make stock kernel sources stable for KitKat ROMs (It is originally for KK) but somebody else may patch them for CM 13. I am not working on this nor I'll do.
Will you be adding extra CPU governors and IO schedulers along with kernel level wakeups for double tap waking?
I was wondering who else is developing kernel 3.10.XX for this device ?
Ms_Julia said:
I was wondering who else is developing kernel 3.10.XX for this device ?
Click to expand...
Click to collapse
Actually, nobody is working on 3.10.X kernel. And I'm rather focusing on LineageOS for now.
What is the defconf for our device in kernel source
imranpopz said:
What is the defconf for our device in kernel source
Click to expand...
Click to collapse
This should include most configs
Code:
/* Mediatek common */
./mediatek/config/common/autoconfig/kconfig/AEE
./mediatek/config/common/autoconfig/kconfig/USER
./mediatek/config/common/ProjectConfig.mk
/* MT6582 common */
./mediatek/config/mt6582/autoconfig/kconfig/platform
./mediatek/config/mt6582/ProjectConfig.mk
/* h30u10 device specific */
./mediatek/config/huawei82_cwet_kk/autoconfig/kconfig/project
./mediatek/config/huawei82_cwet_kk/ProjectConfig.mk
kernel.killer said:
This should include most configs
Code:
/* Mediatek common */
./mediatek/config/common/autoconfig/kconfig/AEE
./mediatek/config/common/autoconfig/kconfig/USER
./mediatek/config/common/ProjectConfig.mk
/* MT6582 common */
./mediatek/config/mt6582/autoconfig/kconfig/platform
./mediatek/config/mt6582/ProjectConfig.mk
/* h30u10 device specific */
./mediatek/config/huawei82_cwet_kk/autoconfig/kconfig/project
./mediatek/config/huawei82_cwet_kk/ProjectConfig.mk
Click to expand...
Click to collapse
Replace Device Name with the configuration file found at:
Source/arch/arm/configs
It's written in this way something_DeviceCodename_user_defconfig
I need for the above step.. ☝☝☝
imranpopz said:
Replace Device Name with the configuration file found at:
Source/arch/arm/configs
It's written in this way something_DeviceCodename_user_defconfig
I need for the above step.. ☝☝☝
Click to expand...
Click to collapse
Well... This is Mediatek, DO NOT expect the sources to look nice. The configs are scattered through ./mediatek subdirectories, *.mk files are parsed and configs are assembled during build. Unfortunatelly, even if you manually assemble .config you will NOT be able to build the kernel. It is full of dirty hacks (Mediatek) and just typing "make" won't work, build will break.
Build:
Code:
$ git clone https://github.com/kernel-killer/android_kernel_huawei_h30u10.git
$ cd android_kernel_huawei_h30u10
$ export ARCH=arm && export ARCH_MTK_PLATFORM=mt6582 && export TARGET_PRODUCT=huawei82_cwet_kk
$ export CROSS_COMPILE=/path-to-your-toolchain/.../bin/arm-linux-androideabi-
$ ./mk n k
Code:
$ ./mk -h
Usage: (makeMtk|mk) [options] project actions [modules]
Options:
-t, -tee : Print log information on the standard-out.
-o, -opt=bypass_argument_to_make
: Pass extra arguments to make.
-h, -help : Print this message and exit.
Projects:
one of available projects.
Actions:
listp, listproject
: List all available projects.
check-env : Check if build environment is ready.
check-dep : Check feature dependency.
n, new : Clean and perform a full build.
c, clean : Clean the immediate files(such as, objects, libraries etc.).
r, remake : Rebuild(target will be updated if any dependency updats).
mrproper : Remove all generated files + config + various backup files in Kbuild process.
bm_new : "new" + GNU make's "-k"(keep going when encounter error) feature.
bm_remake : "remake" + GNU make's "-k"(keep going when encounter error) feature.
mm : Build module through Android native command "mm"
mma : Build module through Android native command "mma"
emigen : Generate EMI setting source code.
nandgen : Generate supported NAND flash device list.
codegen : Generate trace DB(for META/Cather etc. tools used).
drvgen : Generate driver customization source.
custgen : Generate customization source.
javaoptgen : Generate the global java options.
ptgen : Generate partition setting header & scatter file.
bindergen : Generate binder related information
sign-image : Sign all the image generated.
encrypt-image : Encrypt all the image generated.
update-api : Android default build action
(be executed if system setting or anything removed from API).
check-modem : Check modem image consistency.
upadte-modem : Update modem image located in system.img.
modem-info : Show modem version
gen-relkey : Generate releasekey for application signing.
check-appres : Check unused application resource.
sdk : Build sdk package.
win_sdk : Build sdk package with a few Windows tools.
banyan_addon : Build MTK sdk addon.
banyan_addon_x86 :Build MTK sdk x86 addon.
cts : Build cts package.
bootimage : Build boot image(boot.img).
cacheimage : Build cache image(cache.img).
systemimage : Build system image(system.img).
snod : Build system image without dependency.
(that is, ONLY pack the system image, NOT checking its dependencies.)
recoveryimage : Build recovery image(recovery.img).
secroimage : Build secro image(secro.img).
factoryimage : Build factory image(factory.img).
userdataimage : Build userdata image(userdata.img).
userdataimage-nodeps
: Build userdata image without dependency.
(that is, ONLY pack the userdata image, NOT checking its dependencies.)
dump-products : Dump products related configuration(PRODUCT_PACKAGE,PRODUCT_NAME ect.)
target-files-package
: Build the target files package.
(A zip of the directories that map to the target filesystem.
This zip can be used to create an OTA package or filesystem image
as a post-build step.)
updatepackage : Build the update package.
dist : Build distribution package.
Modules:
pl, preloader : Specify to build preloader.
lk : Specify to build little kernel.
md32 : Specify to build DSP md32.
tz, trustzone : Specify to build trusted execution environment.
k, kernel : Specify to build kernel.
dr, android : Specify to build android.
NULL : Specify to build all components/modules in default.
k <module path>
: Specify to build kernel component/module with the source path.
dr <module name>
: Specify to build android component/module with module name.
Other tools:
prebuilts/misc/linux-x86/ccache/ccache -M 10G
: Set CCACHE pool size to 10GB
Example:
./mk -t e1k emigen
: Generate EMI setting source code.
./mk -o=TARGET_BUILD_VARIANT=user e1k n
: Start a user mode full build.
./mk listp : List all available projects.
./mk e1k bootimage
: Build bootimage for e1k project.
./mk e1k bm_new k
: Build kernel for e1k project.
./makeMtk e1k c,bm_remake pl k
: Clean & Build preloader and kernel for e1k project.
./makeMtk e1k n k kernel/xxx/xxx
: Build(full build) kernel component/module
under the path "kernel/xxx/xxx" for e1k project.
./makeMtk e1k r dr Gallery
: Rebuild android module named Gallery for e1k project.
./makeMtk e1k mm packages/apps/Settings
: Change Directory to packages/apps/Settings and execute "mm"
./makeMtk e1k mma packages/apps/Settings
: Change Directory to packages/apps/Settings and execute "mma"
Edit:
I fixed the sources, so menuconfig can be used.
Apply patch:
Code:
$ git am 0001-Fix-build-using-make-command.patch
Build:
Code:
$ cd kernel && export ARCH=arm && export ARCH_MTK_PLATFORM=mt6582 && export TARGET_PRODUCT=huawei82_cwet_kk
$ export CROSS_COMPILE=/path-to-your-toolchain/.../bin/arm-linux-androideabi-
$ make -C $(pwd) O=output h30u10_defconfig menuconfig
$ make -C $(pwd) O=output
Append MTK headers:
Code:
$ ../mediatek/build/tools/mkimage output/arch/arm/boot/zImage KERNEL > output/zImage
*Note: I recommend using AOSP arm-linux-androideabi-4.9 toolchain.
Getting cp: cannot stat 'out/target/product/huawei82_cwet_kk_kernel.log
Make [1]: [kernel ] error 1
Make: *** [remake] error 2

Categories

Resources