linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* asm/*.h files missing for ppc arch.
@ 2006-09-09 15:05 Ming Liu
  2006-09-09 15:14 ` Ming Liu
  0 siblings, 1 reply; 8+ messages in thread
From: Ming Liu @ 2006-09-09 15:05 UTC (permalink / raw)
  To: linuxppc-embedded

Dear all,
Now I am trying to compile a driver module for my linux 2.6.16 kernel in 
ML403 with CPU arch Powerpc 405. But when I include linux/module.h, and 
then in module.h it includes linux/sched.h, and then in sched.h it includes 
asm/param.h and asm/semaphore.h and asm/mmu.h......, the compiling errors 
of "no such file or directory" appear. I found that there are NOT such 
files in asm/ at all.(the asm/ is linked to asm-ppc/ for PPC405 arch) Where 
are they then? I think when compiling modules, we must include 
linux/module.h and then these asm/*.h files, right? Any implies are 
appreciated. Thanks a lot for your telling.

Regards
Ming

_________________________________________________________________
享用世界上最大的电子邮件系统― MSN Hotmail。  http://www.hotmail.com  

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

* RE: asm/*.h files missing for ppc arch.
  2006-09-09 15:05 asm/*.h files missing for ppc arch Ming Liu
@ 2006-09-09 15:14 ` Ming Liu
  2006-09-09 17:42   ` Josh Boyer
  0 siblings, 1 reply; 8+ messages in thread
From: Ming Liu @ 2006-09-09 15:14 UTC (permalink / raw)
  To: linuxppc-embedded

Dear all,
Sorry that mmu.h is there. However ptrace.h, cputime.h and so on are not in 
asm-ppc/. 

Waiting for your telling...

Regards
Ming


>From: "Ming Liu" <eemingliu@hotmail.com>
>To: linuxppc-embedded@ozlabs.org
>Subject: asm/*.h files missing for ppc arch.
>Date: Sat, 09 Sep 2006 15:05:27 +0000
>
>Dear all,
>Now I am trying to compile a driver module for my linux 2.6.16 kernel in
>ML403 with CPU arch Powerpc 405. But when I include linux/module.h, and
>then in module.h it includes linux/sched.h, and then in sched.h it 
includes
>asm/param.h and asm/semaphore.h and asm/mmu.h......, the compiling errors
>of "no such file or directory" appear. I found that there are NOT such
>files in asm/ at all.(the asm/ is linked to asm-ppc/ for PPC405 arch) 
Where
>are they then? I think when compiling modules, we must include
>linux/module.h and then these asm/*.h files, right? Any implies are
>appreciated. Thanks a lot for your telling.
>
>Regards
>Ming
>
>_________________________________________________________________
>享用世界上最大的电子邮件系统― MSN Hotmail。  http://www.hotmail.com
>
>_______________________________________________
>Linuxppc-embedded mailing list
>Linuxppc-embedded@ozlabs.org
>https://ozlabs.org/mailman/listinfo/linuxppc-embedded

_________________________________________________________________
免费下载 MSN Explorer:   http://explorer.msn.com/lccn/  

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

* RE: asm/*.h files missing for ppc arch.
  2006-09-09 15:14 ` Ming Liu
@ 2006-09-09 17:42   ` Josh Boyer
  2006-09-09 18:34     ` Ming Liu
  0 siblings, 1 reply; 8+ messages in thread
From: Josh Boyer @ 2006-09-09 17:42 UTC (permalink / raw)
  To: Ming Liu; +Cc: linuxppc-embedded

On Sat, 2006-09-09 at 15:14 +0000, Ming Liu wrote:
> Dear all,
> Sorry that mmu.h is there. However ptrace.h, cputime.h and so on are not in 
> asm-ppc/. 
> 
> Waiting for your telling...

How are you compiling?  For 4xx, you still need to specify ARCH=ppc with
the make command.  There is some makefile hackery that will then bring
in header files from asm-powerpc as needed.

josh

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

* RE: asm/*.h files missing for ppc arch.
  2006-09-09 17:42   ` Josh Boyer
@ 2006-09-09 18:34     ` Ming Liu
  2006-09-09 19:21       ` Arnd Bergmann
  0 siblings, 1 reply; 8+ messages in thread
From: Ming Liu @ 2006-09-09 18:34 UTC (permalink / raw)
  To: jwboyer; +Cc: linuxppc-embedded

Dear Josh,

>How are you compiling?  For 4xx, you still need to specify ARCH=ppc with
>the make command.  There is some makefile hackery that will then bring
>in header files from asm-powerpc as needed.

In fact, I just try to compile the hello example in the book Linux Device 
Driver chapter 2. The Makefile is listed as:

#Makefile
ifneq ($(KERNELRELEASE),)
  obj-m := hello.o
else 
  KERNELDIR ?= /home/mingliu/linux-2.6.16
  PWD := $(shell pwd)

default:
  $(MAKE) -C $(KERNELDIR) M=$(PWD) modules
endif

Also, I have specified ARCH = ppc in my Linux kernel. But it seems that 
there is still some problem. Thanks for your suggestion.

Regards
Ming

_________________________________________________________________
享用世界上最大的电子邮件系统― MSN Hotmail。  http://www.hotmail.com  

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

* Re: asm/*.h files missing for ppc arch.
  2006-09-09 18:34     ` Ming Liu
@ 2006-09-09 19:21       ` Arnd Bergmann
  2006-09-09 19:28         ` Ming Liu
  0 siblings, 1 reply; 8+ messages in thread
From: Arnd Bergmann @ 2006-09-09 19:21 UTC (permalink / raw)
  To: linuxppc-embedded

Am Saturday 09 September 2006 20:34 schrieb Ming Liu:
> default:
> =A0 $(MAKE) -C $(KERNELDIR) M=3D$(PWD) modules
> endif

It's usually easier if you add your module to your copy of the kernel
sources and build it along with all the other modules.

	Arnd <><

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

* Re: asm/*.h files missing for ppc arch.
  2006-09-09 19:21       ` Arnd Bergmann
@ 2006-09-09 19:28         ` Ming Liu
  2006-09-09 20:17           ` Arnd Bergmann
  0 siblings, 1 reply; 8+ messages in thread
From: Ming Liu @ 2006-09-09 19:28 UTC (permalink / raw)
  To: arnd; +Cc: linuxppc-embedded

Dear Arnd,

>It's usually easier if you add your module to your copy of the kernel
>sources and build it along with all the other modules.


How can I do that? I don't know how can I configure my driver and compile 
it as a module. Which option shall I choose to configure my driver as a 
module in menuconfig? Sorry that I am new to linux and I am anxious for 
your helpful telling...

Regards
ming

_________________________________________________________________
免费下载 MSN Explorer:   http://explorer.msn.com/lccn/  

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

* Re: asm/*.h files missing for ppc arch.
  2006-09-09 19:28         ` Ming Liu
@ 2006-09-09 20:17           ` Arnd Bergmann
  2006-09-09 20:37             ` Ming Liu
  0 siblings, 1 reply; 8+ messages in thread
From: Arnd Bergmann @ 2006-09-09 20:17 UTC (permalink / raw)
  To: linuxppc-embedded

Am Saturday 09 September 2006 21:28 schrieb Ming Liu:
> Dear Arnd,
>
> >It's usually easier if you add your module to your copy of the kernel
> >sources and build it along with all the other modules.
>
> How can I do that? I don't know how can I configure my driver and compile
> it as a module. Which option shall I choose to configure my driver as a
> module in menuconfig? Sorry that I am new to linux and I am anxious for
> your helpful telling...

You need to at least the following steps:

1. Add your module to an appropriate location in the source tree, e.g.
drivers/net/ or drivers/char/, or whereever it fits best depending on
what it does.

2. Edit the Makefile in that directory so your driver gets built, e.g.
by adding a line 'obj-m += your-driver.o'.

The optional but recommended steps are:

3. Add the driver to an appropriate Kconfig file, typically in the same
directory as your driver, and change your Makefile to 
use 'obj-$(CONFIG_YOUR_DRIVER) += your-driver.o'.

4. Learn to use 'quilt', or a similar tool, to manage your patch against
the kernel.

5. If you ask questions on the mailing list, make sure everyone has access
to your patch, e.g. by uploading it to a web site.

	Arnd <><

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

* Re: asm/*.h files missing for ppc arch.
  2006-09-09 20:17           ` Arnd Bergmann
@ 2006-09-09 20:37             ` Ming Liu
  0 siblings, 0 replies; 8+ messages in thread
From: Ming Liu @ 2006-09-09 20:37 UTC (permalink / raw)
  To: arnd; +Cc: linuxppc-embedded

Dear Arnd,
Thanks so much for your telling. I will do that soon. 

>5. If you ask questions on the mailing list, make sure everyone has access
>to your patch, e.g. by uploading it to a web site.

Sorry that my ip driver is so customed and I don't think anyone will have 
interest on that. :-) However maybe later I can integrate other drivers in 
the linux tree.

Regards
Ming

_________________________________________________________________
与联机的朋友进行交流,请使用 MSN Messenger:  http://messenger.msn.com/cn  

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

end of thread, other threads:[~2006-09-09 20:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-09 15:05 asm/*.h files missing for ppc arch Ming Liu
2006-09-09 15:14 ` Ming Liu
2006-09-09 17:42   ` Josh Boyer
2006-09-09 18:34     ` Ming Liu
2006-09-09 19:21       ` Arnd Bergmann
2006-09-09 19:28         ` Ming Liu
2006-09-09 20:17           ` Arnd Bergmann
2006-09-09 20:37             ` Ming Liu

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