Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Samsung Android Kernel Development Toolchain

So, for building the open source version of Android, you need a toolchain to be able to build the kernel. How on earth do you know which version of the toolchain to download? I know it's dependent on the kernel version. But how do you work this out? On the Android website, in the Building Kernels section, it lists codenames for devices and the kernel to go with them; but what codename does a Galaxy Tab have, how do I find this out, and from there, how do I know which toolchain to use?

like image 571
Rhythm17 Avatar asked Mar 26 '26 13:03

Rhythm17


1 Answers

You can download and use the prebuilt GCC

Ensure the prebuilt toolchain is in your path:

$ export PATH=$(pwd)/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin:$PATH

or

$ export PATH=$(pwd)/prebuilts/gcc/darwin-x86/arm/arm-eabi-4.6/bin:$PATH

On a Linux host, if you don't have an Android source tree, you can download the prebuilt toolchain from:
$ git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6

Then open your kernel source code folder go to arch/arm/configs, you will find as per your device yourdevice_somethingbalblabla.defconfig.

Find your CPU from list given here for your phone model.
If you downloaded your kernel from here or similar version $ git clone https://android.googlesource.com/kernel/samsung.git, go to arch/arm/configs as per your CPU you will find one config file, something like tegra_defconfig if your galaxy tab is v. 8.9 or 10.1

After you got the defconfig file for your device, come back to source root, and give commands

$ export ARCH=arm64
$ export CROSS_COMPILE=aach64-linux-android-
$ make your_suitable_defconfig_filename
$ make

With this you'll get compiled kernel

like image 134
Samrat Das Avatar answered Mar 28 '26 02:03

Samrat Das



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!