On Wed, Jan 05, 2011 at 11:36:40PM +0000, Mr Dash Four wrote:
> 
> >> vi .config (this is to add the magic "# x86_64" at the top)
> > I don't understand why you need a commented line???
> > What's the magic about it? A comment is ignored.
> See the "Fedora Wiki" ( :-D ) for building the kernel - the target arch 
> needs to be added as a comment on the first line of that .config file 
> (that is particularly important if I do cross-compilation of the kernel 
> - I add "# i386" for i686 targets for example). If that is not present 
> all hell breaks loose!

I think we use it during the 'make nonint_oldconfig' stage, ala

for i in $config_list
  ARCH=`cat $i|head -1|sed 's/# //'`
  cp $i .config
  make ARCH=$ARCH nonint_oldconfig
  cp .config configs/$i

without the #$arch thing, we wouldn't know what arch to pass into the
kernel Makefile system to get the right config options.

> 
> >> cp .config ~/rpmbuild/SOURCES/config-x86_64-generic

Yeah that won't work (explained below)

> >
> > This will not guarantee that the config file will not be modified.
> > I have done this numerous times, and I can tell you unequivocally,
> > it will not keep all the options you want, nor will it exclude all the
> > options you do NOT want.
> > What it will give you is a beast that is niether what you want nor
> > what you do not want.
> > This is the wierdness of the .spec file operations and the Makefile
> > script in ...SOURCES/Makefile.config
> What would you advice me to do then?! I need to end up with 3 
> kernel-*.rpm files plus one perf*.rpm, which I can distribute to all my 
> machines. The above set of instructions is what "Fedora Wiki" ( :-D ) 
> advices on building the kernel...
> 
> > The fedora release people have not provided us with a mechanism
> > that will let us build a kernel EXACTLY as the config file we save in
> > the SOURCES directory.
> What do they actually change - after I build and install the kernel and 
> then check the corresponding .config file in the /boot 
> partition/directory it is the same as the one I have copied as 
> config-x86_64-generic, so, naturally, I assume that nothing has been 
> modified/changed. Is that not the case?

The way the config options work is basically a bunch of templates that
override each other as they get stacked on top.  So

config-generic is usually the base config that all arches start with
config-$ARCH-generic is merged onto config-generic and overrides those
    options
config-$ARCH-$VARIANT is merged onto that with more overrides

the result config blob is full of stuff that may or may not be relevant to
the particular type of kernel we are building, therefore we use the
for-loop (from earlier in the email), to filter out that cruft.  The magic
is 'make ARCH=$ARCH nonint_oldconfig'  (think make oldconfig without the
prompting).

The output files are kernel-$version-$arch.config.  If you want to copy
.config files somewhere, it really should be the kernel-*.config files.
But I don't have the .spec file handy to know if those get repeatedly
overwritten on a rpmbuild.

The way the kernel maintainers set the options is to modify the
config-$pickone-generic  file with the option you care about to on/off.

But as explained in other threads, we never supported custom configs so no
one really designed a process to make it easy.

Cheers,
Don
_______________________________________________
kernel mailing list
kernel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/kernel

Reply via email to