Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Experimenting with Linux kernel 3.0.0-rc1 on Gentoo
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
Krellan
n00b
n00b


Joined: 27 Aug 2010
Posts: 29

PostPosted: Tue May 31, 2011 5:49 am    Post subject: Experimenting with Linux kernel 3.0.0-rc1 on Gentoo Reply with quote

I successfully got Linux kernel 3.0.0-rc1 to work, on my existing Gentoo installation.

Downloaded from kernel.org, it built just fine. My existing 2.6.39 config file worked as a base for "make menuconfig" in the new kernel, to pick up defaults for any changes, as always.

The biggest stumbling block was getting third-party kernel modules to build. I'm reliant on two:

app-emulation/vmware-modules
x11-drivers/nvidia-drivers

There were slight problems getting each to build, mostly in silly version checks that did things like "if 2.6 then... else 2.4 then... else fail".

However, there is a similar version check bug in Gentoo's module build system. It's in this file:

/usr/portage/eclass/linux-mod.eclass

Here's a patch:

Code:

--- linux-mod.eclass.bak1   2011-05-30 21:27:04.000000000 -0700
+++ linux-mod.eclass   2011-05-30 21:41:30.000000000 -0700
@@ -195,8 +195,9 @@
 
    # if the kernel version is greater than 2.6.6 then we should use
    # M= instead of SUBDIRS=
-   [ ${KV_MAJOR} -eq 2 -a ${KV_MINOR} -gt 5 -a ${KV_PATCH} -gt 5 ] && \
-      return 0 || return 1
+   [ ${KV_MAJOR} -gt 2 ] && return 0
+   [ ${KV_MAJOR} -eq 2 -a ${KV_MINOR} -gt 5 -a ${KV_PATCH} -gt 5 ] && return 0
+   return 1
 }
 
 # @FUNCTION: convert_to_m
@@ -328,7 +329,7 @@
 set_kvobj() {
    debug-print-function ${FUNCNAME} $*
 
-   if kernel_is 2 6
+   if kernel_is ge 2 6
    then
       KV_OBJ="ko"
    else


This worked for me, and now "module-rebuild rebuild" works again.
Back to top
View user's profile Send private message
Krellan
n00b
n00b


Joined: 27 Aug 2010
Posts: 29

PostPosted: Tue May 31, 2011 6:03 am    Post subject: Reply with quote

If anybody else is interested, here's a patch I made for nvidia-drivers:

Code:

diff -urN work-OLD/kernel/conftest.sh work-NEW/kernel/conftest.sh
--- work-OLD/kernel/conftest.sh   2011-05-30 19:41:31.000000000 -0700
+++ work-NEW/kernel/conftest.sh   2011-05-30 19:47:23.000000000 -0700
@@ -76,7 +76,9 @@
 }
 
 build_cflags() {
-    BASE_CFLAGS="-D__KERNEL__ \
+    # Adding -Os optimizer option to work around rcupdate.h compiler bug, see here:
+    # http://choon.net/forum/read.php?21,82725
+    BASE_CFLAGS="-Os -D__KERNEL__ \
 -DKBUILD_BASENAME=\"#conftest$$\" -DKBUILD_MODNAME=\"#conftest$$\" \
 -nostdinc -isystem $ISYSTEM"
 
diff -urN work-OLD/kernel/nv-linux.h work-NEW/kernel/nv-linux.h
--- work-OLD/kernel/nv-linux.h   2011-05-16 23:32:19.000000000 -0700
+++ work-NEW/kernel/nv-linux.h   2011-05-30 19:46:06.000000000 -0700
@@ -34,6 +34,9 @@
 #  error This driver does not support 2.5 kernels!
 #elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 7, 0)
 #  define KERNEL_2_6
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0)
+/* For compatibility, pretend all kernels 3.0.0 and higher are "2.6" */
+#  define KERNEL_2_6
 #else
 #  error This driver does not support development kernels!
 #endif


This is for nvidia-drivers-270.41.19.ebuild, which works fine, all that was needed was the version check fix above.

Put this patch in another file, I called it "nvidia-linux-3.patch", and edit that into the ebuild file, just below the existing epatch line:

Code:

                epatch "${FILESDIR}"/256.35-unified-arch.patch
               
+               # NVidia's version check broke for kernel version 3.0.0
+               epatch "${FILESDIR}"/nvidia-linux-3.patch

                # If you set this then it's your own fault when stuff breaks :)
                use custom-cflags && sed -i "s:-O:${CFLAGS}:" "${NV_SRC}"/Makefile.*


Hope this helps anybody who's also experimenting with 3.0.0.

For VMware, no new changes were necessary, just the existing changes in the bug that's already open for 2.6.39:

https://bugs.gentoo.org/show_bug.cgi?id=368139

Josh
Back to top
View user's profile Send private message
Otamay
n00b
n00b


Joined: 04 Apr 2011
Posts: 18

PostPosted: Tue May 31, 2011 8:05 am    Post subject: Reply with quote

Just what I was looking for!

Linux 3.0 seems ok with nouveau, now I will try with nvidia. Not a big kernel change, but not seeing 2.6 number makes me feel strange xD.

Thanks for the nvidia patch!
Back to top
View user's profile Send private message
genstorm
Advocate
Advocate


Joined: 05 Apr 2007
Posts: 2352
Location: Austria

PostPosted: Tue May 31, 2011 6:46 pm    Post subject: Reply with quote

meh... I was hoping for an eclass/ebuild here ;)
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
ToeiRei
Veteran
Veteran


Joined: 03 Jan 2005
Posts: 1152
Location: Austria

PostPosted: Tue May 31, 2011 6:48 pm    Post subject: Reply with quote

I couldn't resist and tried to give it a shoot. No success here as it seems to ignore my ICH9 SATA controller (AHCI).
_________________
Blog | btrfs | Please stand by - The mailer daemon is busy burning your messages in hell...
Back to top
View user's profile Send private message
FrancoisVal
n00b
n00b


Joined: 12 May 2005
Posts: 56
Location: Namur, Belgique

PostPosted: Tue May 31, 2011 7:50 pm    Post subject: Reply with quote

I also tried kernel 3.0-rc1 yesterday and there seems to be a problem with modules stored in an initramfs image. Genkernel doesn't seems to load them. I tagged the kernel with 2.6.40-rc1 instead of 3.0-rc1 and all the modules I need were loaded (lvm, ex4 and ahci).
_________________
François Valenduc
Back to top
View user's profile Send private message
ToeiRei
Veteran
Veteran


Joined: 03 Jan 2005
Posts: 1152
Location: Austria

PostPosted: Tue May 31, 2011 9:40 pm    Post subject: Reply with quote

my SATA stuff is build in and ignored...
_________________
Blog | btrfs | Please stand by - The mailer daemon is busy burning your messages in hell...
Back to top
View user's profile Send private message
Krellan
n00b
n00b


Joined: 27 Aug 2010
Posts: 29

PostPosted: Wed Jun 01, 2011 7:04 am    Post subject: Reply with quote

FrancoisVal wrote:
I also tried kernel 3.0-rc1 yesterday and there seems to be a problem with modules stored in an initramfs image. Genkernel doesn't seems to load them. I tagged the kernel with 2.6.40-rc1 instead of 3.0-rc1 and all the modules I need were loaded (lvm, ex4 and ahci).


Wow, I didn't think of checking the initrd at all. When first setting up my Gentoo system, I was surprised to see that it did *not* use an initrd, which is kind of strange, since pretty much every other distribution except Gentoo requires it. No surprise there would be breakage there.

As for an ebuild, probably a good idea to wait until it's out of rc status, and becomes officially released as 3.0.0. There still seems to be plenty of bugs (today I tried to install it on a laptop and it complained about symbols in the power management driver, for example).
Back to top
View user's profile Send private message
Veldrin
Veteran
Veteran


Joined: 27 Jul 2004
Posts: 1942
Location: Zurich, Switzerland

PostPosted: Wed Jun 01, 2011 7:12 am    Post subject: Reply with quote

I guess is, that the code itself is not too buggy, but the sudden name/version changes causes some headaches in dependent packages (starting with genkernel, over to packages close to the kernel, like your power management)

I am currently at the stage, where it does not read the initrd, like FrancoisVal.
I could now either fix genkernel, or wait till a fix is published.


V.
_________________
read the portage output!
If my answer is too concise, ask for an explanation.
Back to top
View user's profile Send private message
tomk
Administrator
Administrator


Joined: 23 Sep 2003
Posts: 7219
Location: Sat in front of my computer

PostPosted: Wed Jun 01, 2011 1:47 pm    Post subject: Reply with quote

Moved from Kernel & Hardware to Unsupported Software as it's not in the Portage tree.
_________________
Search | Read | Answer | Report | Strip
Back to top
View user's profile Send private message
cruzki123
Apprentice
Apprentice


Joined: 16 May 2008
Posts: 233

PostPosted: Wed Jun 01, 2011 3:01 pm    Post subject: Reply with quote

I have ussing it in a laptop with ICH-9 without any problem but I don't use genkernel at all. All my ussual stuff works (I haven't tried yet the sd reader nor the webcam :P)
Back to top
View user's profile Send private message
gringo
Advocate
Advocate


Joined: 27 Apr 2003
Posts: 3706

PostPosted: Wed Jun 01, 2011 3:06 pm    Post subject: Reply with quote

yup, same here, everything works as expected as far as i can tell, im not using any out-of-tree drivers though.

cheers
Back to top
View user's profile Send private message
hedmo
l33t
l33t


Joined: 29 Aug 2009
Posts: 839
Location: halmstad

PostPosted: Wed Jun 01, 2011 10:26 pm    Post subject: Reply with quote

can someone post a quick howto for me.like to test it
Back to top
View user's profile Send private message
cruzki123
Apprentice
Apprentice


Joined: 16 May 2008
Posts: 233

PostPosted: Thu Jun 02, 2011 7:32 am    Post subject: Reply with quote

It's quite simple. The only diference with a normal procedure is that you have to download and untar the kernel manually.

Dowload the kernel full sources from kernel.org
Untar it in /usr/src/linux-3.0_rc1
Make the symbolic link ln -s linux-3.0_rc1 linux
configure your kernel
compile it
copy to /boot
Modify the /boot/grub/grub.conf to add the new kernel.
Back to top
View user's profile Send private message
hedmo
l33t
l33t


Joined: 29 Aug 2009
Posts: 839
Location: halmstad

PostPosted: Thu Jun 02, 2011 7:46 am    Post subject: Reply with quote

cruzki123


thanks for the fast reply.on it :lol:
Back to top
View user's profile Send private message
hedmo
l33t
l33t


Joined: 29 Aug 2009
Posts: 839
Location: halmstad

PostPosted: Thu Jun 02, 2011 9:12 am    Post subject: Reply with quote

its working grate so far.even gpu:

mybox ~ # glxinfo | grep OpenGL
OpenGL vendor string: X.Org R300 Project
OpenGL renderer string: Gallium 0.4 on ATI RV350
OpenGL version string: 2.1 Mesa 7.11-devel (git-2812b60)
OpenGL shading language version string: 1.20
OpenGL extensions:
mybox ~ # uname -a
Linux mybox 3.0.0-rc1 #1 SMP Thu Jun 2 10:16:01 GMT 2011 x86_64 AMD Opteron(tm) 64 Processor 244 AuthenticAMD GNU/Linux
mybox ~ #
Back to top
View user's profile Send private message
Loko123
Tux's lil' helper
Tux's lil' helper


Joined: 05 Feb 2011
Posts: 91

PostPosted: Thu Jun 02, 2011 10:19 am    Post subject: Reply with quote

Are there any advanteges in Kernel-3.0? What are the reasons for switching? :)

Loko123
Back to top
View user's profile Send private message
Veldrin
Veteran
Veteran


Joined: 27 Jul 2004
Posts: 1942
Location: Zurich, Switzerland

PostPosted: Thu Jun 02, 2011 11:53 am    Post subject: Reply with quote

more or less the as switching from 2.6.38 to 2.6.39.
keep in mind, that 3.0.0 is nothing else than a renamed 2.6.40 kernel!

V.
_________________
read the portage output!
If my answer is too concise, ask for an explanation.
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 2384

PostPosted: Thu Jun 02, 2011 11:57 am    Post subject: Reply with quote

Loko123 wrote:
Are there any advanteges in Kernel-3.0? What are the reasons for switching? :)


It's obviously much shinier than any of the 2.6 kernels.

At some point there will be compelling reasons for some given 3.x kernel, just like there are for some 2.6.x kernels. I personally happen to like to run latest'n'greatest kernels - it's the only part of my system that's routinely ~arch. Then again you could run brand new RedHat 6.1 with a 2.6.32 series kernel.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2424
Location: Germany

PostPosted: Thu Jun 02, 2011 12:28 pm    Post subject: Reply with quote

I usually use the latest kernel as well, but with 3.0, I'll wait until the dust settles down a bit. Or I might just cheat and name the kernel 2.6.40 anyway. Haha. :lol:

Way too many scripts are checking for 2.x still, and for now the version number is the only change with the new kernel, it's not like there are any must-haves in there, just regular updates. I expect it to take at least half a year until the various scripts can handle 3.x...
Back to top
View user's profile Send private message
hedmo
l33t
l33t


Joined: 29 Aug 2009
Posts: 839
Location: halmstad

PostPosted: Thu Jun 02, 2011 3:02 pm    Post subject: Reply with quote

frostschutz wrote:

Or I might just cheat and name the kernel 2.6.40 anyway. Haha. :lol:


how do i do a thing like that. 3.0.0-rc1 works good on my old box but i want it on my testing box.on my testing box i am using
ati-drivers so:


* Messages for package x11-drivers/ati-drivers-11.5-r1:

* You need a 2.6 linux kernel to compile against!
Back to top
View user's profile Send private message
hedmo
l33t
l33t


Joined: 29 Aug 2009
Posts: 839
Location: halmstad

PostPosted: Thu Jun 02, 2011 3:11 pm    Post subject: Reply with quote

frostschutz wrote:

Or I might just cheat and name the kernel 2.6.40 anyway. Haha. :lol:

thanks :!: :!: :!: bad boy :wink:

"Makefile" :twisted:
Back to top
View user's profile Send private message
Veldrin
Veteran
Veteran


Joined: 27 Jul 2004
Posts: 1942
Location: Zurich, Switzerland

PostPosted: Thu Jun 02, 2011 3:14 pm    Post subject: Reply with quote

I think editing the top Makefile (i.e /usr/src/linux/Makefile) should do the trick.
To be honest, I haven't tried it.

or in full verbose
Code:
cd /usr/src/
mv linux-3.0-rc1 linux-2.6.40-rc1
ln -snf linux-2.6.40-rc1 linux
cd linux
make clean
vim Makefile
make && make modules_install

Assuming that the original tree is located in linux-3.0-rc1 in /usr/src. if not, change as appropriate.

inside the make file you just want to edit the first few lines (i.e. VERSION, PATCHLEVEL, SUBLEVEL, EXTRAVERSION) to reflect the new version number.

HTH
V.
_________________
read the portage output!
If my answer is too concise, ask for an explanation.
Back to top
View user's profile Send private message
hedmo
l33t
l33t


Joined: 29 Aug 2009
Posts: 839
Location: halmstad

PostPosted: Thu Jun 02, 2011 4:49 pm    Post subject: Reply with quote

Veldrin


jepp just rename the top of the Makefile and it works.in that way i manage to install the ati-drivers on the 3.0.0-rc1 kernel


mybox ~ # uname -a
Linux mybox 2.6.99-3.0.0-rc1 #3 SMP Thu Jun 2 16:16:31 GMT 2011 x86_64 AMD Phenom(tm) II X6 1055T Processor AuthenticAMD GNU/Linux
mybox ~ #nano -w /usr/src/linux/Makefile


VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 99
EXTRAVERSION = -3.0.0-rc1
NAME = Sneaky Weasel
Back to top
View user's profile Send private message
genstorm
Advocate
Advocate


Joined: 05 Apr 2007
Posts: 2352
Location: Austria

PostPosted: Thu Jun 02, 2011 8:02 pm    Post subject: Reply with quote

As always, I'm patching my stable kernel forward to the 3.0_rc1 drm portion and that works really fine so far.
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum