Skip to main content
Welcome guest. | Register | Login | Post

kernel


Over the last months there were repeating news about the murder on Nina Reiser by her husband Hans Reiser, known in the community for his work on his filesystems [url=http://en.wikipedia.org/wiki/Reis


This post might be of some interest to any GNU/Linux user who has a motherboard built for Intel Core 2 Duo processors, hence the title. The whole reason I went to compile my own kernel (and as suggested by dylunio) was basically lack of stable support for one of the common features of such motherboards: a JMicron PATA controller.

Here's the story. Many (if not most) Core 2 Duo compatible motherboards (such as ones from Asus and Gigabyte) come with an Intel 965P Express chipset which *does not* have native support for PATA drives. PATA is short for Parallel ATA and is apparently recently called that to differentiate from SATA, which is Serial ATA, a standard that is increasingly being pushed as a replacement for PATA. Since Intel 965P chipset natively supports only SATA, motherboard manufacturers resort to adding a special controller to allow for one PATA IDE port for those who still have old disk and CD/DVD drives (like me). This controller is the JMicron, or JMB controller that we are talking about here.

Since this is all still quite new support for this hasn't been available until Linux kernel 2.6.18, and even there it isn't quite stable, as I have discovered. My board is Gigabyte 965P DS3 and I have been getting short temporary freezes throughout the normal use of my system. The freezes actually happen when it does an "ATAPI reset". I have described the problem in this forum thread where I also posted the output of messages I got when the reset (and a freeze) happened. Because of this, burning CDs also failed.

This problem has apparently been solved in kernels 2.6.19 and upwards. I have decided to compile the latest one, 2.6.21.1, but that was a bad decision. As I later found out this kernel has disabled support for the onboard ethernet controller (which is also used on most similar C2D boards), the currently infamous Marvell 88E8056, because it was causing data corruption and instability on many boards. It has been disabled until the solution for this is found.

However, as it turns out, not everyone experienced these problems. The problem seems to be limited to Gigabyte motherboards, but from my experience not all of them either. It probably depends a lot on the way you use your ethernet connection. If you don't use it heavily and speeds aren't generally above 100Mbit/s then you may be fine. There is a way to re-enable this driver in the latest kernel by uncommenting the "ifdef broken" lines in /usr/src/linux-2.6.21.1/drivers/net/sky2.c, but I'm not sure if that's all you have to do since it didn't quite work for me.

What I would recommend instead is the 2.6.20.9 kernel which has this driver enabled and yet also has JMicron problems ironed out. I would say that at this point, 2.6.20.9 kernel is probably the best bet for any user of a Core 2 Duo based systems with a Intel's 965 series of chipsets.

For your convenience here is what you need to enable to have support for your JMicron controller and your Marvell ethernet:

JMicron:

  • Device Drivers --->
  • Serial ATA (prod) and Parallel ATA (experimental) drivers --->
  • <*> JMicron PATA support
  • <*> AHCI SATA support (also recommended)
  • Device Drivers --->
  • ATA/ATAPI/MFM/RLL support --->
  • generic/default IDE chipset support
  • JMicron JMB36x support
  • Generic PCI IDE Chipset Support (just in case)
  • Include IDE/ATAPI CDROM support (just in case for CD support)

It is recommended to enable AHCI for your drives in your BIOS.

Marvell ethernet:

  • Device Drivers --->
  • Network device support --->
  • Ethernet (1000 Mbit) --->
  • <*> New SysKonnect GigaEthernet support
  • <*> SysKonnect Yukon2 support (EXPERIMENTAL)
  • <*> Marvell Yukon Chipset / SysKonnect SK-98xx Support (although I believe this is Yukon2, it can't hurt to enable this one too, just in case)

So there, I hope this may be helpful to some. I bet there will be only more and more users with these sort of motherboards and while support will almost certainly improve, it'll be useful to people compiling their own kernels for these systems.

My kernel dance was quite a ride. I compiled the 2.6.21.1 kernel at least two times, and then after deciding to go with 2.6.20.9 about four times. This was mostly because either I missed to enable some options or the compile got borked. To those who may be asking whether they really need to do a make-kpkg clean every time they make a configuration change, I would recommend yes. It just seems to be the safest way, and if you possibly can wait these 20 minutes or so doing something else it can't hurt.

Also for convenience, the process of compiling and recompiling a kernel in debian is as follows (2.6.20.9 in this example):

  • Download a kernel image: wget -c ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.20.9.tar.bz2
  • Go to /usr/src/ and extract it there: cd /usr/src/ && tar xvjf /home/you/linux-2.6.20.9.tar.bz2
  • Configure it (this is where you also have to enable the above for Marvell and JMicron): make menuconfig
  • Clean up and compile: make-kpkg clean && fakeroot make-kpkg --initrd --revision=nameyourkernel-v1.0 kernel_image
  • Install the resulting Debian package (which will automatically generate boot stuff like System.map, initrd and grub configuration): dpkg -i ../linux-image-2.6.20.9_liberdeb.2_amd64.deb
  • Update bootloader: grub-install /dev/hda (/dev/hda may be something else on your install, it has to be the HD you boot from)
  • Reboot and hope for the best. Smiling

The above steps reflect the "Debian way" of compiling a kernel, as instructed here. It works well though.

If you end up needing to recompile it is good to move your previous kernel installation out of the way. You can do it by either renaming the /lib/modules/2.6.20.9/kernel/ directory (for example mv /lib/modules/2.6.20.9/kernel /lib/modules/2.6.20.9/kernel.1) or removing the previous kernel installation (like this rm -R /lib/modules/2.6.20.9/). The latter might be acceptable if you don't care to keep the old compilation (with old settings) around, and just want a new fixed one.

These instructions might be all redundant, but hey.. it's nice to have it all in one place, right?

So any fellow Core 2 Duo system users, feel free to share your experiences below. Smiling

Thanks

Some references:


Kernel-developer Greg Kroah-Hartman has started a project to provide more drivers for Linux.
He offers hardware-manufacturers that free (conforming to the GPL!) drivers will be programmed and maintained for their hardware for free!

Panic!


I really do hate my wireless network device. It really causes so many problems but at least it gives me a free net connection and sometimes a good connection. Smiling

Lately it has been giving me kernel panics on network scanning though and is really annoying me. Especially how I lose my uptime.

I had two whole days and seven hours! (it's not much, but it's a start. Sticking out tongue)

Anyhow, I'm done.

S'ya later,

spyro_boy