So I am not sure who knows the answer to this question, but I have been using dkms to install the latest nVIDIA driver into openSUSE and now, their driver seems to support this natively. But, I seem unable to get it to work with the openSUSE default kernel even with kernel sources loaded and there is a difference between the kernels I compile and the kernels installed by YaST. If I look at the kernel source links of:
/lib/modules/$(uname -r)/source/
AND
/lib/modules/$(uname -r)/build/
They are the same for kernels I compile, but for the openSUSE installed kernels, they are not the same. The Kernel’s source folder for the kernels I compile is nearly 7 GB, while the openSUSE source is just under 500 mb. In any event, dkms for nVIDIA works with kernels I compile and not for openSUSE kernels even though dkms works for VirtualBox and the openSUSE installed kernels and the nVIDIA driver can be installed into a system running the openSUSE kernel just fine without dkms. So, I just wonder why the difference in kernel sources and what the reason for that difference might be?
Any insight into this issue would be good to know.
If you can tell that from its size, then no. Other than saving space, if true, why get ride of them, how would you do that and will my life be any better afterwards?
I haven’t compiled Linux kernels (except Gentoo’s) for about ten years or so. But usually you would do a make clean or the equivalent to remove the object files. Why? Well, if you compile a kernel, then edit some source file to fix a bug or add a feature, apply a patch or modify the kernel config, then you will have to do a make clean to delete all compiled files before recompiling. But it’s true for anything you compile from source, not just kernels.
tar -vxjf linux-version.tar.bz2
cd kernel folder
make mrproper
zcat /proc/config.gz >.config
Optional: make menuconfig
make -jX ( where X=CPU cores Times 2)
sudo make modules_install install
This does not answer my original question though of “Does openSUSE use separate KBUILD source and output directories for the Kernel?”.
IMO, you’re missing the last step, which should be “make clean”. I don’t see why you would keep the object files, since you’d pretty much need to delete them if you change something (for example by running make menuconfig). But I’m far from being a Linux kernel expert. In fact, I haven’t see the need to compile the kernel myself for many years. I pretty much always have the latest stable kernel under ArchLinux and Fedora anyway.
Dunno. I just tried to find an explanation for your 7 GiB folder … but I might be wrong. And who knows what else you put in this folder?
So doing a make clean after the kernel compile does not seem very intuitive to me, but I might see what it does. As for doing a new kernel compile, its a way to get the latest hardware drivers. For instance, my sound card by Creative does not work with kernel 3.1 as support was not added until 3.2 came out. One could always find something else like being faster for instances, but its much like anyone testing the very latest thing. Its just another option one might use in openSUSE.