DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I build a custom kernel with make-kpkg, including the headers package. I need it to produce and package the equivalent of running 'make prepare' and 'make prepare scripts' on the kernel sources. How can I do this?
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
As far as I am aware make-kpkg literally just compiles the kernel you have prepared and configured into a Debian package and takes the place of the usual compilation step -- so you just run make prepare and the like as normal. I just ran make prepare inside the kernel source directory on this machine and, yes, it just works.
Edit, my kernel compilation routine is something like:
Code:
tar -xf linux-4.0-rc4.tar.xz
cd linux-4.0-rc4/
cp /boot/config-$(uname -r) ./.config
make autoconfig
make menuconfig
fakeroot make-kpkg -j 4 --initrd --append-to-version=-wintermute kernel_image kernel_headers
As far as I am aware make-kpkg literally just compiles the kernel you have prepared and configured into a Debian package and takes the place of the usual compilation step -- so you just run make prepare and the like as normal. I just ran make prepare inside the kernel source directory on this machine and, yes, it just works.
Edit, my kernel compilation routine is something like:
Code:
tar -xf linux-4.0-rc4.tar.xz
cd linux-4.0-rc4/
cp /boot/config-$(uname -r) ./.config
make autoconfig
make menuconfig
fakeroot make-kpkg -j 4 --initrd --append-to-version=-wintermute kernel_image kernel_headers
I don't do it a different way. This was my command:
The option kernel_headers will build the headers package, but it doesn't seem to install the equivalent of 'make prepare scripts'. This caused the dkms nvidia driver to fail to build.
But I figured out the workaround. I copy over /usr/share/kernel-package to ~/src/linux-overlay, then set it as overlay, such as:
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
ARE you sure you have nvidia-kernel-dkms installed? I ask because on my desktop the NVIDIA DMKS install is automatic when installing the kernel and kernel headers packages.
ARE you sure you have nvidia-kernel-dkms installed? I ask because on my desktop the NVIDIA DMKS install is automatic when installing the kernel and kernel headers packages.
Yes, I'm sure. And yes, the dkms install is automatic, at kernel install. It was failing to build. I checked it by trying to build dkms manually. It was working at a certain point, but an update to kernel-package (I'm guessing), broke the headers building, this on debian stretch. Now, it's working as before.
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
I think sometimes the NVIDIA drivers don't compile as they ought, for whatever reason. I suspect that if you're installing your own kernel you may be better off with the .run dirrectly from NVIDIA but I don't know for sure -- I'll try to remember to do that next time I compile a new kernel branch.
No, it isn't. I do wish the dkms nvidia versions were more up to date, instead of the million little tweaks to the same version, which keep breaking stuff, but installing the nvidia binary is a mess.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.