最近igb编译驱动发现了这个问题:
zacha@Superman:~/igb/igb-5.7.2/src$ make #@+ echo "*** The target kernel has CONFIG_MODULE_SIG_ALL enabled, but" ; echo "*** the signing key cannot be found. Module signing has been" ; echo "*** disabled for this build." ; make ccflags-y="" -C "/lib/modules/4.15.0-142-generic/build" CONFIG_IGB=m CONFIG_MODULE_SIG=n CONFIG_MODULE_SIG_ALL= M="/home/zacha/igb/igb-5.7.2/src" modules make -C /home/zacha/yulong810/kernel M=/home/zacha/igb/igb-5.7.2/src CROSS_COMPILE=arm-linux-gnueabihf- ARCH=arm make[1]: Entering directory '/home/zacha/yulong810/kernel' CC [M] /home/zacha/igb/igb-5.7.2/src/igb_main.o /home/zacha/igb/igb-5.7.2/src/igb_main.c: In function ‘igb_get_os_driver_version’: /home/zacha/igb/igb-5.7.2/src/igb_main.c:10044:7: error: implicit declaration of function ‘isdigit’ [-Werror=implicit-function-declaration] if(!isdigit(*c) && *c != '.') ^~~~~~~ cc1: some warnings being treated as errors scripts/Makefile.build:303: recipe for target '/home/zacha/igb/igb-5.7.2/src/igb_main.o' failed make[2]: *** [/home/zacha/igb/igb-5.7.2/src/igb_main.o] Error 1 Makefile:1519: recipe for target '_module_/home/zacha/igb/igb-5.7.2/src' failed make[1]: *** [_module_/home/zacha/igb/igb-5.7.2/src] Error 2 make[1]: Leaving directory '/home/zacha/yulong810/kernel' Makefile:88: recipe for target 'default' failed make: *** [default] Error 2
网上也有解决方法:
https://github.com/geerlingguy/raspberry-pi-pcie-devices/issues/3可以参考一下
在igb_main.c 加上 #include
然后编译通过 ,生成igb.ko
zacha@Superman:~/igb/igb-5.7.2/src$ make #@+ echo "*** The target kernel has CONFIG_MODULE_SIG_ALL enabled, but" ; echo "*** the signing key cannot be found. Module signing has been" ; echo "*** disabled for this build." ; make ccflags-y="" -C "/lib/modules/4.15.0-142-generic/build" CONFIG_IGB=m CONFIG_MODULE_SIG=n CONFIG_MODULE_SIG_ALL= M="/home/zacha/igb/igb-5.7.2/src" modules make -C /home/zacha/yulong810/kernel M=/home/zacha/igb/igb-5.7.2/src CROSS_COMPILE=arm-linux-gnueabihf- ARCH=arm make[1]: Entering directory '/home/zacha/yulong810/kernel' CC [M] /home/zacha/igb/igb-5.7.2/src/igb_main.o CC [M] /home/zacha/igb/igb-5.7.2/src/e1000_api.o CC [M] /home/zacha/igb/igb-5.7.2/src/igb_ethtool.o CC [M] /home/zacha/igb/igb-5.7.2/src/igb_hwmon.o CC [M] /home/zacha/igb/igb-5.7.2/src/e1000_mbx.o CC [M] /home/zacha/igb/igb-5.7.2/src/e1000_mac.o CC [M] /home/zacha/igb/igb-5.7.2/src/e1000_manage.o CC [M] /home/zacha/igb/igb-5.7.2/src/e1000_nvm.o CC [M] /home/zacha/igb/igb-5.7.2/src/igb_param.o CC [M] /home/zacha/igb/igb-5.7.2/src/e1000_phy.o CC [M] /home/zacha/igb/igb-5.7.2/src/igb_procfs.o CC [M] /home/zacha/igb/igb-5.7.2/src/igb_vmdq.o CC [M] /home/zacha/igb/igb-5.7.2/src/e1000_82575.o CC [M] /home/zacha/igb/igb-5.7.2/src/e1000_i210.o CC [M] /home/zacha/igb/igb-5.7.2/src/igb_debugfs.o CC [M] /home/zacha/igb/igb-5.7.2/src/igb_ptp.o CC [M] /home/zacha/igb/igb-5.7.2/src/kcompat.o LD [M] /home/zacha/igb/igb-5.7.2/src/igb.o Building modules, stage 2. MODPOST 1 modules CC /home/zacha/igb/igb-5.7.2/src/igb.mod.o LD [M] /home/zacha/igb/igb-5.7.2/src/igb.ko make[1]: Leaving directory '/home/zacha/yulong810/kernel'
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)