3779|5

71

帖子

0

TA的资源

一粒金砂(初级)

楼主
 

make后的一个小问题 [复制链接]

做的是led驱动,如下:

[root@localhost root]# cd /working/boot/

[root@localhost boot]# ls
built-in.o  led_driver.c  Makefile

[root@localhost boot]# make clean
rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions

[root@localhost boot]# make
make -C /working/linux2.6.8/ M=/working/boot
make[1]: Entering directory `/working/linux2.6.8'
  LD      /working/boot/built-in.o
  CC [M]  /working/boot/led_driver.o
In file included from include/asm/page.h:192,
                 from include/asm/cpu-single.h:33,
                 from include/asm/proc-fns.h:154,
                 from include/asm/system.h:90,
                 from include/asm/atomic.h:130,
                 from include/asm/processor.h:25,
                 from include/linux/prefetch.h:14,
                 from include/linux/list.h:7,
                 from include/linux/wait.h:14,
                 from include/linux/fs.h:12,
                 from /working/boot/led_driver.c:2:
include/asm/memory.h:16:29: asm/arch/memory.h: 没有那个文件或目录
In file included from include/asm/page.h:192,
                 from include/asm/cpu-single.h:33,
                 from include/asm/proc-fns.h:154,
                 from include/asm/system.h:90,
                 from include/asm/atomic.h:130,
                 from include/asm/processor.h:25,
                 from include/linux/prefetch.h:14,
                 from include/linux/list.h:7,
                 from include/linux/wait.h:14,
                 from include/linux/fs.h:12,
                 from /working/boot/led_driver.c:2:
include/asm/memory.h: In function `virt_to_phys':
include/asm/memory.h:94: error: `PHYS_OFFSET' undeclared (first use in this function)
include/asm/memory.h:94: error: (Each undeclared identifier is reported only once
include/asm/memory.h:94: error: for each function it appears in.)
include/asm/memory.h: In function `phys_to_virt':
include/asm/memory.h:99: error: `PHYS_OFFSET' undeclared (first use in this function)
In file included from include/linux/time.h:4,
                 from include/linux/stat.h:57,
                 from include/linux/fs.h:17,
                 from /working/boot/led_driver.c:2:
include/asm/param.h:13:45: asm/arch/param.h: 没有那个文件或目录
In file included from include/linux/timex.h:155,
                 from include/linux/time.h:29,
                 from include/linux/stat.h:57,
                 from include/linux/fs.h:17,
                 from /working/boot/led_driver.c:2:
include/asm/timex.h:15:28: asm/arch/timex.h: 没有那个文件或目录
In file included from include/linux/stat.h:57,
                 from include/linux/fs.h:17,
                 from /working/boot/led_driver.c:2:
include/linux/time.h:145:31: division by zero in #if
include/linux/time.h:145:31: division by zero in #if
include/linux/time.h:145:31: division by zero in #if
include/linux/time.h:145:31: division by zero in #if
include/linux/time.h:145:31: division by zero in #if
include/linux/time.h:145:31: division by zero in #if
include/linux/time.h:145:31: division by zero in #if
include/linux/time.h:145:31: division by zero in #if
include/linux/time.h:145:31: division by zero in #if
include/linux/time.h:145:31: division by zero in #if
include/linux/time.h:145:31: division by zero in #if
include/linux/time.h:145:31: division by zero in #if
include/linux/time.h:145:31: division by zero in #if
include/linux/time.h:145:31: division by zero in #if
include/linux/time.h:145:31: division by zero in #if
In file included from include/linux/stat.h:57,
                 from include/linux/fs.h:17,
                 from /working/boot/led_driver.c:2:
include/linux/time.h: In function `timespec_to_jiffies':
include/linux/time.h:223: error: `CLOCK_TICK_RATE' undeclared (first use in this function)
include/linux/time.h: In function `jiffies_to_timespec':
include/linux/time.h:242: error: `CLOCK_TICK_RATE' undeclared (first use in this function)
include/linux/time.h: In function `timeval_to_jiffies':
include/linux/time.h:264: error: `CLOCK_TICK_RATE' undeclared (first use in this function)
include/linux/time.h: In function `jiffies_to_timeval':
include/linux/time.h:280: error: `CLOCK_TICK_RATE' undeclared (first use in this function)
In file included from include/asm/hardirq.h:7,
                 from include/asm-generic/local.h:7,
                 from include/asm/local.h:1,
                 from include/linux/module.h:21,
                 from include/linux/device.h:20,
                 from /working/boot/led_driver.c:5:
include/asm/irq.h:4:27: asm/arch/irqs.h: 没有那个文件或目录
In file included from include/linux/mm.h:30,
                 from include/linux/poll.h:10,
                 from /working/boot/led_driver.c:8:
include/asm/pgtable.h:15:30: asm/arch/vmalloc.h: 没有那个文件或目录
In file included from include/linux/mm.h:30,
                 from include/linux/poll.h:10,
                 from /working/boot/led_driver.c:8:
include/asm/pgtable.h: In function `pmd_page_kernel':
include/asm/pgtable.h:336: error: `PHYS_OFFSET' undeclared (first use in this function)
In file included from include/linux/poll.h:10,
                 from /working/boot/led_driver.c:8:
include/linux/mm.h: In function `lowmem_page_address':
include/linux/mm.h:406: error: `PHYS_OFFSET' undeclared (first use in this function)
In file included from /working/boot/led_driver.c:15:
include/asm-arm/hardware.h:16:31: asm/arch/hardware.h: 没有那个文件或目录
In file included from /working/boot/led_driver.c:16:
include/asm-arm/arch-s3c2410/io.h: In function `__ioaddr':
include/asm-arm/arch-s3c2410/io.h:71: error: `S3C2410_VA_ISA_WORD' undeclared (first use
in this function)
include/asm-arm/arch-s3c2410/io.h: In function `__inb':
include/asm-arm/arch-s3c2410/io.h:80: error: `S3C2410_VA_ISA_BYTE' undeclared (first use
in this function)
include/asm-arm/arch-s3c2410/io.h: In function `__outb':
include/asm-arm/arch-s3c2410/io.h:80: error: `S3C2410_VA_ISA_BYTE' undeclared (first use
in this function)
include/asm-arm/arch-s3c2410/io.h: In function `__inw':
include/asm-arm/arch-s3c2410/io.h:81: error: `S3C2410_VA_ISA_WORD' undeclared (first use
in this function)
include/asm-arm/arch-s3c2410/io.h: In function `__outw':
include/asm-arm/arch-s3c2410/io.h:81: error: `S3C2410_VA_ISA_WORD' undeclared (first use
in this function)
include/asm-arm/arch-s3c2410/io.h: In function `__inl':
include/asm-arm/arch-s3c2410/io.h:82: error: `S3C2410_VA_ISA_WORD' undeclared (first use
in this function)
include/asm-arm/arch-s3c2410/io.h: In function `__outl':
include/asm-arm/arch-s3c2410/io.h:82: error: `S3C2410_VA_ISA_WORD' undeclared (first use
in this function)
/working/boot/led_driver.c: In function `LedSet':
/working/boot/led_driver.c:80: warning: implicit declaration of function `__raw_writel'
/working/boot/led_driver.c:80: warning: implicit declaration of function `__raw_readl'
make[2]: *** [/working/boot/led_driver.o] Error 1
make[1]: *** [_module_/working/boot] Error 2
make[1]: Leaving directory `/working/linux2.6.8'
make: *** [all] Error 2

请告诉是什么问题,如何为什么不能生成led_driver.o文件?

最新回复

感激  详情 回复 发表于 2010-1-29 16:50
点赞 关注

回复
举报

74

帖子

0

TA的资源

一粒金砂(初级)

沙发
 
error: `PHYS_OFFSET' undeclared (first use in this function)
include/asm/memory.h:94: error: (Each undeclared identifier is reported only once
include/asm/memory.h:94: error: for each function it appears in.)
include/asm/memory.h: In function `phys_to_virt':
include/asm/memory.h:99: error: `PHYS_OFFSET' undeclared (first use in this function)

这么多error,当然不成功。
看看是不是“include/asm/memory.h:16:29: asm/arch/memory.h: 没有那个文件或目录” 引起的。
 
 

回复

80

帖子

0

TA的资源

一粒金砂(初级)

板凳
 
头文件*.h报错是不影响编译的。
 
 
 

回复

69

帖子

0

TA的资源

一粒金砂(初级)

4
 
看起来是因为有一些头文件找不到所以无法编译。
asm/arch是空目录?
 
 
 

回复

67

帖子

0

TA的资源

一粒金砂(初级)

5
 
非常感谢WOBUGUAN!
编译通过了
 
 
 

回复

77

帖子

0

TA的资源

一粒金砂(初级)

6
 
感激
 
 
 

回复
您需要登录后才可以回帖 登录 | 注册

随便看看
查找数据手册?

EEWorld Datasheet 技术支持

相关文章 更多>>
关闭
站长推荐上一条 1/7 下一条

 
EEWorld订阅号

 
EEWorld服务号

 
汽车开发圈

About Us 关于我们 客户服务 联系方式 器件索引 网站地图 最新更新 手机版

站点相关: 国产芯 安防电子 汽车电子 手机便携 工业控制 家用电子 医疗电子 测试测量 网络通信 物联网

北京市海淀区中关村大街18号B座15层1530室 电话:(010)82350740 邮编:100190

电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号 Copyright © 2005-2025 EEWORLD.com.cn, Inc. All rights reserved
快速回复 返回顶部 返回列表