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

Sat May 26 22:50:38 UTC 2007
dcw <dwoody1 at charter.net>

On Friday 25 May 2007 4:46 pm, Akemi Yagi wrote:
> On 5/25/07, dcw <dwoody1 at charter.net> wrote:
> > The process you describe is the process I am using. There has been a
> > couple of problems along the way. Only 1 problem has not been resolved.
> >
> > If signmodules is set to 1 in the SPEC file for the arch that I have,
> > then there is a segfault during the process when using 'rpmbuild -ba'.
> > From the emails I have read, this is a known problem that has not been
> > resolved.
> >
> > I am currently running the process with all the fixes for the problems I
> > have been having. This includes signmodules set to 0. Signmodules is
> > defined in several places in the SPEC file.
> >
> > I am concerned about the signmodules setting since I do not know what it
> > does. It would seem to be important but I do not know. Are you
> > knowledgeable about this or do you know where I can get information about
> > it?
>
> David,
>
> <preamble>I am not a kernel developer, so I could be totally
> wrong.</preamble>
>
> My impression is that the gpg kernel module signing is something
> provided by distros (redhat, fedora?) and might not (yet) be in the
> mainline kernel.  IF this is correct, that would imply that omitting
> this feature is not a serious concern.  Especially, it you never load
> a module from unknown sources, you wouldn't have to worry about gpg
> signing.  If I were you, I would go ahead and rebuild the kernel by
> turning off the signmodules option.  To be able to use the NIC seems
> more critically important to you.
>
Your comments sound correct to me. I will not be installing modules that do 
not come from CentOS, so I should not have a problem.

Here is a recap of what happened:
I followed the steps from an earlier posting from Akemi:
(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,  as well as, adding the settings that I needed.
      I my case it was support for ISA, ISAPNP and NE2000.
(5) edited the .config file in the BUILD dir: made '# i386' the first line in 
the .config file.
(6) copy this .config back to SOURCES  (using the original name
      xxx.config)
7) rpmbuild -ba kernel-2.6.spec

I had a problem with a segfault during the 'rpmbuild -ba' process.
I changed the setting from 1 to 0 for the lines(multiple) that had:
   '#define signmodules 1'.

However, after the 'rpmbuild -ba' finished, I used 'find /home/cs/redhat -name 
ne.ko -print' and it did not find the module. I did a rpm --list of the 
kernel rpm and it was there however. (Sorry about the redhat -- it should 
have been centos.)

One other thing that caused me problems is that I did not know that rpmbuild 
would not create all the needed directories. ie. BUILD RPMS are 2 that I know 
of for sure.

I copied the kernel rpm to the gateway computer, did a 'rpm -ivh' for the new 
kernel and rebooted.

I then ran system-config-network and was able to setup the ne2000 card in less 
time than I takes to write about it.
 
Thanks for all your help, especially Akemi for staying with me during all 
this.

David

> Once again, I could be wrong.  It's your call.
>
> Akemi
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos