[SOLVED] Kernel documentation for building modules

May 19, 2017
9
1
23
41
Hello guys:

I'm running Proxmox VE 7 with kernel 5.11.22-4-pve. Everytime I try to build a module or even when running "make oldconfig" I get an error message like:

Kconfig:36: can't open file "Documentation/Kconfig"

I tried searching different Proxmox packages but I couldn't find one that contains that directory and file.

Has anyone been able to build modules on Proxmox 7?
 
Did you install the headers? apt install pve-headers
 
Which module do you try to build?
 
I'm trying to build the module for Realtek 8152/8153 USB Network Adapter (r8152.ko), because the default driver detected "cdc_ether" can't make my NIC work (there's no connectivity). On a different server running CentOS 7 the same NIC works perfectly with the r8152.ko module.
 
Can you provide the complete command you use to build it?
In addition please provide the output of ls -l /lib/modules/$(uname -r)/ and the complete output of the command when run.

Are you trying to build version 2.15.0? Where did you get the source?

I tested it here with both kernel 5.11.22-4 and 5.11.22.-5 and it worked.
 
Hi:

$ ls -l /lib/modules/$(uname -r)
total 6148
lrwxrwxrwx 1 root root 36 Sep 22 03:11 build -> /usr/src/linux-headers-5.11.22-4-pve
drwxr-xr-x 15 root root 4096 Sep 23 00:38 kernel
-rw-r--r-- 1 root root 1468668 Aug 27 04:51 modules.alias
-rw-r--r-- 1 root root 1439369 Aug 27 04:51 modules.alias.bin
-rw-r--r-- 1 root root 9903 Aug 27 04:51 modules.builtin
-rw-r--r-- 1 root root 0 Aug 27 04:51 modules.builtin.alias.bin
-rw-r--r-- 1 root root 12579 Aug 27 04:51 modules.builtin.bin
-rw-r--r-- 1 root root 74259 Aug 27 04:51 modules.builtin.modinfo
-rw-r--r-- 1 root root 665189 Aug 27 04:51 modules.dep
-rw-r--r-- 1 root root 920709 Aug 27 04:51 modules.dep.bin
-rw-r--r-- 1 root root 353 Aug 27 04:51 modules.devname
-rw-r--r-- 1 root root 234103 Aug 27 04:51 modules.order
-rw-r--r-- 1 root root 1159 Aug 27 04:51 modules.softdep
-rw-r--r-- 1 root root 647147 Aug 27 04:51 modules.symbols
-rw-r--r-- 1 root root 783822 Aug 27 04:51 modules.symbols.bin
drwxr-xr-x 2 root root 4096 Sep 23 00:38 zfs

$ ls -ld /lib/modules/$(uname -r)
drwxr-xr-x 4 root root 4096 Sep 28 11:55 /lib/modules/5.11.22-4-pve

$ uname -r
5.11.22-4-pve

$ dpkg -l | grep 5.11.22
ii pve-headers-5.11.22-4-pve 5.11.22-9 amd64 The Proxmox PVE Kernel Headers
ii pve-kernel-5.11.22-4-pve 5.11.22-8 amd64 The Proxmox PVE Kernel Image

I googled "realtek 8152 driver" and went directly to the 1st page which in fact is the official Realtek driver's website: https://www.realtek.com/en/componen...0-100-1000m-gigabit-ethernet-usb-3-0-software
 
I'm so sorry. I already noticed the error: The package for pve-kernel installed was 5.11.22-8, but version for pve-headers was 5.11.22-9 (newer release). Once I installed 5.11.22-8 for pve-headers I was able to build the module without any issues.

Thank you so much for your help
 
  • Like
Reactions: mira
I have the same issue, but when I try to install pv-headers-5.15.30-3, it can't find in repository.
Here is pveversion output:

perl: warning: Setting locale failed.

perl: warning: Please check that your locale settings:

LANGUAGE = (unset),

LC_ALL = (unset),

LC_CTYPE = "UTF-8",

LANG = "en_US.UTF-8"

are supported and installed on your system.

perl: warning: Falling back to a fallback locale ("en_US.UTF-8").

proxmox-ve: 7.2-1 (running kernel: 5.15.30-2-pve)

pve-manager: 7.2-3 (running version: 7.2-3/c743d6c1)

pve-kernel-helper: 7.2-2

pve-kernel-5.15: 7.2-1

pve-kernel-5.15.30-2-pve: 5.15.30-3

ceph-fuse: 15.2.16-pve1

corosync: 3.1.5-pve2

criu: 3.15-1+pve-1

glusterfs-client: 9.2-1

ifupdown2: 3.1.0-1+pmx3

ksm-control-daemon: 1.4-1

libjs-extjs: 7.0.0-1

libknet1: 1.22-pve2

libproxmox-acme-perl: 1.4.2

libproxmox-backup-qemu0: 1.2.0-1

libpve-access-control: 7.1-8

libpve-apiclient-perl: 3.2-1

libpve-common-perl: 7.1-6

libpve-guest-common-perl: 4.1-2

libpve-http-server-perl: 4.1-1

libpve-storage-perl: 7.2-2

libspice-server1: 0.14.3-2.1

lvm2: 2.03.11-2.1

lxc-pve: 4.0.12-1

lxcfs: 4.0.12-pve1

novnc-pve: 1.3.0-3

proxmox-backup-client: 2.1.8-1

proxmox-backup-file-restore: 2.1.8-1

proxmox-mini-journalreader: 1.3-1

proxmox-widget-toolkit: 3.4-10

pve-cluster: 7.2-1

pve-container: 4.2-1

pve-docs: 7.2-2

pve-edk2-firmware: 3.20210831-2

pve-firewall: 4.2-5

pve-firmware: 3.4-1

pve-ha-manager: 3.3-4

pve-i18n: 2.7-1

pve-qemu-kvm: 6.2.0-5

pve-xtermjs: 4.16.0-1

qemu-server: 7.2-2

smartmontools: 7.2-pve3

spiceterm: 3.2-2

swtpm: 0.7.1~bpo11+1

vncterm: 1.7-1

zfsutils-linux: 2.1.4-pve1

Would you help please? Thanks.
 
Install the latest headers with apt install pve-headers.
If you need a specific version for the kernel you're currently running, install it with apt install pve-headers-5.15.30-2-pve.