How do I build a kernel tree? Where do I start? - General Questions and Answers

So I wanna compile a custom kernel for my device. For example, I want to make elementalX or maybe a hydra kernel for my device. But I need a kernel tree for my device, and due to my device being too unknown... nobody has made one. So could you link a guide of video showing step by step how to build a kernel tree?

A good reference can be found here:
[REFERENCE] How to compile an Android kernel
Introduction Hello everyone, I will be going over how to compile a kernel from beginning to end! Prerequisites: A Linux environment (preferably 64-bit) Knowledge of how to navigate the command line Common sense A learning spirit, there will be...
forum.xda-developers.com
And here:
Building Kernels | Android Open Source Project
source.android.com

Related

Need Help To Configure Android Kernel For BA

I am trying to compile android from source and here's my setup : -
-> Ubuntu latest on VirtualBox With all latest updates required from compiling along with source and kernel.
I need to know how to configure android kernel menuconfig for Htc BlueAngel.
Can any one point out some good tutorials for it where I can learn how to compile and configure Android kernel ?

How to make source device tree for new devices?

Anyone here can u tell me how to create source code of a new device as my device is INFOCUS M680, kernel source.
I have used another device as same board to create source of my device but the kernel source is different. So anyone can tell me how to create kernel source and device tree.
My kernel version is 3.18.19+
U can't "create" kernel sources... If the manufacturer provides the sources, then u can use that and make modifications to it to boot AOSP based roms

Kernel building instruction

So I own a OnePlus One runnning lineageos 14.1 (android 7.1.2) with a nethunter kernel but I want to make my own kernel https://github.com/franciscofranco/bacon but I have search a compatible building instruction for good two days and did not find them. So does anyone know how to compile this kernel
NetHunter wiki has instuctions on how to do it.

Question Kali nethunter kernel

Could we develop a kernel that support kali nethunter I don't know everything but I can help in anyone anyways I have compiles the stock kernel of SM-A127F ;-)
That would be very helpful as I have the same SM-A127F nacho
If you know how to compile the kernel then just use the guides on kalis website ...all you have to do is makemenuconfig and edit the kernel settings using the guide they provide then rebuild it

Questions on Kernel compilation

I'm new to the android build system but have been running stripped kernels for years. I'm working on a custom rom for a TCL A30 (MT6762/MT6765).
I've looked at the AOSP code base and TCL source, for a similar device, and it looks like the TCL source generates the needed kernel .config file with scripts. There are multiple scripts for different archs and cellphone carriers. My TCL A30 has a Bangkok_CC (ConsumerCellular) tag and I found arch/arm64/configs/bangkok_TF_defconfig (TracFone). There do not appear to be any patches in the TCL source. The source I found:
TCL-Mobile on sourceforge
Has the Tracfone TCL A3:
Tracfone TCL A3x product link
That source contains Bangkok_TF_defconfig.
I was able to adb pull /proc/config.gz directly from the device and it's running 4.19.126+ released last month.
First question: Can I generate a bangkok_CC_defconfig from /proc/config.gz in the AOSP code base? It is mosttly monolithic
Code:
cat .config | grep =m > kernel_modules.txt
CONFIG_IKHEADERS=m
CONFIG_TCP_CONG_WESTWOOD=m
CONFIG_TCP_CONG_HTCP=m
CONFIG_SERIAL_OF_PLATFORM=m
CONFIG_BATTERY_MT6359=m
CONFIG_SND_SOC_MT6359_ACCDET=m
CONFIG_USB_DUMMY_HCD=m
CONFIG_MMC_SDHCI=m
CONFIG_MMC_SDHCI_PLTFM=m
CONFIG_MMSTAT_TRACER=m
At the time of this post the latest upstream is 4.19.244
Second question: Are most Android projects like Debian/RHEL where they back patch kernel vulnerabilites? Would the most up-to-date kernel result from the latest AOSP source and would building it just be a matter of dropping in my /proc/config.gz and setting the build environment that I found in the TCL source?
I suspect that AOSP is contributing back to kernel.org. Third question: AOSP vs Kernel.org source? Does Google backport like RHEL/Debian? Or would I get a more recent,, secure kernel using upstream kernel.org source?.
Last question Clang vs GCC. I've just setup my Arch Linux build box w/ arm64_gcc. Speed is less important to me than stable builds. What are the arguments for one compiler over another?

Categories

Resources