Firefly开源社区

打印 上一主题 下一主题

[Android] 使用aarch64工具链无法编译出.ko文件

17

积分

0

威望

0

贡献

技术小白

积分
17

使用aarch64工具链无法编译出.ko文件

发表于 2021-9-1 15:52:35      浏览:2708 | 回复:1        打印      只看该作者   [复制链接] 楼主
make[1]: Entering directory '/share/AIO-3399Pro_source/kernel'
Makefile:736: Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler
Makefile:660: arch/aarch64/Makefile: No such file or directory
make[1]: *** No rule to make target 'arch/aarch64/Makefile'.  Stop.
make[1]: Leaving directory '/share/AIO-3399Pro_source/kernel'
make: *** [Makefile:9: all] Error 2
回复

使用道具 举报

17

积分

0

威望

0

贡献

技术小白

积分
17
发表于 2021-9-1 16:16:29        只看该作者  沙发
已解决。

先执行:

export PATH=$PATH:/share/AIO-3399Pro_source/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin
export ARCH=arm64
export CROSS_COMPILE=aarch64-linux-android-
export REAL_CROSS_COMPILE=aarch64-linux-android-


编写makefile:

  1. obj-m += word_count.o

  2. all:
  3.         make -C /share/AIO-3399Pro_source/kernel/ M=$(PWD) modules

  4. clean:
  5.         make -C /share/AIO-3399Pro_source/kernel/ M=$(PWD) clean
复制代码
回复

使用道具 举报

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

本版积分规则

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