PDA

View Full Version : building a custom kernel



john_erlandsson
16th February 2010, 11:12 AM
Hi!
I am trying to build a custom kernel, following the guide on fedora wiki (http://fedoraproject.org/wiki/Docs/CustomKernel)

the error occurs when Im installing the build dependencies

[john@lunatech ~]$ sudo yum-builddep kernel-2.6.31.12-174.2.3.fc12.src.rpm
[sudo] password for john:
Loaded plugins: presto, refresh-packagekit
Traceback (most recent call last):
File "/usr/bin/yum-builddep", line 196, in <module>
util = YumBuildDep()
File "/usr/bin/yum-builddep", line 64, in __init__
self.main()
File "/usr/bin/yum-builddep", line 93, in main
self.get_build_deps(opts)
File "/usr/bin/yum-builddep", line 173, in get_build_deps
for srpm in toActOn:
UnboundLocalError: local variable 'toActOn' referenced before assignment

Does anyone know the reason for this?

Appreciate any help

//John

---------- Post added at 11:12 AM CST ---------- Previous post was at 10:50 AM CST ----------

if i pretend like there where no errors, and continue the steps i eventually end up at:


[john@lunatech SPECS]$ rpmbuild -bp --target=i686 kernel.spec
Building target platforms: i686
Building for target i686
error: Failed build dependencies:
redhat-rpm-config is needed by kernel-2.6.31.12-174.2.3.fc12.src
xmlto is needed by kernel-2.6.31.12-174.2.3.fc12.src
asciidoc is needed by kernel-2.6.31.12-174.2.3.fc12.src
elfutils-libelf-devel is needed by kernel-2.6.31.12-174.2.3.fc12.src
binutils-devel is needed by kernel-2.6.31.12-174.2.3.fc12.src

//John

smurffit
16th February 2010, 02:53 PM
Hejsan,

Have you tried to install the missing packages with yum?

john_erlandsson
17th February 2010, 01:11 PM
Hi!

I installed the missing packages. It did not clear the builddep errors, but I was able use the sources anyway.

Tack för hjälpen

//John

Piscium
17th February 2010, 08:58 PM
There was a bug in yum-builddep that has been fixed.

There is more information at this thread:
http://forums.fedoraforum.org/showthread.php?t=239875



Hi!
I am trying to build a custom kernel, following the guide on fedora wiki (http://fedoraproject.org/wiki/Docs/CustomKernel)

the error occurs when Im installing the build dependencies

[john@lunatech ~]$ sudo yum-builddep kernel-2.6.31.12-174.2.3.fc12.src.rpm
[sudo] password for john:
Loaded plugins: presto, refresh-packagekit
Traceback (most recent call last):
File "/usr/bin/yum-builddep", line 196, in <module>
util = YumBuildDep()
File "/usr/bin/yum-builddep", line 64, in __init__
self.main()
File "/usr/bin/yum-builddep", line 93, in main
self.get_build_deps(opts)
File "/usr/bin/yum-builddep", line 173, in get_build_deps
for srpm in toActOn:
UnboundLocalError: local variable 'toActOn' referenced before assignment

tripleninez
4th March 2010, 12:41 AM
yes, i have encountered this bug as well, not only that, but the recommended fix has not
fixed the problem.....there also is another bug i have run into and am not sure how to fix....
same thing as you building a kernel....i get almost all the way through and then
becuase of a missing operand, that i am not usre how to get around. i can't build my kernel....

if anyone has an idea on how to fix this drop me a line!

....following the Custom-kernel guide:

rpmbuild -bb --with baseonly --with firmware --without debuginfo --target=`uname -m` kernel.spec

im done configuring, ready to build....almost done and this happens!



INSTALL /home/ninez/rpmbuild/BUILDROOT/kernel-2.6.32zen6-1.i386/lib/firmware/bnx2/bnx2-mips-06-5.0.0.j3.fw
INSTALL /home/ninez/rpmbuild/BUILDROOT/kernel-2.6.32zen6-1.i386/lib/firmware/bnx2/bnx2-rv2p-06-5.0.0.j3.fw
DEPMOD 2.6.32-zen6
+ cp /home/ninez/rpmbuild/BUILDROOT/kernel-2.6.32zen6-1.i386/boot/vmlinuz-2.6.32-zen6
cp: missing destination file operand after `/home/ninez/rpmbuild/BUILDROOT/kernel-2.6.32zen6-1.i386/boot/vmlinuz-2.6.32-zen6'
Try `cp --help' for more information.
error: Bad exit status from /var/tmp/rpm-tmp.9IFJl5 (%install)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.9IFJl5 (%install)
[ninez@Ninez SPECS]$


this isn't isolated, anytime i try to build a kernel this happens. it looks like a "space" is missing.
i looked through code to see if i could find and fix the problem, but no luck....

it's very annoying, 1st off not being able to "builddep", okay that's fine i can still move along, as i have all of the dependencies, only to find this next error :( .as a linux user, i expect to have to do a lot of setups and fixes, but it's really dumb when some of the most important tools don't work properly,
as unlike say a MAC or windows box - which will handle most anything you throw at it, linux is in limbo, half working half not so much...and just when things seem to be working great - linux craps out again....lol

anyway, if someone has run into this and has a good fix, i would appreciate the help!
take care and thanks.

i am in the meantime im gonna google a bit and probably manually finish this kernel,
i just wish dev-tools were just a little less buggy, and a little
more reliable and solid-state in linux. cause we the the linux community are so reliant of them.
well, maybe another 8months to a year and i can start contributing code and fix bugs myself,
but i am just ing learning C++ this year....