Fedora Linux Support Community & Resources Center
  #1  
Old 23rd August 2010, 09:42 PM
lovenemesis's Avatar
lovenemesis Offline
Registered User
 
Join Date: Apr 2008
Location: Leeds, UK
Posts: 281
linuxfirefox
Question [SOLVED]Kernel 2.6.35 without debugging code

Hello,

I have problem compiling nvidia 256.44 module with stock 2.6.35 kernel on F14. The error is like this:

http://forums.fedoraforum.org/showpo...4&postcount=43

After searching around the forum it looks like to be caused by the debugging code. So I downloaded the SRPM by
Code:
yum-downloader --source kernel
and installed it.

Then I use
Code:
rpmbuild --rebuild --without debug,debuginfo
to build the kernel RPM. However, the same error appears when attempted to compile nvidia.ko.

What should I do to get a vanilla kernel without debug so that the nvidia.ko could work?

Cheers,
__________________
Fedora Ambassador & Translator
Editor of LinuxTOY
Smolts Profile


Take a Deep Breath out of Windows

Last edited by lovenemesis; 25th August 2010 at 11:58 PM. Reason: Marked as solved
  #2  
Old 23rd August 2010, 09:54 PM
andrewthomas's Avatar
andrewthomas Offline
Registered User
 
Join Date: Feb 2010
Posts: 106
linuxfedorafirefox
Re: Kernel 2.6.35 without debugging code

get the source from http://kernel.org/
and compile (make sure you alter .config to remove debug)
  #3  
Old 23rd August 2010, 10:47 PM
lovenemesis's Avatar
lovenemesis Offline
Registered User
 
Join Date: Apr 2008
Location: Leeds, UK
Posts: 281
linuxfirefox
Re: Kernel 2.6.35 without debugging code

thanks!

But I am kind of prefer the RPM way. So it would be better if I could generate the kernel RPM without debug.

Me RPM obsessive ;p
__________________
Fedora Ambassador & Translator
Editor of LinuxTOY
Smolts Profile


Take a Deep Breath out of Windows
  #4  
Old 24th August 2010, 07:13 AM
chepioq's Avatar
chepioq Online
Registered User
 
Join Date: Jun 2007
Location: Aubagne France
Age: 58
Posts: 402
linuxfirefox
Re: Kernel 2.6.35 without debugging code

And I have one question:
In kernel.org, kernel 2.6.35.3 is stable marked.
When will we have a 2.6.36.kernel without debugging?
  #5  
Old 24th August 2010, 08:45 AM
leigh123linux's Avatar
leigh123linux Offline
Retired Administrator
 
Join Date: Oct 2006
Posts: 21,509
linuxfedorafirefox
Re: Kernel 2.6.35 without debugging code

Quote:
Originally Posted by chepioq View Post
And I have one question:
In kernel.org, kernel 2.6.35.3 is stable marked.
When will we have a 2.6.36.kernel without debugging?
You could try asking the fedora kernel devs as no one here will know.
  #6  
Old 24th August 2010, 10:38 AM
tox
Guest
 
Posts: n/a
windows_7mozilla
Re: Kernel 2.6.35 without debugging code

Quote:
Originally Posted by chepioq View Post
And I have one question:
In kernel.org, kernel 2.6.35.3 is stable marked.
When will we have a 2.6.36.kernel without debugging?
#freenode irc server and the #fedora-devel channel is your friend, ask in there
  #7  
Old 24th August 2010, 05:21 PM
droidhacker Offline
Registered User
 
Join Date: Oct 2009
Posts: 824
linuxfedorafirefox
Re: Kernel 2.6.35 without debugging code

Quote:
Originally Posted by lovenemesis View Post
thanks!

But I am kind of prefer the RPM way. So it would be better if I could generate the kernel RPM without debug.

Me RPM obsessive ;p
You apparently aren't aware of this, but you can issue a "make rpm" from the kernel source directory and it will build you an RPM. You then install the rpm, manually run mkinitrd, and add an entry to grub.conf.
  #8  
Old 24th August 2010, 08:07 PM
lovenemesis's Avatar
lovenemesis Offline
Registered User
 
Join Date: Apr 2008
Location: Leeds, UK
Posts: 281
linuxfirefox
Re: Kernel 2.6.35 without debugging code

thanks for the 'make rpm' hint. I guess I would try that.
__________________
Fedora Ambassador & Translator
Editor of LinuxTOY
Smolts Profile


Take a Deep Breath out of Windows
  #9  
Old 24th August 2010, 08:24 PM
AdamW's Avatar
AdamW Offline
Fedora QA Community Monkey
 
Join Date: Dec 2008
Location: Vancouver, BC
Posts: 3,768
linuxfedorafirefox
Re: Kernel 2.6.35 without debugging code

I haven't done it for a bit, but I think the simplest thing to do is 'install' the .src.rpm, edit the .spec file and change '%global released_kernel 0' to '%global release_kernel 1' and rebuild.
__________________
Adam Williamson | awilliam AT redhat DOT com
Fedora QA Community Monkey
IRC: adamw | Twitter: AdamW_Fedora | identi.ca: adamwfedora
http://www.happyassassin.net
  #10  
Old 24th August 2010, 08:54 PM
lovenemesis's Avatar
lovenemesis Offline
Registered User
 
Join Date: Apr 2008
Location: Leeds, UK
Posts: 281
linuxfirefox
Re: Kernel 2.6.35 without debugging code

Quote:
Originally Posted by AdamW View Post
I haven't done it for a bit, but I think the simplest thing to do is 'install' the .src.rpm, edit the .spec file and change '%global released_kernel 0' to '%global release_kernel 1' and rebuild.
No luck on that. It was set to 1 in stock F14 Alpha kernel.
__________________
Fedora Ambassador & Translator
Editor of LinuxTOY
Smolts Profile


Take a Deep Breath out of Windows
  #11  
Old 25th August 2010, 02:24 PM
vallimar Offline
Registered User
 
Join Date: Jul 2008
Posts: 811
windows_xp_2003chrome
Re: Kernel 2.6.35 without debugging code

I don't use variant kernels, so at the top of the spec, I changed 'baseonly' to '1'.
Then under the baseonly build section, I manually define debug, debuginfo to '0'.
I also disable either docs or perf, whichever isn't already disabled. That should be
enough as I recall, but I also use a customized .config file where I strip out all the
fat of things I can't use or won't use. If you need i686 PAE, then you will need to
adjust accordingly. I only build a base x86_64 kernel so it works fine for me.

---------- Post added at 09:24 AM CDT ---------- Previous post was at 09:05 AM CDT ----------

Quote:
Originally Posted by lovenemesis View Post
No luck on that. It was set to 1 in stock F14 Alpha kernel.
Also, I just recalled.. there are a couple of "release" variables.. One indicates that the kernel is a release kernel as issued on kernel.org.. meaning it isn't an rc or git kernel, but an official release. The other indicates whether or not the kernel is being built under released or devel distro conditions. For example, it would be set to release for an F13 kernel now, but not F14. I am not at home, so I cannot tell you which is the correct one you need to toggle. It should be pretty easy to figure out by reading the comments though. The distro one should change the debug bits, the other modifies some uninteresting bits.
  #12  
Old 25th August 2010, 10:17 PM
AdamW's Avatar
AdamW Offline
Fedora QA Community Monkey
 
Join Date: Dec 2008
Location: Vancouver, BC
Posts: 3,768
linuxfedorafirefox
Re: Kernel 2.6.35 without debugging code

oh, yeah, I think vallimar's hit it, I may have given the wrong variable name. Thanks.
__________________
Adam Williamson | awilliam AT redhat DOT com
Fedora QA Community Monkey
IRC: adamw | Twitter: AdamW_Fedora | identi.ca: adamwfedora
http://www.happyassassin.net
  #13  
Old 25th August 2010, 11:03 PM
vallimar Offline
Registered User
 
Join Date: Jul 2008
Posts: 811
linuxchrome
Re: Kernel 2.6.35 without debugging code

Got home and checked, the variable you need to toggle is debugbuildsenabled. Set it to 1 to build separate debug kernels. Should be able to set that, leave all else alone, and you'll have a kernel package usable for building Nvidia drivers.. at least.. after some long process of compiling. If you plan on making a habit of compiling kernels, I recommend you install ccache.
  #14  
Old 25th August 2010, 11:42 PM
lovenemesis's Avatar
lovenemesis Offline
Registered User
 
Join Date: Apr 2008
Location: Leeds, UK
Posts: 281
linuxfirefox
Re: Kernel 2.6.35 without debugging code

Ah, that debugbuildsenabled variable makes the difference ! thank you, vallimar!
__________________
Fedora Ambassador & Translator
Editor of LinuxTOY
Smolts Profile


Take a Deep Breath out of Windows
  #15  
Old 29th August 2010, 02:06 AM
Hansvon Offline
Registered User
 
Join Date: Apr 2009
Posts: 83
linuxfedorafirefox
Re: Kernel 2.6.35 without debugging code

I've rebuilt the kernel 2.6.35.4-12. I've bumped "baserelease" from 12 to 13 and debugbuildsenabled from 0 to 1. I have obtained an extra kernel-debug package so it seems it's working. I'm running my homemade 2.6.35.4-13 kernel.

I then tried to build the kernel module following this guide: http://forums.fedoraforum.org/showthread.php?t=237118

It fails at the "rpmbuild -ba nvidia-kmod.spec --define "kernels $(uname -r)" --target $(uname -m)" stage:
Code:
FATAL: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol 'debug_lockdep_rcu_enabled'
Hint?

Edit
OK, I should have googled before writing this message: http://www.nvnews.net/vbulletin/showthread.php?t=151258 . It seems LOCKDEP should be removed.
F14 kernels are built with
Code:
grep -i lockdep /boot/config-2.6.35.4-13.fc14.x86_64 
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_LOCKDEP=y
# CONFIG_DEBUG_LOCKDEP is not set
while F13
Code:
grep -i lockdep /boot/config-2.6.34.2-34.fc13.x86_64 
CONFIG_LOCKDEP_SUPPORT=y
I will try to disable config_lockdep thing...

---------- Post added at 10:06 AM CDT ---------- Previous post was at 07:56 AM CDT ----------

I can't disable the lockdep thing (tried to put CONFIG_LOCKDEP=n in config-generic) and rebuilt the rpm. Any help?

Last edited by Hansvon; 29th August 2010 at 12:08 AM.
 

Tags
code, debugging, kernel

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
debugging/ tracing no source code rebible Using Fedora 1 21st July 2008 04:47 PM
debugging kernel code dvddrive Using Fedora 0 21st November 2006 05:55 AM


Current GMT-time: 05:17 (Sunday, 26-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat