我为 bbb 构建图像参考本指南 https://forum.digikey.com/t/debian-getting-started-with-the-beaglebone-black/12967
设置映像完成后,我尝试制作内核模块 hello_module.c 和 Makefile,但运行 make 时出现错误:
make[1]: Entering directory '/home/thanh/work/bbb/bb-kernel/KERNEL'
CC [M] /home/thanh/work/bbb/kernelspace/hello_module.o
cc1: error: cannot load plugin ./scripts/gcc-plugins/arm_ssp_per_task_plugin.so
./scripts/gcc-plugins/arm_ssp_per_task_plugin.so: undefined symbol: _Z9rtx_alloc8rtx_code
Makefile的内容:
obj-m += hello_module.o
CROSS=/home/thanh/work/bbb/gcc-linaro-6.5.0-2018.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
KERNEL=/home/thanh/work/bbb/bb-kernel/KERNEL/
all:
make ARCH=arm CROSS_COMPILE=${CROSS} -C ${KERNEL} M=$(PWD) modules
clean:
make -C ${KERNEL} M=$(PWD) clean
如何解决这个错误?请帮助我,谢谢
解决这个错误。
用于构建 gcc 插件的本机主机编译器与用于编译内核/驱动程序的交叉编译器之间存在不兼容性。
尝试在 BBB defconfig 中禁用此行的插件使用
# CONFIG_GCC_PLUGINS is not set