What bundle's needed to install the kernel source?

What bundle would I need to install the kernel source - I tried installing the linux-dev package but dont quite see the source under the /usr/src/kernel folder

linux-dev bundle will install the necessary files to add a module at

/usr/lib/modules/KERNEL_VERSION/build

So when you develop your out-of-tree module you do need to modify your Makefile.

example of a out-of-tree module Makefile

obj-m += lkm_example.o

all:

make -C /lib/modules/(shell uname -r)/build M=(PWD) modules

clean:

make -C /lib/modules/(shell uname -r)/build M=(PWD) clean

2 Likes

Go get “kernel-native-dkms” bundle install, it should have “linux-dev” install and other setup properly to enable kernel module compilation.

I used this bundle and successfully had Nvidia native video driver up in Clearlinux. But do not ever issue “swupd verify --fix”, else the Nvidia native video driver will have to be recompiled again and do some symbolic link fixes manually.

We have fixed swupd so that it will leave the driver sources in /usr/src. swupd verify --fix should now be safe.