I bought a temperature sensor with a usb adapter and needed to install a driver for it, but I could not compile the driver provided by the manufacturer.
pi@raspberrypi:~/CH341SER_LINUX $ make
make -C /lib/modules/4.4.11-v7+/build M=/home/pi/CH341SER_LINUX
make[1]: *** /lib/modules/4.4.11-v7+/build: No such file or directory. Stop.
Makefile:5: recipe for target 'default' failed
make: *** [default] Error 2
I tried downloading a linux headers and moving the /build folder to that directory, compiling worked, but I was unable to load. (Error: could not insert module ch34x.ko invalid module format)
The driver supports up to 3.14 kernel version and I have a 4.4 kernel installed. However I contacted the company that makes those usb adapters, and they said that the driver should support version 4.4. Here are the driver files. Driver download here
I also followed the kernel building instructions on raspberrypi's official website using local building. But I don't know how to use the build function after following the instructions.
Thank you very much!