Re: 2.6-test4: mpspec.h:6:25: mach_mpspec.h: Missing file

From: Randy.Dunlap
Date: Fri Sep 05 2003 - 12:35:51 EST


On Thu, 4 Sep 2003 15:02:33 -0700 (PDT) j d <jpd_hp_linux_kernel@xxxxxxxxx> wrote:

| Hi.
| I'm trying to build a (add-on) module
| on a machine booted from a 2.6-test4 kernel,
| And keep running into this error. I've
| included a sample program , and gcc command
| line.
|
| I built the kernel:
|
| make defconfig;
|
| It is a 2W SMP (Compaq ML850)
| couple minor modes like enet & SCSI device
| make
| My general question is, should I include the
|
| -I/work/src/<build>/include/asm-i386/mach-generic/mach_mpspec.h
|
| in my gcc command line or is my build area incorrect
| is
| some way that the correct mpspec.h file can't be found

See linux/Documentation/modules.txt and Documentation/kbuild/makefiles.txt
for how to do this properly. Basically put your source and Makefile
in a subdir, then use this command and it builds without that error.
(Your source had a few other warnings, but it does build this way.)

Here's the Makefile that I used, with usage info in it:

# makefile for addonmodule
# Randy Dunlap, 2003-02-21
# usage:
# cd /path/to/kernel/source && make SUBDIRS=/path/to/source/addonmodule/ modules

obj-m := addonmodule.o



--
~Randy
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/