LinuxQuestions.org
Help answer threads with 0 replies.
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 08-31-2015, 07:00 PM   #1
m_yates
Senior Member
 
Registered: Aug 2003
Location: Upstate
Distribution: Debian, Mint, Mythbuntu
Posts: 1,249

Rep: Reputation: 101Reputation: 101
Kernel version 4.1 and 4.2 upgrade/compile guide


The purpose of this post is to concisely list the steps needed to install a newer kernel version in Debian Jessie, and also to compile your own custom kernel. For more detailed documentation, you can refer to the Debian kernel handbook:

http://kernel-handbook.alioth.debian.org/

Upgrading and customizing a kernel isn't something that most people will need to do. If all you need is to compile a new module, simply install the headers for your existing kernel from the Debian repositories. However, it is sometimes necessary to install a newer kernel to provide support for hardware that isn't supported by version 3.16. Reasons to consider customizing the kernel include the removal of unnecessary modules, patching the kernel source for some added functionality, or to tinker and learn about the process of creating Debian kernel packages.

With that said, here a 3 ways to do it outlined below (1) Installing a pre-compiled kernel from Debian backports, (2) Patching and compiling a custom kernel from the Debian backports source files, and (3) Compiling a custom kernel from the official sources at kernel.org.

1. Installing pre-compiled 4.1 kernel using Debian backports.


This is the fastest way to obtain a newer kernel. Simply edit your sources.list file:

Code:
su
nano /etc/apt/sources.list
and add the following to the bottom of the file:

Code:
# jessie backports
deb http://http.debian.net/debian jessie-backports main contrib non-free
Hit ctrl+o, then enter to save the changes, and ctrl+x to exit the nano text editor. Next, run apt-get update as root:

Code:
su
apt-get update
To see what kernels are available:

Code:
apt-cache search linux-image
On my 64-bit computer, the output is:

Code:
root@pinto:~# apt-cache search linux-image
linux-headers-3.16.0-4-amd64 - Header files for Linux 3.16.0-4-amd64
linux-image-3.16.0-4-amd64 - Linux 3.16 for 64-bit PCs
linux-image-3.16.0-4-amd64-dbg - Debugging symbols for Linux 3.16.0-4-amd64
linux-image-amd64 - Linux for 64-bit PCs (meta-package)
linux-image-amd64-dbg - Debugging symbols for Linux amd64 configuration (meta-package)
nvidia-kernel-3.16.0-4-amd64 - NVIDIA binary kernel module for Linux 3.16.0-4-amd64
linux-headers-4.1.0-0.bpo.1-amd64 - Header files for Linux 4.1.0-0.bpo.1-amd64
linux-headers-4.1.0-0.bpo.1-rt-amd64 - Header files for Linux 4.1.0-0.bpo.1-rt-amd64
linux-image-4.1.0-0.bpo.1-amd64 - Linux 4.1 for 64-bit PCs
linux-image-4.1.0-0.bpo.1-amd64-dbg - Debugging symbols for Linux 4.1.0-0.bpo.1-amd64
linux-image-4.1.0-0.bpo.1-rt-amd64 - Linux 4.1 for 64-bit PCs, PREEMPT_RT
linux-image-4.1.0-0.bpo.1-rt-amd64-dbg - Debugging symbols for Linux 4.1.0-0.bpo.1-rt-amd64
linux-image-rt-amd64 - Linux for 64-bit PCs (meta-package), PREEMPT_RT
linux-image-rt-amd64-dbg - Debugging symbols for Linux rt-amd64 configuration (meta-package)
root@pinto:~#
As can be seen above, kernel version 3.16 is available in the Debian stable repositories, and version 4.1 is available from the backports. There are 2 versions of the 4.1 kernel, with and without the realtime (rt) patch. To install the newer kernel from backports:

Code:
aptitude -t jessie-backports install linux-image-4.1.0-0.bpo.1-amd64
You may also want to install headers to allow the compilation of modules for the new kernel:

Code:
aptitude -t jessie-backports install linux-headers-4.1.0-0.bpo.1-amd64
You will see an error message about possible missing firmware for for module r8169 (a realtek chip). That firmware can be installed with:

Code:
aptitude -t jessie-backports install firmware-realtek
You can install other non-free firmware with:

Code:
aptitude -t jessie-backports install firmware-linux
Grub is automatically updated with an entry for the new kernel. At bootup, the Grub menu will allow you to select between the Debian/GNU-Linux default and advanced options. The default is the newer 4.1 kernel, the advanced options allow you to choose between the 4.1 and 3.16 kernels and recovery modes. After rebooting, you can confirm the new kernel is installed by running uname -r. The output of uname -r should be: 4.1.0-0.bpo.1-amd64.

2. Compiling a custom 4.1 kernel from the Debian backports sources

If you need to customize the 4.1 kernel, the kernel sources are available from Debain backports to allow you to compile your own. You can check what sources are available using apt-cache search linux-source (after adding the backports repository as described above):

Code:
root@pinto:~# apt-cache search linux-source
linux-source-3.16 - Linux kernel source for version 3.16 with Debian patches
linux-source - Linux kernel source (meta-package)
linux-source-4.1 - Linux kernel source for version 4.1 with Debian patches
The output above shows the 4.1 kernel source is available with Debian patches applied. To install the 4.1 kernel source:

Code:
aptitude -t jessie-backports install linux-source-4.1
The installed source files can be found in the directory /usr/src. The linux-source-4.1 package created a directory linux-config-4.1 containing configurations for different processor architectures and the files linux-patch-4.1-rt.patch.xz and linux-source-4.1.tar.xz.

Next uncompress the source, rt patch, and symbolically link the source to /usr/src/linux:

Code:
cd /usr/src
tar xf linux-source-4.1.tar.xz
unxz linux-patch-4.1-rt.patch.xz
ln -s linux-source-4.1 linux
I am applying the rt patch to the kernel just as a demonstration. I don't really need a realtime kernel, but I'm applying the realtime patch to illustrate how a patch is applied:

Code:
cd /usr/src/linux
patch -p1 < /usr/src/linux-patch-4.1-rt.patch
A kernel patch is a file typically ending with the .patch extension. A patch modifies the source code and typically only works for a specific version of the source code. If you have a patch written for the 3.16 kernel, it will likely fail if you try and apply it to the 4.1 version of the source. Check for errors after applying the patch command. The above rt patch worked fine since it was written specifically for this kernel source.

The kernel source package comes with a bunch of configurations for different processor architectures in the directory /usr/src/linux-config-4.1/. Since I am applying the rt patch to the amd64 kernel, I'll use the configuration supplied:

Code:
cd /usr/src/linux/linux-config-4.1
unxz config.amd64_rt_amd64.xz
cp config.amd64_rt_amd64 /usr/src/linux/.config
Make sure that you have all the tools needed for compilation:

Code:
aptitude install build-essential
Now, adjust the kernel configuration as needed using make menuconfig. Make sure you have libncurses5-dev installed first:

Code:
aptitude install libncurses5-dev
Code:
cd /usr/src/linux
make menuconfig
You can navigate the menus and make changes following the instructions on the top of the screen. Once you have the configuration as you like it, save it and exit.

Then you can compile the kernel package with:

Code:
cd /usr/src/linux
make clean
make deb-pkg LOCALVERSION=-kernel_name KDEB_PKGVERSION=1
The above command compiles the packages with my local version name -kernel_name appended, and applies a version number 1. You can choose whatever name you like in place of "kernel_name". Be prepared to wait a long time for the packages to compile.

When it is done, the kernel and header deb files can be found in the directory /usr/src/:

linux-image-4.1.3-rt3-kernel_name_1_amd64.deb
linux-image-4.1.3-rt3-kernel_name-dbg_1_amd64.deb
linux-headers-4.1.3-rt3-kernel_name_1_amd64.deb
linux-libc-dev_1_amd64.deb

Install the kernel and headers with:

Code:
dpkg -i linux-image-4.1.3-rt3-kernel_name_1_amd64.deb
dpkg -i linux-headers-4.1.3-rt3-kernel_name_1_amd64.deb
The deb file with dbg contains debugging symbols, and the one with libc-dev contains headers for glibc. I'm not installing either of those. Reboot and grub has been automatically updated with the new kernel as default. You can select older kernels using the advanced option on the grub menu.

3. Compiling a custom 4.2 kernel using the official sources from kernel.org

If Debian backports doesn't have a kernel new enough, you can download the latest version as a tar.xz from kernel.org. Move it to /usr/src and extract it there:

Code:
cd /usr/src
tar xf linux-4.2.tar.xz
remove the old symbolic link to /usr/src/linux if there is one:

Code:
cd /usr/src
rm linux
create a new symbolic link:

Code:
cd /usr/src
ln -s linux-4.2 linux
If you have the 4.1 source from backports installed, You can grab a 4.1 configuration file from the ones supplied from the linux-source-4.1 package:

Code:
cd /usr/src/linux-config-4.1
unxz config.amd64_none_amd64.xz 
cp config.amd64_none_amd64 /usr/src/linux/.config
If you don't have linux-source-4.1 installed and don't want to install it, you can grab a configuration file from whatever is the latest version of the kernel you are running:

Code:
cd /usr/src/linux
cp /boot/config-<version> .config
where "config-<version>" is the configuration file for the whatever is the latest kernel version you have installed.

Make sure that you have all the tools needed for compilation:

Code:
aptitude install build-essential
Run make oldconfig to answer questions about configuration options that are new in version 4.2 compared to the earlier version:

Code:
cd /usr/src/linux
make oldconfig
You can just keep hitting the enter key to accept default selections for all of the questions, or choose a different answer. The default option is the one in uppercase.

You can further tweak things if you like using make menuconfig. Make sure you have libncurses5-dev installed first:

Code:
aptitude install libncurses5-dev
Code:
cd /usr/src/linux
make menuconfig
Follow the directions at the top of the screen to navigate menus and make any changes to the configuration that you want. Save and exit, then compile the kernel with:

Code:
make clean
make deb-pkg LOCALVERSION=-kernel_name KDEB_PKGVERSION=1
I added my local version -kernel_name and version number 1. You can pick whatever name you like instead of "kernel_name". The resulting kernel and header deb files will be placed in /usr/src and can be installed with:

Code:
dpkg -i linux-image-4.2.0-kernel_name_1_amd64.deb
dpkg -i linux-headers-4.2.0-kernel_name_1_amd64.deb
When you reboot, the latest 4.2 kernel will be the default in the grub menu. After bootup, uname -r gives: 4.2.0-kernel_name as the output, confirming that you are running the new kernel.

Hope that this is helpful. Post replies or message me if the guide needs improvement. I tested all of this on a fresh install of Debian Jessie with default options, so it should work. I'm submitting this post from the same machine running the 4.2 kernel released yesterday that I compiled as described above.

NOTE: One problem that I ran into is disk space. You will need about 10-15 GB free for compilation of each kernel source that you use. Apparently, the default is to compile with debugging symbols that take up huge space. After you are done, you can free up space with:

Code:
cd /usr/src
rm -rf linux-4.2
rm -rf linux-source-4.1
Enjoy!

Last edited by m_yates; 09-03-2015 at 02:54 PM.
 
Old 09-01-2015, 09:56 AM   #2
mzsade
Member
 
Registered: Sep 2009
Distribution: Linux Mint 9, Linux Mint 17.2(xfce), LMDE2(Mate), Debian Jessie minimal (with standalone OBox)
Posts: 299

Rep: Reputation: 34
Thank you for the guide, @m_yates. In my peculiar case both the kernels that came with the distribution, 4.1 and 4.1-rt, failed to boot but i somehow bungled my way into successfully upgrading to kernel 4.2 without recourse to the old config.
Don't wish to clutter the thread by rambling on about it so i'll just post a link to my screenshot.
 
Old 09-01-2015, 12:38 PM   #3
m_yates
Senior Member
 
Registered: Aug 2003
Location: Upstate
Distribution: Debian, Mint, Mythbuntu
Posts: 1,249

Original Poster
Rep: Reputation: 101Reputation: 101
Quote:
Originally Posted by mzsade View Post
Thank you for the guide, @m_yates. In my peculiar case both the kernels that came with the distribution, 4.1 and 4.1-rt, failed to boot but i somehow bungled my way into successfully upgrading to kernel 4.2 without recourse to the old config.
Don't wish to clutter the thread by rambling on about it so i'll just post a link to my screenshot.
Congrats! Configuring a kernel from scratch isn't easy to do. I'm sure you learned a lot about your hardware specs and the all the configuration options.
 
1 members found this post helpful.
Old 09-01-2015, 01:41 PM   #4
mzsade
Member
 
Registered: Sep 2009
Distribution: Linux Mint 9, Linux Mint 17.2(xfce), LMDE2(Mate), Debian Jessie minimal (with standalone OBox)
Posts: 299

Rep: Reputation: 34
Thanks, amongst the clueless half-baked Linux users i guess i am the most advanced one.

Have a couple of questions related to the upgrade,
1) Neither the image nor the headers are showing in synaptic. Is that normal? It's highly unlikely that i'd want to downgrade but if i were to, how'd i go about it?

2) Would it be safe for me now to remove kernel 3.16 via it's image and header from synaptic? I have booted from the new kernel several times now without any problems and other than an inconsequential error message about some jack driver being already installed or something to that effect, and pulseaudio, everything seems to be working fine..Please don't expend of yourself overthinking this, i consider this a test partition and it will be no big deal if i have to reinstall everything from scratch, i just want to know if i am missing something that's obvious.

Last edited by mzsade; 09-01-2015 at 01:43 PM.
 
Old 09-01-2015, 04:37 PM   #5
m_yates
Senior Member
 
Registered: Aug 2003
Location: Upstate
Distribution: Debian, Mint, Mythbuntu
Posts: 1,249

Original Poster
Rep: Reputation: 101Reputation: 101
1) If you compiled the kernel as a deb package and installed it using dpkg, it should be in Synaptic. To find it, open Synaptic and click on the button labeled "Origin" at the lower left. Then click on "Local" at the upper left. You should then see a list of things installed locally from deb files, rather than from internet repositories. If you want to downgrade, reboot into the older kernel that you want to keep, then uninstall the newer kernel and headers using synaptic, aptitude, or apt-get. You should not try to uninstall the kernel while using it.

2) It is safe to remove unused kernels. It shouldn't affect you. If you use Synaptic, aptitude, or apt-get to remove it, the Grub menu should be automatically updated to delete the old entries. If you keep a Debian-based system for years, you may get new kernels as security updates. The default with any kernel update is to keep the old one in case you have a problem with the new one. However, once you are satisfied that the new kernel is working, it is safe to remove old ones to free up disk space.
 
1 members found this post helpful.
Old 09-01-2015, 07:37 PM   #6
mzsade
Member
 
Registered: Sep 2009
Distribution: Linux Mint 9, Linux Mint 17.2(xfce), LMDE2(Mate), Debian Jessie minimal (with standalone OBox)
Posts: 299

Rep: Reputation: 34
Quote:
Originally Posted by m_yates View Post
1) If you compiled the kernel as a deb package and installed it using dpkg, it should be in Synaptic..
That's the thing, because of my failure with the distribution's kernels i decided to give the oldconfig a miss and after
Code:
cd /usr/src/linux
make menuconfig
and selecting all the defaults, did a
Code:
make #This took about 4hrs.
make modules
make modules_install
make install
Quote:
2) It is safe to remove unused kernels. It shouldn't affect you. If you use Synaptic, aptitude, or apt-get to remove it, the Grub menu should be automatically updated to delete the old entries.
Did that already, in fact changed "jessie" to "stretch" (except in the deb for backports), updated and did a
Code:
sudo aptitude safe-upgrade
Downloaded a ton of upgrades and can boot back into the system too but still don't see kernel 4.2 in synaptic, my fault entirely, goes without saying.
Anyhoo, this kernel upgrade hasn't quite been what i imagined it would be like, pulse stopped working, get that irritating "Driver pcspcr is already registered, Aborting" message after every boot, my Qupzilla has become as slow as iceweasel and /etc/xdg/openbox/autostart doesn't work anymore. Lesson learned, "if it ain't broke, don't fix it".

Edit: Now that i think about it, i do blame the guide to some extent.
For one thing, it should have been made as a standalone without any reference to the old kernels or their configs, that's the whole point of a "vanilla" kernel, isn't it.
These steps made me veer off:

Code:
Grab a 4.1 configuration file from the ones from the linux-source-4.1 package from Debian backports:

Code:
cd /usr/src/linux-config-4.1
unxz config.amd64_none_amd64.xz 
cp config.amd64_none_amd64 /usr/src/linux/.config

Run make oldconfig to answer questions about configuration options that are new in version 4.2 compared to version 4.1:
And for someone who is trying to avoid having anything to do with the previous configs and wishes to use the guide only for the upgrade to 4.2, this, especially the "LOCALVersion=pinto" is a cryptic thing sprung out of nowhere. Makes the whole thing very disjointed.
Code:
make deb-pkg LOCALVERSION=-pinto KDEB_PKGVERSION=1
Instead, the make menuconfig step could have been expanded on, having avoided the above to lead directly to make clean with this "pinto" explained in more detail.

I apologize for being such an ungrateful wretch but in my own clumsy way, i am only trying to make this guide better to the best of my ineptitude.

Last edited by mzsade; 09-02-2015 at 02:24 AM.
 
Old 09-02-2015, 07:59 AM   #7
m_yates
Senior Member
 
Registered: Aug 2003
Location: Upstate
Distribution: Debian, Mint, Mythbuntu
Posts: 1,249

Original Poster
Rep: Reputation: 101Reputation: 101
1) If you want to manage kernels using Debian's package management tools, then I suggest recompiling the 4.2 kernel as a deb package and install it that way as described above. After installing the deb file, reboot into that kernel. You can then delete the kernel you installed from source by deleting the installed files and directories for it:

Code:
su
rm -rf /lib/modules/kernel_version
rm -f /boot/vmlinuz-kernel_version*
rm -f /boot/initrd.img-kernel_version*
rm -f /boot/config-kernel_version*
rm -f /boot/System.map-kernel_version*
update-grub
where "kernel_version" is the name of the one you installed from source. MAKE CERTAIN that you choose the name of the kernel you installed from source, and not a kernel that you want to keep!

2) Sorry my "pinto" name is confusing. It is just the local name I chose for the computer and appended it to the kernel. I name all of my computers after cars. The old piece of junk test machine that I used to create this guide was named after the Ford Pinto. My laptop is "Boxster", my main desktop at work is named "Diablo" after the Lamborghini Diablo, etc. I'll edit the post to say "kernel_version" instead. You can choose whatever kernel name you like in place of "-pinto".

3) I wanted to keep this guide concise, and it is already long. As you probably found out for yourself, there are a lot of configuration options when you run "make menuconfig" and I can't go through all of them. It is much easier and faster to use an existing configuration as a starting point. However, you don't need to install linux-source from backports if you don't want to, you can use the config from whatever kernel you have installed:

Code:
su
cd /usr/src/linux
cp /boot/config-<version> .config
where "config-<version>" is the name of the configuration file for whatever is the latest version of the kernel you have installed. I'll update the post to show that option.

Last edited by m_yates; 09-02-2015 at 08:18 AM.
 
Old 09-02-2015, 12:15 PM   #8
mzsade
Member
 
Registered: Sep 2009
Distribution: Linux Mint 9, Linux Mint 17.2(xfce), LMDE2(Mate), Debian Jessie minimal (with standalone OBox)
Posts: 299

Rep: Reputation: 34
Thank you very much, that brings so much clarity to my mind. I should let you know that in the meantime i upgraded to the latest liquorix kernel as per this and the results were identical to what i experienced with my upgrades to kernels 4.1 and 4.1-rt, i got the famous liquorix splash screen but the boot process froze exactly as before after this output:

Ignoring BGRT: Invalid Status 0 (expected 1)
Loading please wait...
fsck from util-linux 2.26.2
/dev/sda3: clean, XXXX/XXXXXX files, XXXX/XXXXXX blocks
systemd[1]: wfs-common-service: Job nfs-common.service/start deleted to break ordering cycle starting with sysint.target/start
systemd[1]: wfs-common-service: Job nfs-common.service/start deleted to break ordering cycle starting with sysint.target/start

Then the cursor disappeared and there was no other way out of it other than by powering off manually.

In the end i reinstalled because in the first place, i'd made a right mess of the whole thing, and on top of everything, changed my repos to Stretch and removed kernel 3.16 from synaptic of a system which was working quite well inspite of the cockamamie manner in which i had upgraded the kernel to 4.2.
I am now reconfiguring my system and narrating how i go about it on the Debian post installation Sticky. Will be a while before i get around to upgrading the kernel again. I will also have to look into the matter of pulseaudio and sound not working after the upgrade, and the "Driver pspcr is already registered, aborting" message before i go about it. I thank you again for your trouble and hope to be guided when i come to that stage.

Last edited by mzsade; 09-02-2015 at 12:16 PM.
 
Old 09-03-2015, 01:51 AM   #9
mzsade
Member
 
Registered: Sep 2009
Distribution: Linux Mint 9, Linux Mint 17.2(xfce), LMDE2(Mate), Debian Jessie minimal (with standalone OBox)
Posts: 299

Rep: Reputation: 34
Hi, following this: 3. Compiling a custom 4.2 kernel using the official sources from kernel.org
Hit my first snag at
Code:
make oldconfig
, seems i do not have "make" by default so i am installing that, also dpkg-dev

Compiling is frozen here for the last 30 minutes,
Code:
dpkg-deb: building package `linux-firmware-image-4.2.0-3.16.0-4-amd64' in `../linux-firmware-image-4.2.0-3.16.0-4-amd64_1_amd64.deb'.
dpkg-deb: building package `linux-headers-4.2.0-3.16.0-4-amd64' in `../linux-headers-4.2.0-3.16.0-4-amd64_1_amd64.deb'.
dpkg-deb: building package `linux-libc-dev' in `../linux-libc-dev_1_amd64.deb'.
dpkg-deb: building package `linux-image-4.2.0-3.16.0-4-amd64' in `../linux-image-4.2.0-3.16.0-4-amd64_1_amd64.deb'.
dpkg-deb: building package `linux-image-4.2.0-3.16.0-4-amd64-dbg' in `../linux-image-4.2.0-3.16.0-4-amd64-dbg_1_amd64.deb'.
Will give it another 15 then snuff the process, maybe even delete the whole partition..

Last edited by mzsade; 09-03-2015 at 09:24 AM.
 
Old 09-03-2015, 09:38 AM   #10
m_yates
Senior Member
 
Registered: Aug 2003
Location: Upstate
Distribution: Debian, Mint, Mythbuntu
Posts: 1,249

Original Poster
Rep: Reputation: 101Reputation: 101
You'll get make and dpkg-dev, among other things needed for compilation by installing:
Code:
aptitude install build-essential
I'll edit the post again to state that. I ran through the commands in the order I have them listed in the original post, and by the time I got to the compilation step I had everything installed that I needed except dpkg-dev. The other packages were either installed in the default Jessie install, or added as dependencies by aptitude in the earlier steps. I'll just edit the post to replace the line "aptitude install dpkg-dev" with "aptitude install build-essential". I shouldn't have assumed that everyone will run through all the commands in the post.
 
Old 09-03-2015, 12:26 PM   #11
mzsade
Member
 
Registered: Sep 2009
Distribution: Linux Mint 9, Linux Mint 17.2(xfce), LMDE2(Mate), Debian Jessie minimal (with standalone OBox)
Posts: 299

Rep: Reputation: 34
I tried it again, this time i had everything installed including libncurses5-dev but make menuconfig was still terminated with an Error. Everything went fine with make oldconfig and you were right, i did get an inside look into the various hardware options when i paused to look at them, but sadly it seems a proper kernel upgrade is not for the likes of me. In my present state of despondency i am tempted to try this out but i don't think i can stoop so low.

Edit: You missed a typo; "make menconfig"

Last edited by mzsade; 09-03-2015 at 12:58 PM.
 
Old 09-03-2015, 03:13 PM   #12
m_yates
Senior Member
 
Registered: Aug 2003
Location: Upstate
Distribution: Debian, Mint, Mythbuntu
Posts: 1,249

Original Poster
Rep: Reputation: 101Reputation: 101
Do you see a read/write error while compiling? I ran into that problem previously. The compilation would proceed for a long time, then crash out at some random point with a message about a read/write error, followed by some error about the module being compiled at the time of the crash. If you are seeing read/write errors, that is probably because your disk drive has bad sectors. When that was happening to me, I swapped in a new hard drive and everything worked after re-installing Debian on the new drive.

I corrected the typo. Thanks.
 
Old 09-04-2015, 12:06 AM   #13
mzsade
Member
 
Registered: Sep 2009
Distribution: Linux Mint 9, Linux Mint 17.2(xfce), LMDE2(Mate), Debian Jessie minimal (with standalone OBox)
Posts: 299

Rep: Reputation: 34
Code:
make menuconfig
  HOSTCC  scripts/kconfig/mconf.o
In file included from scripts/kconfig/mconf.c:23:0:
scripts/kconfig/lxdialog/dialog.h:38:20: fatal error: curses.h: No such file or directory
 #include CURSES_LOC
                    ^
compilation terminated.
scripts/Makefile.host:108: recipe for target 'scripts/kconfig/mconf.o' failed
make[1]: *** [scripts/kconfig/mconf.o] Error 1
Makefile:531: recipe for target 'menuconfig' failed
aptitude install build-essential had returned 0 to install and 0 to upgrade since i already had all the packages installed. I must have some kind of a masochistic streak, this is for the fourth time, i think..

Edit: I am such an idiot, had libncurses5 not libncurses5-dev, forgot that this was a fresh installation..am going by the book this time. Sorry for pestering you needlessly.
Edit: Chose make silentoldconfig this time, thought it'd spare me the interrogation, it didn't, make menuconfig went without a hitch, make deb-pkg is doing it's thing, i will dull my mind a bit more till it finishes with Terminator Genisys which has been loading on my PC.

Last edited by mzsade; 09-04-2015 at 06:33 AM.
 
Old 09-04-2015, 09:36 AM   #14
m_yates
Senior Member
 
Registered: Aug 2003
Location: Upstate
Distribution: Debian, Mint, Mythbuntu
Posts: 1,249

Original Poster
Rep: Reputation: 101Reputation: 101
The compilation took about 2 hours on my old PC, but I included all of the default modules in the configuration supplied by the linux-source-4.1 package. It is a good time to enjoy a delicious beverage or three while the compilation is running. Hope it worked for you this time.
 
Old 09-04-2015, 11:18 AM   #15
mzsade
Member
 
Registered: Sep 2009
Distribution: Linux Mint 9, Linux Mint 17.2(xfce), LMDE2(Mate), Debian Jessie minimal (with standalone OBox)
Posts: 299

Rep: Reputation: 34
Code:
dpkg-deb: building package `linux-firmware-image-4.2.0-3.16.0-4-amd64' in `../linux-firmware-image-4.2.0-3.16.0-4-amd64_4.2.0-3.16.0-4-amd64-1_amd64.deb'.
dpkg-deb: building package `linux-headers-4.2.0-3.16.0-4-amd64' in `../linux-headers-4.2.0-3.16.0-4-amd64_4.2.0-3.16.0-4-amd64-1_amd64.deb'.
dpkg-deb: building package `linux-libc-dev' in `../linux-libc-dev_4.2.0-3.16.0-4-amd64-1_amd64.deb'.
dpkg-deb: building package `linux-image-4.2.0-3.16.0-4-amd64' in `../linux-image-4.2.0-3.16.0-4-amd64_4.2.0-3.16.0-4-amd64-1_amd64.deb'.
dpkg-deb: building package `linux-image-4.2.0-3.16.0-4-amd64-dbg' in `../linux-image-4.2.0-3.16.0-4-amd64-dbg_4.2.0-3.16.0-4-amd64-1_amd64.deb'.




make: *** No rule to make target 'KDEB'.  Stop.
:/usr/src/linux#
This was as close as i could get to the finish this time. :sniff

Dug up the bash history, would you please tell me what i did wrong?

Code:
:~# cd /usr/src
:~# tar xf linux-4.2.tar.xz 
:~# ln -s linux-4.2 linux
:~# cd linux 
:~# cp /boot/config-3.16.0-4-amd64 .config
:~# make silentoldconfig
:~# make menuconfig
:~# make clean
:~# make deb-pkg LOCALVERSION=-3.16.0-4-amd64 KDEB PKGVERSION=1

Last edited by mzsade; 09-04-2015 at 12:56 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Kernel Compile Guide for 2.6.0 DaOne Slackware 581 04-11-2009 06:31 AM
Kernel compile guide k3rnel Linux - Kernel 1 03-12-2007 02:11 PM
Help - Need guide on how to (re)compile kernel in 9.2 timko SUSE / openSUSE 1 02-17-2005 08:17 AM
re :kernel compile guide sh4d0w331 Slackware 1 10-02-2004 05:38 PM
Kernel re-compile guide marlor Slackware 6 08-08-2004 03:57 AM

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

All times are GMT -5. The time now is 09:59 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