Nathan I followed your steps and I succeeded on building my kernel and making the zip file. My problem now is I cant flash it, I keep getting errors. I tried to tar it and other methods but they are not working.
Hey, first thanks for this tutorial.
Here is my problem, when I try to make clean (or same make 0=out clean), i've an error, I haven't understoop something in the earlier steps but i don't know what.
Screen which should show what i've done :
Hey, so i've tried to compile this kernel (for Z2_row) : https://github.com/mracar07/android_kernel_zuk_msm8996/tree/8x-caf/
Unfortunately i've some errors when I compile, the defconfig file i've selected is : z2_row_defconfig but the file length is around 4400lines when if i am right generaly defconfig file (i've try to seen the length on some other kernels for other devices) are more around 600 lines. so Have I chosen the bad defconfig file ? (link: https://github.com/mracar07/android_kernel_zuk_msm8996/tree/8x-caf/arch/arm64/configs)
Use a different toolchain.
View attachment 4393609
i have this problem .. How to solve it ?
Sir,
I have merged gcc compiler.h and also device not booting with gcc7 commit but still device is not booting with gcc 7 olny with gcc 4.9
Plz help
Source: https://GitHub.com/AndroiableDroid/android_kernel_LYF_LS5015This doesn't really make any sense, give some more information...
Sounds like your build (boot.img) script where the problem occurs.
My device having kernel source for nougat (msm8916)
Can any one tell me about
How to make my kernel source compatible with Oreo?
Any help highly appreciated
If the questions is already asked
Then please provide me a link
Thanks
sorry I haven't tried, I'm also newbie. I will try first and may tell you if successHow can I compile a 5.x kernel using the 3.18 source? My device doesn’t have newer source.
git clone -b <branch_to_checkout> <url> <desired_folder_name>
OR
tar -xvf <filename>
git clone -b android-msm-angler-3.10-nougat-mr2 https://android.googlesource.com/kernel/msm/ angler
git clone <url>
export CROSS_COMPILE=$(pwd)/bin/<toolchain_prefix>-
export CROSS_COMPILE=$(pwd)/bin/aarch64-linux-android-
export ARCH=<arch> && export SUBARCH=<arch>
export ARCH=arm64 && export SUBARCH=arm64
make clean
make mrproper
make <defconfig_name>
make -j$(nproc --all)
mkdir -p out
make O=out clean
make O=out mrproper
make O=out <defconfig_name>
make O=out -j$(nproc --all)
unpackimg.sh <image_name>.img
repackimg.sh
wget https://github.com/nathanchance/AnyKernel2/commit/addb6ea860aab14f0ef684f6956d17418f95f29a.diff
patch -p1 < addb6ea860aab14f0ef684f6956d17418f95f29a.diff
rm addb6ea860aab14f0ef684f6956d17418f95f29a.diff
zip -r9 kernel.zip * -x README.md kernel.zip
diff --git a/Makefile b/Makefile
index 1aaa760f255f..bfccd5594630 100644
--- a/Makefile
+++ b/Makefile
@@ -326,7 +326,7 @@ include $(srctree)/scripts/Kbuild.include
AS = $(CROSS_COMPILE)as
LD = $(CROSS_COMPILE)ld
-REAL_CC = $(CROSS_COMPILE)gcc
+CC = $(CROSS_COMPILE)gcc
CPP = $(CC) -E
AR = $(CROSS_COMPILE)ar
NM = $(CROSS_COMPILE)nm
@@ -340,10 +340,6 @@ DEPMOD = /sbin/depmod
PERL = perl
CHECK = sparse
-# Use the wrapper for the compiler. This wrapper scans for new
-# warnings and causes the build to stop upon encountering them.
-CC = $(srctree)/scripts/gcc-wrapper.py $(REAL_CC)
-
CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
-Wbitwise -Wno-return-void $(CF)
CFLAGS_MODULE =
export CROSS_COMPILE_ARM32=$(pwd)/bin/<toolchain_prefix>
export CROSS_COMPILE_ARM32=$(pwd)/bin/arm-linux-androideabi-
Introduction
I am happy to answer anything that I touched on in this guide. I may point you to another thread if it's better suited but I don't mind off topic (within reason) within the thread. I also want this to be a collaborative effort; other developers, if you have something to add, correct, or improve upon, please let me know!
I am particular in how people ask for help. I do NOT respond to posts asking for a hand out ("How do I fix this?", "Please fix this!", etc.). I only respond to posts with clear logs and steps that you have tried. Basically, show me that you have read this guide and have a specific issue. I am not here to hold your hand through this, this is a developers' forum.
@nathanchance thx for great work
But how to build kernel with gcc 9.2.0
could you please add manual for that