[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-arm
Subject:    Re: error of using arm-linux-gcc to compile a kernel module
From:       Erik Mouw <erik () bitwizard ! nl>
Date:       2004-05-28 12:23:45
Message-ID: 20040528122345.GB28287 () bitwizard ! nl
[Download RAW message or body]

On Fri, May 28, 2004 at 08:02:46PM +0800, ?????? wrote:
>> On the one hand I will study  harder ,on the other hand I should go on to
> ask elementary questions.

The kernelnewbies mailing list is a better place for elementary
questions.

> Now I meet two problems.
> 
> First I made a test kernel module, and compiled it with arm-linux-gcc (cross
> 3.2). But there are errors. Head file errors. Like this:
> 
> [root @localhost new] # /usr/local/arm-linux/sys-include/

Don't use those. Use the *kernel* include files, not the *glibc* files.
Use the appropriate -I compiler flag to point the compiler to the
kernel include directory.

> Since I can not use kernel model to achieve all the functions ,I have to use
> a application program.

Yes, otherwise there's no need to write a kernel driver in the first
place :)

> Wrting driver is a hard work!  The synchronous serial port implement simple
> functions. Is there any simple way?

I think you need to read "Linux device drivers" 2nd edition. You can
buy a hardcopy, but it's also available for free online at
http://www.xml.com/ldd/chapter/book/ .

> I want to ask the kernel module get data from hardware interrupt, how can I
> pass it to the application program?

Not. You could however wake up a userland program that's sleeping in a
blocking read() or write() for your device driver. That's how all other
sound driers (and actually all other drivers) work.


Erik

-- 
----  Erik Mouw  ----  www.bitwizard.nl  ----  +31 15 2600 998  ----

-------------------------------------------------------------------
Subscription options: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ/Etiquette:       http://www.arm.linux.org.uk/armlinux/mailinglists.php
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic