[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: IEE1394 Firewire



Cheryl L. Southard wrote:
> Hi Wolf,
> 
> Here's what I do when  installing the firewire driver under Redhat
> Enterprise 4.  Since you run a smp kernel, skip all the commands
> marked non-smp.  These instructions only recompile the firewire
> driver and not the entire kernel.
> 
> With RHEL_4, we have to recompile the firewire driver
>         > up2date --get-source kernel
>         > rpm -ivh /var/spool/up2date/kernel-2.6.9-11.EL.src.rpm
> 
>         unpack the source code
>         > cd /usr/src/redhat/SPECS
>         > rpmbuild -bp --target=i686 kernel-2.6.spec
> 
>         smp> cd /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9/
>         smp> cp configs/kernel-2.6.9-i686-smp.config .config
>         smp> make oldconfig
> 
>         Choose the correct kernel to build (i686 is default)
>         > cd /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9/drivers/ieee1394
> 
>         > mv Makefile Makefile.orig
>  > vi Makefile		# insert the following lines
>                 obj-m := ieee1394.o sbp2.o ohci1394.o
> 
>                 KDIR := /lib/modules/$(shell uname -r)/build
>                 PWD := $(shell pwd)
> 
>                 ieee1394-objs := ieee1394_core.o ieee1394_transactions.o hosts.o
>  \
>                         highlevel.o csr.o nodemgr.o oui.o dma.o iso.o \
>                         csr1212.o config_roms.o
> 
>                 default: $(PWD)/oui.c
>                         make -C $(KDIR) M=$(PWD) modules
> 
>                 $(PWD)/oui.c: $(PWD)/oui.db
>                         /bin/sh $(PWD)/oui2c.sh < $(PWD)/oui.db > $(PWD)/oui.c 
> 
>         > make 
>         non-smp> mkdir /lib/modules/2.6.9-11.EL/kernel/drivers/ieee1394
>         smp> mkdir /lib/modules/2.6.9-11.ELsmp/kernel/drivers/ieee1394
> 
>         non-smp> cp ieee1394.ko ohci1394.ko sbp2.ko \
>                 /lib/modules/2.6.9-11.EL/kernel/drivers/ieee1394
> 	smp> cp ieee1394.ko ohci1394.ko sbp2.ko \
>                 /lib/modules/2.6.9-11.ELsmp/kernel/drivers/ieee1394
> 
>         non-smp> /sbin/new-kernel-pkg --mkinitrd --depmod --install 2.6.9-11.EL
>         smp> /sbin/new-kernel-pkg --mkinitrd --depmod --install 2.6.9-11.ELsmp
> 
>         > rm /var/spool/up2date/kernel-2.6.9-11.EL.*
>         > rm -f /usr/src/redhat/SOURCES/*
>         > rm -rf /usr/src/redhat/BUILD/kernel-2.6.9/
>         > rm /usr/src/redhat/SPECS/kernel-2.6.spec 
> 

The script for above:  I wish there was a way to download older kernel
source if you aren't running the newest kernel. (Anyone know)

--snip shell script--
#!/bin/bash

##
## Download source for kernel
##
up2date-nox --get-source kernel

##
## Install kernel source
##
rpm -ivh /var/spool/up2date/kernel-`uname -r`.src.rpm

##
## Unpack the source
##
rpmbuild -bp --target=i686 /usr/src/redhat/SPECS/kernel-2.6.spec

##
## Create the config file for the kernel (single proc)
##
cp
/usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9/configs/kernel-2.6.9-i686.config
/usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9/.config
cd /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9/
make oldconfig

##
## Make the make file for the firewire modules and run make
##
mv
/usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9/drivers/ieee1394/Makefile
/usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9/drivers/ieee1394/Makefile.orig
echo -e '#
# Makefile for the Linux IEEE 1394 implementation
#

obj-m := ieee1394.o sbp2.o video1394.o raw1394.o ohci1394.o

KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)

ieee1394-objs := ieee1394_core.o ieee1394_transactions.o hosts.o \
\thighlevel.o csr.o nodemgr.o oui.o dma.o iso.o \
\t\tcsr1212.o config_roms.o

default: $(PWD)/oui.c
\tmake -C $(KDIR) M=$(PWD) modules

$(PWD)/oui.c: $(PWD)/oui.db
\t/bin/sh $(PWD)/oui2c.sh < $(PWD)/oui.db > $(PWD)/oui.c' >
/usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9/drivers/ieee1394/Makefile
cd /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9/drivers/ieee1394
make

##
## Copy the modules to the correct dir
##
mkdir /lib/modules/`uname -r`/kernel/drivers/ieee1394
cp ieee1394.ko ohci1394.ko sbp2.ko video1394.ko raw1394.ko
/lib/modules/`uname -r`/kernel/drivers/ieee1394

##
## Rebuild the initrd
##
/sbin/new-kernel-pkg --mkinitrd --depmod --install `uname -r`
--end snip--


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]