Note:I will be reffering to the following
yourusername=the username that you are logged in to
devicecode=The codename for the device you are building a kernel for(Google it on what is the code name
What you will need
Ubuntu 12.04 or newer
A lot of patience
Open a terminal and type the following (copy-paste)
sudo apt-get install -y build-essential kernel-package libncurses5-dev bzip2
Download the kernel source code for your device (This is important. We are going to build the kernel from this)
For HTC http://htcdev.com
For Samsung http://opensource.samsung.com/
Download The NDK
Move the NDK and your device Kernel source code in your home folder
Extract both the NDK and your kernel source code
Rename the folder were you have the NDK installed to NDK. And rename the folder where you have the kernel installed to Kernel
Now we are ready to build.
Step 2:Tweaking the kernel
Navigate to the kernel folder
cd /home/yourusername/Kernel
export CROSS_COMPILE=/home/yourusername/NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-
Next we need to clean the previous work just incase:
make clean && make mrproper
Now we are ready.
Next we need to add the kernel features to the NDK so we can modife them
Firs open your kernel source code folder go to arch/arm/configs
Here you will all the configs.
We need only one. Find that. It is called:Yourdevicecode_somethingbalblabla.defconfig
Rename it to maker.defconfig
Now type this in your terminal
make maker.defconfig
make menuconfig
When you are ready close the UI and click SAVE
Step 3 Building
So we tweaked the Kernel and we are ready to build.
make -j# ARCH=arm
make -j5 ARCH=arm
Step 4: Finalizing
Now that kernel is ready you will need to find a kernel flashable zip for your device(Just google it)
Download the zip file and leave it in your home folder.
Now got to your kernel source and go to arch/arm/boot and copy zImage
Paste your Zimage to the zip file and replace it.
Now we need the WI-FI modules otherwise your WI-FI will not be working
Go to the Kernel source code folder and go to driver/net/wireless/bcm4329_204 and copy bcm4329.ko
Got the zip file go to the System folder and replace it's bcm4329.ko with your bcm4329.ko
You are ready all you need to do is flash it.



Philadelphia, PA


cesena,IT


上海
Thanks! I'm use Ubuntu 10.04 64 bit don't know if can?
Prilep
Linear Mode