Kernel module not found when compile: Skipping BTF generation

richiewu

New Member
Jul 21, 2021
27
3
3
42
Skipping BTF generation for /root/r8152-2.15.0/r8152.ko due to unavailability of vmlinux

it's searching /lib/modules/$(shell uname -r)/build

I alrady installed header file pve-headers-5.4.128-1-pve

and there is /sys/kernel/btf/vmlinux, should I use this one?
 
I tried install https://www.realtek.com/en/directly-download?downloadid=14693064993b470514fcf9f45f2442e5

It's RTL8156 2.5G USB ethernet driver, because I use lsusb got:
Bus 004 Device 005: ID 0bda:8151 Realtek Semiconductor Corp. RTL8151 Adapteon Business Mobile Networks BV

the device ID is not correct, so I try to install drivers to fix this problem, the correct one shoud be 0bda:8156
sometimes if I plug out and plug in again, lsusb got correct device ID

just use make && make install then got this error

and dmesg got:
[ 4.959995] usb 4-2: New USB device found, idVendor=0bda, idProduct=8151, bcdDevice=30.00
 
Last edited:
Seems I solved this problem

apt install dwarves
apt install pve-headers-5.11.22-1-pve/now build-essential dkms
cp /sys/kernel/btf/vmlinux /usr/lib/modules/`uname -r`/build/

#install by compile
make
make install
mkdir -p /lib/modules/`uname -r`/kernel/net/usb
cp /root/r8152-2.15.0/r8152.ko /lib/modules/`uname -r`/kernel/net/usb/
make install_rules
depmod -a
update-initramfs -u

#install by dkms
dkms add -m r8125 -v 2.15.0
dkms build -m r8125 -v 2.15.0
dkms install -m r8125 -v 2.15.0
depmod -a
modprobe r8125

#load for reboot
echo "r8152" | sudo tee /etc/modules-load.d/r8152.conf

#reboot and check
lsmod | grep 'r8152'
 
  • Like
Reactions: takeokun and Dubyah

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!