Re: RE: [rhn-users] Problems compiling custom kernel]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have successfully build RH 8.0's kernel-2.4.18-14.  I assume by "custom"
kernel, you mean that the Makefile has an "EXTRAVERSION = -14custom", not
that you've started to make "custom" modules.  If you've started making
custom modules, well, YMMV!  :)

I installed an re-built the kernel just fine.  Why did I want to do this?
Well, two reasons, I like to nuke all the stuff in the kernel I'm NEVER
going to use, and two, I ALWAYS want the APM support to powerdown my LCD
display (on a laptop).

Here's BB's quick steps to building a "stock" RH 8.0 kernel-2.4.18.14.

1. Install the kernel source into /usr/src/linux-2.4.18-14
   rpm -ivh kernel-source-2.4.18-14.i386.rpm

2. Since I'm NOT really re-building the exact same kernel, I *always* COPY
the linux-2.4.18-14 directory to another directory, say,
linux-2.4.18-14custom (or whatever you set EXTRAVERSION to.  I then work out
of this new directory.  This prevents screwups with the link from
/lib/modules/2.4.18-14/build.

3. Ok, let's assume you want to build pretty much what RedHat shipped with.
In my case that's the i686 uni-processor build.  So here goes...

   cd /usr/src/linux-2.4.18-14custom
   # edit Makefile to set EXTRAVERSION to what you really want
   make mrproper     #<--- ya really should do this!
   cp configs/kernel-2.4.18-i686.config  .config
   make menuconfig
      # in menuconfig, just say and say YES to write autoconf.h
   make dep
   make bzImage
   make modules
   # be root for the rest of this!
   make modules_install
   mkinitrd /boot/initrd-2.4.18-14custom.img 2.4.18-14custom
   # copy over the kernel files to /boot, as required
   # reconfig lilo and/or grub appropriately

I've found that "make mrproper" is almost REQUIRED when dealing with a
RedHat kernel tree.  They have left all sorts of .depends and .version and
other junk files around that the kernel build seems to crash and burn unless
you clean it out.  Also, mrproper gets rid of the totally useless autoconf.h
file that comes with the package.  If you try to build with this autoconf.h
file, it will fail.  Because of this, after doing an mrproper, ya gotta run
menuconfig to regenerate a "good" autoconf.h file.

If "make modules_install" worked, you should have a new kernel tree in the
/lib/modules/2.4.18-14custom directory.

Also, you CANNOT BUILD AT ALL with any direct copy of a
configs/kernel-xxx.config file!  These RedHat-provided config files are
funny templates.  You can copy the one you want over to .config, but you
MUST MUST MUST run menuconfig (or oldconfig or xconfig) on it first,
otherwise autoconf.h will be bogus (or missing).  Personally, I don't use
oldconfig or xconfig because I think they are generating an updated .config
file (and autoconf.h file) that are busted.  Both oldconfig and xconfig to
not seem to suffix some module-only types with _MODULE correctly  (see
CONFIG_SENSORS as an example).

Hope this helps a bit.  You should be happy to know that I have built the RH
8.0 kernel, now 3 times, each time customizing it more and more to my
liking.  And she's working great.

BB.



----- Original Message -----
From: "William L. Thomson Jr." <support@obsidian-studios.com>
To: "psyche-list" <psyche-list@redhat.com>
Sent: Friday October 11, 2002 16:17
Subject: [Fwd: RE: [rhn-users] Problems compiling custom kernel]


I am not sure if this topic is covered under this list or not. The
thread seems dead on the rhn-users list. Possible the wrong list as
well.

In short I am unable to compile modules for a custom kernel using the
2.4.18-14 source that comes with RH 8.0.

I can compile other kernels, and kernel modules, just not the ones for a
custom 2.4.18-14 kernel. I am pretty sure there is a problem some where.
Although I do not know if that problem lies in the kernel-sources for
2.4.18-14 or in my machine? It's a fresh install and I have tried to
uninstall and reinstall the kernel-sources.rpm.

I am looking for a reason or simple a solution. Is there a problem with
the sources, or is it me?

Has anyone out there been able to compile a custom kernel, and kernel
modules using the 2.4.18-14 source from RH?

-----Forwarded Message-----

> From: William L. Thomson Jr. <support@obsidian-studios.com>
> To: rhn-users <rhn-users@redhat.com>
> Subject: RE: [rhn-users] Problems compiling custom kernel
> Date: 10 Oct 2002 15:13:03 -0700
>
> I have downloaded a vanilla kernel from kernel.org. Both 2.4.18 and
> 2.4.19. I was able to compile both, and make modules for both.
>
> I tried once again to compile modules for the 2.4.18-14 kernel that
> ships with RedHat 8.0 and I still am unable to compile modules.
>
> Can someone from RedHat confirm this? Is there a problem with the
> sources or what? Why can't I compile modules for the 2.4.18-14 kernel
> when I attempt to compile a custom one?
>
> Do I have to just run a custom kernel from kernel.org and forget about
> the 2.4.18-14 from RedHat until the sources are fixed, or a new kernel
> release is available from RedHat?
>
> On Mon, 2002-10-07 at 19:54, William L. Thomson Jr. wrote:
> > On Mon, 2002-10-07 at 18:52, Victor Szeto wrote:
> > > Yes, I have the same problem when I tried to recompile the RH 8.0
kernel.  I
> > > can make bzImage, but I can't make modules.
> > >
> >
> > Good at least I am not alone. Now we need some others to confirm as
> > well, and maybe someone from RedHat or with the necessary experience can
> > tell us what to do in order to get the kernel modules to compile.
> >
> > I wonder if its due to using the new compiler or what, I have not tried
> > to compile a default kernel from kernel.org. If I have time I will. That
> > at least will let us know if its and env or a code problem.
> >
> > > -----Original Message-----
> > > From: rhn-users-admin@redhat.com [mailto:rhn-users-admin@redhat.com]On
> > > Behalf Of William L. Thomson Jr.
> > > Sent: Tuesday, October 08, 2002 6:59 AM
> > > To: rhn-users
> > > Subject: [rhn-users] Problems compiling custom kernel
> > >
> > >
> > > Recently I upgraded my laptop from 7.3 to 8.0. I have had allot of
> > > growing pains, some that are just pains.
> > >
> > > One of which is I can't seem to compile a custom kernel. I can
> > > make dep
> > > and
> > > make bzImage
> > >
> > > But I can't make modules
> > >
> > > No matter what modules I have selected it fails. It will not compile
> > > modules for me?
> > >
> > > I am having some other problems with shared libraries built using ld,
so
> > > I am not sure if something is messed up on my machine or what.
> > >
> > > I have rarely had problems compiling custom kernels, and have done it
a
> > > decent amount of times. I have several other machines I would like to
> > > upgrade to RH 8.0, but can't until I can compile custom kernels.
> > >
> > > Has anyone else had similar problems, any suggestions. I can post the
> > > results of an attempted make modules and the many errors that are spit
> > > out. Anyway I am looking for some initial feedback, and will provide
> > > further info upon request, as I do not want to just toss in a bunch of
> > > lines of error codes that gets generated on a variety of modules. It
> > > does attempt to make the modules, but fails and stops on the first
> > > modules. I have tried not using certain modules and using others, but
> > > either way the first one it tries to compile it will fail on. No
matter
> > > what module it is, for some reason.
> > >
> > > Any comments, thoughts or input is greatly appreciated.
> > >

--
Sincerely,
William L. Thomson Jr.
Support Group
Obsidian-Studios Inc.
439 Amber Way
Petaluma, Ca. 94952
Phone  707.766.9509
Fax    707.766.8989
http://www.obsidian-studios.com



--
Psyche-list mailing list
Psyche-list@redhat.com
https://listman.redhat.com/mailman/listinfo/psyche-list





[Index of Archives]     [Fedora General Discussion]     [Red Hat General Discussion]     [Centos]     [Kernel]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux