Friday, 22 January 2010

NetXtreme II BCM5716 on Ubuntu 8.04

The Ubuntu 8.04 kernels support the NetXtreme II BCM5709 chips (PCI ID 14e4:163a) but not the BCM5716 (PCI ID 14e4:163b). According to this comment, it's possible to use the BCM5716 with said kernel by merely adding the corresponding PCI ID to the source and recompiling the kernel module (bnx2.ko).

Since Dell R210's contain the BCM5716 chip we needed a workable solution for running Ubuntu 8.04 on these systems. Manually recompiling a kernel module just doesn't seem very practicable - it would have to be recompiled every time a new kernel version is installed (ie: apt-get dist-upgrade). Instead, we created a initramfs hook that patches the existing bnx2 module. This script replaces the PCI ID for the BCM5709 with the PCI ID for the BCM5716 in the bnx2 kernel module. The patched kernel module loads and works nicely on our R210's.

Installation is easy:

  • download this file and copy it to /etc/initramfs-tools/hooks/bnx2
  • mark the file as executable: chmod 755 /etc/initramfs-tools/hooks/bnx2
  • update the initramdisk for the running kernel: dpkg-reconfigure linux-image-`uname -r`
From there on, all installed kernel updates automatically contain support for the BCM5716 - no more borked systems after kernel upgrades (because a recompiled module won't load in other kernel versions).

Closing note: yes, I realize that using sed for patching the kernel module isn't technically sophisticated - but it does the job.

Update: With some help from Jurrit (who left a question about it not working on Debian), we've figured out the Issue on Debian: Debian's modprobe implementation does not prefer kernel modules located in /lib/modules/`uname -r`/updates over kernel modules located elsewhere in the module directory subtree. Thus, I've created a Debian-specific version of this hook.

Posted by Jürgen Pabel on 22 January 2010 at 13:09

 

[Trackback URL for this entry]

Comment: Wouter van Eekelen at Sun, 24 Jan 2:28 AM

I'm trying this on Debian 5.0 (kernel 2.6.26) and I'm getting this error:

bnx2: Can't load firmware file bnx2-09-4.0.5.fw
bnx2: probe of 0000:01:00.1 failed with error -2

NIC is Broadcom NetXtreme II BCM5716 Gigabit Ethernet (rev20)
Any idea?

Comment: Juergen Pabel at Sun, 24 Jan 3:13 PM

Dear Wouter,

Debian decided to remove all non-free components from their standard software catalog. The bnx2 driver used by their kernel relies on proprietary firmware code and that firmware is not included in your installation. You need to install the package "firmware-bnx2" from the "non-free" Debian package repository and than re-run dpkg-reconfigure linux-image-`uname -r` in order to update your kernel's initrd for booting.

HTH,
Jürgen

Comment: sunta at Mon, 25 Jan 4:56 PM

jürgen, your initramfs-hint is great, worked like a charm

thank you

Comment: inigoml at Thu, 4 Feb 11:38 AM

Thank you, Jürgen.

Works perfectly with Ubuntu 8.04 server LTS 64bit in my new Dell R410.

Comment: Zen at Thu, 11 Feb 4:30 PM

Good tip, but I can't get it to work with a fresh debian lenny 5.0.4 amd64 installation. What is wrong?

- install server without network
- reboot
- put bnx2 file in /etc/initramfs-tools/hooks/bnx2 + chmod
- install firmware-bnx2_0.14+lenny2_all.deb
- dpkg-reconfigure linux-image-`uname -r`

It errors with bnx2: Can't load firmware file bnx2-09-4.0.5.fw

I also tried it with the backported firmware: firmware-bnx2_0.17~bpo50+1_all.deb

Comment: Mark at Thu, 18 Feb 5:21 AM

Even the latest Lenny 5.04 stable installer (with kernel 2.6.26-2 rev 21lenny3) doesn't yet have the PCI IDs required to load the drivers. Here is some useful info:

1) http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=565353
2) http://www.mail-archive.com/debian-kernel@lists.debian.org/msg52571.html
3) http://wiki.debian.org/HowToRebuildAnOfficialDebianKernelPackage

I've just spent the last 2 days working out how to roll my own Debian installer image with a patched kernel. All this work just to get some tiny changes into bnx2.ko and preseed the firmware :) I've uploaded a working Debian Lenny a netinstall image for amd64 (to megaupload, sorry!):
http://www.megaupload.com/?d=8O5D782S

I'll post the link to the i386 image as soon as it's finished uploading.

For anybody just looking for an install image containing the bnx2 firmware, this is for you too. Well, it works for me - YMMV.

btw, the next point release (5.0.5) of Lenny will work without any of these problems.

Comment: Mark at Thu, 18 Feb 12:08 PM

i386 Debian Lenny 5.0.4 netinstall image with BCM5716 patch:
http://www.megaupload.com/?d=3B9W1MHP

Comment: Juergen Pabel at Thu, 18 Feb 1:55 PM

Mark,

while your work is certainly appreciated, there's a small catch to it: it's a one-time fix. Any time your kernel gets updated (ie: via apt-get) the support for the BCM5716 is lost - my initramfs-hook solution doesn't have that restriction. Keep up the good work.

Jürgen

Comment: Mark at Thu, 18 Feb 1:59 PM

@Juergen, yeah I know. I've stated a warning about that in the README file. However, "the next point release (5.0.5) of Lenny will work without any of these problems.". This should be happening in the next few weeks, so only a one time fix is needed!

Comment: zyarif at Mon, 10 May 11:33 AM

That's exactly what i need ! Thanks a lot.

But it doesn't work on my R210. I use a specific kernel (based on 2.6.24-27). the initramdisk update gives the following message :
Not updating initrd symbolic links since we are being updated/reinstalled (2.6.24-27.65eole1 was configured last, according to dpkg)

Thanks for help

Comment: Rene at Fri, 21 May 12:36 PM

Thanks for the Info Jürgen and Thaks Mark! Your Install Image is exactly what we needed until 5.05! As Megaupload is sort of annoying i mirrored the Images: http://outpost.flashfingaz.de/~smash/iso/

Your comment:

(not displayed)
 
 

Live Comment Preview:

 
« First  « Prev   1 2 3 4 5   Next »  Last »
« January »
MonTueWedThuFriSatSun
    123
45678910
11121314151617
18192021222324
25262728293031