[CentOS] Kernel source - linux -2.6.18 i386 or i686

Tue Sep 16 14:32:24 UTC 2008
Akemi Yagi <amyagi at gmail.com>

On Tue, Sep 16, 2008 at 5:38 AM, Robert Moskowitz <rgm at htt-consult.com> wrote:
> As I plow through the Kernel source to figure out why the BEET patch is not
> working, I notice that there are two similar directories under
> ~/rpmbuild/BUILD/kernel-2.6.18:
>
> linux-2.16.18.i386 and linux-2.16.18.i686
>
> So which one am I suppose to be patching?
>
> Currently, the patch starts out with:
>
> diff -urN  a/net/ipv4/xfrm4_input.c b/net/ipv4/xfrm4_input.c
>
> I followed the kernel source setup instructions on the wiki:
> http://wiki.centos.org/HowTos/I_need_the_Kernel_Source
>
> tells me to supply i686 for getting and setting up the source.
>
> But http://wiki.centos.org/HowTos/Custom_Kernel
>
> has me setting up a .config file with '# i386' as the first line.  Now that
> is a comment, right? So why add such a comment.  Perhaps it is NOT a
> comment?  Shesh...

It is NOT a comment.  That line is read during the build procedure for
identification of the arch.

[code]
# now run oldconfig over all the config files
for i in *.config
do
  mv $i .config
  Arch=`head -1 .config | cut -b 3-`
  make ARCH=$Arch nonint_oldconfig > /dev/null
  echo "# $Arch" > configs/$i
  cat .config >> configs/$i
done
[/code]

> Anyway, which directory structure gets used in the rpmbuild:
>
> rpmbuild -bb --target=`uname -m` kernel-2.6.spec 2> build-err.log | tee
> build-out.log
>
> Do I add this to the patch?

You need to add the patch file to the SOURCES directory and edit the
.spec file to include that patch.  This is explained in the wiki
article you referred to.  If the build fails, please post relevant
portions of the log files so that we can figure out what went wrong.

Akemi