[CentOS] Getting and installing kernel source for 2.6.9-42.ELsmp

Wed Dec 6 20:57:53 UTC 2006
Alexey Loukianov <aloukianov at lavtech.ru>

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.

-- 
Best regards,
 Alexey Loukianov                          mailto:aloukianov at lavtech.ru
 System Engineer,
 IT Department,
 Lavtech Corp