I am trying to compile https://github.com/varigit/linux-imx.git
for ARCH=arm64
with CROSS_COMPILE=arm-none-eabi-
, but I get the error
linux-imx$ make
warning: ld does not support --fix-cortex-a53-843419; kernel may be susceptible to erratum
warning: LSE atomics not supported by binutils
In file included from ././include/linux/compiler_types.h:65,
from <command-line>:
./include/linux/smp.h:34:26: error: requested alignment '20' is not a positive power of 2
34 | __aligned(sizeof(struct __call_single_data));
| ^~~~~~~~~~~~~~~~~~
./include/linux/compiler_attributes.h:33:68: note: in definition of macro '__aligned'
33 | #define __aligned(x) __attribute__((__aligned__(x)))
| ^
In file included from ./arch/arm64/include/asm/thread_info.h:17,
from ./include/linux/thread_info.h:60,
from ./arch/arm64/include/asm/preempt.h:5,
from ./include/linux/preempt.h:78,
from ./include/linux/smp.h:110,
from ./include/linux/lockdep.h:14,
from ./include/linux/mutex.h:17,
from ./include/linux/kernfs.h:12,
from ./include/linux/sysfs.h:16,
from ./include/linux/kobject.h:20,
from ./include/linux/of.h:17,
from ./include/linux/irqdomain.h:35,
from ./include/linux/acpi.h:13,
from ./include/acpi/apei.h:9,
from ./include/acpi/ghes.h:5,
from ./include/linux/arm_sdei.h:8,
from arch/arm64/kernel/asm-offsets.c:10:
./arch/arm64/include/asm/memory.h: In function 'kaslr_offset':
./arch/arm64/include/asm/memory.h:62:33: warning: left shift count >= width of type [-Wshift-count-overflow]
62 | #define _PAGE_END(va) (-(UL(1) << ((va) - 1)))
| ^~
followed by pages and pages of follow-up errors.
searching online didn't bring up anything. The first two lines are clearly warnings.
the toolchain was wrong,
arm-none-eabi-
is neither for building linux nor for 64bit.apt-get install gcc-10-aarch64-linux-gnu
,CROSS_COMPILE=aarch64-linux-gnu-
andsudo ln -s /usr/bin/aarch64-linux-gnu-gcc-10 /usr/bin/aarch64-linux-gnu-gcc
was enough.