This is a discussion on Compiling with 2.6.x SMP kernel - Where are source and headers, etc.? within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> I just installed Slackware 11 with the 2.6.x SMP kernel. To be specific, I installed kernel-generic-smp-2.6.17.13-i686-1.tgz and kernel-modules-smp-2.6.17.13-i686-1.tgz from ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I just installed Slackware 11 with the 2.6.x SMP kernel. To be specific, I installed kernel-generic-smp-2.6.17.13-i686-1.tgz and kernel-modules-smp-2.6.17.13-i686-1.tgz from /slackware-current/extra/linux-smp-2.6.17.13/. What do I need to compile packages from source (I need to compile ndiswrapper)? I'm assuming I need the kernel source and kernel headers. There is a kernel headers package kernel-headers-smp-2.6.17.13-i386-1.tgz in /extra/linux-smp-2.6.17.13/ but it is for i386 rather than i686. There is no kernel source package in /extra/linux-smp-2.6.17.13/ but there is a package kernel-source-2.6.17.13-noarch-1.tgz in /extra/linux-2.6.17.13. Which of these packages, if any, are appropriate for compiling from source in my install? And do I need anything else? Robert |
| |||
| On Tue, 19 Sep 2006 18:22:26 -0400, Robert Glueck <rglk@web.de> wrote: >I just installed Slackware 11 with the 2.6.x SMP kernel. To >be specific, I installed >kernel-generic-smp-2.6.17.13-i686-1.tgz and >kernel-modules-smp-2.6.17.13-i686-1.tgz from >/slackware-current/extra/linux-smp-2.6.17.13/. > >What do I need to compile packages from source (I need to >compile ndiswrapper)? I'm assuming I need the kernel source >and kernel headers. Don't need the 2.6 headers -- I'd suggest copying the source to normal user and learn how to do custom kernels 'properly'... Which is not the slackware method, and not entirely necessary, remember to append a unique tag to your kernel so you get a completely parallel custom kernel, and can boot either. Install slackware's 2.6.17.13 source, then as user: mkdir kernel; cd kernel; cp -a /usr/src/linux-2.6.17.13 linux-2.6.17.13a cd linux-2.6.17.13a make menuconfig +------------------------------------- General setup -------------------------------------+ ¦ Arrow keys navigate the menu. <Enter> selects submenus --->. Highlighted letters are ¦ ¦ hotkeys. Pressing <Y> includes, <N> excludes, <M> modularizes features. Press ¦ ¦ <Esc><Esc> to exit, <?> for Help, </> for Search. Legend:[*] built-in [ ] excluded ¦ ¦ <M> module < > module capable ¦ ¦ +-------------------------------------------------------------------------------------+ ¦ ¦ ¦ (a) Local version - append to kernel release ¦ ¦ ¦ ¦ [ ] Automatically append version information to the version string ¦ ¦ Add an 'a' (or whatever you fancy) to make your shiny new kernel different. I suggest you use a custom /root/bin/installkernel script, see: <http://bugsplatter.mine.nu/bash/kernel/installkernel-latest.gz> for the one I use, gets called by the kernel build 'make install' step and does 2.4 and 2.6 series kernel installs. Finally, my style of /etc/lilo.conf: $ cat /etc/lilo.conf # /etc/lilo.conf for slackware-11.0 on sempro -- 2006-09-17 # boot = /dev/hda root = /dev/hda1 read-only compact prompt timeout = 50 #default = 2.6.17.13a #default = 2.6.16.29a #default = 2.4.34-pre2 default = 2.4.33.3a image = /boot/bzImage-2.6.17.13a label = 2.6.17.13a optional image = /boot/bzImage-2.6.16.29a label = 2.6.16.29a optional image = /boot/bzImage-2.4.34-pre2 label = 2.4.34-pre2 optional image = /boot/bzImage-2.4.33.3a label = 2.4.33.3a optional image = /boot/vmlinuz-ide-2.4.33.3 label = Slack Never lose the slackware kernel, marking custom kernels as optional suits my build system -- I do kernel testing for 2.4 and 2.6 series, here: <http://bugsplatter.mine.nu/test/>. Kwan Lowe's Kernel Rebuild Guide: <http://www.digitalhermit.com/linux/kernel.html>. Grant. -- http://bugsplatter.mine.nu/ |
| |||
| Thanks for your reply, Grant. I believe you misunderstood my query: I wasn't asking about how to compile custom kernels but rather what do I need to have installed on my system (which runs under the 2.6.x SMP kernel) so as to be able to compile applications, utilities etc. from source. I want to make sure that if I need the kernel sources and headers that they are matched to my kernel. Robert |
| |||
| On Tue, 19 Sep 2006 20:03:46 -0400, Robert Glueck <rglk@web.de> wrote: >Thanks for your reply, Grant. I believe you misunderstood >my query: Okay, sorry. >... I >want to make sure that if I need the kernel sources and >headers that they are matched to my kernel. Install 2.6 headers after reading the warning -- I did on one box and it compile boots 2.4.34-pre3 okay recompiled, expected Prior to this I always used the 2.4 headers -- no problems. Grant. -- http://bugsplatter.mine.nu/ |
| |||
| Robert Glueck wrote: > ... I want to make sure that if I need the kernel sources and > headers that they are matched to my kernel. (assuming I understand you correctly ...) Install the kernel-headers package: you need the headers that match those that libc was compiled with, not the kernel. Any packages (such as third-party device drivers) that require kernel-specific headers "know" (in my experience) where to find them. I hope that helps ... -- ---------------------------------------------------------------------- Sylvain Robitaille syl@alcor.concordia.ca Systems and Network analyst Concordia University Instructional & Information Technology Montreal, Quebec, Canada ---------------------------------------------------------------------- |
| |||
| Robert Glueck <rglk@web.de> wrote: > There is a kernel headers package > kernel-headers-smp-2.6.17.13-i386-1.tgz in > /extra/linux-smp-2.6.17.13/ but it is for i386 rather than > i686. There is no kernel source package in > /extra/linux-smp-2.6.17.13/ but there is a package > kernel-source-2.6.17.13-noarch-1.tgz in > /extra/linux-2.6.17.13. Neither the headers nor the source are specific to any kernel, they can be used to create ALL of the kernels. > Which of these packages, if any, are appropriate for > compiling from source in my install? And do I need anything > else? Normally: just install the kernel-source-2.6.17.13-noarch-1.tgz package but use the config from /boot that came WITH your specific kernel as a starting point if you want your own modifications. This can be done with: cp /boot/config /usr/src/linux/.config (assuming all of the symbolic links have been set, which installpkg will normally do). -- ************************************************** ****************** ** Eef Hartman, Delft University of Technology, dept. EWI/TW ** ** e-mail: E.J.M.Hartman@math.tudelft.nl, fax: +31-15-278 7295 ** ** snail-mail: P.O. Box 5031, 2600 GA Delft, The Netherlands ** ************************************************** ****************** |
| |||
| Eef Hartman wrote: > Robert Glueck <rglk@web.de> wrote: >> There is a kernel headers package >> kernel-headers-smp-2.6.17.13-i386-1.tgz in >> /extra/linux-smp-2.6.17.13/ but it is for i386 rather than >> i686. There is no kernel source package in >> /extra/linux-smp-2.6.17.13/ but there is a package >> kernel-source-2.6.17.13-noarch-1.tgz in >> /extra/linux-2.6.17.13. > > Neither the headers nor the source are specific to any kernel, > they can be used to create ALL of the kernels. > >> Which of these packages, if any, are appropriate for >> compiling from source in my install? And do I need anything >> else? > > Normally: just install the kernel-source-2.6.17.13-noarch-1.tgz > package but use the config from /boot that came WITH your specific > kernel as a starting point if you want your own modifications. > This can be done with: > cp /boot/config /usr/src/linux/.config > (assuming all of the symbolic links have been set, which installpkg > will normally do). Thanks for your reply, Eef. I'm a little confused: if the header packages are not specific to any kernel why does Slackware offer two header packages for the 2.6.17.13 kernel, i.e. extra/linux-2.6.17.13/kernel-headers-2.6.17.13-i386-1.tgz extra/linux-smp-2.6.17.13/kernel-headers-smp-2.6.17.13-i386-1.tgz In any case, since I'm using a dual core processor, I've used installpkg to install the following packages, on top of a fresh install of Slackware 11 with the default sata.i kernel v.2.4.33.3 from -current as of 9/11/06: extra/linux-smp-2.6.17.13/kernel-generic-smp-2.6.17.13-i686-1.tgz extra/linux-smp-2.6.17.13/kernel-modules-smp-2.6.17.13-i686-1.tgz extra/linux-smp-2.6.17.13/kernel-headers-smp-2.6.17.13-i386-1.tgz extra/linux-2.6.17.13/kernel-source-2.6.17.13-noarch-1.tgz The /usr/src/linux/.config file is headed with "Linux kernel version: 2.6.17.13" whereas the /boot/config file is headed with "Linux kernel version: 2.6.17.13-smp", and diff shows that there are plenty of differences between them. Hence, I ran # cp /boot/config /usr/src/linux/.config, as you suggested. Am I all set now to compile ndiswrapper from source? Robert |
| |||
| Eef Hartman wrote: > Normally: just install the kernel-source-2.6.17.13-noarch-1.tgz > package but use the config from /boot that came WITH your specific > kernel as a starting point if you want your own modifications. > This can be done with: > cp /boot/config /usr/src/linux/.config > (assuming all of the symbolic links have been set, which installpkg > will normally do). I tried to compile ndiswrapper v.1.23 from source but didn't succeed in getting a working version. I got this compile time message; I don't know how critical this is: *** WARNING: This kernel seems to use 4K stack size option (CONFIG_4KSTACKS); many Windows drivers will not work with this option enabled. Disable CONFIG_4KSTACKS option, recompile and install kernel. The user land utility "ndiswrapper" that I compiled installed my Windows wireless driver fine but running 'modprobe ndiswrapper' to install the ndiswrapper kernel module gave this error: FATAL: Error inserting ndiswrapper (/lib/modules/2.6.17.13-smp/misc/ndiswrapper.ko): Invalid module format The ndiswrapper Wiki FAQ says that this message indicates a kernel module compilation issue. The following conditions must be fulfilled for a successful compile of the module: 1. The kernel running should have been compiled from the same sources as ndiswrapper is. 2. The compiler used for compiling the kernel should be the same as the one used to compile ndiswrapper. 3. If a precompiled kernel is used, one should make sure that the kernel sources have the exact same kernel configuration as was used for compiling the kernel. Re 1: As I said before, I've not been able find the sources for the kernel-generic-smp-2.6.17.13-i686 that I'm running. The closest I was able to get to that was with extra/linux-2.6.17.13/kernel-source-2.6.17.13-noarch-1.tgz. That's what I installed in /usr/src/linux, and presumably those are the sources that I compiled ndiswrapper with. Hence there seems to be a mismatch here, but is it critical? Re 2: That condition presumably is fulfilled (gcc-3.4.6 in both cases). Re 3: Well, there was a mismatch between /usr/src/linux/.config and /boot/config but I overwrote the former with the latter (cp /boot/config-generic-smp-2.6.17.13 /lib/modules/2.6.17.13-smp/build/.config). Presumably /boot/config was used to compile my kernel, and the identical /usr/src/linux/.config is now in the kernel sources directory. Perhaps the biggest clue is what dmesg says: ndiswrapper: version magic '2.6.17.13 mod_unload 486 gcc-3.4' should be '2.6.17.13-smp SMP mod_unload 686 gcc-3.4' To recap, the following packages are installed on my system now: extra/linux-smp-2.6.17.13/kernel-generic-smp-2.6.17.13-i686-1.tgz extra/linux-smp-2.6.17.13/kernel-modules-smp-2.6.17.13-i686-1.tgz extra/linux-smp-2.6.17.13/kernel-headers-smp-2.6.17.13-i386-1.tgz extra/linux-2.6.17.13/kernel-source-2.6.17.13-noarch-1.tgz Questions: Is the problem that I used kernel-source-2.6.17.13-noarch-1.tgz when I should have used specific kernel sources for kernel-generic-smp-2.6.17.13-i686 that unfortunately don't seem to be available? Or is it just a matter of changing a few incorrect CONFIG entries in a kernel config file? Robert |
| |||
| On Wed, 20 Sep 2006 22:38:37 -0400, Robert Glueck <rglk@web.de> wrote: >1. The kernel running should have been compiled from the >same sources as ndiswrapper is. And slackware uses 'vanilla' kernel source from kernel.org. >2. The compiler used for compiling the kernel should be the >same as the one used to compile ndiswrapper. Yep >3. If a precompiled kernel is used, one should make sure >that the kernel sources have the exact same kernel >configuration as was used for compiling the kernel. > >Re 1: As I said before, I've not been able find the sources >for the kernel-generic-smp-2.6.17.13-i686 that I'm running. Came with slackware. >The closest I was able to get to that was with >extra/linux-2.6.17.13/kernel-source-2.6.17.13-noarch-1.tgz. That's right. > That's what I installed in /usr/src/linux, and presumably >those are the sources that I compiled ndiswrapper with. >Hence there seems to be a mismatch here, but is it critical? No mismatch, you ignore the first error message. You have some reading to do before you can understand the answers, sorry I cannot help. Grant. -- http://bugsplatter.mine.nu/ |
| ||||
| Grant wrote: [snip] > You have some reading to do before you can understand the > answers, sorry I cannot help. > > Grant. I readily admit that I don't understand much about the different kernel versions and how to compile them but can you give me some help toward solving this by explaining the dmesg output ndiswrapper: version magic '2.6.17.13 mod_unload 486 gcc-3.4' should be '2.6.17.13-smp SMP mod_unload 686 gcc-3.4' Doesn't this indicate a mismatch or misconfiguration somewhere in my install? How do I correct it? Robert |