PDA

View Full Version : F11 BIGPHYSAREA custom build


adkohler
6th January 2010, 08:35 PM
Greetings all. I'm a UNIX/RTOS programmer with limited linux experience and no experience with rpmbuild, and I hope someone can help me out with what may be a simple question for those more seasoned in Fedora kernel development.

Basic facts: x86_64, F11, linux 2.6.29, PC has no net access.

I used the Fedora kernel howto on the wiki here (http://fedoraproject.org/wiki/Docs/CustomKernel), in conjunction with some vendor instructions that aren't written assuming Fedora or RPM build.

I need to install the BIGPPHYSAREA patch into our F11 kernel. I am using a patch updated by a vendor to support the 2.6.20 kernel. Our F11 machine uses kernel 2.6.29; I had to do some of the entries manually when applying the patch to the .new source tree as described in the Fedora kernel howto and successfully created my own patch version.

Now I went to create the kernel. The vendor instructions specify installing the patch, then doing make xconfig, picking the bigphysarea support, and compiling.

Now the problem here is that using following the howto, rpmbuild wants to take charge of doing all the patching. Since the patch isn't installed in mm/Kconfig (where it wants to put bigphysarea), it doesn't show in the xconfig options. So I'm in a bit of a chicken-and-the-egg sort of situation.

Now I assumed I might be able to to an initial build to get the Kconfig's patched, go back and pick the patch from xconfig, and rebuild.

But no joy. I do that, rpmbuild craps out with (approximate transcription)...

+make ARCH=x86_64 nonint_oldconfig
(some fixdep warnings)
CONFIG_BIGPHYS_AREA
make [1]: ***[nonint_oldconfig] Error 1
make: *** [nonint_oldconfig] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.TQH8g (%prep)

RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.TQH8g (%prep)

I went back to the kernel.spec file and commented out my patch and recompiled to make sure it wasn't some package missing, but without my patch, it compiles fine.

What I think I need to do is put the patch in the compiling source tree by hand... but that doesn't seem like the right way to do it, and I'm not sure that this won't give rpmbuild some other sort of fits.

Any insight here? TIA.

zaitcev
11th January 2010, 01:10 AM
First of all, you should not be using Bigphysarea in the first place. It was obsoleted by the bootmem allocator years and years ago, back before Fedora even existed, IIRC. For crying out loud, Pauline wrote Bigphysarea for a kernel 2.2. That's Red Hat Linux 6.2.

That said, nonint_oldconfig's way to express its displeasure is not optimal. Blame Arjan for that. What it's trying to tell you is that the config has to have something for the option. You cannot just leave it unfilled (like you would for the normal oldconfig). So, go to your SOURCES directory and edit kernel-2.6.27.5-x86_64.config or equivalent and add CONFIG_BIGPHYSAREA=y.

-- Pete

bob
11th January 2010, 01:21 AM

(moved to Fedora Spins & Remixes)

adkohler
11th January 2010, 01:08 PM
First of all, you should not be using Bigphysarea in the first place. It was obsoleted by the bootmem allocator years and years ago, back before Fedora even existed, IIRC. For crying out loud, Pauline wrote Bigphysarea for a kernel 2.2. That's Red Hat Linux 6.2.

Actually, the vendor of the product whose driver I am trying to install has a 2.6 update of the bigphysarea patch. That's the one I am trying to install, so no worries there.

(Unfortunately, I did talk to the vendor, and they don't seem too Fedora/Redhat-wise; I asked here because I figured that it was more of a Fedora/rpmbuild question. It really could have been any patch that is crapping out like this...)

That said, nonint_oldconfig's way to express its displeasure is not optimal. Blame Arjan for that. What it's trying to tell you is that the config has to have something for the option. You cannot just leave it unfilled (like you would for the normal oldconfig).

Ah, that may be the missing link between the vendor document and the kernel config howto.


So, go to your SOURCES directory and edit kernel-2.6.27.5-x86_64.config or equivalent and add CONFIG_BIGPHYSAREA=y.

Alright, thanks, I'll take a look!

zaitcev
11th January 2010, 06:11 PM
Actually, the vendor of the product whose driver I am trying to install has a 2.6 update of the bigphysarea patch. That's the one I am trying to install, so no worries there.
You mentioned that they supported 2.6.20 in the original post, so I noticed it. But still it's unusual (if not outright wrong). Perhaps they want to manage a shared area between modules or something weird like that. Is there a code I can look at? Who are the vendor?
-- Pete

adkohler
11th January 2010, 08:13 PM
You mentioned that they supported 2.6.20 in the original post, so I noticed it. But still it's unusual (if not outright wrong). Perhaps they want to manage a shared area between modules or something weird like that. Is there a code I can look at? Who are the vendor?

The Vendor is Pentek, who makes data up/down conversion products.

You can get to their kernel patches by ftp here:
ftp://ftp.pentek.com/pub/linux/kernel_patches/

I grabbed the 2.6.20 patch, and had to enter some info by hand due to some changed context, and (as per the fedora custom kernel howto) created my own patch.