Compiling issues
Closed this issue · 4 comments
Hello,
I'm trying to compile the kernel using aarch64-linux-gnu-gcc
.
Sadly, no matter what I do the compiler throw multiple errors
which seem to indicate that something is wrong with the source code.
Steps to reproduce
export ARCH=arm64
export SUBARCH=arm64
export CROSS_COMPILE=/usr/aarch64-linux-gnu/bin/aarch64-linux-gnu-`
make
Please correct me if I'm doing something wrong.
Thanks in advance
Probably some error that happens only with the gcc version you are using. Hard to know since you have not specified the gcc version, or what error you actually get.
Have you chosen which config to use with make exynos8895-<your-device>_defconfig
, or cp arch/arm64/configs/exynos8895-<your-device>_defconfig .config
before running make?
It turned out that this kernel is too old to be compiled with my distro's version of gcc and I had to use Lineage's version. Yet, I'm still having issues with an unimplemented '-mgeneral-regs-only' and floating point code
error. From what I figured out it's supposed to
be fixed by adding a CROSS_COMPILE32
environment variable, set to the proper compiler version,
but in my case it didn't change anything(still the same error message)
My make command:
make CROSS_COMPILE32=../prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-android- \
CROSS_COMPILE=../prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android- \
ARCH=arm64 SUBARCH=arm64 KCFLAGS=-Wno-error
I added KCFLAGS=-Wno-error
to ignore some errors I was getting before. It was something about comparing two different enum
types in
case this info is relevant. Also, yes I did use make
to generate a proper config for the kernel.
Edit: fixed some text formatting issues
Edit: fixed an error in the command copy
Ok, I fixed this by removing -mgeneral-regs-only
from arch/arm64/Makefile
Thanks for your help, anyway!