Article 5SWYA Please help installing Drivers

Please help installing Drivers

by
s628940
from LinuxQuestions.org on (#5SWYA)
Hi, Id really appreciate a bit of hand-holding here! I am struggling to understand the process of installing custom drivers in to the system.

I am trying to get a Quectel modem working, and have been provided various drivers from the manufacturer.

The files provided are a folder with a Makefile and folder structure /drivers/usb/serial/option.c, qserial.c, usb-wwan.h, usb_wwan.c

The Makefile is as follows:

KERNELDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)

obj-m+=./drivers/usb/serial/option.o
obj-m+=./drivers/usb/serial/usb_wwan.o
obj-m+=./drivers/usb/serial/qcserial.o

modules: clean
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules

install: modules
cp $(PWD)/drivers/usb/serial/*.ko /lib/modules/$(shell uname -r)/kernel/drivers/usb/serial/
depmod

clean:
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


I am getting a lot of errors if I try make / make install command.

ake[1]: *** /lib/modules/5.15.6-200.fc35.x86_64/build: No such file or directory. Stop.

I think I half-understand what is happening, I have been trying to fix this with sim-link and have downloaded kernel-devel so I now have something in /usr/src/kernels/

But to be honest if anyone has the time I would really appreciated a step by step instructions to help me understand. I am still learning and something as 'simple' as installing drivers has got me a bit stuck.

I believe I am on the right track roughly but could really do with some help.

The guide I was trying to follow is section 3.6 of the following:
https://sixfab.com/wp-content/upload...Guide_V2.0.pdf

Thank you in advance for your time.latest?d=yIl2AUoC8zA latest?i=uAoabDNw4oA:vacUnvOGyyg:F7zBnMy latest?i=uAoabDNw4oA:vacUnvOGyyg:V_sGLiP latest?d=qj6IDK7rITs latest?i=uAoabDNw4oA:vacUnvOGyyg:gIN9vFw
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments