Kernel headers for kernel 4.14.0-xilinx-v2018.3 cannot be found

Hi,

I’m following the following guide to install the USB Wifi Dongle driver with fixes. However, it fired the following problem. I use PYNQ-Z1 with v2.4 image. Is there anyone know how to resolve the issue ?

root@pynq:/home/xilinx# dkms add ./rtl8192cu-fixes

Creating symlink /var/lib/dkms/8192cu/1.11/source →
/usr/src/8192cu-1.11

DKMS: add completed.
root@pynq:/home/xilinx# dkms install 8192cu/1.11
Error! echo
Your kernel headers for kernel 4.14.0-xilinx-v2018.3 cannot be found at
/lib/modules/4.14.0-xilinx-v2018.3/build or /lib/modules/4.14.0-xilinx-v2018.3/source.
root@pynq:/home/xilinx# ls /lib/modules/4.14.0-xilinx-v2018.3/

Thank you

There should be a tarball ‘kernel.tar.gz’ in the path /. Uncompressing it will give you all the linux header files.

Hi @rock, how can I obtain these kernel.tar.gz?
I face the same problem on a Zybo Z7-20 running PYNQ v2.5.
There is no /lib/modules folder on my system and lsmod returns nothing.
On the PYNQ-Z2 they exist and the wifi dongle works fine.

Could you please help?
Thank you

lsmod should list all the kernel modules on your system. Make sure you actually have some kernel modules on your system first.

In the SD build flow, the kernel modules are copied onto your rootfs: PYNQ/Makefile at master · Xilinx/PYNQ · GitHub

So you must have some petalinux kernel modules built in petalinux flow, then copied over to your ubuntu rootfs.

Hi @rock. I had a similar problem when I was generating petalinux to support usb host. So I had to rebuild the image again. Is there a way to add the module after generating the pynq image?

Thank you

You will have to build the kernel module in petalinux-build flow. Then copy the module over to your image. An example can be seen here: PYNQ/sdbuild/packages/xrt at master · Xilinx/PYNQ · GitHub

The pre.sh builds the kernel module using petalinux-build. After the SD build has completed, the modules are copied to your rootfs.

1 Like

Hi @rock. Do you have the flow to install ra 5370 kernel module?
Thank you

I don’t. But you can google it around. It might be just a few kernel configurations that you have to enable (e.g. like this), then rebuild the SD card image.

1 Like

Thank you @rock. I was able to get the wifi running on the Zybo.
With your suggestion I was able to generate a correct petalinux.

Hi @rock, wifi is now running and I can do ssh to the pynq either using ip from eth0 or wlan0, but always with the ethernet cable connected to the computer. Internet is okay.
Is there any way to access the board without using the ethernet cable?

Thank you.

This is the output of my ifconfig:

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
** inet6 fe80::8cb5:97ff:fe5f:8206 prefixlen 64 scopeid 0x20**
** ether 8e:b5:97:5f:82:06 txqueuelen 1000 (Ethernet)**
** RX packets 91 bytes 7427 (7.4 KB)**
** RX errors 0 dropped 0 overruns 0 frame 0**
** TX packets 56 bytes 11058 (11.0 KB)**
** TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0**
** device interrupt 27 base 0xb000 **

eth0:1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
** inet 192.168.0.99 netmask 255.255.255.0 broadcast 192.168.0.255**
** ether 8e:b5:97:5f:82:06 txqueuelen 1000 (Ethernet)**
** device interrupt 27 base 0xb000 **

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
** inet 127.0.0.1 netmask 255.0.0.0**
** inet6 ::1 prefixlen 128 scopeid 0x10**
** loop txqueuelen 1000 (Local Loopback)**
** RX packets 257 bytes 25012 (25.0 KB)**
** RX errors 0 dropped 0 overruns 0 frame 0**
** TX packets 257 bytes 25012 (25.0 KB)**
** TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0**

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
** inet 192.168.0.130 netmask 255.255.255.0 broadcast 192.168.0.255**
** inet6 fe80::1ebf:ceff:fe9f:76ba prefixlen 64 scopeid 0x20**
** ether 1c:bf:ce:9f:76:ba txqueuelen 1000 (Ethernet)**
** RX packets 3955 bytes 218587 (218.5 KB)**
** RX errors 0 dropped 0 overruns 0 frame 0**
** TX packets 143 bytes 15706 (15.7 KB)**
** TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0**

Just for the record. I can auto connect to the pynq using wifi just by editing /etc/network/interfaces:

auto lo
iface lo inet loopback
iface eth0 inet dhcp

auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
** address 192.168.0.130**
** netmask 255.255.255.0**
** network 192.168.0.1**
** broadcast 192.168.1.255**
** gateway 192.168.0.1**
** wpa-ssid “MY-SSID”**
** wpa-psk “MY-PASSWORD”**