make编译报错
按照手册1.1获取SDK然后进入到第三步1.3编译 u-boot和kernel,只在虚拟机上进行操作$ make
make -C /home/yz/proj/rk3588_sdk/kernel M=/home/yz/class/hello modules
make: Entering directory '/home/yz/proj/rk3588_sdk/kernel'
arch/arm64/Makefile:25: ld does not support --fix-cortex-a53-843419; kernel may be susceptible to erratum
CC /home/yz/class/hello/helloworld.o
gcc: error: unrecognized argument in option '-mstack-protector-guard=sysreg'
gcc: note: valid arguments to '-mstack-protector-guard=' are: global tls
gcc: error: unrecognized command line option '-mlittle-endian'; did you mean '-fconvert=little-endian'?
gcc: error: unrecognized command line option '-fpatchable-function-entry=2'; did you mean '--machine-function-return=keep'?
gcc: error: unrecognized command line option '-mstack-protector-guard-reg=sp_el0'; did you mean '-mstack-protector-guard=global'?
gcc: error: unrecognized command line option '-mstack-protector-guard-offset=1344'; did you mean '-mstack-protector-guard=tls'?
scripts/Makefile.build:273: recipe for target '/home/yz/class/hello/helloworld.o' failed
make: *** Error 1
Makefile:1935: recipe for target '/home/yz/class/hello' failed
make: *** Error 2
make: Leaving directory '/home/yz/proj/rk3588_sdk/kernel'
Makefile:5: recipe for target 'all' failed
make: *** Error 2
~/class/hello$ make
make -C /home/yz/proj/rk3588_sdk/kernel M=/home/yz/class/hello modules
make: Entering directory '/home/yz/proj/rk3588_sdk/kernel'
CC /home/yz/class/hello/helloworld.o
/home/yz/class/hello/helloworld.c:1:9: fatal error: linus/module.h: No such file or directory
1 | #include<linus/module.h>
| ^~~~~~~~~~~~~~~~
compilation terminated.
scripts/Makefile.build:273: recipe for target '/home/yz/class/hello/helloworld.o' failed
make: *** Error 1
Makefile:1935: recipe for target '/home/yz/class/hello' failed
make: *** Error 2
make: Leaving directory '/home/yz/proj/rk3588_sdk/kernel'
Makefile:5: recipe for target 'all' failed
make: *** Error 2
yzzz 发表于 2023-8-4 12:36
~/class/hello$ make
make -C /home/yz/proj/rk3588_sdk/kernel M=/home/yz/class/hello modules
make ...
第一步先前交叉编译命令中出现错误修改后:
export CROSS_COMPILE=/home/yz/proj/rk3588_sdk/prebuilts/gcc/linux-x86/aarch64/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-
但是修改之后实现交叉编译之后到了第二步仍未找到头文件
页:
[1]