国产毛片a精品毛-国产毛片黄片-国产毛片久久国产-国产毛片久久精品-青娱乐极品在线-青娱乐精品

電子工程網(wǎng)

標題: linux2.6下的設備驅(qū)動問題 [打印本頁]

作者: chengnokia    時間: 2009-4-24 14:49
標題: linux2.6下的設備驅(qū)動問題
這是C文件

#include
#include
MODULE_LICENSE("Dual BSD/GPL");

static int hello_init(void)
{
        printk(KERN_ALERT "hello,world\n");
        return 0;
}

static void hello_exit(void)
{
        printk(KERN_ALERT "Goodbye,cruel world\n");
}

module_init(hello_init);
module_exit(hello_exit);
~                           


下面是makefile

CC =/usr/local/arm/bin/arm-linux-gcc
KERNELDIR=/home/work/linux2.6
CFLAGS =-D__KERNEL__ -DMODULE -I$(KERNELDIR)/include -O -Wall

hello.hello.c

        $(CC)$(CFLAGS)  -g -c $<

clean:



這時報錯:

/usr/local/arm/bin/arm-linux-gcc -D__KERNEL__ -DMODULE -I/home/work/linux2.6/include -O -Wall  -g -c hello.c   
In file included from /home/work/linux2.6/include/asm/hardware.h:16,
                 from /home/work/linux2.6/include/asm/arch/memory.h:24,
                 from /home/work/linux2.6/include/asm/memory.h:27,
                 from /home/work/linux2.6/include/asm/system.h:6,
                 from /home/work/linux2.6/include/asm/bitops.h:23,
                 from /home/work/linux2.6/include/linux/bitops.h:9,
                 from /home/work/linux2.6/include/linux/thread_info.h:20,
                 from /home/work/linux2.6/include/linux/preempt.h:9,
                 from /home/work/linux2.6/include/linux/spinlock.h:49,
                 from /home/work/linux2.6/include/linux/module.h:9,
                 from hello.c:2:
/home/work/linux2.6/include/asm/arch/hardware.h:30:2: #error "Unsupported AT91 processor"
In file included from /home/work/linux2.6/include/linux/bitops.h:9,
                 from /home/work/linux2.6/include/linux/thread_info.h:20,
                 from /home/work/linux2.6/include/linux/preempt.h:9,
                 from /home/work/linux2.6/include/linux/spinlock.h:49,
                 from /home/work/linux2.6/include/linux/module.h:9,
                 from hello.c:2:
/home/work/linux2.6/include/asm/bitops.h: In function `____atomic_set_bit':
/home/work/linux2.6/include/asm/bitops.h:40: warning: implicit declaration of function `local_irq_save'
/home/work/linux2.6/include/asm/bitops.h:42: warning: implicit declaration of function `local_irq_restore'
In file included from /home/work/linux2.6/include/linux/kobject.h:25,
                 from /home/work/linux2.6/include/linux/module.h:17,
                 from hello.c:2:
/home/work/linux2.6/include/linux/rwsem.h:24:65: asm/rwsem.h: No such file or directory
In file included from /home/work/linux2.6/include/linux/module.h:17,
                 from hello.c:2:
/home/work/linux2.6/include/linux/kobject.h: At top level:
/home/work/linux2.6/include/linux/kobject.h:178: error: field `rwsem' has incomplete type
In file included from /home/work/linux2.6/include/linux/memory_hotplug.h:7,
                 from /home/work/linux2.6/include/linux/mmzone.h:463,
                 from /home/work/linux2.6/include/linux/gfp.h:4,
                 from /home/work/linux2.6/include/linux/slab.h:14,
                 from /home/work/linux2.6/include/linux/percpu.h:5,
                 from /home/work/linux2.6/include/asm-generic/local.h:4,
                 from /home/work/linux2.6/include/asm/local.h:1,
                 from /home/work/linux2.6/include/linux/module.h:19,
                 from hello.c:2:
/home/work/linux2.6/include/linux/notifier.h:62: error: field `rwsem' has incomplete type
In file included from /home/work/linux2.6/include/asm/io.h:76,
                 from /home/work/linux2.6/include/asm/arch/irqs.h:24,
                 from /home/work/linux2.6/include/asm/irq.h:4,
                 from /home/work/linux2.6/include/asm/hardirq.h:6,
                 from /home/work/linux2.6/include/linux/hardirq.h:7,
                 from /home/work/linux2.6/include/asm-generic/local.h:5,
                 from /home/work/linux2.6/include/asm/local.h:1,
                 from /home/work/linux2.6/include/linux/module.h:19,
                 from hello.c:2:
/home/work/linux2.6/include/asm/arch/io.h: In function `at91_sys_read':
/home/work/linux2.6/include/asm/arch/io.h:36: error: `AT91_BASE_SYS' undeclared (first use in this function)
/home/work/linux2.6/include/asm/arch/io.h:36: error: (Each undeclared identifier is reported only once
/home/work/linux2.6/include/asm/arch/io.h:36: error: for each function it appears in.)
/home/work/linux2.6/include/asm/arch/io.h: In function `at91_sys_write':
/home/work/linux2.6/include/asm/arch/io.h:43: error: `AT91_BASE_SYS' undeclared (first use in this function)
make: *** [hello.o] 錯誤 1



到底是什么原因,版主和朋友們能不能幫個忙,謝謝了
作者: 阿南    時間: 2009-4-24 17:32
回復1樓chengnokia


#error "Unsupported AT91 processor"

樓主使用的處理器是AT91系列的嗎?最好是找一個支持該處理器或開發(fā)板的Linux整個包,自己移植太累了
作者: 老郭    時間: 2009-4-24 19:06
謝謝阿南!!!
作者: 阿南    時間: 2009-4-27 12:01
老郭客氣
應該的,嘿嘿




歡迎光臨 電子工程網(wǎng) (http://www.qingdxww.cn/) Powered by Discuz! X3.4
主站蜘蛛池模板: 成人a区| 免费一级毛片在线播放 | 精品国产欧美一区二区最新 | 蜜臀在线免费观看 | 国产精品露脸张开双腿 | 国产成人精品三级 | 狠狠色丁香婷婷综合激情 | 一本大道香焦在线视频 | 国产精品一区二区久久不卡 | 青青草原免费在线 | 欧美日韩一区二区三区在线播放 | 国内特级毛片 | 国产国产伦锂片 | 亚洲视频在线观看地址 | 欧美一区二区三区在观看 | 国产精品麻豆入口 | 日韩欧美综合视频 | 91精品国产高清91久久久久久 | 中文字幕亚洲一区二区v@在线 | 天天色天天综合网 | 黄片毛片免费观看 | 欧美色丁香 | 91久久老司机福利精品网 | a毛片免费视频 | 日韩一区二区三区免费体验 | 999成人网| 四虎永久影院 | 国产区精品福利在线观看精品 | 久久久免费视频播放 | 国产成人精品一区二区三在线观看 | 欧美日韩中文视频 | 日韩精品视频免费观看 | 久久免费视频99 | 欧洲馒头大肥p | 亚洲色图在线播放 | 羞羞网站在线看 | 精品国产日韩亚洲一区二区 | 最新一本大道香蕉综合 | 国产一区精品在线观看 | 日本特黄的免费大片视频 | 四虎影院在线免费观看 |