make[1]: *** /lib/modules/6.1.21-v8+/build: No such file or directory. Stop.

July 28, 2024, 21:55

ihatenetworkchuck

make -C /lib/modules/6.1.21-v8+/build M=/home/dietpi/r8152-2.16.3 modules
make[1]:  /lib/modules/6.1.21-v8+/build: No such file or directory.  Stop. 
make:  [Makefile:24: modules] Error 2

ihatenetworkchuck

so aparently the driver i try to install doesnt have correct kernel headers for my system

ihatenetworkchuck

im lost and idk what to do

ihatenetworkchuck

should i rename sone random kernel header to my kernel and it will use it instead? will this mess everything up?

ihatenetworkchuck

- If you want to support S5 WOL, you have to find

    EXTRA_CFLAGS += -DRTL8152_S5_WOL

  in the Makefile. Then, remove the first character '#", if it exists.


- For Fedora, you may have to run the following command after installing the
  driver.

    # dracut -f

- For Ubuntu, you may have to run the following command after installing the
  driver.

    # sudo depmod -a
    # sudo update-initramfs -u

- Example of setting speed

    2.5G before kernel v4.10
    # ethtool -s eth0 autoneg on advertise 0x802f

    2.5G for kernel v4.10 and later
    # ethtool -s eth0 autoneg on advertise 0x80000000002f

    # ethtool -s eth0 autoneg on advertise 0x002f (1G)
    # ethtool -s eth0 autoneg on advertise 0x000f (100M full)
    # ethtool -s eth0 autoneg on advertise 0x0003 (10M full)

- Disable center tap short

    # make CONFIG_CTAP_SHORT=OFF modules

- Ring parameter

    Show Ring parameter
    # ethtool -g eth0

    Changes the number of ring entries for the Rx ring.
    # ethtool -G eth0 rx 100

ihatenetworkchuck

generally nothing useful because i have a problem where i have some weird kernel

ihatenetworkchuck

its rpizero2w kernel

ihatenetworkchuck

as you can see in the image

ihatenetworkchuck

it means it cant be built for this kernel

ihatenetworkchuck

but i need it

ihatenetworkchuck

its my only adapter

ihatenetworkchuck

and im sure i can bypass the check, i already used command like sudo ln -s /usr/src/linux-headers-6.1.21-v8+ /lib/modules/$(uname -r)/build

ihatenetworkchuck

without much success