core .depend .*.cmd *.ko *.mod.c .tmp_versions Module.* modules.order
make -C /lib/modules/4.4.194-14-rockchip-ge49def7efed1/build M=/home/rock/SIM7600_NDIS modules
make[1]: Entering directory '/usr/src/linux-headers-4.4.194-14-rockchip-ge49def7efed1'
CC [M] /home/rock/SIM7600_NDIS/simcom_wwan.o
/home/rock/SIM7600_NDIS/simcom_wwan.c: In function 'simcom_wwan_suspend':
/home/rock/SIM7600_NDIS/simcom_wwan.c:118:17: warning: unused variable 'dev' [-Wunused-variable]
error, forbidden warning:simcom_wwan.c:118
struct usbnet *dev = usb_get_intfdata(intf);
^~~
/home/rock/SIM7600_NDIS/simcom_wwan.c: In function 'simcom_wwan_resume':
/home/rock/SIM7600_NDIS/simcom_wwan.c:136:1: warning: label 'err' defined but not used [-Wunused-label]
error, forbidden warning:simcom_wwan.c:136
err:
^~~
/home/rock/SIM7600_NDIS/simcom_wwan.c:131:17: warning: unused variable 'dev' [-Wunused-variable]
error, forbidden warning:simcom_wwan.c:131
struct usbnet *dev = usb_get_intfdata(intf);
^~~
scripts/Makefile.build:283: recipe for target '/home/rock/SIM7600_NDIS/simcom_wwan.o' failed
make[2]: *** [/home/rock/SIM7600_NDIS/simcom_wwan.o] Error 1
Makefile:1479: recipe for target '_module_/home/rock/SIM7600_NDIS' failed
make[1]: *** [_module_/home/rock/SIM7600_NDIS] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.4.194-14-rockchip-ge49def7efed1'
Makefile:8: recipe for target 'all' failed
make: *** [all] Error 2
в чем проблема? 🤔
добавить флаг -Wno-error=unused-label или -Wno-unused-label
куда именно? в файл make?
да. даю разрешение
obj-m := simcom_wwan.o SIMCOM_WWAN-objs := simcom_wwan.o KDIR := /lib/modules/$(shell uname -r)/build PWD := $(shell pwd) OUTPUTDIR=/lib/modules/`uname -r`/kernel/drivers/net/usb/ CONFIG_RETPOLINE=n all: clean $(MAKE) -C $(KDIR) M=$(PWD) modules install: all mkdir -p $(OUTPUTDIR) cp -f simcom_wwan.ko $(OUTPUTDIR) depmod -Wno-error=unused-label clean: rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions Module.* modules.order
Обсуждают сегодня