Firefly开源社区

标题: 使用aarch64工具链无法编译出.ko文件 [打印本页]

作者: Kevin_huang    时间: 2021-9-1 15:52
标题: 使用aarch64工具链无法编译出.ko文件
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

作者: Kevin_huang    时间: 2021-9-1 16:16
已解决。

先执行:

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
复制代码





欢迎光临 Firefly开源社区 (https://dev.t-firefly.com/) Powered by Discuz! X3.1