linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 2.6-test4: mpspec.h:6:25: mach_mpspec.h: Missing file
@ 2003-09-04 22:02 j d
  2003-09-05 17:28 ` Randy.Dunlap
  0 siblings, 1 reply; 3+ messages in thread
From: j d @ 2003-09-04 22:02 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 675 bytes --]

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
?

Thx. JD.

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

[-- Attachment #2: test.txt --]
[-- Type: text/plain, Size: 1336 bytes --]

In file included from /work/src/linux-2.6.0-test4/include/asm/smp.h:18,
                 from /work/src/linux-2.6.0-test4/include/linux/smp.h:17,
                 from /work/src/linux-2.6.0-test4/include/linux/topology.h:33,
                 from /work/src/linux-2.6.0-test4/include/linux/mmzone.h:294,
                 from /work/src/linux-2.6.0-test4/include/linux/gfp.h:4,
                 from /work/src/linux-2.6.0-test4/include/linux/slab.h:15,
                 from test.c:8:
/work/src/linux-2.6.0-test4/include/asm/mpspec.h:6:25: mach_mpspec.h: No such file or directory
/work/src/linux-2.6.0-test4/include/asm/mpspec.h:8: `MAX_MP_BUSSES' undeclared here (not in a function)



 gcc -g -D__KERNEL__ -DMODULE -I/work/src/linux-2.6.0-test4/include \
	-I/work/src/linux-2.6.0-test4/drivers/scsi -c test.c

//  -- snip sample 

#include <linux/version.h>	// 2.6 ++
#include <linux/config.h>	// 2.6 ++
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/spinlock.h>
#include <asm/io.h>
#include <asm/system.h>
#include <linux/slab.h>
#include <linux/interrupt.h>  

#define MEMORY_TABLE_SIZE	512

void *
my_kmalloc(unsigned int size, char *id)
{
	char *ptr ;
	if ((ptr =
	     kmalloc(size,
		     (in_interrupt()? GFP_ATOMIC : GFP_KERNEL))) == NULL) {
		kprintf("Cannot allocate %u bytes for %s\n", size, id);
	}
}



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: 2.6-test4: mpspec.h:6:25: mach_mpspec.h: Missing file
  2003-09-04 22:02 2.6-test4: mpspec.h:6:25: mach_mpspec.h: Missing file j d
@ 2003-09-05 17:28 ` Randy.Dunlap
  0 siblings, 0 replies; 3+ messages in thread
From: Randy.Dunlap @ 2003-09-05 17:28 UTC (permalink / raw)
  To: dead_email; +Cc: jpd_hp_linux_kernel, linux-kernel

On Thu, 4 Sep 2003 15:02:33 -0700 (PDT) j d <jpd_hp_linux_kernel@yahoo.com> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* 2.6-test4: mpspec.h:6:25: mach_mpspec.h: Missing file
@ 2003-09-05 14:38 j d
  0 siblings, 0 replies; 3+ messages in thread
From: j d @ 2003-09-05 14:38 UTC (permalink / raw)
  To: linux-kernel


> Date: Fri, 05 Sep 2003 09:25:42 -0500

> From: jpd_hp_linux_kernel@yahoo.com
> Subject: 2.6-test4: mpspec.h:6:25: mach_mpspec.h:
> Missing file
> 
> 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
> ?
> 
> Thx. JD.
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
> http://sitebuilder.yahoo.com
> > In file included from
> /work/src/linux-2.6.0-test4/include/asm/smp.h:18,
>                  from
> /work/src/linux-2.6.0-test4/include/linux/smp.h:17,
>                  from
>
/work/src/linux-2.6.0-test4/include/linux/topology.h:33,
>                  from
>
/work/src/linux-2.6.0-test4/include/linux/mmzone.h:294,
>                  from
> /work/src/linux-2.6.0-test4/include/linux/gfp.h:4,
>                  from
> /work/src/linux-2.6.0-test4/include/linux/slab.h:15,
>                  from test.c:8:
>
/work/src/linux-2.6.0-test4/include/asm/mpspec.h:6:25:
> mach_mpspec.h: No such file or directory
> /work/src/linux-2.6.0-test4/include/asm/mpspec.h:8:
> `MAX_MP_BUSSES' undeclared here (not in a function)
> 
> 
> 
>  gcc -g -D__KERNEL__ -DMODULE
> -I/work/src/linux-2.6.0-test4/include \
> 	-I/work/src/linux-2.6.0-test4/drivers/scsi -c
> test.c
> 
> //  -- snip sample 
> 
> #include <linux/version.h>	// 2.6 ++
> #include <linux/config.h>	// 2.6 ++
> #include <linux/kernel.h>
> #include <linux/types.h>
> #include <linux/spinlock.h>
> #include <asm/io.h>
> #include <asm/system.h>
> #include <linux/slab.h>
> #include <linux/interrupt.h>  
> 
> #define MEMORY_TABLE_SIZE	512
> 
> void *
> my_kmalloc(unsigned int size, char *id)
> {
> 	char *ptr ;
> 	if ((ptr =
> 	     kmalloc(size,
> 		     (in_interrupt()? GFP_ATOMIC : GFP_KERNEL)))
> == NULL) {
> 		kprintf("Cannot allocate %u bytes for %s\n", size,
> id);
> 	}
> }
> 
> 
> 
> 


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-09-05 17:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-04 22:02 2.6-test4: mpspec.h:6:25: mach_mpspec.h: Missing file j d
2003-09-05 17:28 ` Randy.Dunlap
2003-09-05 14:38 j d

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).