免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2945 | 回复: 5
打印 上一主题 下一主题

[Linux] 编译WIFI节点驱动源码时,总是出现这个错误,求大神告知解决方法 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2014-03-25 20:39 |只看该作者 |倒序浏览
make -C tools
make[1]: Entering directory `/root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/tools'
gcc -g bin2h.c -o bin2h
make[1]: Leaving directory `/root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/tools'
/root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/tools/bin2h
cp -f os/linux/Makefile.6 /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/Makefile
make -C /utuLinux2.6.24/utu-Linux2.6.24_for_utu2440_2009-07-18 SUBDIRS=/root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux modules
make[1]: Entering directory `/utuLinux2.6.24/utu-Linux2.6.24_for_utu2440_2009-07-18'
  CC [M]  /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/crypt_md5.o
In file included from include/asm/system.h:6,
                 from include/linux/list.h:9,
                 from include/linux/module.h:9,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/os/rt_linux.h:31,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rtmp_os.h:44,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rtmp_comm.h:69,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rt_config.h:33,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/crypt_md5.c:28:
include/asm/memory.h:27:29: asm/arch/memory.h: No such file or directory
In file included from include/asm/system.h:6,
                 from include/linux/list.h:9,
                 from include/linux/module.h:9,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/os/rt_linux.h:31,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rtmp_os.h:44,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rtmp_comm.h:69,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rt_config.h:33,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/crypt_md5.c:28:
include/asm/memory.h: In function `virt_to_phys':
include/asm/memory.h:170: error: `PHYS_OFFSET' undeclared (first use in this function)
include/asm/memory.h:170: error: (Each undeclared identifier is reported only once
include/asm/memory.h:170: error: for each function it appears in.)
include/asm/memory.h: In function `phys_to_virt':
include/asm/memory.h:175: error: `PHYS_OFFSET' undeclared (first use in this function)
include/asm/memory.h: In function `virt_to_bus':
include/asm/memory.h:193: error: implicit declaration of function `__virt_to_bus'
include/asm/memory.h: In function `bus_to_virt':
include/asm/memory.h:198: error: implicit declaration of function `__bus_to_virt'
In file included from include/linux/timex.h:188,
                 from include/linux/jiffies.h:8,
                 from include/linux/ktime.h:25,
                 from include/linux/timer.h:5,
                 from include/linux/workqueue.h:8,
                 from include/linux/slub_def.h:11,
                 from include/linux/slab.h:118,
                 from include/linux/percpu.h:5,
                 from include/asm-generic/local.h:4,
                 from include/asm/local.h:1,
                 from include/linux/module.h:19,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/os/rt_linux.h:31,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rtmp_os.h:44,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rtmp_comm.h:69,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rt_config.h:33,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/crypt_md5.c:28:
include/asm/timex.h:15:28: asm/arch/timex.h: No such file or directory
In file included from include/linux/ktime.h:25,
                 from include/linux/timer.h:5,
                 from include/linux/workqueue.h:8,
                 from include/linux/slub_def.h:11,
                 from include/linux/slab.h:118,
                 from include/linux/percpu.h:5,
                 from include/asm-generic/local.h:4,
                 from include/asm/local.h:1,
                 from include/linux/module.h:19,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/os/rt_linux.h:31,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rtmp_os.h:44,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rtmp_comm.h:69,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rt_config.h:33,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/crypt_md5.c:28:
include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:225:31: division by zero in #if
include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:225:31: division by zero in #if
include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:225:31: division by zero in #if
include/linux/jiffies.h:225:31: division by zero in #if
include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:225:31: division by zero in #if
include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:225:31: division by zero in #if
include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:225:31: division by zero in #if
include/linux/jiffies.h:225:31: division by zero in #if
include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:225:31: division by zero in #if
include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:225:31: division by zero in #if
include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:225:31: division by zero in #if
include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:225:31: division by zero in #if
include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:225:31: division by zero in #if
include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:225:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:225:31: division by zero in #if
include/linux/jiffies.h:225:31: division by zero in #if
In file included from include/asm/hardirq.h:6,
                 from include/linux/hardirq.h:7,
                 from include/asm-generic/local.h:5,
                 from include/asm/local.h:1,
                 from include/linux/module.h:19,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/os/rt_linux.h:31,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rtmp_os.h:44,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rtmp_comm.h:69,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rt_config.h:33,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/crypt_md5.c:28:
include/asm/irq.h:4:27: asm/arch/irqs.h: No such file or directory
In file included from include/linux/mm.h:38,
                 from include/asm/dma-mapping.h:6,
                 from include/linux/dma-mapping.h:52,
                 from include/asm-generic/pci-dma-compat.h:7,
                 from include/asm/pci.h:5,
                 from include/linux/pci.h:796,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/os/rt_linux.h:41,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rtmp_os.h:44,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rtmp_comm.h:69,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rt_config.h:33,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/crypt_md5.c:28:
include/asm/pgtable.h:23:30: asm/arch/vmalloc.h: No such file or directory
In file included from include/linux/mm.h:38,
                 from include/asm/dma-mapping.h:6,
                 from include/linux/dma-mapping.h:52,
                 from include/asm-generic/pci-dma-compat.h:7,
                 from include/asm/pci.h:5,
                 from include/linux/pci.h:796,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/os/rt_linux.h:41,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rtmp_os.h:44,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rtmp_comm.h:69,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rt_config.h:33,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/crypt_md5.c:28:
include/asm/pgtable.h: In function `pmd_page_vaddr':
include/asm/pgtable.h:314: error: `PHYS_OFFSET' undeclared (first use in this function)
In file included from include/asm/dma-mapping.h:6,
                 from include/linux/dma-mapping.h:52,
                 from include/asm-generic/pci-dma-compat.h:7,
                 from include/asm/pci.h:5,
                 from include/linux/pci.h:796,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/os/rt_linux.h:41,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rtmp_os.h:44,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rtmp_comm.h:69,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rt_config.h:33,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/crypt_md5.c:28:
include/linux/mm.h: In function `virt_to_head_page':
include/linux/mm.h:254: error: `PHYS_OFFSET' undeclared (first use in this function)
In file included from include/asm/dma-mapping.h:6,
                 from include/linux/dma-mapping.h:52,
                 from include/asm-generic/pci-dma-compat.h:7,
                 from include/asm/pci.h:5,
                 from include/linux/pci.h:796,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/os/rt_linux.h:41,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rtmp_os.h:44,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rtmp_comm.h:69,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rt_config.h:33,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/crypt_md5.c:28:
include/linux/mm.h: In function `lowmem_page_address':
include/linux/mm.h:538: error: `PHYS_OFFSET' undeclared (first use in this function)
In file included from include/linux/scatterlist.h:8,
                 from include/asm/dma-mapping.h:8,
                 from include/linux/dma-mapping.h:52,
                 from include/asm-generic/pci-dma-compat.h:7,
                 from include/asm/pci.h:5,
                 from include/linux/pci.h:796,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/os/rt_linux.h:41,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rtmp_os.h:44,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rtmp_comm.h:69,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rt_config.h:33,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/crypt_md5.c:28:
include/asm/io.h:85:25: asm/arch/io.h: No such file or directory
In file included from include/asm/dma-mapping.h:8,
                 from include/linux/dma-mapping.h:52,
                 from include/asm-generic/pci-dma-compat.h:7,
                 from include/asm/pci.h:5,
                 from include/linux/pci.h:796,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/os/rt_linux.h:41,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rtmp_os.h:44,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rtmp_comm.h:69,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rt_config.h:33,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/crypt_md5.c:28:
include/linux/scatterlist.h: In function `sg_set_buf':
include/linux/scatterlist.h:106: error: `PHYS_OFFSET' undeclared (first use in this function)
include/linux/scatterlist.h: In function `sg_phys':
include/linux/scatterlist.h:278: error: `PHYS_OFFSET' undeclared (first use in this function)
In file included from include/asm/pci.h:7,
                 from include/linux/pci.h:796,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/os/rt_linux.h:41,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rtmp_os.h:44,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rtmp_comm.h:69,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/rt_config.h:33,
                 from /root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/crypt_md5.c:28:
include/asm/hardware.h:16:31: asm/arch/hardware.h: No such file or directory
make[2]: *** [/root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/crypt_md5.o] Error 1
make[1]: *** [_module_/root/Desktop/code/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux] Error 2
make[1]: Leaving directory `/utuLinux2.6.24/utu-Linux2.6.24_for_utu2440_2009-07-18'
make: *** [LINUX] Error 2

论坛徽章:
1
天蝎座
日期:2013-10-23 21:11:03
2 [报告]
发表于 2014-03-26 08:08 |只看该作者
先安装内核源码树?
可以看看系统使用的 repo 里面有没有 kernel-dev 类似的包

论坛徽章:
0
3 [报告]
发表于 2014-04-01 17:05 |只看该作者
回复 2# openspace


   啥意思?不懂,可以帮我分析这个错误的原因吗?

论坛徽章:
1
天蝎座
日期:2013-10-23 21:11:03
4 [报告]
发表于 2014-04-03 11:28 |只看该作者
编译安装模块需要编译的内核源码树
一般发行版会带有编译好的内核源码包,kernel-dev 或者 -devel 之类的
LZ 可以看看有没有这样的包,然后装上,再试试模块编译

论坛徽章:
0
5 [报告]
发表于 2014-04-04 09:51 |只看该作者
回复 4# openspace


   我编译的时候用的不是Linux发行版系统里自带的内核源码包,我用的是utu-Linux2.6.24,自己把这个内核源码包路径加到makefile文件里的

论坛徽章:
1
天蝎座
日期:2013-10-23 21:11:03
6 [报告]
发表于 2014-04-04 15:14 |只看该作者
内核之前编译了吗?编译模块需要二进制的内核源码树
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP