././include/linux/compiler_types.h:88:10: fatal error: asm/compiler.h: No such file or directory
#include
^~~~~~~~~~~~~~~~
解决:
CC = aarch64-none-linux-gnu-gcc
aarch64-none-linux-gnu-gcc: error: unrecognized argument in option ‘-mcmodel=kernel’
aarch64-none-linux-gnu-gcc: note: valid arguments to ‘-mcmodel=’ are: large small tiny
aarch64-none-linux-gnu-gcc: error: unrecognized command-line option ‘-mno-sse’; did you mean ‘-fno-dse’?
aarch64-none-linux-gnu-gcc: error: unrecognized command-line option ‘-mno-mmx’
aarch64-none-linux-gnu-gcc: error: unrecognized command-line option ‘-mno-sse2’
aarch64-none-linux-gnu-gcc: error: unrecognized command-line option ‘-mno-3dnow’
解决:
增加:ARCH=arm64
$(MAKE) -C $(KDIR) M=`pwd` ARCH=arm64 modules
ld does not support --fix-cortex-a53-843419; kernel may be susceptible to erratum
ld: unrecognised emulation mode: aarch64linux
Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 elf_iamcu i386linux elf_l1om elf_k1om i386pep i386pe
解决: 编译链前缀写对和添加编译链路径
(1)$(MAKE) -C $(KDIR) M=`pwd` ARCH=arm64 CROSS_COMPILE=$(toolchain)/aarch64-none-linux-gnu- modules
(2)aarch64-linux- 改为 aarch64-none-linux-gnu-

- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21