Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Kernel compile and install for newbies
Re: Kernel compile and install for newbies
I never saw any performance benefit to use make localmodconfig. All it does is detect what modules your system is currently using and disable all (except what you need) of the options (already) marked as a kernel module. So basically it makes your kernel into a monolithic binary. It might save some space or compile time; However if you ever add a new piece of hardware that requires a missing module you will need to recompile a new kernel.
Always on Debian Testing
Re: Kernel compile and install for newbies
That's all that it does. But the point is to start there, so you won't have to spend 2 hours building the kernel, and have 100+ MB used for the kernel.vbrummond wrote:I never saw any performance benefit to use make localmodconfig. All it does is detect what modules your system is currently using and disable all (except what you need) of the options (already) marked as a kernel module. So basically it makes your kernel into a monolithic binary. It might save some space or compile time; However if you ever add a new piece of hardware that requires a missing module you will need to recompile a new kernel.
Since it only disables modules, you can reconfigure the sources later to re-enable a driver, make modules, and install the modules (I've done this at least a couple times, it's not just speculation).
Then you do the tuning:
check if you need ISA (lspci|grep ISA)--some boards use it for odd purposes;
disable MCA (you almost certainly don't need it);
tune for the lowest CPU you'll use (eg, i586, i686, k{6,7,8}, Core whatever...); select your general options; etc.
If you messed up, you wasted maybe 1-2 hours, not 4-6 hours like you might otherwise.
If you're paranoid about "What if I end up needing to test a DEC network card or find an MGA card for a spare console on my desktop, or get given some Infiniband card?", it's not for you. But otherwise, you can add back the useful stuff faster than you'd remove anything.
Thinkpad X100e/Debian Squeeze (All reposiories enabled)/Linux 3.4.11:
1GB RAM/1.6GHz Neo X2/ATI HD 3200/RTL8191SEVA2 wlan0, RTL8169 eth0
1GB RAM/1.6GHz Neo X2/ATI HD 3200/RTL8191SEVA2 wlan0, RTL8169 eth0
-
- Posts: 397
- Joined: 2009-02-27 04:59
- Location: Portland, OR USA
Re: Kernel compile and install for newbies
make-kpkg is very well documented. It has a very helpful manpage, etc.
Is there any similar documentation regarding 'make deb-pkg' ? I cannot seem to find anything...
Also though I have been using 'make deb-pkg' as of late I have several grievances with it (apart from the apparent lack of documentation). The firmware package gets called "linux-firmware-x.x.x.deb". This package conflicts with the debianized firmware-linux, firmware-linux-free and nonfree. This is annoying, is there a way to change the names? (that's why I'm asking about that documentation).
Recently, nvidia-kernel-dkms from backports failed to compile and install the module on one of my computers running a 3.0.18 kernel customized and compiled by myself with "make deb-pkg". It failed saying that there were no sources for the kernel image (even though kernel headers were installed). Curiously module-assistant had no trouble at all compiling the nvidia module for the kernel... kernels from backports had no trouble with dkms though.
On the other hand make-kpkg doesn't seem to even offer the option of the separate firmware package.
Anyone encountered these problems and found documentation / solutions?
Thanks
Is there any similar documentation regarding 'make deb-pkg' ? I cannot seem to find anything...
Also though I have been using 'make deb-pkg' as of late I have several grievances with it (apart from the apparent lack of documentation). The firmware package gets called "linux-firmware-x.x.x.deb". This package conflicts with the debianized firmware-linux, firmware-linux-free and nonfree. This is annoying, is there a way to change the names? (that's why I'm asking about that documentation).
Recently, nvidia-kernel-dkms from backports failed to compile and install the module on one of my computers running a 3.0.18 kernel customized and compiled by myself with "make deb-pkg". It failed saying that there were no sources for the kernel image (even though kernel headers were installed). Curiously module-assistant had no trouble at all compiling the nvidia module for the kernel... kernels from backports had no trouble with dkms though.
On the other hand make-kpkg doesn't seem to even offer the option of the separate firmware package.
Anyone encountered these problems and found documentation / solutions?
Thanks
Re: Kernel compile and install for newbies
linux-firmware-x.x.x contains the same files as firmware-lnux,firmware-linux-free, & firmware-linux-nonfree.acimmarusti wrote:make-kpkg is very well documented. It has a very helpful manpage, etc.
Is there any similar documentation regarding 'make deb-pkg' ? I cannot seem to find anything...
Also though I have been using 'make deb-pkg' as of late I have several grievances with it (apart from the apparent lack of documentation). The firmware package gets called "linux-firmware-x.x.x.deb". This package conflicts with the debianized firmware-linux, firmware-linux-free and nonfree. This is annoying, is there a way to change the names? (that's why I'm asking about that documentation).
Recently, nvidia-kernel-dkms from backports failed to compile and install the module on one of my computers running a 3.0.18 kernel customized and compiled by myself with "make deb-pkg". It failed saying that there were no sources for the kernel image (even though kernel headers were installed). Curiously module-assistant had no trouble at all compiling the nvidia module for the kernel... kernels from backports had no trouble with dkms though.
On the other hand make-kpkg doesn't seem to even offer the option of the separate firmware package.
Anyone encountered these problems and found documentation / solutions?
Thanks
Therefore, it must always conflict. You only need one of the options, though.
dkms:
The default links (/lib/modules/`uname -r`/{build,source} point to the original build directory.
This is the one problem with this method...
I wrote a script to handle this.
Code: Select all
#!/bin/sh
#fixkernlink
usage(){
cat <<EOF
kernlinks.sh--clean up /lib/modules/<kernel-release> for building modules.
USAGE:
kernlinks.sh <kernelversion>
cd /lib/modules;for K in * ; do kernlinks.sh $K; done; cd -
EOF
}
if [ ! -d /lib/modules/$1 ]
then usage; exit 255
fi
#If build is not a link, there are no headers or it's not a kernel version
test -L /lib/modules/$1/build||exit 127
cd /lib/modules/$1/
export KERNVER=`pwd`; export KERNVER=`basename ${KERNVER}`
#Are headers installed?
export KERNHDR=/usr/src/linux-headers-${KERNVER}
test -d ${KERNHDR} || exit 126
unlink build
unlink source
ln -s ${KERNHDR} build
ln -s ${KERNHDR} source
cd ${KERNHDR}/arch/x86
#Makefile_32.cpu -- for OSS4
test -e Makefile_32.cpu || cp ../../../all/arch/x86/Makefile_32.cpu ./
exit 0
Thinkpad X100e/Debian Squeeze (All reposiories enabled)/Linux 3.4.11:
1GB RAM/1.6GHz Neo X2/ATI HD 3200/RTL8191SEVA2 wlan0, RTL8169 eth0
1GB RAM/1.6GHz Neo X2/ATI HD 3200/RTL8191SEVA2 wlan0, RTL8169 eth0
-
- Posts: 1
- Joined: 2012-02-25 20:18
Re: Kernel compile and install for newbies
Hello. Wireless don't work with my compiled kernel. What can I do?
Re: Kernel compile and install for newbies
Recompile your kernel, with the right version and configuration, of course. That's all your info tells us.javidemon95 wrote:Hello. Wireless don't work with my compiled kernel. What can I do?
If you actually want to solve this, here are my recommendations:
0. Ask in another part of the forum with more details. (This forum is for "How-to"s, not for asking how to do something.)
This report is about as useless for getting help as it can be:
1. You did not state which Debian version you're using. (If you aren't using Debian, ask in your distro's forums.)
Please state whether it's Stable/Squeeze, Testing/Wheezy, or Sid.
2. You did not mention whether wireless worked without a custom kernel.
->If you didn't check, why do you expect your kernel to work?
3. You did not mention what kernel version you built (Kernel 3.x has drivers that are missing in 2.6.32, while some old drivers may have been dropped/broken)
4. You did not mention what wireless card you are using (As root run
Code: Select all
lspci -k #or lshw
5. You did not mention whether you enabled the driver for your wireless card.
(If you have no clue, run "make savedefconfig" and attach the defconfig that you get.)
If you don't have the details from at least 1-4, please ask in the beginners forum how to find out or go Google it.
Assuming that you post these details in another part of the forum (Hardware, System Configuration, or Beginners), I'd be happy to help.
But if you want help, please do not use this subforum.
Thinkpad X100e/Debian Squeeze (All reposiories enabled)/Linux 3.4.11:
1GB RAM/1.6GHz Neo X2/ATI HD 3200/RTL8191SEVA2 wlan0, RTL8169 eth0
1GB RAM/1.6GHz Neo X2/ATI HD 3200/RTL8191SEVA2 wlan0, RTL8169 eth0
-
- Posts: 1
- Joined: 2012-04-18 10:01
Re: Kernel compile and install for newbies
Hello,
I'm probably making some dumb mistake or two but I can't seem to get a .deb file out to install.
All I'm trying to do is change the system timer resolution from 250Hz to 1000Hz.
I followed instructions from these links; http://newbiedoc.sourceforge.net/system/kernel-pkg.html and https://docs.google.com/viewer?a=v&q=ca ... hsg_WYCLZA
after menuconfig it looks like the change is ok
here's the command I've been using
/usr/src$ fakeroot make-kpkg --append-to-version=.hz1000 kernel_image
So, can I just do some sort of make-deb-file from the newly created linux folder?
Can I just replace the old config file with the new one?
Or, somewhere I got the impression you can do this without installing a deb file.
Any ideas would be much appreciated.
I'm probably making some dumb mistake or two but I can't seem to get a .deb file out to install.
All I'm trying to do is change the system timer resolution from 250Hz to 1000Hz.
I followed instructions from these links; http://newbiedoc.sourceforge.net/system/kernel-pkg.html and https://docs.google.com/viewer?a=v&q=ca ... hsg_WYCLZA
after menuconfig it looks like the change is ok
Code: Select all
root@debian:/usr/src/linux# diff /boot/config-2.6.32-5-686 .config
3,4c3,4
< # Linux kernel version: 2.6.32
< # Mon Mar 26 03:57:35 2012
---
> # Linux kernel version: 2.6.32.hz1000
> # Tue Apr 17 05:45:44 2012
370c370
< CONFIG_HZ_250=y
---
> # CONFIG_HZ_250 is not set
372,373c372,373
< # CONFIG_HZ_1000 is not set
< CONFIG_HZ=250
---
> CONFIG_HZ_1000=y
> CONFIG_HZ=1000
root@debian:/usr/src/linux#
/usr/src$ fakeroot make-kpkg --append-to-version=.hz1000 kernel_image
So, can I just do some sort of make-deb-file from the newly created linux folder?
Can I just replace the old config file with the new one?
Or, somewhere I got the impression you can do this without installing a deb file.
Any ideas would be much appreciated.
-
- Posts: 199
- Joined: 2012-03-09 19:56
- Location: SoCal
- Has thanked: 52 times
- Been thanked: 1 time
Re: Kernel compile and install for newbies
@MHill: did you check my PM? was that any help to you? Sorry to cut into the How-to on the maiden post . . . .
e.e.p.
e.e.p.
Re: Kernel compile and install for newbies
I presume that make-kpkg is not creating a deb in the parent directory like it should?MarianHill wrote:Hello,
I'm probably making some dumb mistake or two but I can't seem to get a .deb file out to install.
All I'm trying to do is change the system timer resolution from 250Hz to 1000Hz.
...
after menuconfig it looks like the change is ok
here's the command I've been usingCode: Select all
root@debian:/usr/src/linux# diff /boot/config-2.6.32-5-686 .config 3,4c3,4 < # Linux kernel version: 2.6.32 < # Mon Mar 26 03:57:35 2012 --- > # Linux kernel version: 2.6.32.hz1000 > # Tue Apr 17 05:45:44 2012 370c370 < CONFIG_HZ_250=y --- > # CONFIG_HZ_250 is not set 372,373c372,373 < # CONFIG_HZ_1000 is not set < CONFIG_HZ=250 --- > CONFIG_HZ_1000=y > CONFIG_HZ=1000 root@debian:/usr/src/linux#
/usr/src$ fakeroot make-kpkg --append-to-version=.hz1000 kernel_image
So, can I just do some sort of make-deb-file from the newly created linux folder?
Can I just replace the old config file with the new one?
Or, somewhere I got the impression you can do this without installing a deb file.
Any ideas would be much appreciated.
In other words--does
Code: Select all
ls ../*.deb
If it didn't work, do this in the kernel source directory:
Code: Select all
make menuconfig #Change CONFIG_LOCALVERSION, and make sure that CONFIG_HZ is properly set
make deb-pkg #as previously discussed in this thread
It's possible to install a kernel without a deb, but if you don't know how, you would be risking an unbootable system; the deb has several hooks for the system to configure everything properly.
PS: FYI, it's also possible to install linux-image-rt-686-pae from backports.org, if you want a realtime kernel.
Thinkpad X100e/Debian Squeeze (All reposiories enabled)/Linux 3.4.11:
1GB RAM/1.6GHz Neo X2/ATI HD 3200/RTL8191SEVA2 wlan0, RTL8169 eth0
1GB RAM/1.6GHz Neo X2/ATI HD 3200/RTL8191SEVA2 wlan0, RTL8169 eth0
Re: Kernel compile and install for newbies
Why so may different ways to compile a kernel? And how do you know which method is best for what you're trying to acheive?
http://kernelnewbies.org/FAQ/KernelCompilation
make
make modules_install
make install
http://wiki.debian.org/HowToRebuildAnOf ... nelPackage
fakeroot make -f debian/rules.gen setup_i386_none_686
fakeroot make -f debian/rules.gen binary-arch_i386_none_686 binary-indep \
DEBIAN_KERNEL_JOBS=${NR_CPUS}
"I have no idea which of the many packages this creates to install"
Then this thread has
make-kpkg clean
make-kpkg --rootcmd fakeroot --initrd --revision=custom.001 kernel_image kernel_headers
dpkg -i *.deb
http://kernelnewbies.org/FAQ/KernelCompilation
make
make modules_install
make install
http://wiki.debian.org/HowToRebuildAnOf ... nelPackage
fakeroot make -f debian/rules.gen setup_i386_none_686
fakeroot make -f debian/rules.gen binary-arch_i386_none_686 binary-indep \
DEBIAN_KERNEL_JOBS=${NR_CPUS}
"I have no idea which of the many packages this creates to install"
Then this thread has
make-kpkg clean
make-kpkg --rootcmd fakeroot --initrd --revision=custom.001 kernel_image kernel_headers
dpkg -i *.deb
Re: Kernel compile and install for newbies
Or you can use module assitant if all you want to do is add a moduleIbidem wrote:Since it only disables modules, you can reconfigure the sources later to re-enable a driver, make modules, and install the modules (I've done this at least a couple times, it's not just speculation)..
http://wiki.debian.org/ModuleAssistant
- manishthatte
- Posts: 15
- Joined: 2014-05-12 02:46
Re: Kernel compile and install for newbies
I have just begun compiling my own kernel...version 3.15-rc7 for debian wheezy7.5
with local param settings.
This forum has been a tremendous help.
Hope this goes well.
Cheers !!!
with local param settings.
This forum has been a tremendous help.
Hope this goes well.
Cheers !!!
Taking baby steps in Debian
- manishthatte
- Posts: 15
- Joined: 2014-05-12 02:46
Re: Kernel compile and install for newbies
Finished. All went well till now.
Further steps after compiling:
1) sudo make modules_install
2) sudo make install
3) sudo depmod
4) sudo update-initramfs -c -k'(version number)'
5) Reboot
Further steps after compiling:
1) sudo make modules_install
2) sudo make install
3) sudo depmod
4) sudo update-initramfs -c -k'(version number)'
5) Reboot
Taking baby steps in Debian
- manishthatte
- Posts: 15
- Joined: 2014-05-12 02:46
Re: Kernel compile and install for newbies
And lastly, dont forget to update-grub
Taking baby steps in Debian
-
- Posts: 397
- Joined: 2009-02-27 04:59
- Location: Portland, OR USA
Re: Kernel compile and install for newbies
Have you guys been able to compile kernels since 3.14 ?
From vanilla sources, I keep getting this annoying error about a "recipe" for a driver failing, for more details see this:
http://forums.debian.net/viewtopic.php?f=5&t=117033
From vanilla sources, I keep getting this annoying error about a "recipe" for a driver failing, for more details see this:
http://forums.debian.net/viewtopic.php?f=5&t=117033