LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 10-01-2009, 03:58 AM   #1
solarfields
Member
 
Registered: Feb 2006
Location: Outer Shpongolia
Distribution: Slackware
Posts: 468

Rep: Reputation: 118Reputation: 118
[SOLVED] How to patch linux-2.6.27.31 kernel source to no-smp in Slackware 12.2?


Hi to all!
I am using slackware 12.2, all kept up-tp-date with slackpkg upgrade-all. I am using vmlinuz-generic-2.6.27.31 (no-SMP!) and all works well. However, I do have the following problem:

the linux-2.6.27.7-smp-to-nosmp.diff.gz patch found in /extra/linux-2.6.27.7-nosmp-sdk/ no longer works and I cannot switch the kernel source from SMP to non-SMP, since the version is no longer 2.6.27.7, but 2.6.27.31.

I was not able to find such a patch for 2.6.27.31. Can somebody suggest a solution?

I do need the kernel source in order to install ndiswrapper and fglrx. Using the SMP kernel is not an option, since my CPU heats as if it was constantly running at 100% (and it is not -- i checked with top). Reverting back to 2.6.27.7 is also not an option since something gets messed and I cannot mount my mobile phone as a regular USB storage device.

regards

---EDIT---

After some googling, i solved the problem. I am posting it here, hoping it may be useful. This is what I did:

just in case, because i had numerous unsuccessful attempts to configure properly the kernel source, i started with:

cd /usr/src/linux-2.6.27.31
make clean
make mrproper

---

then I did:

cd /lib/modules/2.6.27.31
ln -s /usr/src/linux-2.6.27.31 build
cd /usr/src/linux-2.6.27.31
make mrproper
cp /boot/config-generic-2.6.27.31 /usr/src/linux-2.6.27.31/.config
make oldconfig
make prepare
make scripts

REBOOT!

# ./ati-driver-installer-8-12-x86.x86_64.run

works

Last edited by solarfields; 10-10-2009 at 05:11 AM. Reason: solved
 
Old 10-01-2009, 07:07 AM   #2
gegechris99
Member
 
Registered: Oct 2005
Location: France
Distribution: Slackware 14.1 32bit
Posts: 720
Blog Entries: 3

Rep: Reputation: 76
Hello,

---- EDIT ------
sorry my suggestion doesn't work as you already mentioned the patch doesn't work.
---- EDIT ------


According the README file in the extra/linux-2.6.27-7-nosmp-sdk directory:

Quote:
To switch your unmodified Slackware kernel sources from SMP to non-SMP,
run the following script in this directory:
./patch-to-non-smp.sh
So you need to apply that script to the 2.6.27.31-smp kernel source and hope it works.

Last edited by gegechris99; 10-01-2009 at 07:10 AM. Reason: Sorry useless suggestion
 
Old 10-01-2009, 06:22 PM   #3
hotchili
Member
 
Registered: Sep 2009
Location: Germany
Distribution: slackware64-current
Posts: 69

Rep: Reputation: 17
Hello,

I haven't tested this, but if you look at the patch with zcat, it only changes some options in the
kernel config. So I would install the smp kernel source as normal, then go to /usr/src/linux-x.y.z
run make menuconfig, switch off smp... Maybe that is already enough for your driver(s) to build.
 
Old 10-10-2009, 08:28 PM   #4
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,441

Rep: Reputation: 70
For some reason when I switched to the newer kernel my laptop no longer completely halts on its own. I use APM by appending acpi=off to the kernel options. While my laptop (TP 600E) supports ACPI, APM works much better. [EDIT]Forgot to add "modprobe apm" to the new rc.modules file [/EDIT]

I was surprised that an update was not included for the smp-to-nosmp patch, but that is not the cause of my computer no longer halting without hitting the power button.

Last edited by shadowsnipes; 10-10-2009 at 08:48 PM.
 
Old 10-10-2009, 09:44 PM   #5
mudangel
Member
 
Registered: May 2008
Location: Ohio
Distribution: Slackware
Posts: 267

Rep: Reputation: 48
Quote:
Originally Posted by solarfields View Post
cd /lib/modules/2.6.27.31
ln -s /usr/src/linux-2.6.27.31 build
cd /usr/src/linux-2.6.27.31
make mrproper
cp /boot/config-generic-2.6.27.31 /usr/src/linux-2.6.27.31/.config
make oldconfig
make prepare
make scripts
I've never seen that set/sequence of commands(mainly referring to the link in modules and "make scripts") to build a kernel- where is it from?
Why would you need a patch to unset SMP when configuring a kernel?
 
Old 10-10-2009, 11:07 PM   #6
jedi_sith_fears
Member
 
Registered: Jan 2008
Location: Kolkata
Distribution: Slackware(64)-current, Fedora 14, FreeBSD
Posts: 136
Blog Entries: 1

Rep: Reputation: 29
Question

Why dont you just use the huge.s (non-smp) kernel from the stock and copy its configuration as you need.

If you use gconfig/xconfig to configure the kernel, you can just disable the SMP support there.

The question is SMP kernels behave pretty much good on non-SMP system. SO why whould you be needing it?
 
Old 10-11-2009, 03:33 AM   #7
Ilgar
Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware 14.1, Slackware64 14.1
Posts: 921

Rep: Reputation: 92
Can't you just do make menuconfig and turn the SMP option off? I think there's only one option to change in that menu, to go from SMP to non-SMP.
 
Old 10-11-2009, 07:48 AM   #8
solarfields
Member
 
Registered: Feb 2006
Location: Outer Shpongolia
Distribution: Slackware
Posts: 468

Original Poster
Rep: Reputation: 118Reputation: 118
/*
I've never seen that set/sequence of commands(mainly referring to the link in modules and "make scripts") to build a kernel- where is it from?
*/

it is from here: http://blogs.koolwal.net/2009/07/05/...e-compilation/

without make scripts, ndiswrapper didnt build

/*
Why would you need a patch to unset SMP when configuring a kernel?
*/

i need the kernel source in order to install ndiswrapper and fglrx and it should match the vmlinuz-generic-2.6.27.31 that i am using (no-smp)

/*
Why dont you just use the huge.s (non-smp) kernel from the stock and copy its configuration as you need.
*/

dont know, just copied the configuration file of the generic kernel

/*
The question is SMP kernels behave pretty much good on non-SMP system. SO why whould you be needing it?
*/

as i mentioned in my original post, due to some reason the SMP kernel makes my CPU heat all the time as if it were running constantly on 100%. I checked with top and the % usage appeared normal. However the heat (i am using a laptop) bothered me and the noise of the fan was driving me nuts

/*
Can't you just do make menuconfig and turn the SMP option off?
*/

what's the point of doing this by hand, if i use the .config of the generic no-smp kernel?

Last edited by solarfields; 10-11-2009 at 07:51 AM.
 
Old 10-11-2009, 08:36 AM   #9
jedi_sith_fears
Member
 
Registered: Jan 2008
Location: Kolkata
Distribution: Slackware(64)-current, Fedora 14, FreeBSD
Posts: 136
Blog Entries: 1

Rep: Reputation: 29
Cool

Quote:
Originally Posted by solarfields View Post
/*

/*
Why dont you just use the huge.s (non-smp) kernel from the stock and copy its configuration as you need.
*/

dont know, just copied the configuration file of the generic kernel

/*
The question is SMP kernels behave pretty much good on non-SMP system. SO why whould you be needing it?
*/

as i mentioned in my original post, due to some reason the SMP kernel makes my CPU heat all the time as if it were running constantly on 100%. I checked with top and the % usage appeared normal. However the heat (i am using a laptop) bothered me and the noise of the fan was driving me nuts

/*
Can't you just do make menuconfig and turn the SMP option off?
*/

what's the point of doing this by hand, if i use the .config of the generic no-smp kernel?
If you use the generic kernel, you need to make initrd.gz to boot.

If you use the 32-bit Slack13, you can find both the huge.s(non-SMP) & hugesmp.s kernels there.

Try to take the config and turn on cpu clock management and set it to "ondemand". This will make your machine run cooler.

By the way, what notebook are you using?

Last edited by jedi_sith_fears; 10-11-2009 at 08:38 AM.
 
Old 10-11-2009, 09:14 AM   #10
solarfields
Member
 
Registered: Feb 2006
Location: Outer Shpongolia
Distribution: Slackware
Posts: 468

Original Poster
Rep: Reputation: 118Reputation: 118
i am using slack 12.2, not 13

however when i tried slack 13, i got the same problem with the heat but this time with _both_ SMP and NOSMP kernels. the cpu clock management is automatically set to ONDEMAND by slack 13

my laptop is this one: http://support.packardbell.com/se/it...4M02568&t=1409

Last edited by solarfields; 10-11-2009 at 09:18 AM.
 
Old 10-11-2009, 10:44 AM   #11
mudangel
Member
 
Registered: May 2008
Location: Ohio
Distribution: Slackware
Posts: 267

Rep: Reputation: 48
Quote:
Originally Posted by solarfields View Post
/*
I've never seen that set/sequence of commands(mainly referring to the link in modules and "make scripts") to build a kernel- where is it from?
*/

it is from here: http://blogs.koolwal.net/2009/07/05/...e-compilation/

without make scripts, ndiswrapper didnt build
Oh, I see...I(for some reason) didn't realise you were building a module, not the kernel. Good link, too.


Quote:
Originally Posted by solarfields View Post
/*
Why would you need a patch to unset SMP when configuring a kernel?
*/

i need the kernel source in order to install ndiswrapper and fglrx and it should match the vmlinuz-generic-2.6.27.31 that i am using (no-smp)
The thing that's still confusing me- kernel source isn't specifically SMP/non-SMP... that's all up to your .config, so why not just copy the running kernel's config to the source directory, then do the steps you mentioned earlier?
I just don't see any need for a patch to change a config item- is there an argument in favor of that, instead of "make <menu/x/g>config"?
 
Old 10-11-2009, 11:27 AM   #12
jedi_sith_fears
Member
 
Registered: Jan 2008
Location: Kolkata
Distribution: Slackware(64)-current, Fedora 14, FreeBSD
Posts: 136
Blog Entries: 1

Rep: Reputation: 29
Cool

Quote:
Originally Posted by mudangel View Post
Oh, I see...I(for some reason) didn't realise you were building a module, not the kernel. Good link, too.




The thing that's still confusing me- kernel source isn't specifically SMP/non-SMP... that's all up to your .config, so why not just copy the running kernel's config to the source directory, then do the steps you mentioned earlier?
I just don't see any need for a patch to change a config item- is there an argument in favor of that, instead of "make <menu/x/g>config"?
I think what he wants to say that he need a patch for ndiswrapper to use and compile in non-SMP kernel.
 
Old 10-11-2009, 11:49 AM   #13
solarfields
Member
 
Registered: Feb 2006
Location: Outer Shpongolia
Distribution: Slackware
Posts: 468

Original Poster
Rep: Reputation: 118Reputation: 118
/*
why not just copy the running kernel's config to the source directory, then do the steps you mentioned earlier?
*/

i copied the generic config, etc, now everything is fine (as i wrote when i edited the original post)...
simply, before (when the kernel was 2.6.27.7, not 2.6.27.31), all i needed to do was to apply the patch mentioned above to the kernel source and then i had no problems to compile ndiswrapper and install ati's proprietary driver

i did not need a patch for ndiswrapper, i needed it for the kernel source (as i wrote above)

anyways, seems i am repeating myself

but if anyone has any idea of why my CPU behaves so strange when using the SMP kernel (and even the non-smp kernel in slack 13) -- please let me know
 
Old 10-11-2009, 12:26 PM   #14
jedi_sith_fears
Member
 
Registered: Jan 2008
Location: Kolkata
Distribution: Slackware(64)-current, Fedora 14, FreeBSD
Posts: 136
Blog Entries: 1

Rep: Reputation: 29
I have no idea why your CPU acting so weird. But another things I will suggest that you should give a try to latest 2.6.31.3 kernel. 2.6.30+ seems to fix many hardware issues.
 
Old 10-11-2009, 08:43 PM   #15
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,441

Rep: Reputation: 70
The patch does not change just the .config file, but several other files. These sources have to be configured using the correct .config file. You can't just uncheck smp either. You need to remove the local "-smp" version appended. Many other options change when smp is turned off, and in the end a lot of changes are made. Look at the nosmp patch in the Slackware tree to see what I mean.
 
  


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
RT Kernel patch and folding@ home SMP client ThunderRd Linux - Desktop 1 08-31-2009 11:12 AM
Kernel source for linux-smp-2.6.17.13? gbowden Slackware 3 11-28-2006 10:24 AM
CAN-2004-1335 : Linux kernel patch for the open source 2.4.28 kingkhan2006 Linux - Security 2 01-29-2006 05:31 PM
kernel source for 2.6.8-11-amd64-k8-smp sadarax Debian 1 09-21-2005 04:04 PM
Kernel-Patch Debian Logo 2.6.2 not correctly working for custom kernel 2.6.11 smp deepclutch Debian 3 06-27-2005 03:59 AM


All times are GMT -5. The time now is 11:39 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration