Hi guys , it is a common fact that kernel runs linux. Without kernel, linux won't be usable. One of linux family is Android. Okay, so after that preamble, i just want to share to you "How To Compile Kernel (Especially for Redmi Note 5A)"
So, Let's start !
Prerequisites : 1. Laptop/PC with Linux installed (i prefer Ubuntu based distro, for other distributions i'll update if i have tested
2. Already installed needed package (you'll see list below)
3. Internet connection (Optional if you have prepared all)
Stages :
1. Install all needed packages by typing this command in terminal (if you encounter any error just delete the package that causes error)
Code:
sudo apt-get install git –core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev ia32-libs lib32z1-dev lib32ncurses5-dev gcc-multilib g++-multilib adb
Code:
git clone <url> gcc
Code:
git clone –b <branch name> https://github.com/xxx/xxx
After all required components are ready, now let's start compiling our kernel. Run terminal in your kernel folder and type commands below :
1. First, we have to export(to tell the computer) the path of our compiler(gcc) by typing this command :
Code:
export CROSS_COMPILE=/home/<your host>/<gcc folder>/bin/<toolchain prefix>
Code:
export CROSS_COMPILE=/home/nayef/gcc/bin/aarch64-linux-android-
Code:
export ARCH=arm64 && export SUBARCH=arm64
Code:
make O=out <defconfig name>
Code:
make O=out ugglite_defconfig
Code:
make O=out -j4
nathanchance thread
Android Google Source
Last edited: