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

**URL:** <https://discuss.pynq.io/t/kernel-headers-for-kernel-4-14-0-xilinx-v2018-3-cannot-be-found/482>\
**Category:** Support\
**Created:** [September 20, 2019, 10:21am UTC](https://discuss.pynq.io/t/kernel-headers-for-kernel-4-14-0-xilinx-v2018-3-cannot-be-found/482 "2019-09-20T10:21:40Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![NS\_Huang](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/ns_huang/32/151_2.png) [@NS\_Huang](https://discuss.pynq.io/u/NS_Huang)\
**Post date:** [September 20, 2019, 10:21am UTC](https://discuss.pynq.io/t/kernel-headers-for-kernel-4-14-0-xilinx-v2018-3-cannot-be-found/482/1 "2019-09-20T10:21:40Z")

</div>

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 ?

> **[GitHub - pvaret/rtl8192cu-fixes: Realtek 8192 chipset driver, ported to...](https://github.com/pvaret/rtl8192cu-fixes)**
>
> Realtek 8192 chipset driver, ported to kernel 3.11. - GitHub - pvaret/rtl8192cu-fixes: Realtek 8192 chipset driver, ported to kernel 3.11.

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

---

<div class="post-metadata">

**Author:** ![rock](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/rock/32/32_2.png) [@rock](https://discuss.pynq.io/u/rock)\
**Post date:** [October 2, 2019, 12:06am UTC](https://discuss.pynq.io/t/kernel-headers-for-kernel-4-14-0-xilinx-v2018-3-cannot-be-found/482/2 "2019-10-02T00:06:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![neocsc](https://avatars.discourse-cdn.com/v4/letter/n/898d66/32.png) [@neocsc](https://discuss.pynq.io/u/neocsc)\
**Post date:** [March 18, 2020, 5:56pm UTC](https://discuss.pynq.io/t/kernel-headers-for-kernel-4-14-0-xilinx-v2018-3-cannot-be-found/482/3 "2020-03-18T17:56:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rock](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/rock/32/32_2.png) [@rock](https://discuss.pynq.io/u/rock)\
**Post date:** [March 18, 2020, 6:32pm UTC](https://discuss.pynq.io/t/kernel-headers-for-kernel-4-14-0-xilinx-v2018-3-cannot-be-found/482/4 "2020-03-18T18:32:28Z")

</div>

`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](https://github.com/Xilinx/PYNQ/blob/master/sdbuild/Makefile#L217)

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

---

<div class="post-metadata">

**Author:** ![neocsc](https://avatars.discourse-cdn.com/v4/letter/n/898d66/32.png) [@neocsc](https://discuss.pynq.io/u/neocsc)\
**Post date:** [March 18, 2020, 7:42pm UTC](https://discuss.pynq.io/t/kernel-headers-for-kernel-4-14-0-xilinx-v2018-3-cannot-be-found/482/5 "2020-03-18T19:42:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rock](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/rock/32/32_2.png) [@rock](https://discuss.pynq.io/u/rock)\
**Post date:** [March 18, 2020, 8:08pm UTC](https://discuss.pynq.io/t/kernel-headers-for-kernel-4-14-0-xilinx-v2018-3-cannot-be-found/482/6 "2020-03-18T20:08:54Z")

</div>

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](https://github.com/Xilinx/PYNQ/tree/master/sdbuild/packages/xrt)

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

---

<div class="post-metadata">

**Author:** ![neocsc](https://avatars.discourse-cdn.com/v4/letter/n/898d66/32.png) [@neocsc](https://discuss.pynq.io/u/neocsc)\
**Post date:** [March 18, 2020, 8:13pm UTC](https://discuss.pynq.io/t/kernel-headers-for-kernel-4-14-0-xilinx-v2018-3-cannot-be-found/482/7 "2020-03-18T20:13:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rock](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/rock/32/32_2.png) [@rock](https://discuss.pynq.io/u/rock)\
**Post date:** [March 18, 2020, 8:15pm UTC](https://discuss.pynq.io/t/kernel-headers-for-kernel-4-14-0-xilinx-v2018-3-cannot-be-found/482/8 "2020-03-18T20:15:25Z")

</div>

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](https://github.com/Xilinx/PYNQ/blob/master/sdbuild/boot/meta-pynq/recipes-kernel/linux/linux-xlnx/greengrass.cfg)), then rebuild the SD card image.

---

<div class="post-metadata">

**Author:** ![neocsc](https://avatars.discourse-cdn.com/v4/letter/n/898d66/32.png) [@neocsc](https://discuss.pynq.io/u/neocsc)\
**Post date:** [March 18, 2020, 11:23pm UTC](https://discuss.pynq.io/t/kernel-headers-for-kernel-4-14-0-xilinx-v2018-3-cannot-be-found/482/9 "2020-03-18T23:23:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![neocsc](https://avatars.discourse-cdn.com/v4/letter/n/898d66/32.png) [@neocsc](https://discuss.pynq.io/u/neocsc)\
**Post date:** [March 18, 2020, 11:51pm UTC](https://discuss.pynq.io/t/kernel-headers-for-kernel-4-14-0-xilinx-v2018-3-cannot-be-found/482/10 "2020-03-18T23:51:40Z")

</div>

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\*\*

---

<div class="post-metadata">

**Author:** ![neocsc](https://avatars.discourse-cdn.com/v4/letter/n/898d66/32.png) [@neocsc](https://discuss.pynq.io/u/neocsc)\
**Post date:** [March 19, 2020, 1:49am UTC](https://discuss.pynq.io/t/kernel-headers-for-kernel-4-14-0-xilinx-v2018-3-cannot-be-found/482/11 "2020-03-19T01:49:05Z")

</div>

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”\*\*
