LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 03-26-2016, 12:40 PM   #1
xyzone
Member
 
Registered: Jun 2010
Posts: 35

Rep: Reputation: Disabled
Question How to configure make-kpkg?


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?
 
Old 03-27-2016, 05:29 AM   #2
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
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

Last edited by 273; 03-27-2016 at 05:31 AM.
 
Old 03-28-2016, 10:18 PM   #3
xyzone
Member
 
Registered: Jun 2010
Posts: 35

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by 273 View Post
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:

CONCURRENCY_LEVEL=8 nice -n19 ionice -c3 fakeroot make-kpkg --initrd --append-to-version=-myria --revision=4.4.6-myria kernel_image kernel_headers

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:

CONCURRENCY_LEVEL=8 nice -n19 ionice -c3 fakeroot make-kpkg --overlay-dir $HOME/src/linux-overlay --initrd --append-to-version=-myria --revision=4.4.6-myria kernel_image kernel_headers

So I guess this is more or less solved.

Last edited by xyzone; 03-28-2016 at 10:20 PM.
 
Old 03-29-2016, 12:56 AM   #4
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
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.
 
Old 03-29-2016, 05:01 AM   #5
xyzone
Member
 
Registered: Jun 2010
Posts: 35

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by 273 View Post
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.

Last edited by xyzone; 03-29-2016 at 05:04 AM.
 
Old 03-29-2016, 12:32 PM   #6
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
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.
 
Old 03-29-2016, 05:46 PM   #7
xyzone
Member
 
Registered: Jun 2010
Posts: 35

Original Poster
Rep: Reputation: Disabled
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Kernel compilation: make vs make-kpkg derchris Ubuntu 1 03-15-2011 10:25 AM
Where can i get make-kpkg linuxmandrake Debian 1 12-16-2005 04:36 PM
Kernel compile fails with make-kpkg, not with make cspos Debian 37 11-09-2005 09:11 AM
where do i get make-kpkg linuxmandrake Debian 4 09-27-2005 04:42 AM
Using make-kpkg Maximus2000 Debian 4 02-27-2004 09:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 02:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration