View Full Version : Kernel 2.6.35 without debugging code
lovenemesis
23rd August 2010, 09:42 PM
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/showpost.php?p=1378584&postcount=43
After searching around the forum it looks like to be caused by the debugging code. So I downloaded the SRPM by yum-downloader --source kernel and installed it.
Then I use 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,
andrewthomas
23rd August 2010, 09:54 PM
get the source from http://kernel.org/
and compile (make sure you alter .config to remove debug)
lovenemesis
23rd August 2010, 10:47 PM
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
chepioq
24th August 2010, 07:13 AM
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?
leigh123linux
24th August 2010, 08:45 AM
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.
tox
24th August 2010, 10:38 AM
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
droidhacker
24th August 2010, 05:21 PM
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.
lovenemesis
24th August 2010, 08:07 PM
thanks for the 'make rpm' hint. I guess I would try that. ;)
AdamW
24th August 2010, 08:24 PM
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.
lovenemesis
24th August 2010, 08:54 PM
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.
vallimar
25th August 2010, 02:24 PM
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 ----------
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.
AdamW
25th August 2010, 10:17 PM
oh, yeah, I think vallimar's hit it, I may have given the wrong variable name. Thanks.
vallimar
25th August 2010, 11:03 PM
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.
lovenemesis
25th August 2010, 11:42 PM
Ah, that debugbuildsenabled variable makes the difference ! thank you, vallimar!
Hansvon
29th August 2010, 02:06 AM
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:
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
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
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?
mohaas05
31st August 2010, 04:48 AM
I managed to get around that by removing the GPL check from modpost.c and recompiling it (as described here: https://bugs.launchpad.net/ubuntu/+source/openafs/+bug/129480/comments/1).
I've managed to build the akmod, but it refuses to load. A look through dmesg shows this:
nvidia: Unknown symbol debug_lockdep_rcu_enabled (err 0)
So I guess lockdep is still holding it up.
Hansvon
31st August 2010, 05:21 AM
I personally gave up:
- install latest Fedora 13 kernel: http://koji.fedoraproject.org/koji/packageinfo?packageID=8
- disable systemd, add "init=/sbin/upstart" to the kernel line in /etc/grub.conf (/cgroup vs /sys/fs/cgroup problem)
- build 256.52 driver (this version brings compatibility with X.org 1.9?)
- write a /etc/X11/xorg.conf (rpmfusion tools are broken? python 2.7 problem?)
If somebody wants my .src.rpm and I guess very generic xorg.conf: http://hansvon.homelinux.org/nvidia-256.52/
Based on http://forums.fedoraforum.org/showthread.php?t=237118 (thanks leigh123linux and rpm fusion people).
You can build the source rpm with:
rpmbuild --rebuild nvidia-kmod-256.52-1.fc14.src.rpm --define "kernels $(uname -r)" --target $(uname -m)
rpmbuild --rebuild xorg-x11-drv-nvidia-256.52-1.fc14.src.rpm
Maybe, you need to change $(uname -r) with the f13 kernel (if you're not running it already).
Everything seems to be working fine, except that I get error messages about screen resolution when gnome starts (but resolution is OK).
mohaas05
31st August 2010, 05:25 AM
I wish I could do that, but the reason I'm using F14 in the first place is that it contains the sata patch for the 2010 MacBook Pros.
Would simply removing "CONFIG_LOCKDEP=y" be sufficient to build without lockdep?
Hansvon
31st August 2010, 05:31 AM
I've tried but without success (see my previous message). I probably did it wrong... I would be happy to test F14 kernel and systemd.
sangu
1st September 2010, 04:50 PM
Building a non-debugging kernel : https://fedoraproject.org/wiki/Building_a_non-debugging_kernel I used this page. And sucess!
* (as root) # yum install fedpkg fedora-packager rpmdevtools
* # yum-builddep kernel
* (as your user) $ fedpkg co -B -a kernel ( Add -a option anonymous user )
* $ cd kernel/f14
* kernel/f14 $ make release
* kernel/f14 $ fedpkg local
* kernel/f14/x86_64 # yum localinstall --nogpgcheck ./kernel-$version.rpm
$ uname -r
2.6.35.4-14.fc14.x86_64
$ dmesg | grep NVIDIA
ACPI: DSDT 00000000afee3280 0A1B2 (v01 NVIDIA ASUSACPI 00001000 MSFT 03000000)
nvidia: module license 'NVIDIA' taints kernel.
NVRM: loading NVIDIA UNIX x86_64 Kernel Module 256.53 Fri Aug 27 20:27:48 PDT 2010
Hansvon
2nd September 2010, 03:20 AM
Thanks! That worked!
mohaas05
3rd September 2010, 02:39 AM
I get this when I try to make:
#@perl -pi -e 's/CONFIG_KGDB_KDB=y/# CONFIG_KGDB_KDB is not set/'
config-nodebug
#@perl -pi -e 's/CONFIG_KDB_KEYBOARD=y/# CONFIG_KDB_KEYBOARD is not set/'
config-nodebug
Hansvon
3rd September 2010, 02:42 AM
I also got this message. The actual build is done in the next command (fedpkg local), "make release" is instantaneous.
mohaas05
3rd September 2010, 02:42 AM
Ah so it is. Thanks.
dwightpaige79
4th September 2010, 06:23 PM
I'm trying to do this. When I run 'kernel/f14 $ fedpkg local' I'm getting:
drivers/infiniband/hw/nes/nes_hw.c:1973:24: warning: operation on 'nesvnic->nic.sq_tail' may be undefined
make[3]: *** No rule to make target `drivers/input/misc/appleir.c', needed by `drivers/input/misc/appleir.o'. Stop.
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [drivers/input/misc] Error 2
make[1]: *** [drivers/input] Error 2
make: *** [drivers] Error 2
make: *** Waiting for unfinished jobs....
+ exit 1
error: Bad exit status from /var/tmp/rpm-tmp.t9fobM (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.t9fobM (%build)
And I don't seem to have any rpm built. Of course with that error I expected that... Any ideas how to trouble shoot this?
I'm leaving town for weekend will be back sometime Monday.
chepioq
4th September 2010, 06:37 PM
I have same result:
make[3]: *** No rule to make target `drivers/input/misc/appleir.c', needed by `drivers/input/misc/appleir.o'. Stop.
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [drivers/input/misc] Error 2
make[1]: *** [drivers/input] Error 2
make: *** [drivers] Error 2
make: *** Waiting for unfinished jobs....
net/ipv4/netfilter/nf_nat_standalone.c: In function 'nf_nat_fn':
net/ipv4/netfilter/nf_nat_standalone.c:118:2: warning: case value '4' not in enumerated type 'enum ip_conntrack_info'
net/ipv4/netfilter/ipt_CLUSTERIP.c: In function 'clusterip_tg':
net/ipv4/netfilter/ipt_CLUSTERIP.c:323:3: warning: case value '4' not in enumerated type 'enum ip_conntrack_info'
net/mac80211/scan.c: In function 'ieee80211_request_internal_scan':
net/mac80211/scan.c:749:23: warning: comparison between 'enum nl80211_band' and 'enum ieee80211_band'
net/netfilter/nf_conntrack_netlink.c: In function 'ctnetlink_parse_tuple':
net/netfilter/nf_conntrack_netlink.c:762:11: warning: comparison between 'enum ctattr_tuple' and 'enum ctattr_type'
+ exit 1
erreur: Mauvais status de sortie pour /var/tmp/rpm-tmp.3MULbQ (%build)
Erreur de construction de RPM:
Mauvais status de sortie pour /var/tmp/rpm-tmp.3MULbQ (%build)
[dominique@208 f14]$
I do this build twice for same result...
xheliox
5th September 2010, 09:32 AM
I personally gave up:
- install latest Fedora 13 kernel: http://koji.fedoraproject.org/koji/packageinfo?packageID=8
- disable systemd, add "init=/sbin/upstart" to the kernel line in /etc/grub.conf (/cgroup vs /sys/fs/cgroup problem)
- build 256.52 driver (this version brings compatibility with X.org 1.9?)
- write a /etc/X11/xorg.conf (rpmfusion tools are broken? python 2.7 problem?)
If somebody wants my .src.rpm and I guess very generic xorg.conf: http://hansvon.homelinux.org/nvidia-256.52/
Based on http://forums.fedoraforum.org/showthread.php?t=237118 (thanks leigh123linux and rpm fusion people).
You can build the source rpm with:
rpmbuild --rebuild nvidia-kmod-256.52-1.fc14.src.rpm --define "kernels $(uname -r)" --target $(uname -m)
rpmbuild --rebuild xorg-x11-drv-nvidia-256.52-1.fc14.src.rpm
Maybe, you need to change $(uname -r) with the f13 kernel (if you're not running it already).
Everything seems to be working fine, except that I get error messages about screen resolution when gnome starts (but resolution is OK).This is finally what I ended up doing. Best solution thus far.. thanks for the tip.
Hansvon
5th September 2010, 12:32 PM
Here's the non-debug kernel I've obtained using the method described by sangu above: http://hansvon.homelinux.org/kernel-f14-woutdebug/
The x86_64 package is working:
[root@sanma ~]# uname -a
Linux sanma 2.6.35.4-15.fc14.x86_64 #1 SMP Thu Sep 2 09:11:27 JST 2010 x86_64 x86_64 x86_64 GNU/Linux
[root@sanma ~]# dmesg | grep NVIDIA
nvidia: module license 'NVIDIA' taints kernel.
NVRM: loading NVIDIA UNIX x86_64 Kernel Module 256.53 Fri Aug 27 20:27:48 PDT 2010
I guess you can rebuild the src.rpm if you need the i686 package (rpmbuild --rebuild rpm).
leigh123linux
5th September 2010, 12:46 PM
I personally gave up:
- install latest Fedora 13 kernel: http://koji.fedoraproject.org/koji/packageinfo?packageID=8
- disable systemd, add "init=/sbin/upstart" to the kernel line in /etc/grub.conf (/cgroup vs /sys/fs/cgroup problem)
- build 256.52 driver (this version brings compatibility with X.org 1.9?)
- write a /etc/X11/xorg.conf (rpmfusion tools are broken? python 2.7 problem?)
If somebody wants my .src.rpm and I guess very generic xorg.conf: http://hansvon.homelinux.org/nvidia-256.52/
Based on http://forums.fedoraforum.org/showthread.php?t=237118 (thanks leigh123linux and rpm fusion people).
You can build the source rpm with:
rpmbuild --rebuild nvidia-kmod-256.52-1.fc14.src.rpm --define "kernels $(uname -r)" --target $(uname -m)
rpmbuild --rebuild xorg-x11-drv-nvidia-256.52-1.fc14.src.rpmMaybe, you need to change $(uname -r) with the f13 kernel (if you're not running it already).
Everything seems to be working fine, except that I get error messages about screen resolution when gnome starts (but resolution is OK).
I have updated the nvidia guide .
1. bumped version to 256.53
2. merged some rpmfusion changes (it now edits grub.conf to blacklist nouveau).
dwightpaige79
6th September 2010, 10:56 PM
I have same result:
make[3]: *** No rule to make target `drivers/input/misc/appleir.c', needed by `drivers/input/misc/appleir.o'. Stop.
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [drivers/input/misc] Error 2
make[1]: *** [drivers/input] Error 2
make: *** [drivers] Error 2
make: *** Waiting for unfinished jobs....
net/ipv4/netfilter/nf_nat_standalone.c: In function 'nf_nat_fn':
net/ipv4/netfilter/nf_nat_standalone.c:118:2: warning: case value '4' not in enumerated type 'enum ip_conntrack_info'
net/ipv4/netfilter/ipt_CLUSTERIP.c: In function 'clusterip_tg':
net/ipv4/netfilter/ipt_CLUSTERIP.c:323:3: warning: case value '4' not in enumerated type 'enum ip_conntrack_info'
net/mac80211/scan.c: In function 'ieee80211_request_internal_scan':
net/mac80211/scan.c:749:23: warning: comparison between 'enum nl80211_band' and 'enum ieee80211_band'
net/netfilter/nf_conntrack_netlink.c: In function 'ctnetlink_parse_tuple':
net/netfilter/nf_conntrack_netlink.c:762:11: warning: comparison between 'enum ctattr_tuple' and 'enum ctattr_type'
+ exit 1
erreur: Mauvais status de sortie pour /var/tmp/rpm-tmp.3MULbQ (%build)
Erreur de construction de RPM:
Mauvais status de sortie pour /var/tmp/rpm-tmp.3MULbQ (%build)
[dominique@208 f14]$
I do this build twice for same result...
Yeah, I've done this twice with same result also...
---------- Post added at 04:56 PM CDT ---------- Previous post was at 04:45 PM CDT ----------
Here's the non-debug kernel I've obtained using the method described by sangu above: http://hansvon.homelinux.org/kernel-f14-woutdebug/
The x86_64 package is working:
[root@sanma ~]# uname -a
Linux sanma 2.6.35.4-15.fc14.x86_64 #1 SMP Thu Sep 2 09:11:27 JST 2010 x86_64 x86_64 x86_64 GNU/Linux
[root@sanma ~]# dmesg | grep NVIDIA
nvidia: module license 'NVIDIA' taints kernel.
NVRM: loading NVIDIA UNIX x86_64 Kernel Module 256.53 Fri Aug 27 20:27:48 PDT 2010
I guess you can rebuild the src.rpm if you need the i686 package (rpmbuild --rebuild rpm).
I'm x86_64 so I'm going to try those. Many thanks.
dwightpaige79
11th September 2010, 07:55 PM
I did a fresh install of F 14 x86_64 using BFO CD. And I got non debugging kernel to build and nvidia installed.
$ uname -a
Linux localhost.localdomain 2.6.35.4-25.fc14.x86_64 #1 SMP Sat Sep 11 09:21:17 CDT 2010 x86_64 x86_64 x86_64 GNU/Linux
$ dmesg | grep NVIDIA
ACPI: DSDT 00000000cdef3240 081E6 (v01 NVIDIA ASUSACPI 00001000 MSFT 03000000)
nvidia: module license 'NVIDIA' taints kernel.
NVRM: loading NVIDIA UNIX x86_64 Kernel Module 260.19.04 Thu Sep 2 18:45:06 PDT 2010
From sysinfo:/
Display Info
Vendor: NVIDIA Corporation
Model: GeForce 6150/PCI/SSE2
Driver: 2.1.2 NVIDIA 260.19.04
Now I've got a F 14 system with reasonable resolution and no flashing windows or screens and fewer crashes.
kto
13th September 2010, 05:21 PM
I built a non-debugging kernel using the fedora wiki. That worked fine. But using the nvidia-driver does not work, because I get the wrong version for (a)kmod-nvidia. It should be 256.53 and not 195.36.31. Do I have to install the nvidia-driver using the one from nvidia.com or is there a way I do not know about?
leigh123linux
13th September 2010, 05:38 PM
I built a non-debugging kernel using the fedora wiki. That worked fine. But using the nvidia-driver does not work, because I get the wrong version for (a)kmod-nvidia. It should be 256.53 and not 195.36.31. Do I have to install the nvidia-driver using the one from nvidia.com or is there a way I do not know about?
http://forums.fedoraforum.org/showthread.php?t=237118
kto
13th September 2010, 06:13 PM
Thanks a lot Leigh...
The installation worked fine, and after the reboot everything looked good until I tried glxinfo. Instead of the expected output I got this:
X Error of failed request: BadWindow (invalid Window parameter)
Major opcode of failed request: 138 (NV-GLX)
Minor opcode of failed request: 4 ()
Resource id in failed request: 0x2a00003
Serial number of failed request: 30
Current serial number in output stream: 30I am sure, that the nvidia driver is running and I have no idea what this means. Any ideas?
edit: There are some errors in dmesg:
# dmesg | grep -i nvidia
nvidia: module license 'NVIDIA' taints kernel.
nvidia 0000:01:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
nvidia 0000:01:00.0: setting latency timer to 64
NVRM: loading NVIDIA UNIX x86_64 Kernel Module 260.19.04 Thu Sep 2 18:45:06 PDT 2010
init[1]: nvidia.service: control process exited, code=exited status=1
init[1]: Unit nvidia.service entered failed state.So the nvidia driver is not working at all. But which driver am I using at the moment? Is there a way to find that out? According to lsmod the nvidia kmod is loaded.
edit2: Some of the colors look funny. I am using the "Dust" style and the orange-brown color that is used for highlighting menu entries is now extremely bright, the rest seems normal.
dwightpaige79
19th September 2010, 09:29 PM
Having trouble getting new nondebugging rpm's to install:
root@localhost x86_64]# ls
kernel-2.6.35.4-28.fc14.x86_64.rpm kernel-debuginfo-common-x86_64-2.6.35.4-28.fc14.x86_64.rpm
kernel-debug-2.6.35.4-28.fc14.x86_64.rpm kernel-devel-2.6.35.4-28.fc14.x86_64.rpm
kernel-debug-debuginfo-2.6.35.4-28.fc14.x86_64.rpm kernel-headers-2.6.35.4-28.fc14.x86_64.rpm
kernel-debug-devel-2.6.35.4-28.fc14.x86_64.rpm perf-2.6.35.4-28.fc14.x86_64.rpm
kernel-debuginfo-2.6.35.4-28.fc14.x86_64.rpm
# yum localinstall --nogpgcheck ./kernel-2.6.35.4-28.fc14.x86_64.rpmLoaded plugins: fastestmirror, langpacks, presto, refresh-packagekit
Adding en_US to language list
Setting up Local Package Process
Examining ./kernel-2.6.35.4-28.fc14.x86_64.rpm: kernel-2.6.35.4-28.fc14.x86_64
./kernel-2.6.35.4-28.fc14.x86_64.rpm: does not update installed package.
Nothing to do
What did I do wrong?
Edit:
# uname -a
Linux localhost.localdomain 2.6.35.4-28.fc14.x86_64 #1 SMP Wed Sep 15 01:56:54 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux
Hansvon
20th September 2010, 01:16 AM
You're already running 2.6.35.4-28 (installed from Fedora, with debug).
You need to remove this kernel and install the one you built.
dwightpaige79
20th September 2010, 02:18 AM
You're already running 2.6.35.4-28 (installed from Fedora, with debug).
You need to remove this kernel and install the one you built.
Then I should have mentioned that I'm in a fresh install of KDE-Live and only have the one kernel. Where do I get another kernel so I can do this?
Hansvon
20th September 2010, 02:23 AM
Pick a old one on koji: http://koji.fedoraproject.org/koji/packageinfo?packageID=8
Or maybe, you can force the installation (rpm -Uvh --force). Install an old one is much safer...
dwightpaige79
20th September 2010, 02:30 AM
Pick a old one on koji: http://koji.fedoraproject.org/koji/packageinfo?packageID=8
Or maybe, you can force the installation (rpm -Uvh --force). Install an old one is much safer...
Thanks. I was Scroogling and trying to find where koji keeps the old kernel packages as I got your post.
leigh123linux
24th September 2010, 12:05 PM
Thread closed as the extra debugging has been disabled in kernel-2.6.35.5-31 +
b2fxhtWf
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.