Firefly开源社区

打印 上一主题 下一主题

[Linux] make编译报错

56

积分

0

威望

0

贡献

技术小白

积分
56

make编译报错

发表于 2023-8-4 12:20:06      浏览:3390 | 回复:2        打印      只看该作者   [复制链接] 楼主
按照手册1.1获取SDK然后进入到第三步1.3编译 u-boot和kernel,只在虚拟机上进行操作
$ make
make -C /home/yz/proj/rk3588_sdk/kernel M=/home/yz/class/hello modules
make[1]: 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 [M]  /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[2]: *** [/home/yz/class/hello/helloworld.o] Error 1
Makefile:1935: recipe for target '/home/yz/class/hello' failed
make[1]: *** [/home/yz/class/hello] Error 2
make[1]: Leaving directory '/home/yz/proj/rk3588_sdk/kernel'
Makefile:5: recipe for target 'all' failed
make: *** [all] Error 2


回复

使用道具 举报

56

积分

0

威望

0

贡献

技术小白

积分
56
发表于 2023-8-4 12:36:51        只看该作者  沙发
~/class/hello$ make
make -C /home/yz/proj/rk3588_sdk/kernel M=/home/yz/class/hello modules
make[1]: Entering directory '/home/yz/proj/rk3588_sdk/kernel'
  CC [M]  /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[2]: *** [/home/yz/class/hello/helloworld.o] Error 1
Makefile:1935: recipe for target '/home/yz/class/hello' failed
make[1]: *** [/home/yz/class/hello] Error 2
make[1]: Leaving directory '/home/yz/proj/rk3588_sdk/kernel'
Makefile:5: recipe for target 'all' failed
make: *** [all] Error 2
回复

使用道具 举报

56

积分

0

威望

0

贡献

技术小白

积分
56
发表于 2023-8-4 12:40:11        只看该作者  板凳
yzzz 发表于 2023-8-4 12:36
~/class/hello$ make
make -C /home/yz/proj/rk3588_sdk/kernel M=/home/yz/class/hello modules
make[1] ...

第一步先前交叉编译命令中出现错误修改后:
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-
但是修改之后实现交叉编译之后到了第二步仍未找到头文件
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表