LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.

Notices

Reply
 
Search this Thread
Old 01-25-2013, 01:43 AM   #1
poplinux
Member
 
Registered: May 2012
Posts: 51

Rep: Reputation: Disabled
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.
 
Old 01-25-2013, 02:14 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,522

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503
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/


-

Last edited by knudfl; 01-25-2013 at 02:17 AM.
 
Old 01-25-2013, 02:16 AM   #3
EricTRA
Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 18 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290
Hello,

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

Kind regards,

Eric

___________________________
Beaten by knudfl... ;-)
 
Old 02-12-2013, 10:23 AM   #4
garystampa
LQ Newbie
 
Registered: Jun 2012
Posts: 11

Rep: Reputation: Disabled
Quote:
Originally Posted by EricTRA View Post
Doesn't actually work. I followed it to the letter only to have it barf complaining about failed build dependencies.
 
Old 02-12-2013, 10:39 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,522

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503
# 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
-
Attached Files
File Type: txt requires.log.txt (455 Bytes, 9 views)
 
Old 02-12-2013, 10:46 AM   #6
garystampa
LQ Newbie
 
Registered: Jun 2012
Posts: 11

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

Thanks.
 
Old 02-12-2013, 10:55 AM   #7
garystampa
LQ Newbie
 
Registered: Jun 2012
Posts: 11

Rep: Reputation: Disabled
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?
 
Old 02-12-2013, 11:01 AM   #8
garystampa
LQ Newbie
 
Registered: Jun 2012
Posts: 11

Rep: Reputation: Disabled
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?
 
Old 02-12-2013, 11:15 AM   #9
garystampa
LQ Newbie
 
Registered: Jun 2012
Posts: 11

Rep: Reputation: Disabled
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?
 
Old 02-12-2013, 12:07 PM   #10
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,522

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503
# 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


-

Last edited by knudfl; 02-12-2013 at 12:12 PM.
 
Old 02-12-2013, 12:48 PM   #11
garystampa
LQ Newbie
 
Registered: Jun 2012
Posts: 11

Rep: Reputation: Disabled
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?
 
Old 02-12-2013, 01:14 PM   #12
garystampa
LQ Newbie
 
Registered: Jun 2012
Posts: 11

Rep: Reputation: Disabled
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.
 
Old 02-12-2013, 01:28 PM   #13
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,522

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503
# 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.

-
 
Old 02-12-2013, 02:29 PM   #14
garystampa
LQ Newbie
 
Registered: Jun 2012
Posts: 11

Rep: Reputation: Disabled
Ok, that all ended up working -- THANK YOU VERY MUCH!
 
Old 02-12-2013, 02:30 PM   #15
garystampa
LQ Newbie
 
Registered: Jun 2012
Posts: 11

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
gnome: Fedora/CentOS source .bash_profile but Ubuntu/Debian source .bashrc centguy Linux - Software 6 01-17-2010 08:35 PM
CentOS: trying to compile cisco wccp module but getting kernel source errors joker20 Red Hat 1 07-03-2009 06:22 AM
LXer: Howto: build Linux kernel module against installed kernel w/o full kernel source tree LXer Syndicated Linux News 0 09-03-2006 08:21 PM
apt-get kernel-source is installing the wrong kernel source. JordanH Ubuntu 10 07-08-2005 05:42 PM
difference between "pure" kernel source, and .deb packaged kernel source microsoft/linux Debian 1 06-19-2005 10:28 PM


All times are GMT -5. The time now is 06:55 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration