From: Jamie Lokier <lk@tantalophile.demon.co.uk>
To: Miquel van Smoorenburg <miquels@cistron-office.nl>
Cc: linux-kernel@vger.kernel.org
Subject: Re: build -->/usr/src/linux
Date: Mon, 9 Apr 2001 17:02:27 +0200 [thread overview]
Message-ID: <20010409170227.B17914@pcep-jamie.cern.ch> (raw)
In-Reply-To: <3AD079EA.50DA97F3@rcn.com> <3AD0A029.C17C3EFC@rcn.com> <9aqmci$gn2$1@ncc1701.cistron.net> <20010409010103.A16562@pcep-jamie.cern.ch> <9as6fl$gmq$1@ncc1701.cistron.net>
In-Reply-To: <9as6fl$gmq$1@ncc1701.cistron.net>; from miquels@cistron-office.nl on Mon, Apr 09, 2001 at 11:29:57AM +0000
Miquel van Smoorenburg wrote:
> >There is a way though I'd not call it clean. Here is an extract from
>
> Do you think something like this is the correct approach? If it
> was part of the official kernel you could write a Makefile like this:
>
> [code to creake /lib/modules/`uname -r`/config.mak
I agree with that idea in principle, although for quite a while
something else is required, to deal with older kernels. You'll notice
that my fragment greps for SMP from the kernel's Makefile: that is to
deal with 2.2 kernels and isn't required for 2.4 kernels. This is not
an issue if you only care about future-compatibility.
Fortunately, the file $(KERNEL_SOURCE)/arc/$(ARCH)/Makefile provides
most of the variables like CFLAGS et al.
Unfortunately, determining ARCH is rather ugly. I copied the expression
from the kernel's top level Makefile.
One more thing: some systems do not have a /lib/modules directory. On
those systems it's good to hunt in /usr/src/linux.
> -modules: include/config/MARKER $(patsubst %, _mod_%, $(SUBDIRS))
> +modules: include/config/MARKER $(patsubst %, _mod_%, $(SUBDIRS)) \
> + include/linux/config.mak
The file needs to be created even if you don't do `make modules'. Some
kernels will support third party modules, but don't actually have any
modules of their own.
> +include/linux/config.mak: ./Makefile
This must depend on the configuration somehow. If the kernel's
reconfigured, a new file needs to be created. For 2.2 kernels it must
depend on whether SMP is defined too.
-- Jamie
next prev parent reply other threads:[~2001-04-09 15:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <9aqmgo$8f6ol$1@fido.engr.sgi.com>
2001-04-08 14:47 ` Marvin Stodolsky
2001-04-08 15:16 ` Russell King
2001-04-08 17:30 ` Marvin Stodolsky
2001-04-08 21:49 ` Miquel van Smoorenburg
2001-04-08 23:01 ` Jamie Lokier
2001-04-09 11:29 ` Miquel van Smoorenburg
2001-04-09 15:02 ` Jamie Lokier [this message]
2001-04-09 23:01 ` richard offer
2001-04-10 14:08 ` Jamie Lokier
2001-04-10 16:36 ` richard offer
2001-04-10 16:42 ` Jamie Lokier
2001-04-10 16:52 ` richard offer
2001-04-10 17:04 ` Jamie Lokier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20010409170227.B17914@pcep-jamie.cern.ch \
--to=lk@tantalophile.demon.co.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=miquels@cistron-office.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®