LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Distributions (http://www.linuxquestions.org/questions/linux-distributions-5/)
-   -   How can get a kernel source for Centos 6.3? (http://www.linuxquestions.org/questions/linux-distributions-5/how-can-get-a-kernel-source-for-centos-6-3-a-4175447125/)

poplinux 01-25-2013 01:43 AM

How can get a kernel source for Centos 6.3?
 
Dear sir.

I was installed Centos 6.3 to my pc.

And I'm want to re-compile kernel. But i can't get a source of kernel.

Code:

[root@isci 2.6.32-279.el6.x86_64.debug]# uname -a
Linux isci 2.6.32-279.el6.x86_64 #1 SMP Fri Jun 22 12:19:21 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
[root@isci 2.6.32-279.el6.x86_64.debug]#

Question.
1. How can get the kernel source for Centos 6.3

Thank you.

knudfl 01-25-2013 02:14 AM

CentOS Wiki http://wiki.centos.org/ >>
> http://wiki.centos.org/HowTos/
> I_need_the_Kernel_Source > http://wiki.centos.org/HowTos/I_need_the_Kernel_Source
> 2

http://vault.centos.org/6.3/os/Source/
http://vault.centos.org/6.3/updates/Source/


-

EricTRA 01-25-2013 02:16 AM

Hello,

I'm sure this page will be of use to you.

Kind regards,

Eric

___________________________
Beaten by knudfl... ;-)

garystampa 02-12-2013 10:23 AM

Quote:

Originally Posted by EricTRA (Post 4877199)

Doesn't actually work. I followed it to the letter only to have it barf complaining about failed build dependencies.

knudfl 02-12-2013 10:39 AM

1 Attachment(s)
# 4

$ yum grouplist

# yum install "Development Tools".
... i.e. you cannot build anything without "tools".

Please read the file 'requires.log' in e.g. kernel-2.6.32-279.19.1.el6.src.rpm
http://vault.centos.org/6.3/updates/....1.el6.src.rpm
-

garystampa 02-12-2013 10:46 AM

I'll go through each of those, but I know I have gcc and a number of those 'devel' items already installed.

Thanks.

garystampa 02-12-2013 10:55 AM

I did not have python-devel, patchutils or xmlto.

These three confuse me:
perl(ExtUtils::Embed)
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(CompressedFileNames) <= 3.0.4-1

How do I specify these? As in, what's the actual "yum install" wording for these three?

garystampa 02-12-2013 11:01 AM

I guess I'm further along, now I get:

make all
CHK include/linux/version.h
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-x86
make[1]: *** No rule to make target `missing-syscalls'. Stop.
make: *** [prepare0] Error 2

I'm in the /usr/src/kernels/2.6.32-279.22.1.el6.x86_64 directory. Any ideas?

garystampa 02-12-2013 11:15 AM

Curiously, the page http://wiki.centos.org/HowTos/I_need...8eff16bf67be0d

References a file which gets a 404 error:
rpm -i http://vault.centos.org/6.3/updates/....1.el6.src.rpm 2>&1 | grep -v mock

.19. is there, but .22. is not?

knudfl 02-12-2013 12:07 PM

# 7 : "rpmlib**" should be OK when 'rpm-build' is installed.
"perl(ExtUtils::Embed)" : # yum install perl-ExtUtils-Embed
( May be included in # yum install "Development Tools"
( yum groupinfo "Development Tools" )
You can check what got installed with $ rpm -qa --last | less
.. or save the "install list" : $ rpm -qa --last > last-packages.txt ).


# 9 : Recently uploaded to 'Updates' :
kernel-2.6.32-279.22.1.el6.i686.rpm : 06-Feb-2013.
.. ? May be they forgot to upload the source ? Please check again in a few days.


# 8 : ? Why not run $ 'rpmbuild -bb kernel.spec' ?
The build version (279.xx) can be edited to your version in 'kernel.spec'.
And the things you want different : The files ///SOURCE/config-***
can be edited to your preferences.

**** Setting up an unprivileged rpmbuild account in /home/<name> :
#13 http://www.linuxquestions.org/questi...1-a-766486/#13


-

garystampa 02-12-2013 12:48 PM

I managed to fetch the file using my browser (+80MB) instead of the suggested 'rpm -i' command.

So I ran 'rpm -i' locally on the fetched file without complaints. However, and I assumed the source would be in /usr/src/kernels/2.6.32-279.22.1.el6.x86_64, but there isn't anything other than Kconfigs and Makefiles.

I do have a bunch of h files, but I assume those came with the 'yum install kernel-headers kernel-devel' command.

I ran the 'rpmbuild -bb kernel.spec' -- but I'm not sure where I got the 'kernel.spec' file. I simply located it using 'find'. It was in the rpmbuild/SPEC directory. So I switched to that directory and issued 'rpmbuild -bb kernel.spec' as you instructed.

That at least *seems* to be doing what I want, although it is taking a while...

I appreciate your help! Why do you suppose the CentOS page has the 'rpm -i' suggested versus the rpmbuild you suggested?

garystampa 02-12-2013 01:14 PM

Now I see that the source is in rpmbuild/BUILD.

I have a card that wants to build its driver against the kernel, so I suppose now I need to create a 'link' to this rpmbuild/BUILD directory... and all will be fine. :)

knudfl 02-12-2013 01:28 PM

# 12
Quote:

I have a card that wants to build its driver
That's usually done by installing matching packages kernel/kernel-devel :
# yum install kernel kernel-devel
.. and then build the new <module.ko> from the <source-for-the-card>.
That's why no "configured source package" is available as a binary rpm :
'kernel-devel' will do for 99.x % module build :
$ make : And you will have the module within a few seconds, usually.

*** Which card ? ? And which "driver package" ? Name, and a link, please.

-

garystampa 02-12-2013 02:29 PM

Ok, that all ended up working -- THANK YOU VERY MUCH!

garystampa 02-12-2013 02:30 PM

The card is 'Eicon' and it's an ISDN adapter from last century's technology.


All times are GMT -5. The time now is 10:21 AM.