Creating the Driver Disk for VT8251 SATA Controller in Fedora Core 5 x86_64
Many persons have requested me for the driver disk of VT8251 SATA Controller for other architectures other than x86_64 in Fedora® Core 5. But since I don't have access to all of them & have very little time to spare, I am giving the steps that I took in creating the driver disk.
I don't think that the steps I followed was absolutely right or better. However, it worked for me. Few persons have not been able to use the driver disk to detect the SATA HDD, while others reported success. I have no idea why the driver disk didn't work for some. So, please get ready to experiment if you prefer to try the steps given here.
The steps given below is for kernel-2.6.15-1.2054_FC5 of Fedora Core 5, x86_64. These steps should also work on a recent Red Hat®/Fedora distribution. Please, make the necessary substitutions for your own distribution.
For testing the modules directly after kernel compile, you should connect a regular IDE HDD to the PC containing the VT8251 SATA controller & install the appropriate GNU/Linux® distribution on it. The steps below were executed on this setup.
Now, download the appropriate Kernel Source, For FC5, I downloaded kernel-2.6.15-1.2054_FC5.src.rpm from http://rpm.pbone.net/
In the # prompt type the following:
# rpm -Uvh kernel-2.6.15-1.2054_FC5.src.rpm
# rpmbuild --bp --target=$(uname -m) /usr/src/redhat/SPECS/kernel-2.6.spec
# cd /usr/src/redhat/BUILD/kernel-2.6.15/
# cp -R linux-2.6.15.x86_64/ /usr/src/
# cd /usr/src/
# ln -s linux-2.6.15.x86_64 linux-2.6
Next, download the patched ahci.c and sata_via.c source from Rajahuroman's webpage
Overwrite the two original sources with these two files:
# cp ahci.c sata_via.c /usr/src/linux-2.6/drivers/scsi/
Now, we have to make the modules with these new files. First configure the kernel:
# cd /usr/src/linux-2.6/
# make menuconfig (or make xconfig|gconfig|config)
The defaults should be ok for us. Just change the following:
Set the extra version info. In General Setup -> Local version -> Append to kernel release, type: -1.2054_FC5
Set the proper subarchitecture type. In Processor Type & Feature -> Subarchitecture Type, select PC-compatible
Set processor family. In Processor Type & Feature -> Processor Family, select Opteron/Athlon64/Hammer/K8
In this kernel, ahci, sata_via are by default selected as to be compiled as modules. For other kernel version, check & make sure they are selected as modules. Moreover, for other architecture, make sure to select SMP or non-SMP type. Save & exit the kernel configuration.
Edit the Makefile and delete pre form the EXTRAVERSION = pre line to make it null.
Next, compile the modules:
# make modules
Check the modules to see that it reports the correct kernel version & SMP/non SMP in vermagic: string.
# modinfo drivers/scsi/ahci.ko
# modinfo drivers/scsi/sata_via.ko
Make sure the kernel version is 2.6.15-1.2054_FC5
Now, we need to make the driver disk. First download the driver disk file from my web-page & extract it to an empty directory, say /opt/vt8251/
The driver disk contains the following files:
Of these, we will need to recreate the modules.cgz file only. If you are curious how I created the other files, you can check out Petr Sulla's webpage.
For creating the modules.cgz file, first we need to create a directory with the same name as the kernel version.
# cd /opt/vt8251/
# mkdir 2.6.15-1.2054_FC5
Now, copy the driver files (and the driver dependency files - though not strictly required) to this directory, strip them & create the modules.cgz file:
# cp /usr/src/linux-2.6/drivers/scsi/ahci.ko 2.6.15-1.2054_FC5/
# cp /usr/src/linux-2.6/drivers/scsi/sat_via.ko 2.6.15-1.2054_FC5/
# cp /usr/src/linux-2.6/drivers/scsi/libata.ko 2.6.15-1.2054_FC5/
# cp /usr/src/linux-2.6/drivers/scsi/scsi_mod.ko 2.6.15-1.2054_FC5/
# strip --strip-unneeded 2.6.15-1.2054_FC5/*.ko
# find 2.6.15-1.2054_FC5 | cpio -ov -H CRC | gzip -9 > modules.cgz
You can now copy the files modinfo, modules.cgz, modules.dep, pcitable, rhdd-6.1 to a fully formatted DOS floppy. This is your new VT8251 SATA driver disk.
You need to also copy the ahci.ko, sata_via.ko files from the 2.6.15-1.2054_FC5 directory to the floppy (not part of the actual driver disk) for later 'rescue' stage as described in my installation steps. You may create a directory in the floppy to hold these two files - I copied these files to a directory called x86_64