From: Sven Eckelmann <sven.eckelmann@gmx.de>
To: The list for a Better Approach To Mobile Ad-hoc Networking
<b.a.t.m.a.n@open-mesh.net>
Subject: [B.A.T.M.A.N.] Out of tree builds of kernel modules
Date: Fri, 10 Apr 2009 12:31:07 +0200 [thread overview]
Message-ID: <200904101231.14877.sven.eckelmann@gmx.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 1947 bytes --]
Hi,
I have currently following problem with batman-adv-kernelland and batmand-
gateway:
Danial Baumann supports building of kernel modules against the current Debian
kernel in sid with his linux-modules-extra-2.6 package. The module sources
must only to support build over the kernel headers. It is done like that:
/usr/bin/make -C /usr/src/linux-headers-2.6.29-1-amd64 M=/batman-adv/
So it calls the Makefile in /usr/src/linux-headers-2.6.29-1-amd64 to build the
sources in /batman-adv/. This seems to be a quite common way to do the build.
There are different problems with the way the current Makefiles of these
modules are written.
First thing is that there is a Makefile.kbuild which is included with
include $(PWD)/Makefile.kbuild
This will not work in the current situation because the PWD is now
/usr/src/linux-headers-2.6.29-1-amd64. Is this extra Makefile.kbuild really
needed?
The second problem is the check of KERNELPATH of Makefile. It will check if
the sources of the current kernel is installed and quits if not (+ error
message that someone should set the KERNELPATH variable). In the current
situation we don't have the sources of the current kernel installed, but the
kernel headers of another kernel are being used automatically. Wouldn't be
following check
KERNELPATH ?= /lib/modules/$(shell uname -r)/build
# sanity check: does KERNELPATH exist?
ifeq ($(shell cd $(KERNELPATH) && pwd),)
$(warning $(KERNELPATH) is missing, please set KERNELPATH)
endif
ok too?
The batmand-gateway cannot be build for linux 2.6 if the current kernel is a
2.4.x. Isn't it possible to make the obj-m and batgat-objs assignment outside
the check for the kernel version?
My current workaround is to install my own version of the Makefile in the
debian package, but I ask myself if this is really needed or parts of it
should also be changed upstream.
Best regards,
Sven
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
next reply other threads:[~2009-04-10 10:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-10 10:31 Sven Eckelmann [this message]
2009-04-10 22:34 ` [B.A.T.M.A.N.] Out of tree builds of kernel modules Marek Lindner
2009-04-11 8:53 ` Sven Eckelmann
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=200904101231.14877.sven.eckelmann@gmx.de \
--to=sven.eckelmann@gmx.de \
--cc=b.a.t.m.a.n@open-mesh.net \
/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