Part Number:AM4376
sdk版本 am437x- 07.03.00.005
当用make编译自己写的驱动时报错
make -C /d/sdk-am437x-07.03.00.005/board-support/linux-5.4.106+gitAUTOINC+023faefa70-g023faefa70 ARCH=arm CROSS_COMPILE=/d/sdk-am437x-07.03.00.005/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-none-linux-gnueabihf- M=/d/xie_module/glb_fpga modules
make[1]: Entering directory '/d/sdk-am437x-07.03.00.005/board-support/linux-5.4.106+gitAUTOINC+023faefa70-g023faefa70'
Makefile:632: include/config/auto.conf: No such file or directory
ERROR: Kernel configuration is invalid.
include/generated/autoconf.h or include/config/auto.conf are missing.
Run 'make oldconfig && make prepare' on kernel src to fix it.
Makefile:704: recipe for target 'include/config/auto.conf' failed
make[1]: *** [include/config/auto.conf] Error 1
make[1]: Leaving directory '/d/sdk-am437x-07.03.00.005/board-support/linux-5.4.106+gitAUTOINC+023faefa70-g023faefa70'
Makefile:21: recipe for target 'modules' failed
make: *** [modules] Error 2
而用sdk版本 sdk-am57xx-06.03.00.106编译却正常,请问是什么原因?
make -C /d/sdk-am57xx-06.03.00.106/board-support/linux-4.19.94+gitAUTOINC+be5389fd85-gbe5389fd85 ARCH=arm CROSS_COMPILE=/d/sdk-am57xx-06.03.00.106/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf- M=/d/xie_module/glb_fpga modules
make[1]: Entering directory '/d/sdk-am57xx-06.03.00.106/board-support/linux-4.19.94+gitAUTOINC+be5389fd85-gbe5389fd85'
make[2]: Circular /d/xie_module/glb_fpga/glbfpga.o <- /d/xie_module/glb_fpga/glbfpga.o dependency dropped.
CC [M] /d/xie_module/glb_fpga/glbfpga-dev.o
LD [M] /d/xie_module/glb_fpga/glbfpga.o
Building modules, stage 2.
MODPOST 2 modules
CC /d/xie_module/glb_fpga/glbfpga-dev.mod.o
LD [M] /d/xie_module/glb_fpga/glbfpga-dev.ko
CC /d/xie_module/glb_fpga/glbfpga.mod.o
LD [M] /d/xie_module/glb_fpga/glbfpga.ko
make[1]: Leaving directory '/d/sdk-am57xx-06.03.00.106/board-support/linux-4.19.94+gitAUTOINC+be5389fd85-gbe5389fd85'
Shine:
请问您用的是AM4376还是AM57xx芯片?我看到能编译通过的是sdk-am57xx-06.03.00.106,而不能编译通过的是am437x- 07.03.00.005?
,
qingyulan:
芯片是am4376,am437x- 07.03.00.005编译不能通过
,
Shine:
您的问题是不是自己写的驱动可以在sdk-am57xx-06.03.00.106里编译,但是不能在am437x- 07.03.00.005编译通过?
如果不加自己的驱动,am437x- 07.03.00.005能编译么?
,
qingyulan:
找到问题了。原来是需要把内核编译一遍,之后不能运行 make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- distclean,否则编译自己的驱动就会报错
,
Shine:
感谢分享解决方法!