This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-users] Xen and megaraid Drivers CentOS 4

To: Andrew Turnbull <abturnbull@xxxxxxxxx>
Subject: Re: [Xen-users] Xen and megaraid Drivers CentOS 4
From: James Bulpin <james@xxxxxxxxxxxxx>
Date: Sat, 25 Jun 2005 10:37:34 +0100
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Sat, 25 Jun 2005 09:36:39 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <bff20ae2050624062450ee125c@xxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <bff20ae2050624062450ee125c@xxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

Any *binary* drivers supplied by a hardware vendor for a specific Linux distro will be for the (native) kernel that ships with that distro so won't generally work as-is with a Xen kernel.

SO we need to build the source. There are two options:

(1) use a driver in the Linux tree - I'm not sure if the current driver supports your particular card, perhaps someone else here can confirm? In fact I think our binary distribution has this already so if it doesn't work for you then the driver in 2.6.11 may not support your card.

(2) use source code supplied by LSI and build a module against the Xen kernel - this should generally work fine unless the vendor has cut corners with assumptions about the hardware platform.

To do (1):

* download the Xen source distribution. It is easiest to do a "make world" first so that everything is in position.
 * change into the dom0 linux build directory: cd linux-2.6.11-xen0
 * reconfigure the kernel using (e.g.): make ARCH=xen xconfig
 * select the megaraid driver.
 * change directory back up a level
* perform a make (*not* 'make world' as this will overwrite config changes)
 * reinstall the Xen0 kernel and modules

To do (2) *in general*:

 * unpack the driver source
* see the driver documentation to find out how to point it at the kernel headers, point this at <path to you xen tree>/linux-2.6.11-xen0/include/linux
 * make ARCH=xen

LSI ship DKMS (http://linux.dell.com/projects.shtml#dkms) style source. I've got doubts as to how well this works with the build mechanism for Xen kernels so an alternative approach would be to manually merge the LSI source into the Xen0 build tree. I just tried this using the following command sequence (having downloaded dr_linux_2.20.4.6_as40.zip to /tmp):

cd /tmp
unzip dr_linux_2.20.4.6_as40.zip
rpm2cpio \
  megaraid-v2.20.4.6-for-redhat-rhel-4-ga-kernel2.6.9-5.EL-x86.rpm \
  | cpio -idv
mv $MY_XEN_TREE/linux-2.6.11-xen0/drivers/scsi/megaraid \
cp -a /tmp/usr/src/megaraid-v2.20.4.6 \

The follow the steps for (1) above. This builds cleanly for me but I don't have this hardware to test.

If you choose to build the driver as a module then you'll need to:

depmod -a
mkinitrd /boot/initrd-

and add a grub module line for that initrd.


Andrew Turnbull wrote:
Hi there

I am managed to get Xen stable 2.0.6 working.

I have 1 IDE (PATA) drive and 2 SATA drives connected to a Megaraid 300-8X.

I have got everything working apart from I cannot figure out howto
recompile the Xen Kernel with the support for the megaraid drivers in

Furthermore I dont really know how to get the drivers into the correct
place to compile them. I have never really messed around with Kernels

The system is Centos 4, (RHEL 4) and the drivers are available on
www.lsilogic.com for this distro.

Thanks in advance

Xen-users mailing list

Xen-users mailing list