Re: External compilation

From: John Levon (movement@marcelothewonderpenguin.com)
Date: Mon Jun 10 2002 - 10:12:47 EST


On Mon, Jun 10, 2002 at 09:31:42AM -0500, Kai Germaschewski wrote:

> Well, you need the source for the kernel you're building the module for,
> it needs to be configured and "make dep" must have been run (for module
> versions).

Obviously :)

I already have stuff working fine w/o the Rules.make include, I'm just
trying to do the "right thing"

> obj-m := my_module.o
>
> include $(TOPDIR)/Rules.make
>
> cd into the kernel source and run
>
> make SUBDIRS=/path/to/your/module modules

Doesn't work for 2.2. Hopefully I will be able to specify M_OBJS in
addition.

Also, you don't specify O_TARGET ?

Given :

TOPDIR=/usr/src/linux
THISDIR=/tmp/mod
 
O_TARGET=lartmod.o
obj-m := lart.o blah.o
 
include $(TOPDIR)/Rules.make
 
all:
        (cd $(TOPDIR) && $(MAKE) SUBDIRS=/tmp/mod modules)

a) default target for Rules.make doesn't do anything useful
b) lartmod.o is never made (how could I convince it to ?)
c) is this going to work OK for modversions...
d) the above seems to disallow a lart.c forming only part of a final lart.o target
e) there seems something is going horribly wrong :

moz mod 317 make all
make: execvp: /usr/src/linux/scripts/pathdown.sh: Permission denied
ˆ¶@ˆ¶@re/locale/en_US/LC_MESSAGES/make.mo(cd /usr/src/linux && make SUBDIRS=/tmp/mod modules)
make[1]: Entering directory `/usr/src/linux-2.4.0'

The above problems is why I asked for working examples :)

regards
john

-- 
"I continue to be amazed at what Andrei can make templates do. Some of it
 still makes my head hurt."
	- Herb Sutter
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jun 15 2002 - 22:00:18 EST