How to compile kernel for Note 3 N9005 Kit Kat – Step by Step Guide


Compile kernel from sources for Note 3 N9005 Kit Kat
Step by step guide!!

This guide is made with Ubuntu 12.04 LTS 64 bit

Copy and paste the orange colored text to Ubuntu 64 bit terminal and execute.

Open terminal and download the necessary tools:
$ sudo apt-get install git-core gnupg openjdk-6-jdk openjdk-6-jre flex bison gperf libesd0-dev libwxgtk2.8-dev libxml2 libxml2-utils libwxgtk2.6-dev build-essential zip curl zlib1g-dev ia32-libs squashfs-tools pngcrush schedtool xsltproc lzop

Download kernel sources
Create a directory where you will install the kernel sources, example:
$ mkdir -p ~/kernel/note3
$ cd ~/kernel/note3/

Get sources:
$ sudo git clone

Install Toolchain:

Create a directory where you will install the to Toolchain, example:
$ mkdir -p ~/kernel/Toolchain
Move to this new Toolchain directory:
$ cd ~/kernel/Toolchain/

Download Toolchain 4.7
$ sudo git clone

Change directory to the one you downloaded the kernel sources (step 3)
$ cd ~/kernel/note3/N9005_Stock_Kernel_KK_4.4.2
Edit Makefile to add your Toolchain directory, execute:
$ sudo gedit Makefile
this command will open the Makefile file and we have to edit the following line:
CROSS_COMPILE ?=/home/opensource.m/toolchains/arm-eabi-4.7/bin/arm-eabi-
and put your Toolchain directory, example:
CROSS_COMPILE ?=/home/user/kernel/Toolchain/arm-eabi-4.7/bin/arm-eabi-
(The green colored text, is the text you have to change with your Toolchain directory)

Prepare to build:
$ export ARCH=arm
$ sudo make VARIANT_DEFCONFIG=msm8974_sec_hlte_eur_defconfig msm8974_sec_defconfig SELINUX_DEFCONFIG=selinux_defconfig

All is ready to compile the kernel.
Give root rights:
$ sudo su
Start the build:
$ make

If build is successful kernel will be at directory > Kernel/arch/arm/boot/zImage

If you want to clean the build, execute:
$ Make clean

8,889 total views, 4 views today

Bookmark the permalink.
  • Garbis Tapacian

    as much as i would love to do this, it all looks pretty chinese to me