From: David Schleef <ds@schleef.org>
To: Dana Lacoste <dana.lacoste@peregrine.com>
Cc: Peter Samuelson <peter@cadcamlab.org>, linux-kernel@vger.kernel.org
Subject: Re: Linus's include file strategy redux
Date: Mon, 18 Dec 2000 11:32:46 -0800 [thread overview]
Message-ID: <20001218113246.A14376@stm.lbl.gov> (raw)
In-Reply-To: <NBBBJGOOMDFADJDGDCPHIENJCJAA.law@sgi.com> <91bnoc$vij$2@enterprise.cistron.net> <20001215155741.B4830@ping.be> <01cf01c066ab$036fc030$890216ac@ottawa.loran.com> <20001216164151.J3199@cadcamlab.org> <024701c0690a$56f9ba10$890216ac@ottawa.loran.com>
In-Reply-To: <024701c0690a$56f9ba10$890216ac@ottawa.loran.com>; from dana.lacoste@peregrine.com on Mon, Dec 18, 2000 at 10:51:09AM -0500
On Mon, Dec 18, 2000 at 10:51:09AM -0500, Dana Lacoste wrote:
>
> Can we get a #3 going? I think it could really help both the cross-compile
> people and those who just want to make sure their modules are compiling in
> the 'correct' environment. It also allows for things like 'kgcc vs. gcc' to
> be 'properly' resolved by the distribution-creator as it should be, instead of
> linux-kernel or the 3rd party module mailing lists.
I use the following script (scripts/dep.linux from Comedi-0.7.53).
It could easily be improved to handle the /lib/modules/*/build/include
link. I've also developed (actually, "gathered") a lot of other stuff
for convenient non-kernel module compiling, including compatiblity
header files, Makefiles, etc. Good places to look for stuff include
comedi, RTAI, RTLinux, PCMCIA, and MTD.
Keep in mind that there is no "correct" environment except that
which the user specifies.
dave...
#!/bin/sh
if [ "$LINUXDIR" = "" ]
then
echo -n "Enter location of Linux source tree [/usr/src/linux]: "
read LINUXDIR
: ${LINUXDIR:=/usr/src/linux}
fi
if [ ! -f "$LINUXDIR/.config" ];then
echo Kernel source tree at $LINUXDIR is not configured
echo Fix before continuing
exit 1
fi
echo using LINUXDIR=$LINUXDIR
echo LINUXDIR=$LINUXDIR >.sourcedirs
. $LINUXDIR/.config
#
# check for a bad situation
#
if [ "$CONFIG_MODULES" = "n" ]
then
cat <<EOF
*****
***** WARNING!!!
*****
***** Your kernel is configured to not allow loadable modules.
***** You are attempting to compile a loadable module for this
***** kernel. This is a problem. Please correct it.
*****
EOF
exit
fi
#
# check running kernel vs. /usr/src/linux and warn if necessary
#
read dummy dummy dummy2 <$LINUXDIR/include/linux/version.h
UTS_VERSION=`echo $dummy2|sed 's/"//g'`
echo UTS_VERSION=$UTS_VERSION >.uts_version
if [ "$(uname -r)" != "$UTS_VERSION" ]
then
cat <<EOF
*****
***** WARNING!!!
*****
***** The kernel that is currently running is a different
***** version than the source in $LINUXDIR. The current
***** compile will create a module that is *incompatible*
***** with the running kernel.
*****
EOF
fi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2000-12-18 20:03 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <91gr99$bs81o$1@fido.engr.sgi.com>
2000-12-14 23:55 ` LA Walsh
2000-12-15 0:14 ` Miquel van Smoorenburg
2000-12-15 0:17 ` Alexander Viro
2000-12-15 0:39 ` Miquel van Smoorenburg
2000-12-15 0:33 ` Alan Cox
2000-12-15 0:48 ` Alexander Viro
2000-12-15 0:56 ` David Riley
2000-12-15 1:05 ` Alexander Viro
2000-12-15 4:24 ` ferret
2000-12-16 11:30 ` Marcus Sundberg
2000-12-15 14:57 ` Kurt Roeckx
2000-12-15 15:23 ` Dana Lacoste
2000-12-15 22:28 ` Alex Buell
2000-12-16 22:41 ` Peter Samuelson
2000-12-18 15:51 ` Dana Lacoste
2000-12-18 17:08 ` Peter Samuelson
2000-12-18 19:32 ` David Schleef [this message]
2000-12-18 17:04 ` richard offer
2000-12-19 5:16 ` Peter Samuelson
2000-12-15 0:15 ` Alexander Viro
2000-12-15 7:21 ` LA Walsh
2000-12-15 11:05 ` Chmouel Boudjnah
2000-12-15 14:21 ` Werner Almesberger
2000-12-15 17:15 ` ferret
2000-12-15 17:46 ` Werner Almesberger
2000-12-15 20:29 ` Joe deBlaquiere
2000-12-15 21:27 ` Werner Almesberger
2000-12-15 22:58 ` Joe deBlaquiere
2000-12-15 23:56 ` Werner Almesberger
2000-12-16 22:50 ` Peter Samuelson
2000-12-17 0:04 ` Joe deBlaquiere
2000-12-17 2:05 ` Peter Samuelson
2000-12-15 18:10 ` LA Walsh
2000-12-15 21:02 ` Miquel van Smoorenburg
2000-12-16 4:04 ` ferret
2000-12-16 11:09 ` Miquel van Smoorenburg
2000-12-16 17:20 ` ferret
2000-12-17 0:21 ` J . A . Magallon
2000-12-16 23:10 ` Peter Samuelson
2000-12-17 1:15 ` Miquel van Smoorenburg
2000-12-17 2:18 ` Peter Samuelson
2000-12-15 21:21 ` Werner Almesberger
2000-12-15 21:36 ` LA Walsh
2000-12-15 22:48 ` J . A . Magallon
2000-12-15 23:47 ` Werner Almesberger
2000-12-16 4:11 ` ferret
2000-12-16 2:50 ` richard offer
2000-12-16 4:22 ` What about 'kernel package'? was: " ferret
2000-12-15 19:35 ` Matt D. Robinson
2000-12-15 21:36 ` Werner Almesberger
2000-12-18 17:48 Petr Vandrovec
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=20001218113246.A14376@stm.lbl.gov \
--to=ds@schleef.org \
--cc=dana.lacoste@peregrine.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peter@cadcamlab.org \
/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®