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

tank0412

Senior Member
May 24, 2014
2,831
5,468
193
Saint Petersburg
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
 

dgadelha

Senior Member
Jan 1, 2015
1,260
2,203
0
Bahia
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. :)
 
  • Like
Reactions: n0ak

n0ak

Senior Member
Jan 10, 2013
116
46
0
Perdagangan
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 ----------

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. :)
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. (y).
 
  • Like
Reactions: dgadelha