|
|
Log in / Subscribe / Register

Driver porting: hello world

Driver porting: hello world

Posted Sep 23, 2004 20:47 UTC (Thu) by Droep (guest, #24946)
Parent article: Driver porting: hello world

Hi,

I'm new to "Linux Device Drivers". When I try to compile the given example as shown above, I get the following error messages. The only difference is that I named the file "hello-driver2.c".
Anyone who knows what I did wrong?

*/usr/include/linux/jiffies.h:16: error: parse error before "jiffies_64"
*/usr/include/linux/jiffies.h:20: error: parse error before "get_jiffies_64"
*/usr/include/asm/mmu.h:13: error: field `sem' has incomplete type
*/usr/include/linux/list.h:604:2: warning: #warning "don't include kernel headers in userspace"
*/usr/include/asm-generic/siginfo.h:53: error: size of array `_pad' is too large
*/usr/include/linux/fs_struct.h:9: error: parse error before "rwlock_t"
*/usr/include/linux/fs_struct.h:13: error: parse error before '}' token
*/usr/include/linux/completion.h:15: error: parse error before "wait_queue_head_t"
*/usr/include/linux/completion.h:26: error: dereferencing pointer to incomplete type
*/usr/include/linux/completion.h:27: error: dereferencing pointer to incomplete type
*/usr/include/linux/pid.h:18: error: field `task_list' has incomplete type
*/usr/include/linux/pid.h:19: error: field `hash_chain' has incomplete type
*/usr/include/linux/pid.h:24: error: field `pid_chain' has incomplete type
*/usr/include/linux/sched.h:93: error: parse error before "process_counts"
*/usr/include/linux/timer.h:10: error: field `entry' has incomplete type
*hello-driver2.c:6: error: `KERN_ALERT' undeclared (first use in this function)
*hello-driver2.c:6: error: parse error before string constant
*hello-driver2.c:11: error: `KERN_ALERT' undeclared (first use in this function)
*hello-driver2.c:11: error: parse error before string constant
*hello-driver2.c:14: error: parse error before "__attribute_used__"
*hello-driver2.c:14: warning: initialization makes integer from pointer without a cast
*hello-driver2.c:14: warning: data definition has no type or storage class
*hello-driver2.c:15: error: parse error before "__attribute_used__"
*hello-driver2.c:15: error: redefinition of `__attribute_used__'
*hello-driver2.c:14: error: `__attribute_used__' previously defined here
*hello-driver2.c:15: warning: initialization makes integer from pointer without a cast
*hello-driver2.c:15: warning: data definition has no type or storage class
**** Beƫindigd met status: 2 ***


to post comments

Driver porting: hello world

Posted Jun 13, 2006 13:44 UTC (Tue) by tuxonnst (guest, #33869) [Link]

Dear Mr.X,

Is this the start of your error message or is it preceeded by a hell lot of other messages ?

Just try out this thing

go to the Linux source directory
go to include/linux/asm/ directory in the source directory
check if it is having a link arch to the architecture you are using

If no, be free to use 'ln' command for making the link arch for required architecture

Hope this will solve the probs

Rgds
Aeolus Jacob


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds