Page 1 of 2

Missing headers for driver compilation

Posted: 07 Sep 2022, 22:24
by thalesmaoa
Hi, I need to compile some drivers, but the headers are missing.
I appreciate if anyone can help.

https://github.com/lwfinger/rtl8188eu
or
https://github.com/aircrack-ng/rtl8188eus

Code: Select all

$ make
make ARCH=arm CROSS_COMPILE= -C /lib/modules/4.19.95-rt38/build M=/home/pi/RealtekDriver/rtl8188eu  modules
make[1]: *** /lib/modules/4.19.95-rt38/build: No such file or directory.  Stop.
Makefile:155: recipe for target 'modules' failed
make: *** [modules] Error 2

Re: Missing headers for driver compilation

Posted: 08 Sep 2022, 10:48
by nicolaiB
Hi,

you have to install the package raspberrypi-kernel-headers

-Nicolai

Re: Missing headers for driver compilation

Posted: 08 Sep 2022, 22:57
by thalesmaoa
Thanks. It did work.

Re: Missing headers for driver compilation

Posted: 08 Sep 2022, 23:11
by thalesmaoa
I'm getting segmentation fault. Any idea how to fix?

Re: Missing headers for driver compilation

Posted: 09 Sep 2022, 09:00
by nicolaiB
No, I'm afraid not. Maybe you can try one of the other Realtek drivers most of them are forks in a more or less volatile state. If nothing helps, you probably should open an issue at the drivers repository.

-Nicolai

Re: Missing headers for driver compilation

Posted: 10 Sep 2022, 17:49
by thalesmaoa
Any tutorial for cross compilation? Can't match the headers.

Re: Missing headers for driver compilation

Posted: 11 Sep 2022, 14:33
by nicolaiB
Why do you want to cross compile the driver? Just install the kernel headers on your RevPi and build the module. Cross compilation is only needed if you have to build on a different architecture than your target.

-Nicolai

Re: Missing headers for driver compilation

Posted: 12 Sep 2022, 00:51
by thalesmaoa
I can't compile within RevPi. I alsways get Segmentation Fault.
It did work using cross compilation.

It was difficult to find the correct path, but it is working now.

Re: Missing headers for driver compilation

Posted: 12 Sep 2022, 02:56
by thalesmaoa
After compiling and testing:

Code: Select all

sudo /sbin/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant.conf -D8188eu,wext -iwlan0
It works as expected, however, using service. Nothing happens. I'm using buster version now. Any help?
How do I correctly configure wifi network?

Re: Missing headers for driver compilation

Posted: 12 Sep 2022, 10:16
by nicolaiB
Without any configuration shown, it is hard to guess. I suggest you try to configure it with raspi-config or other ways the official Raspberry Pi documentation suggests (our image uses Raspberry Pi OS as a base)

-Nicolai