From: Bernd Porr <Bernd.Porr@cn.stir.ac.uk>
To: linux-kernel@vger.kernel.org, comedi@comedi.org
Subject: compiling external kernel modules (comedi.org)
Date: Sat, 02 Aug 2003 02:04:06 +0100 [thread overview]
Message-ID: <3F2B0E06.9000907@cn.stir.ac.uk> (raw)
Hi all,
I'm trying to compile comedi on 2.6-test2. The very naive way (with
configure) does not work (as expected). However, comedi conforms
(mainly) to the kernel makefile convention. So I tried this:
make -C /usr/src/linux-2.6.0-test2
SUBDIRS=/home/bp1/c/usb/2.6/comedi/comedi/ V=1
make -f scripts/Makefile.build
obj=/home/bp1/c/usb/2.6/comedi/comedi//drivers
scripts/Makefile.build:27: kbuild:
/home/bp1/c/usb/2.6/comedi/comedi//drivers/Makefile - Usage of
export-objs is obsolete in 2.5. Please fix!
make -f scripts/Makefile.build
obj=/home/bp1/c/usb/2.6/comedi/comedi//kcomedilib
scripts/Makefile.build:27: kbuild:
/home/bp1/c/usb/2.6/comedi/comedi//kcomedilib/Makefile - Usage of
export-objs is obsolete in 2.5. Please fix!
make -f scripts/Makefile.build obj=arch/i386/boot arch/i386/boot/bzImage
make -f scripts/Makefile.build obj=arch/i386/boot/compressed \
IMAGE_OFFSET=0x100000
arch/i386/boot/compressed/
vmlinux
Kernel: arch/i386/boot/bzImage is ready
Building modules, stage 2.
make -rR -f scripts/Makefile.modpost
scripts/modpost vmlinux drivers/net/pcmcia/3c574_cs.o
drivers/net/pcmcia/3c589
_cs.o drivers/net/8139cp.o drivers/net/8139too.o drivers/net/8390.o
drivers/char
/agp/agpgart.o drivers/net/wireless/airo.o
drivers/net/wireless/airo_cs.o driver
s/net/wireless/arlan-proc.o drivers/net/wireless/arlan.o
drivers/net/wireless/at
mel.o drivers/net/wireless/atmel_cs.o drivers/usb/class/audio.o
drivers/net/pcmc
Looks like as if the kernel itself has been compiled and not comedi.
In comparison: kernel 2.4.x makes it (nearly) right:
make -C /usr/src/linux SUBDIRS=/home/bp1/c/usb/2.6/comedi/comedi/
make: Entering directory `/usr/src/linux-2.4.21'
. scripts/mkversion > .tmpversion
gcc -D__KERNEL__ -I/usr/src/linux-2.4.21/include -Wall
-Wstrict-prototypes -Wno-
trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer
-pipe -mpref
erred-stack-boundary=2 -march=athlon -DUTS_MACHINE='"i386"'
-DKBUILD_BASENAME=v
ersion -c -o init/version.o init/version.c
make CFLAGS="-D__KERNEL__ -I/usr/src/linux-2.4.21/include -Wall
-Wstrict-prototy
pes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common
-fomit-frame-pointer -pi
pe -mpreferred-stack-boundary=2 -march=athlon " -C
/home/bp1/c/usb/2.6/comedi/c
omedi
make[1]: Entering directory `/home/bp1/c/usb/2.6/comedi/comedi'
gcc -D__KERNEL__ -I/usr/src/linux-2.4.21/include -Wall
-Wstrict-prototypes -Wno-
trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer
-pipe -mpref
erred-stack-boundary=2 -march=athlon -D__KERNEL__
-I/usr/src/linux-2.4.21/inclu
de -c -o comedi_fops.o comedi_fops.c
make[1]: Leaving directory `/home/bp1/c/usb/2.6/comedi/comedi'
make: Leaving directory `/usr/src/linux-2.4.21'
Is it a kernel2.6 issue or is it a comedi issue? Actually the comedi
configuration is a hack and does not completely comply with the kernel
makefile conventions. Probably because it has to run on either 2.x.x
kernel. Who can help? Is the way to compile exernal modules from the
2.4.x kernel deprecated? Is there another (more elegant) way? Would be
nice to use as much as possible from the 2.6 stuff. Just now comdi does
most of the stuff by a "configure" by itself. This leads to another
problem where comedi is not able to obtain the compiler flags etc from
the 2-6 kernel. However, this is a hack and has to be chnanged anyway.
Therefore my questions: What is the best way to compile external modules?
What has changed from 2.4 to 2.6? I noticed that .htdepend is no longer
there and that there is no rules file.
/Bernd
--
http://www.cn.stir.ac.uk/~bp1/
mailto:bp1@cn.stir.ac.uk
next reply other threads:[~2003-08-02 1:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-02 1:04 Bernd Porr [this message]
2003-08-02 7:04 ` compiling external kernel modules (comedi.org) Sam Ravnborg
2003-08-02 11:53 ` Bernd Porr
2003-08-02 12:07 ` Sam Ravnborg
2003-08-02 13:10 ` Bernd Porr
2003-08-02 23:05 ` Sam Ravnborg
2003-08-11 13:53 ` David Woodhouse
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=3F2B0E06.9000907@cn.stir.ac.uk \
--to=bernd.porr@cn.stir.ac.uk \
--cc=comedi@comedi.org \
--cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).