Unable to compil drivers x64

Hello,

Rapberry Pi 4, and I try to create an ansible playbook.

But I have this error:

:/opt/files/drivers $ sudo make
rm -rf *~ .tmp_versions modules.order Module.symvers
find . -type f -name *~ -o -name *.o -o -name *.ko -o -name *.cmd -o -name *.mod.c |  xargs rm -rf
make -C /lib/modules/5.4.72-v8+/build M=/opt/files/drivers modules
make[1] : on entre dans le répertoire « /usr/src/linux-headers-5.4.72-v8+ »
  CC [M]  /opt/files/drivers/./drivers/usb/serial/option.o
  CC [M]  /opt/files/drivers/./drivers/usb/serial/usb_wwan.o
  CC [M]  /opt/files/drivers/./drivers/usb/serial/qcserial.o
  Building modules, stage 2.
  MODPOST 3 modules
ERROR: "__stack_chk_guard" [/opt/files/drivers/./drivers/usb/serial/usb_wwan.ko] undefined!
make[2]: *** [scripts/Makefile.modpost:94: __modpost] Error 1
make[1]: *** [Makefile:1645: modules] Error 2
make[1] : on quitte le répertoire « /usr/src/linux-headers-5.4.72-v8+ »
make: *** [Makefile:9: modules] Error 2
/opt/files/drivers $ ls -lart
total 24
-rwxrwxr-x 1 root root  531 oct.  16  2019 Makefile
drwxrwxr-x 3 root root 4096 nov.   8 17:13 drivers
drwxr-xr-x 4 root root 4096 nov.  20 10:08 ..
-rw-r--r-- 1 root root  154 nov.  20 10:14 modules.order
-rw-r--r-- 1 root root 1320 nov.  20 10:14 Module.symvers
drwxrwxr-x 3 root root 4096 nov.  20 10:14 .
/opt/files/drivers $ ls -lart drivers/usb/serial/
total 544
-rwxrwxr-x 1 root root   2149 oct.  17 11:11 usb-wwan.h
-rwxrwxr-x 1 root root  17469 oct.  17 11:11 qcserial.c
-rwxrwxr-x 1 root root 129752 nov.   8 16:11 option.c
-rwxrwxr-x 1 root root  18118 nov.   8 16:19 usb_wwan.c
drwxrwxr-x 3 root root   4096 nov.   8 17:13 ..
-rw-r--r-- 1 root root  41211 nov.  20 10:13 .option.o.cmd
-rw-r--r-- 1 root root  50192 nov.  20 10:13 option.o
-rw-r--r-- 1 root root    177 nov.  20 10:13 .option.mod.cmd
-rw-r--r-- 1 root root     50 nov.  20 10:13 option.mod
-rw-r--r-- 1 root root  41235 nov.  20 10:14 .usb_wwan.o.cmd
-rw-r--r-- 1 root root  14637 nov.  20 10:14 .usb_wwan.o.d
-rw-r--r-- 1 root root  32656 nov.  20 10:14 usb_wwan.o
-rw-r--r-- 1 root root    183 nov.  20 10:14 .usb_wwan.mod.cmd
-rw-r--r-- 1 root root     52 nov.  20 10:14 usb_wwan.mod
-rw-r--r-- 1 root root  41235 nov.  20 10:14 .qcserial.o.cmd
-rw-r--r-- 1 root root  13088 nov.  20 10:14 qcserial.o
-rw-r--r-- 1 root root    183 nov.  20 10:14 .qcserial.mod.cmd
-rw-r--r-- 1 root root     52 nov.  20 10:14 qcserial.mod
-rw-r--r-- 1 root root   2064 nov.  20 10:14 usb_wwan.mod.c
-rw-r--r-- 1 root root   9317 nov.  20 10:14 qcserial.mod.c
-rw-r--r-- 1 root root  77634 nov.  20 10:14 option.mod.c
drwxrwxr-x 2 root root   4096 nov.  20 10:14 .

I missed something?
Thanks

Hi @fred,

Unfortunately, I don’t understand completely what you are attempting to do. Could you please elaborate a bit more on this?

Hello,

I just want to compil drivers, and I have this error:

/opt/files/drivers $ sudo make
rm -rf *~ .tmp_versions modules.order Module.symvers
find . -type f -name *~ -o -name *.o -o -name *.ko -o -name *.cmd -o -name *.mod.c |  xargs rm -rf
make -C /lib/modules/5.4.72-v8+/build M=/opt/files/drivers modules
make[1] : on entre dans le répertoire « /usr/src/linux-headers-5.4.72-v8+ »
  CC [M]  /opt/files/drivers/./drivers/usb/serial/option.o
  CC [M]  /opt/files/drivers/./drivers/usb/serial/usb_wwan.o
  CC [M]  /opt/files/drivers/./drivers/usb/serial/qcserial.o
  Building modules, stage 2.
  MODPOST 3 modules
ERROR: "__stack_chk_guard" [/opt/files/drivers/./drivers/usb/serial/usb_wwan.ko] undefined!
make[2]: *** [scripts/Makefile.modpost:94: __modpost] Error 1
make[1]: *** [Makefile:1645: modules] Error 2
make[1] : on quitte le répertoire « /usr/src/linux-headers-5.4.72-v8+ »
make: *** [Makefile:9: modules] Error 2

Where I do a mistake?

Thanks

Please follow the steps below:

  • First of all, install the kernel header.
    sudo apt install raspberrypi-kernel-headers

  • Now download the v5.4.72 driver, unzip it and cd into it.

wget https://github.com/sixfab/Sixfab_QMI_Installer/raw/master/src/v5.4.72.zip -O drivers.zip
unzip drivers.zip
cd drivers/
  • Then run make and install it.
    make && sudo make install

  • Then reboot your RPi.
    sudo reboot

After the reboot check the drivers. It should work by this point.

You can refer to the Linux USB driver user guide for more information. You can download it from the link below:
https://sixfab.com/wp-content/uploads/2020/12/Quectel_LTE5G_Linux_USB_Driver_V1.0.zip

Hello and Happy New Year!

Good news to start, It’s work finally.

/opt/drivers $ sudo  make && sudo make install
rm -rf *~ .tmp_versions modules.order Module.symvers
find . -type f -name *~ -o -name *.o -o -name *.ko -o -name *.cmd -o -name *.mod.c |  xargs rm -rf
make -C /lib/modules/4.19.118-v7l+/build M=/opt/drivers modules
make[1]: *** /lib/modules/4.19.118-v7l+/build : Aucun fichier ou dossier de ce type. Arrêt.
make: *** [Makefile:9: modules] Error 2

raspberrypi-kernel-headersare already installed, but no module build

ls -lart /lib/modules/4.19.118-v7+/
total 2128
-rw-r--r--  1 root root 285417 juin   1  2020 modules.symbols.bin
-rw-r--r--  1 root root 232106 juin   1  2020 modules.symbols
-rw-r--r--  1 root root    379 juin   1  2020 modules.softdep
-rw-r--r--  1 root root  62790 juin   1  2020 modules.order
-rw-r--r--  1 root root    324 juin   1  2020 modules.devname
-rw-r--r--  1 root root 257806 juin   1  2020 modules.dep.bin
-rw-r--r--  1 root root 186140 juin   1  2020 modules.dep
-rw-r--r--  1 root root  12782 juin   1  2020 modules.builtin.bin
-rw-r--r--  1 root root  11534 juin   1  2020 modules.builtin
-rw-r--r--  1 root root 557543 juin   1  2020 modules.alias.bin
-rw-r--r--  1 root root 535080 juin   1  2020 modules.alias
drwxr-xr-x 11 root root   4096 juil.  1  2020 kernel
drwxr-xr-x  9 root root   4096 déc.  21 08:51 ..
drwxr-xr-x  3 root root   4096 déc.  21 08:52 .

So I solve with this:

sudo apt-get update && sudo apt-get install --reinstall raspberrypi-bootloader raspberrypi-kernel
sudo reboot

And make && make installworks!

Thanks

1 Like

Glad to hear that worked for you!

Thank you.