Building Firewire Support for RHEL


RHEL and related distributions, including Scientific Linux, do not support firewire disks with the distribution kernels. A set of prebuilt kernels for the i686 and x86_64 platforms are available here. To build a kernel with firewire support for these distributions, follow the following steps.


  1. Get the source RPM package for the distribution kernel. Most likely, this will be in the errata area of a repository, as the kernel that is used for the base distribution will be quickly outdated. A mirror that has most distributions is mirror.mcs.anl.gov, which has both the Red Hat and Scientific Linux distributions available.

  2. Install the source RPM. This uses the following command, as root:

    	rpm -ihv kernel-*.src.rpm
    

  1. change directories to /usr/src/redhat/SOURCE

  2. Patch the SOURCE directory. For each configuration file, change the options to include firewire. The following command will do this:

    	for i in *.config
    	do
    		mv $i $i.orig
    		awk '!/# CONFIG_IEEE1394 is not set/{print}
    			/# IEEE 1394 \(FireWire\) support/
    			{print "CONFIG_IEEE1394=m"}' $i.orig >$i 
    	done
    

    make sure to include the single quotes around the awk script.

  1. Use rpmbuild to create the rpm packages appropriate for your architecture. This also includes tagging the spec file to indicate the custom kernels. Execute the following commands:

    	cd ../SPECS
    	awk '{
    		if(/%define release /)
    			{printf "%s%s\n", $0,"_firewire"}
    		else
    			{print}
    		}' kernel*.spec > kernel-firewire.spec
    	#(replace the * in kernel*.spec with the actual filename)
    	rpm -ba --target {platform} kernel-firewire.spec
    

    This will build the rpm files for all architectures that will work on your machine, and also build a source rpm for this configuration. The rpms will be in the directory /usr/src/redhat/RPMS. To skip the source rpm, use -bb. The --target {platform} directive may not be needed, depending on how the platform is detected automatically. Targets included in the source package include i686 and x86_64, but not i386.

  1. Install the new kernel using rpm. To install both the kernel and the devel package, do

	rpm -ihv kernel-[flavor of kernel]{version}_firewire.rpm
  1. Reboot to use the new kernel. Modification of the boot loader may be needed to set this as the default kernel.