[CentOS-docs] doco bug as to http://wiki.centos.org/HowTos/Custom_Kernel

R P Herrold

herrold at owlriver.com
Fri Aug 27 19:35:22 UTC 2010

and AJB kernel-2.6.35-3.bcat.src.rpm

[I see AlanBartlett as the last editor on that page]

I have installed the given ajb source rpm 
kernel-2.6.35-3.bcat.src.rpm, and verified that it is intact:

[herrold at kernel-bleeder linux-2.6.35.i686]$ rpm -Vp  ~/build/ajb/sources/kernel-2.6.35-3.bcat.src.rpm
warning: /home/herrold/build/ajb/sources/kernel-2.6.35-3.bcat.src.rpm:
 	Header V3 DSA signature: NOKEY, key ID baadae52
.....UGT    config-2.6.35-i686
.....UGT    config-2.6.35-i686-PAE
.....UGT    config-2.6.35-x86_64
missing     kernel.spec
missing     linux-
[herrold at kernel-bleeder linux-2.6.35.i686]$ pwd
[herrold at kernel-bleeder linux-2.6.35.i686]$

The tarball and .spec are in the anticipated locales, and out 
of scope here; userids [UGT] are expected to differ

[herrold at kernel-bleeder linux-2.6.35.i686]$ ls -l \
 	~/rpmbuild/SPECS/ ~/rpmbuild/SOURCES/kernel
total 68064
-rw-r--r-- 1 herrold herrold   109943 Aug 21 13:08 config-2.6.35-i686
-rw-r--r-- 1 herrold herrold   109993 Aug 21 13:08 config-2.6.35-i686-PAE
-rw-r--r-- 1 herrold herrold   105624 Aug 21 13:08 config-2.6.35-x86_64
-rw-r--r-- 1 herrold herrold 69267320 Aug 21 13:02 linux-

total 20
-rw-r--r-- 1 herrold herrold 15839 Aug 21 13:04 kernel.spec
[herrold at kernel-bleeder linux-2.6.35.i686]$


The wiki page notes:

| If you you do not intend to modify the distributed kernel 
| configuration file you may omit this section, as long as you 
| perform the equivalent of the final step:
| [user at host] $ cp \
| 	~/rpmbuild/BUILD/kernel-2.6.18/linux-2.6.18.`uname -m`/configs/* \
| 	~/rpmbuild/SOURCES

which is curious, because at this point in the outline in 
section 2, ~/rpmbuild/BUILD/ should be empty

I suspect there has been a:

 	[herrold at kernel-bleeder ~]$ rpm -U \
 	[herrold at kernel-bleeder ~]$ rpmbuild -bp \

omitted here.  Following on that assumption, I do those setps 
and cd into the prepared directory


I follow the wiki outline branch involving using an existing 
config file out of /boot/,
 	[user at host]$ cp /boot/config-`uname -r` .config
and run the suggested
 	make oldconfig
and perform the edit to the top of the resulting .config to 
add the `uname -i ` comment on the first line


The outline falls of the tracks here.  It suggests:

| Copy the .config file back to the configs/ directory. This is 
| basically the opposite of the earlier copy command:
| [user at host]$ cp .config configs/kernel-2.6.18-`uname -m`[-type].config

[herrold at kernel-bleeder ~]$ find / -type d -name configs 2> /dev/null
[herrold at kernel-bleeder ~]$

The problem here: several candidates to copy to are possible, 
and although I assume an arch dependent choice is proper:
the reader is left to wonder


The outline next goes off into .spec file edits, and does not 
stop to roll and position a new tarball

I think some steps are missing that need to be done first:
 	cd ~/rpmbuild/BUILD/kernel-2.6.35
 	mv linux-2.6.35.i386 linux-
 	tar cf linux- linux-
 	bzip2 linux-
 	cp linux- ~/rpmbuild/SOURCES
or such?   The .spec file seems to key off of:
 	%define LKAver


So open questions working through the article are:
 	1. is there a missing preparatory rpm based unpack and 
rpmbuild -bp
 	2. what is the proper place for the new .config, 
taking into account the target arch
 	3. is there a missing directory rename and tarball 


Not unexpectedly, these are raised in the context of packaging 
and getting to a non-root build of pathscale's pscnv 'gpgpu 
module' as raised on another mailing list earlier this week

I raise them here [centos-docs ML] rather than adding QUERY in 
the articles

-- Russ herrold

More information about the CentOS-docs mailing list