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
-----Original Message----- From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of Charles E Campbell
Jr
Sent: Wednesday, December 06, 2006 10:01 AM To: centos@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!
Seth Bardash wrote:
-----Original Message----- From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of Charles E Campbell
Jr
Sent: Wednesday, December 06, 2006 10:01 AM To: centos@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
Would you please tell me more? While on the computer with Centos:
cd /usr/src/redhat/SRPMS ls (shows empty directory)
Trying Redhat:
http://download.fedora.redhat.com/pub/fedora/linux/core has a "4" directory, not a 4.4
Thank you, Charles Campbell
On Wed, 2006-12-06 at 14:03 -0500, Charles E Campbell Jr wrote:
Would you please tell me more? While on the computer with Centos:
cd /usr/src/redhat/SRPMS ls (shows empty directory)
As it should be if you have not built any SRPMS locally.
Trying Redhat:
http://download.fedora.redhat.com/pub/fedora/linux/core has a "4" directory, not a 4.4
You are confusing Fedora 4 with EL4. The latest updated CentOS SRPMS are at
http://mirror.centos.org/centos/4/updates/SRPMS/kernel-2.6.9-42.0.3.EL.src.r...
The single digit release number, $releasever in yum configs, always points to the current version - as of now 4.4.
The original 4.4 kernel is at
http://mirror.centos.org/centos/4.4/os/SRPMS/kernel-2.6.9-42.EL.src.rpm
Phil
On Wed, Dec 06, 2006 at 02:03:28PM -0500, Charles E Campbell Jr enlightened us:
Would you please tell me more? While on the computer with Centos:
cd /usr/src/redhat/SRPMS ls (shows empty directory)
Trying Redhat:
http://download.fedora.redhat.com/pub/fedora/linux/core has a "4" directory, not a 4.4
Fedora is not CentOS or RHEL. Try again.
I might suggest sources.redhat.com or mirrors.centos.org.
Charles Campbell sent:
Sent: Wednesday, December 06, 2006 10:01 AM To: centos@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.
Seth Bardash wrote
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.
I was able to get the original 4.4 kernel from
http://mirror.centos.org/centos/4.4/os/SRPMS/kernel-2.6.9-42.EL.src.rpm
using Phillip R. Shaffner's advice.
However, rpm -i kernel-2.6.9-42.EL.src.rpm yielded no driver source anywhere under /usr/src ; in particular, no arcnet source.
So, I tried Seth Bardash's advice to use up2date:
up2date --get-source kernel
This yielded a number of fetches, but terminated with
An HTTP error occurred: URL: http://mirror.centos.org/centos/4/updates/i386//SRPMS/kernel-2.6.9-42.0.3.EL... Status Code: 404 Error Message: Not Found
No driver source present afterwards, either, anywhere under /usr/src.
Note: An exploded source tree is not required to build kernel modules
against
the currently in-use kernel.
That's basically what I want to do -- just build the arcnet code and insmod it.
So, what am I doing wrong? How do I get that source?
Thank you, Charles E. Campbell
On Wed, Dec 06, 2006 at 03:42:13PM -0500, Charles E Campbell Jr enlightened us:
I was able to get the original 4.4 kernel from
http://mirror.centos.org/centos/4.4/os/SRPMS/kernel-2.6.9-42.EL.src.rpm
using Phillip R. Shaffner's advice.
However, rpm -i kernel-2.6.9-42.EL.src.rpm yielded no driver source anywhere under /usr/src ; in particular, no arcnet source.
There should have been tarballs and config files in /usr/src/redhat/SOURCES, unless you've modified your rpm macros to point to a different %_top
So, I tried Seth Bardash's advice to use up2date:
up2date --get-source kernel
This yielded a number of fetches, but terminated with
An HTTP error occurred: URL: http://mirror.centos.org/centos/4/updates/i386//SRPMS/kernel-2.6.9-42.0.3.EL... Status Code: 404 Error Message: Not Found
No driver source present afterwards, either, anywhere under /usr/src.
Note: An exploded source tree is not required to build kernel modules
against
the currently in-use kernel.
That's basically what I want to do -- just build the arcnet code and insmod it.
So, what am I doing wrong? How do I get that source?
Have you looked at http://wiki.centos.org/HowTos/Custom_Kernel?
Matt
Greetings, Charles.
On 6 ??????? 2006 ?., 23:42:13 you wrote:
I was able to get the original 4.4 kernel from http://mirror.centos.org/centos/4.4/os/SRPMS/kernel-2.6.9-42.EL.src.rpm
using Phillip R. Shaffner's advice.
However, rpm -i kernel-2.6.9-42.EL.src.rpm yielded no driver source anywhere under /usr/src ; in particular, no arcnet source.
Looks like you have never-ever before worked with src.rpms. Head on to /usr/src/redhat/SPECS. There should be one single .spec file. You will have to run (assuming you're using i686 kernel):
# rpmbuild -bp --target=i68 <this_spec_file>
and then CAREFULLY re-read mail from Seth Bardash, and follow the instruction he provided.
Note: An exploded source tree is not required to build kernel modules against the currently in-use kernel.
That's basically what I want to do -- just build the arcnet code and insmod it.
So, what am I doing wrong? How do I get that source?
If you want to build arcnet module without rebuilding the whole kernel - you will have to somehow get this module for 2.6.9 kernel in a separate distribution with a separate Makefile, install kernel-devel RPM package for your current kernel and build it against it's headers. It's always possible to extract module source code from original vanilla kernel sources, but that requires a lot of experience with building and rebuilding linux kernels, so I wouldn't suggest you to give it a try.
Hello!
Thank you for your help! Here's what works for me (thanks to Seth Bardash, Nick Webb, and Alan Cudmore), although there's a caveat:
1. yum install kernel-devel 2. Obtain kernel-2.6.9-42.EL.src.rpm (which can be obtained from http://www.gtlib.gatech.edu/pub/centos/4/os/SRPMS
Now, for the caveat: this kernel-2.6.9-42.EL.src.rpm, NOT kernel-2.6.9-42.ELsmp.src.rpm, which I still haven't found. This means that the four-cpu machine needs to be brought up as a single-cpu machine.
3. Install kernel SRPM: rpm -ivh kernel-2.6.9-42.EL.src.rpm
4. rpmbuild -bp --target $(uname -m) kernel.2.6.9-42.EL.src.rpm
5. (kernel source is now in /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9) cd /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9
Now, for the steps I used to install the arcnet driver, which is why I needed to do the above:
6. make menuconfig (enable arcnet modules) Device Drivers:Networking Support:Network Device Support:Arcnet Devices (press "M", get another menu, "M"-ize the selections there)
7. make
8. Insert the modules into the current kernel:
cd /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9/drivers/net/arcnet insmod arcnet.ko insmod arc-rawmode.ko insmod com20020.ko insmod com20020-pci.ko node=3 device=arc0 timeout=3 backplane=0 clockp=0 clockm=0 insmod rfc1201.ko ifconfig arc0 up
If anyone has some more hints about how to get ...ELsmp... instead of just EL, I'd appreciate it!
Hmm, Nick Webb said something about enabling SMP support, so perhaps I'll take another look for it in menuconfig...
Thank you, Charles Campbell
Charles E Campbell Jr spake the following on 12/14/2006 8:00 AM:
Hello!
Thank you for your help! Here's what works for me (thanks to Seth Bardash, Nick Webb, and Alan Cudmore), although there's a caveat:
- yum install kernel-devel
- Obtain kernel-2.6.9-42.EL.src.rpm (which can be obtained from http://www.gtlib.gatech.edu/pub/centos/4/os/SRPMS
Now, for the caveat: this kernel-2.6.9-42.EL.src.rpm, NOT kernel-2.6.9-42.ELsmp.src.rpm, which I still haven't found. This means that the four-cpu machine needs to be brought up as a single-cpu machine.
- Install kernel SRPM:
rpm -ivh kernel-2.6.9-42.EL.src.rpm
rpmbuild -bp --target $(uname -m) kernel.2.6.9-42.EL.src.rpm
(kernel source is now in /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9) cd /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9
Now, for the steps I used to install the arcnet driver, which is why I needed to do the above:
make menuconfig (enable arcnet modules) Device Drivers:Networking Support:Network Device Support:Arcnet Devices (press "M", get another menu, "M"-ize the selections there)
make
Insert the modules into the current kernel:
cd /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9/drivers/net/arcnet insmod arcnet.ko insmod arc-rawmode.ko insmod com20020.ko insmod com20020-pci.ko node=3 device=arc0 timeout=3 backplane=0 clockp=0 clockm=0 insmod rfc1201.ko ifconfig arc0 up
If anyone has some more hints about how to get ...ELsmp... instead of just EL, I'd appreciate it!
Hmm, Nick Webb said something about enabling SMP support, so perhaps I'll take another look for it in menuconfig...
Thank you, Charles Campbell
There is no kernel-2.6.9-42.ELsmp.src.rpm. SMP kernels are built from the same source as non-smp kernels. While you are in make oldconfig, you can enable smp just as easily as enabling the arcnet drivers. In your /boot directory are the configs you need to run under make oldconfig to get drivers that have been left out. You will have one for each kernel you have installed. It is an easy way to see what has been done with a kernel you have installed.
Charles E Campbell Jr wrote:
Hmm, Nick Webb said something about enabling SMP support, so perhaps I'll take another look for it in menuconfig...
when I did the rpmbuild step, I find
/usr/src/kernels/2.6.9-42.0.3.EL-smp-i686
in addition to the others. go there, make oldconfig
I would probably edit the Makefile, and add my own 'tag' to the
EXTRAVERSION = -42.0.3.ELsmp
so there's no confusing my custom builds with stock CentOS builds
On 12/14/06, Charles E Campbell Jr charles.e.campbell@nasa.gov wrote:
Hello!
Thank you for your help! Here's what works for me (thanks to Seth Bardash, Nick Webb, and Alan Cudmore), although there's a caveat:
yum install kernel-devel
Obtain kernel-2.6.9-42.EL.src.rpm (which can be obtained from http://www.gtlib.gatech.edu/pub/centos/4/os/SRPMS
Now, for the caveat: this kernel-2.6.9-42.EL.src.rpm, NOT kernel-2.6.9-42.ELsmp.src.rpm, which I still haven't found. This means that the four-cpu machine needs to be brought up as a single-cpu machine.
There is no src.rpm for the smp setup, as it's all the same source. Look at the specfile in the rpm to see how it gets built.
also. -> http://wiki.centos.org/HowTos/Custom_Kernel
- Install kernel SRPM:
rpm -ivh kernel-2.6.9-42.EL.src.rpm
rpmbuild -bp --target $(uname -m) kernel.2.6.9-42.EL.src.rpm
(kernel source is now in /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9) cd /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9
Now, for the steps I used to install the arcnet driver, which is why I needed to do the above:
make menuconfig (enable arcnet modules) Device Drivers:Networking Support:Network Device Support:Arcnet Devices (press "M", get another menu, "M"-ize the selections there)
make
Insert the modules into the current kernel:
cd /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9/drivers/net/arcnet insmod arcnet.ko insmod arc-rawmode.ko insmod com20020.ko insmod com20020-pci.ko node=3 device=arc0 timeout=3 backplane=0 clockp=0 clockm=0 insmod rfc1201.ko ifconfig arc0 up
If anyone has some more hints about how to get ...ELsmp... instead of just EL, I'd appreciate it!
Hmm, Nick Webb said something about enabling SMP support, so perhaps I'll take another look for it in menuconfig...
Thank you, Charles Campbell
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos