打印

各位我在编译LINUX驱动,希望大家能指点一下,谢谢!!

[复制链接]
1915|1
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
los|  楼主 | 2008-7-11 22:48 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
下面就是我的程序和makefile

少了一个#include <linux/module.h>语句就能编译通过

多了一个#include <linux/module.h>语句就出现一大堆错误信息




程序 hello.c

#define __KERNEL__
#define MODULE

#include <linux/module.h>

int init_module(void){
        printk("<1>hello FriendlyARM!\n");
}

void cleanup_module(void)
{
        printk("<1>goodbye , FriendlyARM!\n");

}


makefile

CROSS=/arm/3.4.1/bin/arm-linux-gcc
INCPATH=/arm/kernel-2.6.13/include/



all:hello

hello:

    $(CROSS) -I$(INCPATH) -c hello.c -o hello.o

clean:
    rm -rf hello *.o


错误信息
/arm/kernel-2.6.13/include/linux/jiffies.h:416:6: division by zero in #if
/arm/kernel-2.6.13/include/linux/jiffies.h:416:6: division by zero in #if
/arm/kernel-2.6.13/include/linux/jiffies.h:416:41: division by zero in #if
/arm/kernel-2.6.13/include/linux/jiffies.h:416:42: division by zero in #if
/arm/kernel-2.6.13/include/linux/jiffies.h: In function `jiffies_64_to_clock_t':
/arm/kernel-2.6.13/include/linux/jiffies.h:424: error: `x' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/jiffies.h:424: error: `CLOCK_TICK_RATE' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/jiffies.h:425: error: `NSEC_PER_SEC' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/jiffies.h:425: error: `USER_HZ' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/jiffies.h:425: error: parse error before "__asmeq"
/arm/kernel-2.6.13/include/linux/jiffies.h: At top level:
/arm/kernel-2.6.13/include/linux/jiffies.h:430: error: parse error before "nsec_to_clock_t"
/arm/kernel-2.6.13/include/linux/jiffies.h:430: error: parse error before "x"
/arm/kernel-2.6.13/include/linux/jiffies.h:432:28: division by zero in #if
/arm/kernel-2.6.13/include/linux/jiffies.h: In function `nsec_to_clock_t':
/arm/kernel-2.6.13/include/linux/jiffies.h:433: error: `NSEC_PER_SEC' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/jiffies.h:433: error: `USER_HZ' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/jiffies.h:433: error: `x' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/jiffies.h:433: error: parse error before "__asmeq"
In file included from /arm/kernel-2.6.13/include/linux/cpumask.h:82,
                 from /arm/kernel-2.6.13/include/linux/sched.h:15,
                 from /arm/kernel-2.6.13/include/linux/module.h:10,
                 from hello.c:4:
/arm/kernel-2.6.13/include/linux/bitmap.h: In function `bitmap_zero':
/arm/kernel-2.6.13/include/linux/bitmap.h:119: error: `BITS_PER_LONG' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/bitmap.h: In function `bitmap_fill':
/arm/kernel-2.6.13/include/linux/bitmap.h:134: error: `BITS_PER_LONG' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/bitmap.h: In function `bitmap_copy':
/arm/kernel-2.6.13/include/linux/bitmap.h:140: error: `BITS_PER_LONG' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/bitmap.h: In function `bitmap_and':
/arm/kernel-2.6.13/include/linux/bitmap.h:151: error: `BITS_PER_LONG' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/bitmap.h: In function `bitmap_or':
/arm/kernel-2.6.13/include/linux/bitmap.h:160: error: `BITS_PER_LONG' undeclared (first use in this function)



/arm/kernel-2.6.13/include/linux/nodemask.h: In function `__node_clear':
/arm/kernel-2.6.13/include/linux/nodemask.h:97: error: `node' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:97: error: `dstp' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h: At top level:
/arm/kernel-2.6.13/include/linux/nodemask.h:101: error: parse error before '*' token
/arm/kernel-2.6.13/include/linux/nodemask.h: In function `__nodes_setall':
/arm/kernel-2.6.13/include/linux/nodemask.h:103: error: `dstp' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:103: error: `nbits' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h: At top level:
/arm/kernel-2.6.13/include/linux/nodemask.h:107: error: parse error before '*' token
/arm/kernel-2.6.13/include/linux/nodemask.h: In function `__nodes_clear':
/arm/kernel-2.6.13/include/linux/nodemask.h:109: error: `dstp' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:109: error: `nbits' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h: At top level:
/arm/kernel-2.6.13/include/linux/nodemask.h:117: error: parse error before "nodemask_t"
/arm/kernel-2.6.13/include/linux/nodemask.h: In function `__node_test_and_set':
/arm/kernel-2.6.13/include/linux/nodemask.h:119: error: `node' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:119: error: `addr' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h: At top level:
/arm/kernel-2.6.13/include/linux/nodemask.h:124: error: parse error before '*' token
/arm/kernel-2.6.13/include/linux/nodemask.h: In function `__nodes_and':
/arm/kernel-2.6.13/include/linux/nodemask.h:127: error: `dstp' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:127: error: `src1p' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:127: error: `src2p' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:127: error: `nbits' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h: At top level:
/arm/kernel-2.6.13/include/linux/nodemask.h:132: error: parse error before '*' token
/arm/kernel-2.6.13/include/linux/nodemask.h: In function `__nodes_or':
/arm/kernel-2.6.13/include/linux/nodemask.h:135: error: `dstp' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:135: error: `src1p' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:135: error: `src2p' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:135: error: `nbits' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h: At top level:
/arm/kernel-2.6.13/include/linux/nodemask.h:140: error: parse error before '*' token
/arm/kernel-2.6.13/include/linux/nodemask.h: In function `__nodes_xor':
/arm/kernel-2.6.13/include/linux/nodemask.h:143: error: `dstp' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:143: error: `src1p' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:143: error: `src2p' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:143: error: `nbits' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h: At top level:
/arm/kernel-2.6.13/include/linux/nodemask.h:148: error: parse error before '*' token
/arm/kernel-2.6.13/include/linux/nodemask.h: In function `__nodes_andnot':
/arm/kernel-2.6.13/include/linux/nodemask.h:151: error: `dstp' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:151: error: `src1p' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:151: error: `src2p' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:151: error: `nbits' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h: At top level:
/arm/kernel-2.6.13/include/linux/nodemask.h:156: error: parse error before '*' token
/arm/kernel-2.6.13/include/linux/nodemask.h: In function `__nodes_complement':
/arm/kernel-2.6.13/include/linux/nodemask.h:159: error: `dstp' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:159: error: `srcp' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:159: error: `nbits' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h: At top level:
/arm/kernel-2.6.13/include/linux/nodemask.h:164: error: parse error before '*' token
/arm/kernel-2.6.13/include/linux/nodemask.h: In function `__nodes_equal':
/arm/kernel-2.6.13/include/linux/nodemask.h:167: error: `src1p' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:167: error: `src2p' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:167: error: `nbits' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h: At top level:
/arm/kernel-2.6.13/include/linux/nodemask.h:172: error: parse error before '*' token
/arm/kernel-2.6.13/include/linux/nodemask.h: In function `__nodes_intersects':
/arm/kernel-2.6.13/include/linux/nodemask.h:175: error: `src1p' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:175: error: `src2p' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:175: error: `nbits' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h: At top level:
/arm/kernel-2.6.13/include/linux/nodemask.h:180: error: parse error before '*' token
/arm/kernel-2.6.13/include/linux/nodemask.h: In function `__nodes_subset':
/arm/kernel-2.6.13/include/linux/nodemask.h:183: error: `src1p' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:183: error: `src2p' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:183: error: `nbits' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h: At top level:
/arm/kernel-2.6.13/include/linux/nodemask.h:187: error: parse error before '*' token
/arm/kernel-2.6.13/include/linux/nodemask.h: In function `__nodes_empty':
/arm/kernel-2.6.13/include/linux/nodemask.h:189: error: `srcp' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:189: error: `nbits' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h: At top level:
/arm/kernel-2.6.13/include/linux/nodemask.h:193: error: parse error before '*' token
/arm/kernel-2.6.13/include/linux/nodemask.h: In function `__nodes_full':
/arm/kernel-2.6.13/include/linux/nodemask.h:195: error: `srcp' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:195: error: `nbits' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h: At top level:
/arm/kernel-2.6.13/include/linux/nodemask.h:199: error: parse error before '*' token
/arm/kernel-2.6.13/include/linux/nodemask.h: In function `__nodes_weight':
/arm/kernel-2.6.13/include/linux/nodemask.h:201: error: `srcp' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:201: error: `nbits' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h: At top level:
/arm/kernel-2.6.13/include/linux/nodemask.h:206: error: parse error before '*' token
/arm/kernel-2.6.13/include/linux/nodemask.h: In function `__nodes_shift_right':
/arm/kernel-2.6.13/include/linux/nodemask.h:209: error: `dstp' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:209: error: `srcp' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:209: error: `n' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:209: error: `nbits' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h: At top level:
/arm/kernel-2.6.13/include/linux/nodemask.h:214: error: parse error before '*' token
/arm/kernel-2.6.13/include/linux/nodemask.h: In function `__nodes_shift_left':
/arm/kernel-2.6.13/include/linux/nodemask.h:217: error: `dstp' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:217: error: `srcp' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:217: error: `n' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:217: error: `nbits' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h: At top level:
/arm/kernel-2.6.13/include/linux/nodemask.h:224: error: parse error before '*' token
/arm/kernel-2.6.13/include/linux/nodemask.h: In function `__first_node':
/arm/kernel-2.6.13/include/linux/nodemask.h:226: error: parse error before "int"
/arm/kernel-2.6.13/include/linux/nodemask.h: At top level:
/arm/kernel-2.6.13/include/linux/nodemask.h:230: error: parse error before '*' token
/arm/kernel-2.6.13/include/linux/nodemask.h: In function `__next_node':
/arm/kernel-2.6.13/include/linux/nodemask.h:232: error: parse error before "int"
/arm/kernel-2.6.13/include/linux/nodemask.h: At top level:
/arm/kernel-2.6.13/include/linux/nodemask.h:248: error: parse error before '*' token
/arm/kernel-2.6.13/include/linux/nodemask.h: In function `__first_unset_node':
/arm/kernel-2.6.13/include/linux/nodemask.h:250: error: parse error before "int"
/arm/kernel-2.6.13/include/linux/nodemask.h: At top level:
/arm/kernel-2.6.13/include/linux/nodemask.h:283: error: parse error before '*' token
/arm/kernel-2.6.13/include/linux/nodemask.h: In function `__nodemask_scnprintf':
/arm/kernel-2.6.13/include/linux/nodemask.h:285: error: `buf' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:285: error: `len' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:285: error: `srcp' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:285: error: `nbits' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h: At top level:
/arm/kernel-2.6.13/include/linux/nodemask.h:291: error: parse error before "nodemask_t"
/arm/kernel-2.6.13/include/linux/nodemask.h: In function `__nodemask_parse':
/arm/kernel-2.6.13/include/linux/nodemask.h:293: error: `buf' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:293: error: `len' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:293: error: `dstp' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:293: error: `nbits' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h: At top level:
/arm/kernel-2.6.13/include/linux/nodemask.h:299: error: parse error before '*' token
/arm/kernel-2.6.13/include/linux/nodemask.h: In function `__nodelist_scnprintf':
/arm/kernel-2.6.13/include/linux/nodemask.h:301: error: `buf' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:301: error: `len' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:301: error: `srcp' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:301: error: `nbits' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h: At top level:
/arm/kernel-2.6.13/include/linux/nodemask.h:305: error: parse error before "nodemask_t"
/arm/kernel-2.6.13/include/linux/nodemask.h: In function `__nodelist_parse':
/arm/kernel-2.6.13/include/linux/nodemask.h:307: error: `buf' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:307: error: `dstp' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h:307: error: `nbits' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/nodemask.h: At top level:
/arm/kernel-2.6.13/include/linux/nodemask.h:326: error: parse error before "node_online_map"
/arm/kernel-2.6.13/include/linux/nodemask.h:326: warning: data definition has no type or storage class
/arm/kernel-2.6.13/include/linux/nodemask.h:327: error: parse error before "node_possible_map"
/arm/kernel-2.6.13/include/linux/nodemask.h:327: warning: data definition has no type or storage class
In file included from /arm/kernel-2.6.13/include/linux/sched.h:20,
                 from /arm/kernel-2.6.13/include/linux/module.h:10,
                 from hello.c:4:
/arm/3.4.1/bin/../lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/asm/semaphore.h:18: error: parse error before "wait_queue_head_t"
/arm/3.4.1/bin/../lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/asm/semaphore.h: In function `sema_init':
/arm/3.4.1/bin/../lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/asm/semaphore.h:46: error: dereferencing pointer to incomplete type
/arm/3.4.1/bin/../lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/asm/semaphore.h:47: error: dereferencing pointer to incomplete type
/arm/3.4.1/bin/../lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/asm/semaphore.h:48: error: dereferencing pointer to incomplete type
/arm/3.4.1/bin/../lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/asm/semaphore.h: In function `sema_count':
/arm/3.4.1/bin/../lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/asm/semaphore.h:66: error: dereferencing pointer to incomplete type
In file included from /arm/kernel-2.6.13/include/linux/module.h:10,
                 from hello.c:4:
/arm/kernel-2.6.13/include/linux/sched.h:24:25: asm/cputime.h: No such file or directory
In file included from /arm/kernel-2.6.13/include/linux/signal.h:4,
                 from /arm/kernel-2.6.13/include/linux/sched.h:28,
                 from /arm/kernel-2.6.13/include/linux/module.h:10,
                 from hello.c:4:
/arm/kernel-2.6.13/include/linux/list.h:705:2: warning: #warning "don't include kernel headers in userspace"
In file included from /arm/3.4.1/bin/../lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/asm/siginfo.h:4,
                 from /arm/kernel-2.6.13/include/linux/signal.h:7,
                 from /arm/kernel-2.6.13/include/linux/sched.h:28,
                 from /arm/kernel-2.6.13/include/linux/module.h:10,
                 from hello.c:4:
/arm/kernel-2.6.13/include/asm-generic/siginfo.h: At top level:
/arm/kernel-2.6.13/include/asm-generic/siginfo.h:50: error: parse error before "pid_t"
/arm/kernel-2.6.13/include/asm-generic/siginfo.h:56: error: parse error before "timer_t"
/arm/kernel-2.6.13/include/asm-generic/siginfo.h:58: error: `uid_t' undeclared here (not in a function)
/arm/kernel-2.6.13/include/asm-generic/siginfo.h:58: error: size of array `_pad' is too large
/arm/kernel-2.6.13/include/asm-generic/siginfo.h:61: error: parse error before '}' token
/arm/kernel-2.6.13/include/asm-generic/siginfo.h:65: error: parse error before "pid_t"
/arm/kernel-2.6.13/include/asm-generic/siginfo.h:68: error: parse error before '}' token
/arm/kernel-2.6.13/include/asm-generic/siginfo.h:72: error: parse error before "pid_t"
/arm/kernel-2.6.13/include/asm-generic/siginfo.h:75: error: parse error before "_utime"
/arm/kernel-2.6.13/include/asm-generic/siginfo.h:76: error: parse error before "_stime"
/arm/kernel-2.6.13/include/asm-generic/siginfo.h:92: error: parse error before '}' token
/arm/kernel-2.6.13/include/asm-generic/siginfo.h:93: error: parse error before '}' token
In file included from /arm/kernel-2.6.13/include/linux/sched.h:30,
                 from /arm/kernel-2.6.13/include/linux/module.h:10,
                 from hello.c:4:
/arm/kernel-2.6.13/include/linux/fs_struct.h:21: warning: "struct task_struct" declared inside parameter list
/arm/kernel-2.6.13/include/linux/fs_struct.h:21: warning: its scope is only this definition or declaration, which is probably not what you want
In file included from /arm/kernel-2.6.13/include/linux/sched.h:32,
                 from /arm/kernel-2.6.13/include/linux/module.h:10,
                 from hello.c:4:
/arm/kernel-2.6.13/include/linux/completion.h:15: error: parse error before "wait_queue_head_t"
/arm/kernel-2.6.13/include/linux/completion.h:15: warning: no semicolon at end of struct or union
/arm/kernel-2.6.13/include/linux/completion.h: In function `init_completion':
/arm/kernel-2.6.13/include/linux/completion.h:26: error: dereferencing pointer to incomplete type
/arm/kernel-2.6.13/include/linux/completion.h:27: error: dereferencing pointer to incomplete type
In file included from /arm/kernel-2.6.13/include/linux/sched.h:33,
                 from /arm/kernel-2.6.13/include/linux/module.h:10,
                 from hello.c:4:
/arm/kernel-2.6.13/include/linux/pid.h: At top level:
/arm/kernel-2.6.13/include/linux/pid.h:17: error: field `pid_chain' has incomplete type
/arm/kernel-2.6.13/include/linux/pid.h:19: error: field `pid_list' has incomplete type
/arm/kernel-2.6.13/include/linux/pid.h:29: warning: "struct task_struct" declared inside parameter list
/arm/kernel-2.6.13/include/linux/pid.h:31: warning: "struct task_struct" declared inside parameter list
/arm/kernel-2.6.13/include/linux/pid.h:41: warning: "struct task_struct" declared inside parameter list
In file included from /arm/kernel-2.6.13/include/linux/sched.h:34,
                 from /arm/kernel-2.6.13/include/linux/module.h:10,
                 from hello.c:4:
/arm/kernel-2.6.13/include/linux/percpu.h: In function `__alloc_percpu':
/arm/kernel-2.6.13/include/linux/percpu.h:45: error: `GFP_KERNEL' undeclared (first use in this function)
/arm/kernel-2.6.13/include/linux/percpu.h:45: warning: initialization makes pointer from integer without a castIn file included from /arm/kernel-2.6.13/include/linux/sched.h:36,
                 from /arm/kernel-2.6.13/include/linux/module.h:10,
                 from hello.c:4:
/arm/kernel-2.6.13/include/linux/seccomp.h: At top level:
/arm/kernel-2.6.13/include/linux/seccomp.h:37: warning: "struct thread_info" declared inside parameter list
In file included from /arm/kernel-2.6.13/include/linux/sched.h:103,
                 from /arm/kernel-2.6.13/include/linux/module.h:10,
                 from hello.c:4:
/arm/kernel-2.6.13/include/linux/resource.h:22: error: field `ru_utime' has incomplete type
/arm/kernel-2.6.13/include/linux/resource.h:23: error: field `ru_stime' has incomplete type
In file included from /arm/kernel-2.6.13/include/linux/sched.h:104,
                 from /arm/kernel-2.6.13/include/linux/module.h:10,
                 from hello.c:4:
/arm/kernel-2.6.13/include/linux/timer.h:12: error: field `entry' has incomplete type
In file included from /arm/3.4.1/bin/../lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/asm/hardirq.h:7,
                 from /arm/kernel-2.6.13/include/linux/hardirq.h:7,
                 from /arm/kernel-2.6.13/include/asm-generic/local.h:6,
                 from /arm/3.4.1/bin/../lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/asm/local.h:1,
                 from /arm/kernel-2.6.13/include/linux/module.h:21,
                 from hello.c:4:
/arm/3.4.1/bin/../lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/asm/irq.h:4:27: asm/arch/irqs.h: No such file or directory
In file included from /arm/kernel-2.6.13/include/asm-generic/local.h:6,
                 from /arm/3.4.1/bin/../lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/asm/local.h:1,
                 from /arm/kernel-2.6.13/include/linux/module.h:21,
                 from hello.c:4:
/arm/kernel-2.6.13/include/linux/hardirq.h:55:2: #error PREEMPT_ACTIVE is too low!
/arm/kernel-2.6.13/include/linux/hardirq.h:109:26: macro "irq_exit" passed 1 arguments, but takes just 0
In file included from /arm/3.4.1/bin/../lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/asm/local.h:1,
                 from /arm/kernel-2.6.13/include/linux/module.h:21,
                 from hello.c:4:
/arm/kernel-2.6.13/include/asm-generic/local.h: In function `local_inc':
/arm/kernel-2.6.13/include/asm-generic/local.h:65: error: invalid type argument of `->'
/arm/kernel-2.6.13/include/asm-generic/local.h:65: error: invalid type argument of `->'
/arm/kernel-2.6.13/include/asm-generic/local.h: In function `local_dec':
/arm/kernel-2.6.13/include/asm-generic/local.h:72: error: invalid type argument of `->'
/arm/kernel-2.6.13/include/asm-generic/local.h:72: error: invalid type argument of `->'
/arm/kernel-2.6.13/include/asm-generic/local.h: In function `local_add':
/arm/kernel-2.6.13/include/asm-generic/local.h:79: error: invalid type argument of `->'
/arm/kernel-2.6.13/include/asm-generic/local.h:79: error: invalid type argument of `->'
/arm/kernel-2.6.13/include/asm-generic/local.h: In function `local_sub':
/arm/kernel-2.6.13/include/asm-generic/local.h:86: error: invalid type argument of `->'
/arm/kernel-2.6.13/include/asm-generic/local.h:86: error: invalid type argument of `->'
In file included from hello.c:4:
/arm/kernel-2.6.13/include/linux/module.h: At top level:
/arm/kernel-2.6.13/include/linux/module.h:50: error: field `attr' has incomplete type
/arm/kernel-2.6.13/include/linux/module.h:51: error: parse error before "ssize_t"
/arm/kernel-2.6.13/include/linux/module.h:51: warning: no semicolon at end of struct or union
/arm/kernel-2.6.13/include/linux/module.h:52: error: parse error before '*' token
/arm/kernel-2.6.13/include/linux/module.h:53: error: `ssize_t' declared as function returning a function
/arm/kernel-2.6.13/include/linux/module.h:53: warning: data definition has no type or storage class
/arm/kernel-2.6.13/include/linux/module.h:57: error: parse error before '}' token
/arm/kernel-2.6.13/include/linux/module.h:61: error: field `kobj' has incomplete type
/arm/kernel-2.6.13/include/asm-generic/siginfo.h:58: error: storage size of `_pad' isn't known
make: *** [hello] Error 1

相关帖子

沙发
hugerat| | 2008-7-12 09:39 | 只看该作者

你的linux-2.6.13有没有在主机上编译过?

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

los

63

主题

192

帖子

2

粉丝