Charles E Campbell Jr
2006-Dec-06 17:00 UTC
[CentOS] Getting kernel source for 2.6.9-42.ELsmp
Hello! I need to get an arcnet device driver up and running. Normally it appears to be distributed with linux, but not installed. So, I need to compile and install it, naturally. So, where is the kernel souce for 2.6.9-42.ELsmp? I can find kernel source for 2.6.9. BTW, I obtained 2.6.9 and tried compiling it, but all I got was *.o files and insmod: error inserting 'arcnet.o`: -1 Invalid module format Seems that the rest of the /lib/modules/2.6.9-42.ELsmp/kernel/drivers/net appear to be *.ko files. Hope y'all can help! Charles Campbell
Seth Bardash
2006-Dec-06 18:20 UTC
[CentOS] Getting and installing kernel source for 2.6.9-42.ELsmp
> -----Original Message----- > From: centos-bounces at centos.org > [mailto:centos-bounces at centos.org] On Behalf Of Charles E CampbellJr> Sent: Wednesday, December 06, 2006 10:01 AM > To: centos at centos.org > Subject: [CentOS] Getting kernel source for 2.6.9-42.ELsmp > > Hello! > > I need to get an arcnet device driver up and running. Normally it > appears to be distributed with linux, but not installed. So, > I need to > compile and install it, naturally. > > So, where is the kernel souce for 2.6.9-42.ELsmp? I can find kernel> source for 2.6.9. >The kernel source for building the kernel is in the SRPM's directory. The original install kernel source is in ./4.4/os/SRPMS/kernel-2.6.9-42.EL.src.rpm The latest update kernel source ./4.4/updates/SRPM/kernel-2.6.9-42.0.3.EL.src.rpm But getting the source is just the beginning. Follow these instructions from the kernel portion of theRedhat 4.0 release notes to install the kernel sources: # Source rpm install notes for 4.x In order to eliminate the redundancy inherent in providing a separate package for the kernel source code when that source code already exists in the kernel's .src.rpm file, Red Hat Enterprise Linux 4 no longer includes the kernel-source package. Users that require access to the kernel sources can find them in the kernel .src.rpm file. To create an exploded source tree from this file, perform the following steps (note that <version> refers to the version specification for your currently-running kernel): 1. Obtain the kernel-<version>.src.rpm file from one of the following sources: * The SRPMS directory on the appropriate "SRPMS" CD iso image * The FTP site where you got the kernel package * By running the following command: up2date --get-source kernel 2. Install kernel-<version>.src.rpm (given the default RPM configuration, the files this package contains will be written to /usr/src/redhat/) 3. Change directory to /usr/src/redhat/SPECS/, and issue the following command: rpmbuild -bp --target=<arch> kernel.spec (Where <arch> is the desired target architecture.) On a default RPM configuration, the kernel tree will be located in /usr/src/redhat/BUILD/. 4. In resulting tree, the configurations for the specific kernels shipped in Red Hat Enterprise Linux 4 are in the /configs/ directory. For example, the i686 SMP configuration file is named /configs/kernel-<version>-i686-smp.config. Issue the following command to place the desired configuration file in the proper place for building: cp <desired-file> ./.config 5. Issue the following command: make oldconfig You can then proceed as usual. Note: An exploded source tree is not required to build kernel modules against the currently in-use kernel. For example, to build the foo.ko module, create the following file (named Makefile) in the directory containing the foo.c file: obj-m := foo.o KDIR := /lib/modules/$(shell uname -r)/build PWD := $(shell pwd) default: $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules Issue the make command to build the foo.ko module. Hope this helps Seth Bardash Integrated Solutions and Systems 1510 Old North Gate Road Colorado Springs, CO 80921 719-495-5866 719-495-5870 Fax 719-337-4779 Cell http://www.integratedsolutions.org Failure can not cope with knowledge and perseverance! -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.432 / Virus Database: 268.15.13/577 - Release Date: 12/6/2006 4:39 PM
Charles E Campbell Jr
2006-Dec-06 18:46 UTC
[CentOS] Getting kernel source for 2.6.9-42.ELsmp
Hello! I need to get an arcnet device driver up and running. Normally it appears to be distributed with linux, but not installed. So, I need to compile and install it, naturally. So, where is the kernel souce for 2.6.9-42.ELsmp? I can find kernel source for 2.6.9. BTW, I obtained 2.6.9 and tried compiling it, but all I got was *.o files and insmod: error inserting 'arcnet.o`: -1 Invalid module format Seems that the rest of the /lib/modules/2.6.9-42.ELsmp/kernel/drivers/net appear to be *.ko files. Hope y'all can help! Charles Campbell P.S. sorry if this is a duplicate; my first copy went out over an hour ago and I didn't see it show up