Broadcom Corporation 16215 Alton Parkway, Irvine, CA 92619-7013 Rebuilding the RedHat 7.0 Enterprise Kernel Source Tree Broadcom BCM5700 Linux Driver 05/30/2001 Introduction ============ This file describes how to rebuild the RedHat 7.0 Enterprise source tree for the purpose of building the bcm5700 driver module with the RedHat 7.0 2.2.16-22enterprise kernel. Pre-requisites ============== RedHat Kernel Source: kernel-source-2.2.16-22.i386.rpm Kernel Source Patches: kernel-2.2.16-22.src.rpm KGCC: kgcc-1.1.2-40.i386.rpm Verify Pre-requisites ===================== rpm -q kernel-source rpm -q kernel-2.2.16-22.src rpm -q kgcc If the kernel-source-2.2.16-22.i386.rpm or kgcc-1.1.2-40.i386.rpm files are not installed, you may obtain the files from your RedHat 7.0 Binary CD-ROM or from: ftp://ftp.redhat.com/redhat/linux/7.0/en/os/i386/RedHat/RPMS/ If the kernel-2.2.16.22.src.rpm package is not installed, you may obtain the file from your RedHat Source CD-ROM or from: ftp://ftp.redhat.com/redhat/linux/7.0/en/os/i386/SRPMS/ Install Pre-requisites if needed ================================ Skip this process and go to "Copy the Patch Files" if you were able to successfully query for these packages using rpm -q rpm -ivh kernel-source-2.2.16-22.i386.rpm rpm -ivh kernel-2.2.16-22.src.rpm rpm -ivh kgcc-1.1.2-40.i386.rpm Note: You may need to manually create the /usr/src/redhat/ directory if the installation of kernel-2.2.16-22.src.rpm should fail. Copy the Patch Files and Patch Kernel ===================================== Make sure that you have a symlink for your Kernel source directory to /usr/src/linux before your proceed. Example: /usr/src/linux --> /usr/src/linux-2.2.16 Change directory to /usr/src and copy the below patch files into the working directory. Note that in the example, there is one space and one "dot" following the word patch. cd /usr/src/ cp redhat/SOURCES/linux-2.2.16-lfs.patch . cp redhat/SOURCES/linux-2.2.16-lfs-bigmem.patch . patch -p0 -f < linux-2.2.16-lfs.patch patch -p0 -f < linux-2.2.16-lfs-bigmem.patch Note: You must have kernel-2.2.16-22.src.rpm installed to complete this step. Rebuild the source tree ======================= Change directory to /usr/src/linux and run "make mrproper" to clean up your source. make mrproper Copy the old RedHat Enterprise configuration file to the working directory while renaming it to .config cp configs/kernel-2.2.16-i686-enterprise.config .config Run "make oldconfig" to configure the Enterprise Kernel sourctree with the original parameters set by RedHat in .config. Finally run "make dep". make oldconfig make dep Correct the Version Header file =============================== With your favorite text editor modify /usr/src/linux/include/linux/version.h Find the line that reads: #define UTS_RELEASE "2.2.16-22" Change to: #define UTS_RELEASE "2.2.16-22enterprise" Save your changes. Done! You may now build the bcm5700 driver module.