[CentOS-docs] Suggestions on "I Need the Kernel Source" Wiki pages

Sun Jul 13 03:39:46 UTC 2008
Akemi Yagi <amyagi at gmail.com>

On Sat, Jul 12, 2008 at 6:27 PM, Antti J. Huhtala <ahuhtal4 at welho.com> wrote:
> Hi all,

Hi Antti,

> I am a newcomer to CentOS but slightly less so to Linux in general
> (FC4-F9). In short, I am trying to make an old SB Vibra 16C (ISA) sound
> card work in Centos 5. To achieve this, support for ISA bus and ISA PnP
> is apparently needed in kernel. Therefore, a custom kernel needs to be
> built. -- Yes, I have read all the warnings of lack of support, etc.
>
> As a first step, I had to build the complete kernel tree according to "I
> Need the Kernel Source" CentOS Wiki. I tried to meticulously follow the
> directions given there but it took five or six attempts before I had a
> complete tree in ~/rpmbuild/BUILD/. Would you please consider the
> following questions in order to decide if any changes/additions are
> necessary in the article:
>
> a) In section 2.1 it is said: "[user at host]# yum install rpm-build". To
> 'yum install' something you need to be superuser (as confirmed by '#'
> prompt before the command). Shouldn't the example read:
> "[root at host]# yum install rpm-build"?

Yes, this should be root@ instead of user at .

> b) The next command on the page is "rpm -i http://mirror.centos.org...".
> Two of my futile attempts to install the ...src.rpm were due to the fact
> that 1) I did not understand and then 2) forgot to exit from root before
> trying to install the source rpm. Shouldn't there be at least a "$"
> prompt (and perhaps the directory, too) before the 'rpm -i' command?

The [user at host] would make it clearer, yes.

> c) One attempt of 'rpmbuild' failed because "redhat-rpm-config is needed
> by kernel-2.6.18-92.1.6.el5.i686". This may not apply to everyone but it
> certainly applied to me who had only installed 5.1 in March and updated
> it to 5.2 in July by just updating when told to do so. Perhaps it would
> be advisable to add "# yum install redhat-rpm-config" to the article?

Maybe this can be added to or near the yum install rpm-build command
because both should be run as root.

> d) Two attempts of 'rpmbuild' perhaps failed because I inadvertently
> used single quotes or apostrophes around 'uname -m' instead of "`"s
> (accent grave?). The result in prep-err.log, however, was: "Building
> target platforms: uname -m" and "Building for target uname -m".
> I had to explicitly insert "i686" in the 'rpmbuild' command like this:
> [user at host SPECS]$ rpmbuild -bp --target=i686 kernel-2.6.spec 2> ...".
> If this is what the user is supposed to do anyway, perhaps it could be
> worded a little differently to make it perfectly clear? On the other
> hand, if 'accent grave' characters around 'uname -m' really work in
> replacing the proper architecture in the command, perhaps the text
> should emphasize the fact? I foolishly did not "cut-and-paste" the
> 'rpmbuild' command but wrote it myself.

They are "back ticks" :-)  This is one of those things that might be
regarded as Unix/Linux basics (?).  It feeds the output of the command
inside the ticks to the shell.  In your case, `uname -m` produces i686
which then will be used as the parameter for the --target= option.

> I realize there is another thread about these Wiki pages currently being
> discussed on centos-docs list but I thought it better to start a new
> thread.

Yes, this is a new subject, so you did it just fine.

Thank you for writing this note to share what you have noticed.  The
Wiki article shall be modified accordingly.

Akemi

> TIA, Antti