centos 6 i need kernel source guide help

Issues related to applications and software problems
Rhasz
Posts: 5
Joined: 2012/06/13 19:29:46

centos 6 i need kernel source guide help

Post by Rhasz » 2012/06/13 19:39:33

I have an independent study assignment to modify the kernel code to add functionality
I follow this guide http://wiki.centos.org/HowTos/I_need_the_Kernel_Source to get the kernel,
and the rpmbuild/BUILD is empty after completing all steps. The err log is this.

[code]
error: Failed build dependencies:
make >= 3.78 is needed by kernel-2.6.32-220.17.1.el6.i686
gcc >= 3.4.2 is needed by kernel-2.6.32-220.17.1.el6.i686
patchutils is needed by kernel-2.6.32-220.17.1.el6.i686
xmlto is needed by kernel-2.6.32-220.17.1.el6.i686
asciidoc is needed by kernel-2.6.32-220.17.1.el6.i686
elfutils-libelf-devel is needed by kernel-2.6.32-220.17.1.el6.i686
zlib-devel is needed by kernel-2.6.32-220.17.1.el6.i686
binutils-devel is needed by kernel-2.6.32-220.17.1.el6.i686
newt-devel is needed by kernel-2.6.32-220.17.1.el6.i686
python-devel is needed by kernel-2.6.32-220.17.1.el6.i686
perl(ExtUtils::Embed) is needed by kernel-2.6.32-220.17.1.el6.i686
hmaccalc is needed by kernel-2.6.32-220.17.1.el6.i686
[/code]
I already tried deleting the user and recreating the user and following the steps in the guide again.

Anyone can help pls?

User avatar
toracat
Site Admin
Posts: 7518
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

centos 6 i need kernel source guide help

Post by toracat » 2012/06/13 19:46:55

That link is for setting up a kernel source tree. I believe you are now trying to [i]build[/i] a kernel. Have you followed the [url=http://wiki.centos.org/HowTos/Custom_Kernel]Custom Kernel[/url] wiki ?

User avatar
toracat
Site Admin
Posts: 7518
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

Re: centos 6 i need kernel source guide help

Post by toracat » 2012/06/13 19:49:30

Ah, sorry, the rpmbuild command was the one you had trouble with. I'm afraid the Kernel Source article may need some amendment.

User avatar
AlanBartlett
Forum Moderator
Posts: 9345
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

Re: centos 6 i need kernel source guide help

Post by AlanBartlett » 2012/06/13 22:39:50

@[b]Rhasz[/b] -- Looking at the messages from the error log and considering [b]toracat[/b]'s responses, I can see that you do not have all the necessary packages installed on your system to allow you to perform the kernel source installation. :-(

I see that an update to the details within the [url=http://wiki.centos.org/HowTos/I_need_the_Kernel_Source]Kernel Source[/url] article is called for.

To allow the process to proceed correctly, please perform the following steps (as [i]root[/i]) --

[code]
[b]yum groupinstall "Development tools"
yum install hmaccalc zlib-devel binutils-devel elfutils-libelf-devel[/b]
[/code]

Rhasz
Posts: 5
Joined: 2012/06/13 19:29:46

Re: centos 6 i need kernel source guide help

Post by Rhasz » 2012/06/13 23:41:48

I did the yum install and groupinstall as root and they worked.
There are still errors :-( but the list is smaller :-) .

cat prep-err.log
error: Failed build dependencies:
xmlto is needed by kernel-2.6.32-220.17.1.el6.i686
asciidoc is needed by kernel-2.6.32-220.17.1.el6.i686
newt-devel is needed by kernel-2.6.32-220.17.1.el6.i686
python-devel is needed by kernel-2.6.32-220.17.1.el6.i686
perl(ExtUtils::Embed) is needed by kernel-2.6.32-220.17.1.el6.i686

User avatar
toracat
Site Admin
Posts: 7518
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

Re: centos 6 i need kernel source guide help

Post by toracat » 2012/06/13 23:52:20

Hopefully this is the last time you have to add more packages. :-)

[code]
yum install xmlto asciidoc newt-devel python-devel perl-ExtUtils-Embed
[/code]

User avatar
AlanBartlett
Forum Moderator
Posts: 9345
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

Re: centos 6 i need kernel source guide help

Post by AlanBartlett » 2012/06/13 23:56:55

[img]http://www.centos.toracat.org/ajb/tmp/hmmm.gif[/img] Hmm . . . Good [i]and[/i] bad. I guess [b]toracat[/b] will have something to say. :roll:

Until such time as we get to the bottom of this issue, just [i]yum install[/i] the packages mentioned --

[code]
[b]yum install xmlto asciidoc newt-devel python-devel perl-ExtUtils-Embed[/b]
[/code]

Edit: I see [b]toracat[/b] is awake, so I'll take that as a hint to go and find [i]my[/i] bed. [img]http://www.centos.toracat.org/ajb/tmp/bed.gif[/img]

Rhasz
Posts: 5
Joined: 2012/06/13 19:29:46

Re: centos 6 i need kernel source guide help

Post by Rhasz » 2012/06/14 00:01:54

Ok, I did yum update on every item listed in the remaining errors, for the perl i did yum install perl*
then tried build

[code]
rpmbuild -bp --target=`uname -m` kernel.spec 2> prep-err.log | tee prep-out.log
Building target platforms: i686
Building for target i686
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.AiRE63
perl merge.pl config-nodebug-merged config-generic-merged > temp-generic
perl merge.pl config-x86_64-generic-merged temp-generic > temp-x86_64-generic
perl merge.pl config-x86_64-nodebug-merged temp-x86_64-generic x86_64 > kernel-2.6.32-x86_64.config
perl merge.pl config-debug-merged config-generic-merged > temp-debug-generic
perl merge.pl config-x86_64-generic-merged temp-debug-generic > temp-x86_64-debug-generic
perl merge.pl config-x86_64-debug-merged temp-x86_64-debug-generic x86_64 > kernel-2.6.32-x86_64-debug.config
perl merge.pl config-x86-generic-merged temp-generic > temp-x86-generic
perl merge.pl config-i686-merged temp-x86-generic > temp-i686-final
perl merge.pl config-i686-nodebug-merged temp-i686-final i386 > kernel-2.6.32-i686.config
perl merge.pl config-x86-generic-merged temp-debug-generic > temp-x86-debug-generic
perl merge.pl config-i686-merged temp-x86-debug-generic > temp-i686-debug-final
perl merge.pl config-i686-debug-merged temp-i686-debug-final i386 > kernel-2.6.32-i686-debug.config
perl merge.pl config-s390x-merged temp-generic > temp-s390x-generic
perl merge.pl config-s390x-merged temp-s390x-generic s390 > kernel-2.6.32-s390x.config
perl merge.pl config-s390x-merged temp-debug-generic > temp-s390x-debug-generic
perl merge.pl config-s390x-debug-merged temp-s390x-debug-generic s390 > kernel-2.6.32-s390x-debug.config
perl merge.pl config-s390x-kdump-merged kernel-2.6.32-s390x.config s390 > kernel-2.6.32-s390x-kdump.config
perl merge.pl config-powerpc-generic-merged temp-generic > temp-powerpc-generic
perl merge.pl config-powerpc64-merged temp-powerpc-generic powerpc > kernel-2.6.32-ppc64.config
perl merge.pl config-powerpc64-kdump-merged kernel-2.6.32-ppc64.config powerpc > kernel-2.6.32-ppc64-kdump.config
perl merge.pl config-powerpc-generic-merged temp-debug-generic > temp-powerpc-debug-generic
perl merge.pl config-powerpc64-merged temp-powerpc-debug-generic powerpc > kernel-2.6.32-ppc64-debug.config
###
### Now generating a PGP key pair to be used for signing modules.
###
### If this takes a long time, you might wish to run rngd in the background to
### keep the supply of entropy topped up. It needs to be run as root, and
### should use a hardware random number generator if one is available, eg:
###
### rngd -r /dev/hwrandom
###
### If one isn't available, the pseudo-random number generator can be used:
###
### rngd -r /dev/urandom
###
[/code]
I will leave it alone for a while.

I did not see the 2 comments preceding I did not refresh the page :-P

User avatar
toracat
Site Admin
Posts: 7518
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

Re: centos 6 i need kernel source guide help

Post by toracat » 2012/06/14 00:06:13

The system needs more entropy. Run as root:

rngd -r /dev/urandom

Rhasz
Posts: 5
Joined: 2012/06/13 19:29:46

Re: centos 6 i need kernel source guide help

Post by Rhasz » 2012/06/14 00:09:35

I did as root
rngd -r /dev/urandom
-bash: rngd: command not found

Post Reply