Bonjour à tous,
En essayant de construire la version SierraLinuxQMIdrivers S2.42N2.62 contre le noyau Linux 5.4.0-39 d'Ubuntu 20.04 Focal Fossa, je suis tombé sur l'erreur suivante dans la construction :
/MC7710/GobiNet/GobiUSBNet.c: In function ‘GobiUSBNetProbe’:
/MC7710/GobiNet/GobiUSBNet.c:3263:35: error: passing argument 1 of ‘wakeup_source_register’ from incompatible pointer type [-Werror=incompatible-pointer-types]
3263 | ws = wakeup_source_register(szWakeSourceName);
| ^~~~~~~~~~~~~~~~
| |
| char *
In file included from ./include/linux/device.h:1337,
from ./include/linux/dma-mapping.h:7,
from ./include/linux/skbuff.h:31,
from ./include/linux/if_ether.h:19,
from ./include/linux/etherdevice.h:20,
from /MC7710/GobiNet/Structs.h:75,
from /MC7710/GobiNet/GobiUSBNet.c:86:
./include/linux/pm_wakeup.h:92:30: note: expected ‘struct device *’ but argument is of type ‘char *’
92 | extern struct wakeup_source *wakeup_source_register(struct device *dev,
| ^~~~~~~~~~~~~~~~~~~~~~
/MC7710/GobiNet/GobiUSBNet.c:3263:12: error: too few arguments to function ‘wakeup_source_register’
3263 | ws = wakeup_source_register(szWakeSourceName);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from ./include/linux/device.h:1337,
from ./include/linux/dma-mapping.h:7,
from ./include/linux/skbuff.h:31,
from ./include/linux/if_ether.h:19,
from ./include/linux/etherdevice.h:20,
from /MC7710/GobiNet/Structs.h:75,
from /MC7710/GobiNet/GobiUSBNet.c:86:
./include/linux/pm_wakeup.h:92:30: note: declared here
92 | extern struct wakeup_source *wakeup_source_register(struct device *dev,
| ^~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:275: /MC7710/GobiNet/GobiUSBNet.o] Error 1
make[1]: *** [Makefile:1719: /MC7710/GobiNet] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-39-generic'
make: *** [Makefile:50: all] Error 2
L'erreur provient d'une ligne qui se trouve à l' intérieur d' un fichier #ifdef CONFIG_ANDROID.
J'ai ajouté ce qui suit au début du fichier source :
#ifdef CONFIG_ANDROID
#warning CONFIG_ANDROID is defined! This may not be android
#endif
L'avertissement s'est déclenché lors de la compilation, bien qu'il ne s'agisse pas d'une version Android. Cependant creuser plus profondément dans la configuration du noyau pour les noyaux ubuntu, je trouve que cela est toujours réglé sur oui : CONFIG_ANDROID=y
Le problème est toujours la malgré la correction avec la version S2.42N2.63 de SierraLinuxQMIdrivers 4
Merci d'avance pour votre aide
😃