Hello,
I have an arm64 development machine and I would like to compile an Android kernel (specifically Xiaomi Redmi 6A kernel (kernel 4.9) ). Google provides cross-compile toolchain for x86_64 host (i.e. I can compile an arm64 Android kernel on a x86_64 development machine ). However I cannot find a toolchain that would run on an arm64 host. Is there an Android kernel compile toolchain for arm64 host?
Thanks!
Posting the reply by myself in case somebody else has this issue. Basically I was trying to find a toolchain from Google (and there seem to be no arm64-hosted toolchain). I used a toolchain provided by arm: https://developer.arm.com/tools-and...developer-tools/gnu-toolchain/gnu-a/downloads
I used gcc-arm-9.2-2019.12-aarch64-arm-none-linux-gnueabihf.tar.xz
ipust said:
Posting the reply by myself in case somebody else has this issue. Basically I was trying to find a toolchain from Google (and there seem to be no arm64-hosted toolchain). I used a toolchain provided by arm: https://developer.arm.com/tools-and...developer-tools/gnu-toolchain/gnu-a/downloads
I used gcc-arm-9.2-2019.12-aarch64-arm-none-linux-gnueabihf.tar.xz
Click to expand...
Click to collapse
what medium did you use to install the build host? termux ? android in a container? could you provide some help?
Related
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 ?
I have written a linux kernel module for my Pixel2, and compile it under AOSP source: kernel/msm.git android-msm-wahoo-4.4-oreo-dr1
But when I insmod my module, dmesg reports "disagrees about version of symbol module_layout".
Google told me that the kernel source version I used to compile my kernel module is not corresponding to the kernel source version used to building the official Pixel2 kernel.
Where can I find the kernel source version/branch of AOSP used to build the official Pixel2 kernel?
https://android.googlesource.com/device/google/wahoo-kernel/
Thanks, but this link only has some binaries used for pixel device.
I want to have the kernel source location and its branch and version used to build the pixel 2 official kernel.
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
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?
Hi guys, I just managed install Raspbian on my Surface RT.
How can I get kernelconfig (.CONFIG) of the latest publicised kernel (5.17.0-rc3-next-20220207) and source for compile?