[CentOS] recompiling kernel results in error: .../linux-2.6.18.i686/arch//Makefile: No such file or directory

Thu May 24 10:42:52 UTC 2007
Akemi Yagi <amyagi at gmail.com>

On 5/24/07, Akemi Yagi <amyagi at gmail.com> wrote:
> On 5/23/07, dcw <dwoody1 at charter.net> wrote:
> > The compile with the altered %prep section but that does NOT include the
> > altered config file finished with no apparent errors.
> >
> > What is the next step?
> >
> > Thanks,
> >
> > David
>
> Sorry, I must ask obvious questions.  Did you copy your .config back
> to the SOURCES directory before running rpmbuild -ba ?  How did you
> confirm that you are running the newly built kernel?  Did you give a
> unique release number?

Guess I misunderstood your question.  The following procedure might work.

(1) prepare .spec by removing lines from %prep
(2) rpmbuild -bp kernel-2.6.spec
(3) go to BUILD  (where .config is)
(4) make xconfig
(5) add # i386 to .config as the first line
(6) copy this .config back to SOURCES  (using the original name xxx.config)
(7) rpmbuild -ba kernel-2.6.spec

Or, instead of steps (5) to (7), just run:

rpmbuild -bc --short-circuit kernel-2.6.spec
  (to build without going through %prep)

This seems to work for me.  At least the building process started
without any errors. The only person who can help (and give you an
authentic answer) is Johnny Hughes.  Hope he can chime in here.

Akemi