compiling external modules

From: angusyoung (angusisgodyoung_at_yahoo.com)
Date: 07/01/04


Date: 1 Jul 2004 08:10:20 -0700

I am trying to upgrade my driver from the 2.4.X kernel to 2.6.X

I have read up on the changes required to how external modules are to
be compiled.

The recommeded procedure is to create a simple one line Makefile, add
in your modules, and let the Linux make do its job:

/* file: Makefile */
obj-m := module.o

% make -C /path/to/kernel/source SUBDIRS=$PWD modules

Unfortunately, my "module.o" is made up of a bunch of individually
compiled files, each with its own Makefile, switches, ...

When I replace"module.o" with my "combined.o" the make returns with
the following error message:

% make -C /path/to/source SUBDIRS=/path/to/pwd modules
make: Entering directory `/path/to/source'
*** Warning: Overriding SUBDIRS on the command line can cause
*** inconsistencies
make[1]: `arch/i386/kernel/asm-offsets.s' is up to date.
  CHK include/asm-i386/asm_offsets.h
  Building modules, stage 2.
/path/to/source/scripts/Makefile.modpost:17: *** Uh-oh, you have stale
module entries. You messed with SUBDIRS,
/path/to/source/scripts/Makefile.modpost:18: do not complain if
something goes
wrong.
  MODPOST
make: Leaving directory `/path/to/source'
%

My question is: Is there an easy way for me to update my "combined.o"
without having "combined.c"?



Relevant Pages

  • problems trying to "make" it
    ... checking for attribute assignment... ... creating Makefile ... extconf.rb: Entering directory `gdkpixbuf' ... extconf.rb: Leaving directory 'gdkpixbuf' ...
    (comp.lang.ruby)
  • Re: [opensuse] NIC installation: What is this error?
    ... make: Entering directory ... It can't find some makefile ... dealing with your kernel. ...
    (SuSE)
  • Make file
    ... I want to create a Makefile that runs "make" in 3 subdirectories. ... make: Entering directory `/my/path' ...
    (comp.os.linux)
  • Dynamic link library
    ... Whilst rebuilding my lib as a shared one, ... make: Entering directory ... I am using a makefile and not the GNAT projects. ...
    (comp.lang.ada)