Compiling MegaRAID module

Ganesh_Viswanathan@Dell.com Ganesh_Viswanathan at Dell.com
Wed Aug 13 16:38:01 CDT 2003


You only need to recompile the module. You will need the kernel source
though. However, you can compile on any machine and move the relevent file
(i.e. megaraid.o) to the target machine.

Let's assume we have the 2.4.20-8smp stock redhat kernel installed and need
megaraid for that:

1. First backup the following files:
  /lib/modules/2.4.20-8smp/kernel/drivers/scsi/megaraid.o
  /usr/src/linux-2.4/drivers/scsi/megaraid.c
  /usr/src/linux-2.4/drivers/scsi/megaraid.h
  /boot/initrd-2.4.20-8smp.img

2. Install kernel source rpm
  # rpm -ivh kernel-source-2.4.20-8.i386.rpm

3. Go to /usr/src/linux-2.4/ directory
  # cd /usr/src/linux-2.4/

4. Copy the megaraid driver source to the kernel to compile it.
  # cp megaraid.c drivers/scsi/.
  # cp megaraid.h drivers/scsi/.

5. Copy the redhat kernel config from the configs/ directory to .config
  # cp configs/kernel-2.4.20-i686-smp.config .config

6. Compile the driver
  # make oldconfig
  # make dep
  # make modules SUBDIRS=drivers/scsi/

7. Once all the modules are made, the megaraid.o file is installed
  # cp drivers/scsi/megaraid.o
/lib/modules/2.4.20-8smp/kernel/drivers/scsi/.

8. Check if the module is compiled properly
  # depmod -a 2.4.20-8smp -F /boot/System.map-2.4.20-8smp

9. Remake the initrd
  # mkinitrd -f /boot/initrd-2.4.20-8smp.img 2.4.20-8smp

10. Reboot

Replace the 2.4.20-8smp with whatever kernel you need to compile. If you
have a custom kernel, skip step 5 and the "make oldconfig" command in step
6.

Let us know if you have any trouble.

Thanks.

-----Original Message-----
From: syn uw [mailto:syn_uw at hotmail.com] 
Sent: Wednesday, August 13, 2003 2:49 PM
To: apalma at custodium.com; Linux-PowerEdge at dell.com
Subject: Re: Compiling MegaRAID module


Ok so how do you change the default driver in the kernel for the megaraid 
driver from ftp.lsil.com in the Linux kernel ? Or is there maybe a quick doc

or howto somewhere about that ?

I am planning to use the megaraid driver 1.18i as suggested by Matt Domsch 
himself.

Regards


>From: Álvaro Palma <apalma at custodium.com>
>To: Linux-PowerEdge at dell.com
>Subject: Re: Compiling MegaRAID module
>Date: Wed, 13 Aug 2003 14:10:38 -0400
>
>Mensaje citado por syn uw <syn_uw at hotmail.com>:
>
> > Hello,
> >
> > I just downloaded the MegaRAID Linux module driver from ftp.lsil.com 
> > now I've got one .h and one .c file but unfortunately no Makefiles. 
> > What is
>the
> > exact parameters which I need to pass to gcc to compile this driver 
> > ?
>
>Better than that, download a kernel source, change the default driver 
>for
>this
>one and compile the custom kernel. I tried to compile the driver 
>separately, but
>it didn't work, even after rebuild the RAMdisk, always got kernel panics at

>boot.
>
>BTW, what version of the megaraid driver did you download? I advice you 
>to
>try
>the 2.00.7 (patched for 2.4 kernels), it works a lot faster (aprox twice) 
>than 1.18.
>
>--
>Atte.
>Álvaro Palma
>
>_______________________________________________
>Linux-PowerEdge mailing list
>Linux-PowerEdge at dell.com 
>http://lists.us.dell.com/mailman/listinfo/linux-poweredge
>Please read the FAQ at http://lists.us.dell.com/faq or search the list
>archives at http://lists.us.dell.com/htdig/

_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail

_______________________________________________
Linux-PowerEdge mailing list
Linux-PowerEdge at dell.com
http://lists.us.dell.com/mailman/listinfo/linux-poweredge
Please read the FAQ at http://lists.us.dell.com/faq or search the list
archives at http://lists.us.dell.com/htdig/




More information about the Linux-PowerEdge mailing list