Backporting the CCISS driver to Red Hat 6.2 Stock Kernel
Updated January 06, 2003
Created December 11, 2002


Autogenerated Site Map
Search this Site!:
Search this site powered by FreeFind

This is a work in progress, use at your own risk. Not fully tested yet.


Here I backport the cciss driver to RH62 stock kernel 2.2.14-5.0BOOT

Install RH62 (server)
Install kernel-source + development stuff (
1. glibc-2.1.3-15.i386.rpm
2. ncurses-5.0-11.i386.rpm
3. kernel-headers-2.2.14-5.0.i386.rpm
4. kernel-source-2.2.14-5.0.i386.rpm
5. glibc-devel-2.1.3-15.i386.rpm
6. cpp-1.1.2-30.i386.rpm
7. make-3.78.1-4.i386.rpm
8. ncurses-devel-5.0-11.i386.rpm
9. egcs-1.1.2-30.i386.rpm
10. egcs-objc-1.1.2-30.i386.rpm
11. dev86-x.x.x-x.i386.rpm (contains the x86 Assembler)
)

[root@localhost src]# for X in glibc ncurses kernel-headers kernel-source glibc-devel cpp make ncurses-devel egcs egcs-objc dev86; do rpm -q $X; done
glibc-2.1.3-15
ncurses-5.0-11
kernel-headers-2.2.14-5.0
kernel-source-2.2.14-5.0
glibc-devel-2.1.3-15
cpp-1.1.2-30
make-3.78.1-4
ncurses-devel-5.0-11
egcs-1.1.2-30
egcs-objc-1.1.2-30
dev86-0.15.0-2

grab the linux-2.2.22 kernel
rpm -hUv /mnt/cdrom/RedHat/RPMS/wget-1.5.3-6.i386.rpm
wget -m http://www.kernel.org/pub/linux/kernel/v2.2/linux-2.2.22.tar.bz2.sign
wget -m http://www.kernel.org/pub/linux/kernel/v2.2/linux-2.2.22.tar.bz2

Unpack the 2.2.22 kernel
cat linux-2.2.22.tar.bz2 | bunzip2 | tar -xvf -
cd linux
find . -type f | grep -i cciss
find . -type f -exec grep -Hi ciss \{\} \; | grep -vi scissor

Here's the files I copied over to my RH62 stock kernel tree
cp -a Documentation/cciss.txt /usr/src/linux/Documentation/.
cp -a Documentation/mkdev.cciss /usr/src/linux/Documentation/.
cp -a drivers/block/cciss.c /usr/src/linux/drivers/block/.
cp -a drivers/block/cciss.h /usr/src/linux/drivers/block/.
cp -a drivers/block/cciss_cmd.h /usr/src/linux/drivers/block/.
cp -a drivers/scsi/cpqioctl.c /usr/src/linux/drivers/scsi/.
cp -a include/linux/cciss_ioctl.h /usr/src/linux/include/linux/cciss_ioctl.h

then I had to copy/paste a couple of sections from the following files:
include/linux/pci.h
include/linux/major.h
drivers/block/genhd.c

Here's the patch on these files:
[root@localhost src]# for X in include/linux/pci.h include/linux/major.h drivers/block/genhd.c; do diff -Naur linux-2.2.14/$X linux-2.2.14-cciss/$X; done

--- linux-2.2.14/include/linux/pci.h Tue Mar 7 19:35:26 2000 +++ linux-2.2.14-cciss/include/linux/pci.h Wed Dec 11 09:43:56 2002 @@ -294,6 +294,8 @@ #define PCI_DEVICE_ID_COMPAQ_NETEL100D 0xae40 #define PCI_DEVICE_ID_COMPAQ_NETEL100PI 0xae43 #define PCI_DEVICE_ID_COMPAQ_NETEL100I 0xb011 +#define PCI_DEVICE_ID_COMPAQ_CISS 0xb060 +#define PCI_DEVICE_ID_COMPAQ_CISSB 0xb178 #define PCI_DEVICE_ID_COMPAQ_THUNDER 0xf130 #define PCI_DEVICE_ID_COMPAQ_NETFLEX3B 0xf150 --- linux-2.2.14/include/linux/major.h Tue Mar 7 19:24:43 2000 +++ linux-2.2.14-cciss/include/linux/major.h Wed Dec 11 09:24:15 2002 @@ -105,6 +105,15 @@ #define SPECIALIX_NORMAL_MAJOR 75 #define SPECIALIX_CALLOUT_MAJOR 76 +#define COMPAQ_CISS_MAJOR 104 +#define COMPAQ_CISS_MAJOR1 105 +#define COMPAQ_CISS_MAJOR2 106 +#define COMPAQ_CISS_MAJOR3 107 +#define COMPAQ_CISS_MAJOR4 108 +#define COMPAQ_CISS_MAJOR5 109 +#define COMPAQ_CISS_MAJOR6 110 +#define COMPAQ_CISS_MAJOR7 111 + #define DASD_MAJOR 94 /* Official assignations from Peter */ #define LVM_CHAR_MAJOR 109 /* Logical Volume Manager */ --- linux-2.2.14/drivers/block/genhd.c Tue Mar 7 19:24:43 2000 +++ linux-2.2.14-cciss/drivers/block/genhd.c Wed Dec 11 09:05:10 2002 @@ -1450,6 +1450,9 @@ { extern void console_map_init(void); extern void cpqarray_init(void); +#ifdef CONFIG_BLK_CPQ_CISS_DA + extern int cciss_init(void); +#endif #ifdef CONFIG_PARPORT extern int parport_init(void); #endif @@ -1479,6 +1482,9 @@ #endif #ifdef CONFIG_BLK_CPQ_DA cpqarray_init(); +#endif +#ifdef CONFIG_BLK_CPQ_CISS_DA + cciss_init(); #endif #ifdef CONFIG_NET net_dev_init();
[root@localhost src]#
Then I proceeded to build the kernel as follows:
1. cd /usr/src/linux-2.2.14
2. vi Makefile - changed "EXTRAVERSION = " value to be -5.0BOOT
3. make mrproper
4. cp -a configs/kernel-2.4.14-i386.config arch/i386/defconfig
5. yes | make oldconfig
6. make menuconfig - just save and exit
6a. I grabbed to correct info from drivers/block/Makefile to add in the cciss driver as follows:
cat drivers/block/Makefile | grep -i cpq_ciss | sed -e 's,^.*(,,' -e 's,).*$,,' | head -1 \
| tr '\n' ' ' | sed -e 's, *$,,'; echo '=m' >> .config
Here's the line that gets added to the very bottom of .config:
CONFIG_BLK_CPQ_CISS_DA=m
and move it up in the .config to just below "CONFIG_BLK_CPQ_DA=m"
7. make clean
8. make dep
9. make bzImage
10. make modules
11. make modules_install


You should get a clean build from this.


Next proceed to place it on a drivers diskette or integrate it into boot.img or bootnet.img


Instructions for integrating into drivers / boot.ing / bootnet.img go here.

Basically modifying any of these images is really simple. Make avid use of the "file" command. Anything that is gzip compressed, then gunzip it. Anything that is gzipped cpio, then undo that with a "cat modules.cgz | gunzip | cpio -idvm". Anything that is a filesystem can be loop mounted: "mkdir boot.img.dir; mount boot.img boot.img.dir -o loop"

So a short run would look like this:
mkdir unpack
cd unpack
cp -a /mnt/cdrom/images/boot.img .
mkdir boot.img.dir
mount boot.img boot.img.dir -o loop
mv boot.img.dir/initrd.img initrd.img.gz
gunzip initrd.img.gz
mkdir initrd.img.dir
mount initrd.img initrd.img.dir -o loop
mv initrd.img.dir/modules/modules.cgz .
mkdir modules.cgz.dir
cd modules.cgz.dir
cat ../modules.cgz | cpio -idvm
cd ..

Then after working with this you repack everything:

(cd modules.cgz.dir && find . -type f | cpio -o -H crc | gzip -n -9 ) > modules.cgz
mv modules.cgz initrd.img.dir/modules/modules.cgz
dd if=/dev/zero of=initrd.img.dir/zero.tmp bs=1440k count=8 >/dev/null 2>&1
rm -rf initrd.img.dir/zero.tmp
umount initrd.img.dir
e2fsck -f initrd.img
gzip -n -9 initrd.img
mv initrd.img.gz boot.img.dir/initrd.img
rm -rf modules.cgz.dir
rmdir initrd.img.dir
umount boot.img.dir
rmdir boot.img.dir

Also see
rhdiskmod.html

you'll need to modify at the very least modules.cgz. Others that may be helpful to modify are pcitable, module-info, possibly module-dep, also maybe dev. It appears that /dev is of no help, one needs to work with the RH62 installer to get it to understand the cciss dev node structure.12/11/2002



I am currently working on performing an install of RH62 onto the DL360G2 (5i controller - cciss driver needed).

So I've successfully built the cciss driver for 2.2.14-5.0BOOT.
I've updated boot.img with the cciss.o driver, updated pcitable, and module-info.

I can boot to the updated boot.img floppy and get the installer to load the cciss driver (text expert mode - choose hard drive install, load cciss driver, choose back, then choose CDRom install).

I can manually fdisk and mke2fs the drives on the 5i controller during installation (at the F2 - BASH# prompt).

Anaconda doesn't seem to want to work right with the device nodes. Do I need to redo anaconda so that it understands the /dev/cciss/c0d0 structure?

When the cciss driver loads, on screen #4
<5>RAMDISK: Compressed image found at block 0
<4>VFS: Mounted root (ext2 filesystem).
<7>VFS: Disk change detected on device fd(2,0)
<7>cciss: Device b178 has been found at 1 20
<6>Compaq CISS Driver (v 1.0.4)
<6>Found 1 controller(s)
<6>      blocks= 35553120 block_size= 512
<6>      heads= 255, sectors= 32, cylinders= 4357
<4>
<4> ccissa: ccissa1 ccissa2
<7>VFS: Disk change detected on device ide0(3,0)
<7>ISO 9660 Extensions: RRIP_1991A
Notice the strange line:
<4> ccissa: ccissa1 ccissa2

what is ccissa? I can't find it anywhere in /usr/src/linux-2.2.14-5.0. It appears that this value is generated and is cciss + a for the first controller.

I went as far as creating device nodes for cciss: c0d0 and c0d0p1 - c0d0p9. I placed these device nodes in /dev and in /dev/cciss of the initrd on the boot.img image I modified above. I even created a "ccissa b 104 0", and "cissa1 b 104 "1 thru "ccissa9 b 104 9" in the dev directory of the initrd.

The installer didn't pick up any of these device nodes and I'm not sure how to tell what I need to give it.

I have more notes at http://www.cpqlinux.com/rh62_cciss.html

Any ideas on how to get RH62 installer to understand the dev structure would be great.

Partial Success!

Ok, here's the status:
built the cciss.o for 2.2.14-5.0BOOT per the instructions above.
merged the cciss.o into boot.img per the instructions above (also editing pcitable and module-info).
started the install by booting to the modified boot.img floppy, using parameters "text expert"
Say no to driver disk, choose hard drive install, add in cciss module, choose back, choose cdrom install
switch to bash# prompt on F2

mkdir /a
mknod /a/c0d0 b 104 0
mknod /a/c0d0p1 b 104 1
mknod /a/c0d0p2 b 104 2

fdisk /a/c0d0
I made c0d0p1 to be swap
I made c0d0p2 to be linux (/ "root" partition)

mke2fs /a/c0d0p2

mkdir /mnt/sysimage
mount /a/c0d0p2 /mnt/sysimage

cd /mnt/source/RedHat/RPMS

#The next part was by brute force, probably better I should have followed "BASE" in the comps file
for X in *.rpm; do rpm -ivh --nodeps --root /mnt/sysimage $X; done

After a couple of rounds of getting all the rpms in I continued below:

/mnt/sysimage/usr/sbin/chroot /mnt/sysimage
su -

You'll need the following files to continue easily (I borrowed these from an existing RH62 system): cciss.o, lilo.conf, fstab, conf.modules. Here's my modified files:

/dev/cciss/c0d0p2       /                       ext2    defaults        1 1
/dev/cdrom              /mnt/cdrom              iso9660 noauto,owner,ro 0 0
/dev/fd0                /mnt/floppy             auto    noauto,owner    0 0
none                    /proc                   proc    defaults        0 0
none                    /dev/pts                devpts  gid=5,mode=620  0 0
/dev/cciss/c0d0p1       swap                    swap    defaults        0 0
boot=/dev/cciss/c0d0
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
linear
default=linux

image=/boot/vmlinuz-2.2.14-5.0BOOT
        label=linux
        initrd=/boot/initrd-2.2.14-5.0BOOT.img
        read-only
        root=/dev/cciss/c0d0p2
alias scsi_hostadapter cciss
#alias eth0 eepro100
alias parport_lowlevel parport_pc
Then fix up /etc/fstab for the system. Also fix up conf.modules so that it will load the cciss driver. Also fix up lilo.conf so that it will load 2.2.14-5.0BOOT for now (as shown above).

After putting these files in place, do some housekeeping:

get cciss.o into /lib/modules/2.2.14-5.0BOOT/block

update lilo-21.4.4-10.i386.rpm based on the one included in the rh62-cciss-extras.gz floppy below

Create a new initrd:
mkinitrd /boot/initrd-2.2.14-5.0BOOT.img 2.2.14-5.0BOOT


Then run lilo
/sbin/lilo -v

if all looks good, then let's get out and reboot.

umount /mnt/floppy
exit (from su -)
exit (from chroot)
umount /mnt/sysimage
reboot

If it works as well for you as it did for me then your system will then boot on the 5i controller of the DL360G2

Now I have to clean up this process so that you can use the installer to do the installation instead of hacking it in by hand. Doing it by hand doesn't configure a lot of stuff, for example you didn't have a lilo.conf, an fstab, conf.modules, no root password, etc, etc.

Oh, and I need to get networking going as well. Need to backport either tg3 or bcm5700.
The current 2 disks I have is a modified boot disk (boot.img) with cciss.o and an extras disk for use after you boot up.

rh62-cciss-2.2.14-boot.img.gz
rh62-cciss-extras-1.img.gz

Here are the current installation notes I have on using the above two disk images.


The other thing is that using the following instructions exactly, I can't seem to get the system to boot LILO correctly anymore. All I get now is just an "L" at boot. Last night I did try installing the RPMs a little nicer, I started with basesystem, setup, install, and a few other rpms listed in the comps file. I am now trying to install according to the comps file order (comps should be located in /mnt/cdrom/RedHat/base/comps). -- OK, I adjusted the rpm installation as shown below, we might get a run like I got last night which actually booted. Here goes -- I'm trying this method now.

OK, Here's the current installation instructions. Just follow the next section by making the above two floppies and you should be able to get a system up and running on the 5i controller (DL360G2 and DL380G2).


rh62-cciss-2.2.14-boot.img.gz
rh62-cciss-extras-1.img.gz
Boot on the floppy listed above
Just hit enter at the boot prompt and you will be taken to "text expert" mode.
Cancel driver disk question
select english
select keyboard us
(pop in the RH62 install CD)
cdrom install or hard drive install: "hard drive install"
You don't seem to have any hard drives on your system!  Would you like to configure additional devices.  "Yes"
load cciss driver (all the way at the bottom - don't specify any module parameters)
You don't seem to have any hard drives on your system!  Would you like to configure additional devices.  "Back"
cdrom install or hard drive install: "cdrom install"
Devices: I don't have any special device drivers loaded for your system.  Would you like to load some now? - "Done"
Welcome to Red Hat linux, "stop here"
ALT+F2 - BASH# prompt
(pop in the extras floppy that you downloaded)
fdisk /dev/c0d0     (Here I make a p1 of 256M swap, and a p2 of the rest of the drive, be sure to mark p1 as type 82 "swap")
mke2fs /dev/c0d0p2    (format p2)
mkswap /dev/c0d0p1    (format the swap partition - p1)
mkdir /mnt/sysimage
mount /dev/c0d0p2 /mnt/sysimage
mkdir -p /mnt/sysimage/var/lib/rpm
touch /mnt/sysimage/var/lib/rpm/packages.rpm
cd /mnt/source/RedHat/RPMS

#Try these rpm installs first:
rpm -ivh --root /mnt/sysimage basesystem-xyz.rpm setup-xyz.rpm filesystem-xyz.rpm
for X in l*.rpm; do rpm -ivh --root /mnt/sysimage $X; done
for X in *.rpm; do rpm -ivh --root /mnt/sysimage $X; done
for X in *.rpm; do rpm -ivh --root /mnt/sysimage $X; done
for X in *.rpm; do rpm -ivh --root /mnt/sysimage $X; done
for X in *.rpm; do rpm -ivh --root /mnt/sysimage $X; done
for X in *.rpm; do rpm -ivh --root /mnt/sysimage $X; done

#Then after some good runs at the above which takes 5 tries, run the following 3 times.
Now for the rest of the files:

ls *.rpm | grep -v kernel-2.2.14 | grep -v kernel-smp | grep -v Mesa | grep -v gzip >/list.txt
echo gzip-1.2.4a-2.i586.rpm kernel-2.2.14-5.0.i686.rpm kernel-smp-2.2.14-5.0.i686.rpm Mesa-3.2-2.i686.rpm Mesa-devel-3.2-2.i686.rpm >> /list.txt
rpm -ivh --root /mnt/sysimage `cat /list.txt`
#Well, I don't have time today to check the results and put the exact 
# commands needed above.  Of course if you try this, it should be 
# obvious what I'm doing. Of the packages I grep out above, they 
# have a i386, i586, and a i686 for these packages.  You can't install 
# all 3 versions, so we remove out all three from the list to be installed, 
# then we come in and just put one version (on the dl360g2 I'm trying 
# to put in the i686 where available, if not the the i586 version.)  
# So if I missed any files from these notes you will get an error 
# message stating "CONFLICTING FILES", if so, then you are in this 
# case and that package needs to be condensed to just one package 
# so choose just the i686 or the i586 package.
# ok, I just checked some of the stuff and the list above should 
# be complete (kernel-2.2.14, kernel-smp, gzip, Mesa, and Mesa-devel).


#Note, this could probably be accomplished with the following command as well,
#(without the first 5 "nice" runs of rpm -ivh shown above) 
#(and without the usage of the /list.txt file)
#but I don't have time to test this now, I'll test this first
# thing next week (12/30/02).
#rpm -ivh --root /mnt/sysimage `ls *.rpm | grep -v kernel-2.2.14 | grep -v kernel-smp | grep -v Mesa | grep -v gzip; echo gzip-1.2.4a-2.i586.rpm kernel-2.2.14-5.0.i686.rpm kernel-smp-2.2.14-5.0.i686.rpm Mesa-3.2-2.i686.rpm Mesa-devel-3.2-2.i686.rpm`

/mnt/sysimage/usr/sbin/chroot /mnt/sysimage
su -
mount /dev/fd0 /mnt/floppy
#Note, you will get a warning message like the following
Warning: can't open /etc/fstab: no such file or directory.
#this is because you don't have a /etc/fstab yet.
cp -a /mnt/floppy/fstab /etc
cp -a /mnt/floppy/conf.modules /etc
cp -a /mnt/floppy/lilo.conf /etc
cp -a /mnt/floppy/cciss.o /lib/modules/2.2.14-5.0BOOT/block/


/mnt/floppy/mkdev.cciss

#Note, please copy lilo-21.4.4-10.i386.rpm to the hard drive first before
# trying to upgrade it -- just in case your floppy (like mine) isn't
# of the greatest quality.  You'll be ok if it fails on the copy,
# you can just try copying until it fails no more.  Then you can
# update lilo without fear of the unknown if it can't read the floppy.
cp -a /mnt/floppy/lilo-21.4.4-10.i386.rpm /root
rpm -hUv /root/lilo-21.4.4-10.i386.rpm
mkinitrd /boot/initrd-2.2.14-5.0BOOT.img 2.2.14-5.0BOOT
/sbin/lilo -v
umount /mnt/floppy
exit       (exit from su -)
exit       (exit from chroot)
umount /mnt/sysimage
reboot      (CTRL + ALT + DEL)
# Remove floppy and CD before the system starts booting
# The CD is locked in place until you reboot with a CTRL+ALT+DEL

Another round of instructions begin here.

For using updated "boot-20000407.img" and "update-disk-20001025.img" http://updates.redhat.com/6.2/en/os/images/i386/
Boot to the new boot-20000407.img floppy.
Type linux updates text expert
aarrgghh, well this hasn't turned out as well as I hoped, so these instructions end here.  I'll attempt again next week.




January 6, 2003

Build Server for RH62 and cciss

Red Hat 6.2 Server Instal on ML330 (cdrom install)
Install kernel building items:
1. glibc-2.1.3-15.i386.rpm
2. ncurses-5.0-11.i386.rpm
3. kernel-headers-2.2.14-5.0.i386.rpm
4. kernel-source-2.2.14-5.0.i386.rpm
5. glibc-devel-2.1.3-15.i386.rpm
6. cpp-1.1.2-30.i386.rpm
7. make-3.78.1-4.i386.rpm
8. ncurses-devel-5.0-11.i386.rpm
9. egcs-1.1.2-30.i386.rpm
10. egcs-objc-1.1.2-30.i386.rpm
11. dev86-0.15.0-2.i386.rpm (contains the x86 Assembler)
Installed wget-1.5.3-6.i386.rpm (rh62 cdrom)
Installed openssh:
db3-3.1.17-4.6x (http://updates.redhat.com/6.2/en/os/i386/)
rpm-4.0.2-6x (http://updates.redhat.com/6.2/en/os/i386/)
openssh-2.9.9p2-1 (http://www.openssh.com/)
openssh-askpass-2.9.9p2-1 (http://www.openssh.com/)
openssh-clients-2.9.9p2-1 (http://www.openssh.com/)
openssh-server-2.9.9p2-1 (http://www.openssh.com/)
Installed updated tar:
tar-1.13.25-1.6 (http://updates.redhat.com/6.2/en/os/i386/)

Investigate for locations of cciss driver:
[root@localhost src]# for X in cciss ciss cpq compaq; do 
find linux-2.2.22/ -type f -exec grep -Hi $X \{\} \; > $X.txt; 
done
Find files plainly named cciss:
[root@localhost src]# find linux-2.2.22/ | grep -i cciss
linux-2.2.22/include/linux/cciss_ioctl.h
linux-2.2.22/drivers/block/cciss.c
linux-2.2.22/drivers/block/cciss.h
linux-2.2.22/drivers/block/cciss_cmd.h
linux-2.2.22/Documentation/cciss.txt
linux-2.2.22/Documentation/mkdev.cciss
[root@localhost src]# 
Lets copy these 6 files over, it's obvious we'll need them without modification.
[root@localhost src]# cd linux-2.2.22/
[root@localhost linux-2.2.22]# for X in `find . -type f | grep -i cciss`; do 
tar -cvf - $X | (cd ../linux-2.2.14/ && tar -xvf -); 
done
./include/linux/cciss_ioctl.h
./include/linux/cciss_ioctl.h
./drivers/block/cciss.c
./drivers/block/cciss.c
./drivers/block/cciss.h
./drivers/block/cciss.h
./drivers/block/cciss_cmd.h
./drivers/block/cciss_cmd.h
./Documentation/cciss.txt
./Documentation/cciss.txt
./Documentation/mkdev.cciss
./Documentation/mkdev.cciss
[root@localhost linux-2.2.22]#
Now let's find the other pieces:
[root@localhost src]# cat *.txt | sed -e 's,:.*$,,' | sort | uniq | grep -v cciss >files_to_check.txt_1
[root@localhost src]#

I will ignore items such as CREDITS, Documentation/, and MAINTAINERS.
I will also ignore items located in architectures other than i386 such as arm, mips, and ppc.
Ignore arch/i386/defconfig for now. We'll be populating that later when we begin building the kernel.
I'll investigate each file listed in files_to_check.txt_1 as follows:
If I am unsure about apm.c, then I do the following:

[root@localhost src]# fgrep apm.c *.txt
compaq.txt:linux-2.2.22/arch/i386/kernel/apm.c: * Fix for the Compaq Contura 3/25c which reports BIOS version 0.1
[root@localhost src]#

From these results I see it does not concern the cciss driver and so I should skip it.

If still in doubt, then visit the actual file to see if any of it pertains to the cciss driver.

Build individual patch files as needed:

[root@localhost src]# diff -Naur linux-2.2.14/drivers/block/Config.in linux-2.2.22/drivers/block/Config.in > patch.Config.in.patch

Then start taking out sections that don't pertain to the cciss driver. Sections to remove begin with a @@ and end when the next @@ begins.
check back with the following line to see what sections you should be looking for:
[root@localhost src]# fgrep Config.in *.txt | less


I found a file that is new but is not labeled with "cciss":

linux-2.2.22/drivers/scsi/cpqioctl.c
copy that file over to 2.2.14 as well
[root@localhost src]# cp -a linux-2.2.22/drivers/scsi/cpqioctl.c linux-2.2.14/drivers/scsi/cpqioctl.c


Here's the diff I came up with. Cd to linux-2.2.14 and use -p1 to remove off
the first directory, like this:
cd /usr/src/linux-2.2.14
cat /tmp/patch.diff | patch -p1


diff -Naur k-old/drivers/block/Config.in k-new/drivers/block/Config.in
--- k-old/drivers/block/Config.in	Fri Jan  3 12:15:25 2003
+++ k-new/drivers/block/Config.in	Fri Jan  3 12:19:56 2003
@@ -137,6 +137,10 @@
 if [ "$CONFIG_PCI" = "y" ]; then
   tristate 'Compaq SMART2 support' CONFIG_BLK_CPQ_DA
 fi
+if [ "$CONFIG_PCI" = "y" ]; then
+  tristate 'Compaq Smart Array 5xxx support' CONFIG_BLK_CPQ_CISS_DA
+fi
+
 
 if [ "$CONFIG_BLK_DEV_HD_IDE" = "y" -o "$CONFIG_BLK_DEV_HD_ONLY" = "y" ]; then
   define_bool CONFIG_BLK_DEV_HD y
diff -Naur k-old/drivers/block/Makefile k-new/drivers/block/Makefile
--- k-old/drivers/block/Makefile	Fri Jan  3 12:15:25 2003
+++ k-new/drivers/block/Makefile	Fri Jan  3 12:19:56 2003
@@ -258,6 +258,14 @@
   endif
 endif
 
+ifeq ($(CONFIG_BLK_CPQ_CISS_DA),y)
+L_OBJS += cciss.o
+else
+  ifeq ($(CONFIG_BLK_CPQ_CISS_DA),m)
+  M_OBJS += cciss.o
+  endif
+endif
+
 ifeq ($(CONFIG_BLK_DEV_DAC960),y)
 LX_OBJS += DAC960.o
 else
diff -Naur k-old/drivers/block/genhd.c k-new/drivers/block/genhd.c
--- k-old/drivers/block/genhd.c	Fri Jan  3 12:15:25 2003
+++ k-new/drivers/block/genhd.c	Fri Jan  3 12:19:56 2003
@@ -131,6 +131,10 @@
 			return buf;
 		}
 	}
+	if (hd->major >= COMPAQ_CISS_MAJOR && hd->major <=
+            COMPAQ_CISS_MAJOR+7) {
+          return raid_name (hd, minor, COMPAQ_CISS_MAJOR, buf);
+        }
 	if (hd->major >= COMPAQ_SMART2_MAJOR && hd->major <=
             COMPAQ_SMART2_MAJOR+7) {
           return raid_name (hd, minor, COMPAQ_SMART2_MAJOR, buf);
@@ -1450,6 +1454,9 @@
 {
 	extern void console_map_init(void);
 	extern void cpqarray_init(void);
+#ifdef CONFIG_BLK_CPQ_CISS_DA
+	extern int  cciss_init(void);
+#endif 
 #ifdef CONFIG_PARPORT
 	extern int parport_init(void);
 #endif
@@ -1479,6 +1486,9 @@
 #endif
 #ifdef CONFIG_BLK_CPQ_DA
 	cpqarray_init();
+#endif
+#ifdef CONFIG_BLK_CPQ_CISS_DA
+        cciss_init();
 #endif
 #ifdef CONFIG_NET
 	net_dev_init();
diff -Naur k-old/include/linux/major.h k-new/include/linux/major.h
--- k-old/include/linux/major.h	Fri Jan  3 12:15:25 2003
+++ k-new/include/linux/major.h	Fri Jan  3 12:19:56 2003
@@ -102,8 +102,19 @@
 #define COMPAQ_SMART2_MAJOR6	78
 #define COMPAQ_SMART2_MAJOR7	79
 
+#define I2O_MAJOR		80	/* 80->87 */
+
 #define SPECIALIX_NORMAL_MAJOR 75
 #define SPECIALIX_CALLOUT_MAJOR 76
+
+#define COMPAQ_CISS_MAJOR 	104
+#define COMPAQ_CISS_MAJOR1	105
+#define COMPAQ_CISS_MAJOR2      106
+#define COMPAQ_CISS_MAJOR3      107
+#define COMPAQ_CISS_MAJOR4      108
+#define COMPAQ_CISS_MAJOR5      109
+#define COMPAQ_CISS_MAJOR6      110
+#define COMPAQ_CISS_MAJOR7      111
 
 #define DASD_MAJOR      94	/* Official assignations from Peter */
 
diff -Naur k-old/include/linux/pci.h k-new/include/linux/pci.h
--- k-old/include/linux/pci.h	Fri Jan  3 12:15:25 2003
+++ k-new/include/linux/pci.h	Fri Jan  3 12:19:56 2003
@@ -294,6 +294,8 @@
 #define PCI_DEVICE_ID_COMPAQ_NETEL100D	0xae40
 #define PCI_DEVICE_ID_COMPAQ_NETEL100PI	0xae43
 #define PCI_DEVICE_ID_COMPAQ_NETEL100I	0xb011
+#define PCI_DEVICE_ID_COMPAQ_CISS	0xb060
+#define PCI_DEVICE_ID_COMPAQ_CISSB	0xb178
 #define PCI_DEVICE_ID_COMPAQ_THUNDER	0xf130
 #define PCI_DEVICE_ID_COMPAQ_NETFLEX3B	0xf150

You should get something like:
[root@localhost linux-2.2.14]# cd /usr/src/linux-2.2.14
[root@localhost linux-2.2.14]# cat /tmp/patch.diff | patch -p1
patching file `drivers/block/Config.in'
patching file `drivers/block/Makefile'
patching file `drivers/block/genhd.c'
patching file `include/linux/major.h'
patching file `include/linux/pci.h'
[root@localhost linux-2.2.14]#


Ok, now let's attempt to build the cciss module for the 2.2.14 kernel.
www.cpqlinux.com/kernel.html
1) cd /usr/src/linux-2.2.14
2) Change the EXTRAVERSION line in the Makefile from -5.0 to -5.0BOOT
3) make mrproper

4) populate arch/i386/defconfig:
[root@localhost linux-2.2.14]# cp -a configs/kernel-2.2.14-i386-BOOT.config
arch/i386/defconfig
cp: overwrite `arch/i386/defconfig'? y
[root@localhost linux-2.2.14]# 

5) generate the .config file:
[root@localhost linux-2.2.14]# yes "" | make oldconfig
...
Magic SysRq key (CONFIG_MAGIC_SYSRQ) [Y/n/?]

*** End of Linux kernel configuration.
*** Check the top-level Makefile for additional configuration.
*** Next, you must run 'make dep'.

Broken pipe
[root@localhost linux-2.2.14]#

The "Broken pipe" is ok.

6) make menuconfig
choose block devices
Make "Compaq Smart Array 5xxx support" to be "M" for "modular"
exit from block devices
exit from menuconfig
when prompted to save, choose "yes"
7) make clean
8) make dep
#build the kernel and modules
I will skip making the kernel for now as I won't need it
9) make modules
it appears that cciss.o was built successfully


Now the next steps will involve modifying anaconda (rh62 installer) to work
with the cciss devices -- yes, anaconda must be taught how to do each step.
We'll need to install python-devel and the anaconda source:
anaconda-6.2.2-1.src.rpm

Now you can either install the anaconda source (which will install the .tgz
into /usr/src/redhat/SOURCES or you can unpack it with rpm2cpio:
rpm2cpio anaconda-6.2.2-1.src.rpm | cpio -idvm

Now I made comparisons between the RH62 anaconda (anaconda-6.2.2-1) and the
next one which is RH70 (anaconda-7.0.1-6). I created a patchfile contained
temporarily here: anaconda.patch.622.tar

If you get the following error:
Python.h: No such file or directory
then you need to install:
python-devel-1.5.2-13.i386.rpm
Check the Makefile to see which version you need (1.5 vs. 2.2):
[root@localhost anaconda-6.2.2]# cat Makefile | grep -i python
        gcc -Wall -o _xkb.o -fPIC -I/usr/include/python1.5 `gtk-config --cflags gtk` -c xkb.c
        gcc -Wall -o xmouse.o -fPIC -I/usr/include/python1.5 -I /usr/include/python1.5 -c xmouse.c

From this we see that we need version 1.5 (which is standard to RH62)

For the following error:
/bin/sh: gtk-config: command not found
you need to install:
gtk+-devel-1.2.6-7.i386.rpm
which relys on the following:
gtk+
glib-devel
XFree86-devel

For the following error:
gnome.h: No such file or directory
install:
xmms-gnome and its dependencies
[root@localhost RPMS]# for X in `ls | grep -i gnome`; do rpm -qpl $X | grep
/gnome\\.h >/dev/null && echo $X; done | while read; do echo 999999999999 $X;
rpm -qpl $REPLY | grep /gnome\\.h; done


I can't satisfy gnome-core's need for "windowmaker" so I'm installing
everything nicely with the following:
for X in *.rpm; do rpm -hUv $X; done


Well, I found where windowmaker is, it's in WindowMaker. Well I'll have to
run back through so I can remove the above "for X in *.rpm; do rpm -hUv $X
;done" command. For now, after running through one pass of that, I was able to do the
following installs as well (in a round about way):
for X in xmms-gnome-1.0.1-4.i386.rpm xmms-1.0.1-4.i386.rpm
ORBit-0.5.0-3.i386.rpm audiofile-0.1.9-3.i386.rpm
gnome-libs-1.0.55-12.i386.rpm gnome-audio-1.0.0-8.noarch.rpm
libxml-1.8.6-2.i386.rpm esound-0.2.17-2.i386.rpm imlib-1.9.7-3.i386.rpm
libgr-progs-2.0.13-23.i386.rpm libungif-4.1.0-4.i386.rpm
xscreensaver-3.23-2.i386.rpm magicdev-0.2.7-1.i386.rpm
xloadimage-4.1-13.i386.rpm libglade-0.11-1.i386.rpm
fortune-mod-1.0-11.i386.rpm Mesa-3.2-2.i386.rpm mikmod-3.1.6-6.i386.rpm
xpm-3.4k-2.i386.rpm libgtop-1.0.6-1.i386.rpm XFree86-3.3.6-20.i386.rpm
control-center-1.0.51-3.i386.rpm gnome-core-1.0.55-12.i386.rpm; do
rpm -hUv $X; done
with a little help from the following 2 rpm installs:
rpm -hUv wmakerconf-2.1-1.i386.rpm wmconfig-0.9.8-1.i386.rpm
WindowMaker-0.61.1-2.i386.rpm
and
rpm -hUv xmms-gnome-1.0.1-4.i386.rpm gnome-core-1.0.55-12.i386.rpm

Now who knows what errors I'm skipping now by having more than just "server
install" installed and having installed a countless number of RPMs.

I didn't like the following errors:
warning: file `../textw/timezone.py' extension `py' is unknown; will try C
warning: file `../textw/userauth.py' extension `py' is unknown; will try C

Also I got the following error:
/usr/bin/../lib/librpm.so: undefined reference to `gnameToGid'
/usr/bin/../lib/librpm.so: undefined reference to `Lstat'
collect2: ld returned 1 exit status
make[1]: *** [moddeps] Error 1
make[1]: Leaving directory `/root/anaconda-6.2.2/utils'
make[1]: Entering directory `/root/anaconda-6.2.2/gnome-map'
cc -g -Wall -fPIC `gnome-config --cflags gnomeui` -I/usr/include/python1.5
-c
-o gnome-map.o gnome-map.c


So I decided to install everything (using for X in *.rpm; do rpm -hUv $X;
done)


Search this Site!:
Search this site powered by FreeFind

Homepage: http://www.cpqlinux.com
Site Map: http://www.cpqlinux.com/sitemap.html