kernel_compile

This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.



Subject: Re: Recompiling kernel -- missing a step
From: Eric Sisler <esisler@westminster.lib.co.us>
Date: Wed, 17 Nov 1999 20:15:19 -0700


Adam Getchell <acgetchell@ucdavis.edu> wrote:

[snip]

>make dep
>make clean
>make bzdisk

You've forgotten 'make modules' and 'make modules_install'

WARNING!  'make modules_install' will overwrite your old
/lib/modules/[kernel-version] directory, so I'd recommend moving it out of
the way first.

>(the extra lines are for old kernels, to be safe)

A good idea.  If you need to boot to an old kernel you'll need to switch
back to the old modules in order for everything to work right.  What I've
done is adopt a naming convention for the kernel & modules directory I
build in the form of [kernel].YYYY.MM.DD.x.[smp] where

kernel = kernel version
YYYY = year
MM = month
DD = day
x = revision (Yes, I've been known to build several kernels in a day)
smp = if the kernel is compiled for SMP support

in /boot:

lrwxrwxrwx		vmlinuz -> vmlinuz-2.0.36-3.1999-10-26.1.smp
-rw-r--r--		vmlinuz-2.0.36-3.1999-10-06.1.smp
-rw-r--r--		vmlinuz-2.0.36-3.1999-10-22.1.smp
-rw-r--r--		vmlinuz-2.0.36-3.1999-10-26.1.smp

in /lib/modules:

lrwxrwxrwx		2.0.36 -> 2.0.36-3.1999-10-26.1.smp
drwxr-xr-x		2.0.36-3.1999-10-06.1.smp
drwxr-xr-x		2.0.36-3.1999-10-22.1.smp
drwxr-xr-x		2.0.36-3.1999-10-26.1.smp

As you can see, the kernel version has a corresponding /lib/modules
directory.  If I want to change to an older kernel, I just change the soft
link in /lib/modules as necessary.  I also keep a 'config.YYYY.MM.DD.x'
file in /usr/src/linux that corresponds to the kernel build.  Makes it easy
to make a minor change to the last kernel.

It may seem a little overdone, but it works for me.  ;-)

===

Subject: Re: Kernel config checklist
From: Eric Sisler <esisler@westminster.lib.co.us>
Date: Sun, 21 Nov 1999 18:10:04 -0700


Adam Getchell <acgetchell@ucdavis.edu> wrote:

>First, thanks to all that responded with help for compiling the kernel. With
>this help, I was able to successfully compile and install a working kernel.

And doesn't that make you feel good!  Woo-hoo!!!

>Here are my notes I collected on the process, from FAQs, the README, and your
>commentary. I'm interested to know if I've got the procedure down, and more
>importantly, what steps are/are not optional.

>Kernel numbering convention (<kernel number>):  kernel-version.YYYY.MM.DD.V
>	Example: 2.2.13-20.1999.11.19.2

This was my numbering/dating convention and now that I've re-read the
message I send I realize there should be dashes between the date and not
dots like so:  kernel-version.YYYY-MM-DD.V  FYI - this is a numbering
convention I made up for my own use - don't know if anyone else uses it or
not.  If it helps you, use it.  If not, feel free to make up your own.  ;-)

><your root mount point>: location of /boot/

I'm not sure what this is refering to...

>Optional steps in ()'s. Steps I'm not sure are optional are not have ?
>Kernel assumed to reside in /boot/

It's normally there, although I supposed if you edited /etc/lilo.conf you
could put it elsewhere.

>unpack sources in /usr/src

Or use the RPM which should put them there by default.

>(make mrproper)

I generally do 'make clean' and 'make mrproper'.  They're probably
unnecessary if you know your kernel build tree is clean - I usually do it
just to be on the safe side.

>make config/menuconfig/xconfig depending on preference
>	(if xconfig, save kernel config file as config-<kernel number>)

Again, my own made-up numbering scheme.  You can save your config file when
using menuconfig or xconfig, but not config.

>(inspect Makefile)

Especially if you need to enable SMP support.

>make dep
>make clean
>make bzimage/bzdisk

I *think* it's 'make bzImage' but I can't remember off the top of my head.

>make modules
>(backup modules directory if same kernel version)

Only if you want to keep old modules to go with your old kernel(s)

>make modules_install

You'll also need make sure the soft link in /lib/modules is pointing to the
correct modules directory if you're using my kernel/modules numbering
scheme.  Otherwise you'll get unresolved module depencencies.

>make install
>(make checkconfig)
>(make checkhelp)

Never used these three.  Maybe someone else can shed some light on what
they're for.

>cp /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz-<kernel number>
>edit lilo.conf
>	add 	image-/boot/vmlinuz-<kernel number>
>		label=linux
>		root=/dev/<your root mount point>
>		read-only
>	modify previous label=linux to label=linux.old, etc.
>lilo

I'd run lilo -v (for verbose) just to be on the safe side.  When the 2.2.x
kernels began getting too large for lilo to handle without 'make bzImage'
running lilo in verbose mode warned me - otherwise I wouldn't have known
until I rebooted, which could have been messy.

>(rm -rf /usr/include/linux /usr/include/asm) ?
>(ln -sf /usr/src/linux/include/linux /usr/include/linux) ?
>(ln -sf /usr/src/linux/include/asm /usr/include/asm) ?

Never run these three either.

>(depmod -a) ?

Don't think this is necessary - I believe it gets done during bootup.

>cp /usr/src/linux/System-map /boot/System.map-<kernel number>
>rm /boot/System.map
>ln -s System.map-<kernel number> System.map

I don't think this is necessary either.  As above, I think it gets sorted
out during boot.

===

Subject: Re: RH61: Problems compiling SRPMS with /usr/share/locale files
From: JF Martinez <jfm2@club-internet.fr>
Date: Mon, 1 Nov 1999 00:44:17 +0100


> 
> I'm somewhat of a newbie to NLS, /usr/share/locale, etc., so please
> forgive me if this is a silly question.
> 
> I'm using a stock RH61 setup and I can't compile any SRPMS that have
> /usr/share/locale/ entries in their files listings.  For example,
> gettext or some of the GNOME stuff.  It compiles okay but during the
> files phase it bombs because it can't find the /usr/share/locale/*/*/*/*
> stuff mentioned in the %files listings.  I check the BUILDROOT and
> indeed there is usually nothing there.  Stock RPMS, however, I notice
> have these files.  They look like some kind of int'l language support--I
> suppose it is NLS.
> 
> I think I've narrowed down the problem a little.  During the configure
> stage it does say that I want NLS, occasionally it says to use the
> included gettext, but it always says there are no catalogs.  I'm
> guessing these catalogs are the files that are missing.
> 
> Any ideas? I don't care about NLS, however, I want to be able to built
> these SRPMS without doing lots of modifications.    Plus, it bothers me
> that this problem exists.  How did Red Hat built the original RPMS?
> 


The languages to build are determined through the LINGUAS environment
varaiable that for an unknown reason is set to "en".  It happens "en"
is not a correct value for LINGUAS: en-GB or en_US are.  Or you can
unset LINGUAS and thenit builds help fies for all supported languages.

Now I have been unable to see whare LINGUAS is set because no refular
file under /etc contains it except the i18n file unser /etc/sysconfig
and this tols to use fr_FR in my case while my shell was using "en".

====


the rest of The Pile (a partial mailing list archive)

doom@kzsu.stanford.edu