主题 : <mini2440 linux移植实战指南> 分区表移植是不是有问题 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 30469
精华: 0
发帖: 11
金钱: 55 两
威望: 11 点
贡献值: 0 点
综合积分: 22 分
注册时间: 2010-10-17
最后登录: 2012-02-11
楼主  发表于: 2010-10-21 21:39

 <mini2440 linux移植实战指南> 分区表移植是不是有问题

按照指南上面的作之后,加入了一些头文件总算没有问题。。。但是就是启动不了

后来baidu半天才看到说要写上        s3c_device_nand.dev.platform_data(&mini2440_nand_info);这一句。。。

但是写了之后make zImage又出问题。。。不知道是怎么回事?

arch/arm/mach-s3c2440/mach-mini2440.c: In function 'mini2440_machine_init':
arch/arm/mach-s3c2440/mach-mini2440.c:223: error: 'mini2440_nand_info' undeclared (first use in this function)
arch/arm/mach-s3c2440/mach-mini2440.c:223: error: (Each undeclared identifier is reported only once
arch/arm/mach-s3c2440/mach-mini2440.c:223: error: for each function it appears in.)
arch/arm/mach-s3c2440/mach-mini2440.c:223: error: called object 's3c_device_nand.dev.platform_data' is not a function
make[1]: *** [arch/arm/mach-s3c2440/mach-mini2440.o] 错误 1


各位大大求助下!!
[ 此帖被zaigelinux在2010-10-22 18:12重新编辑 ]
级别: 新手上路
UID: 30469
精华: 0
发帖: 11
金钱: 55 两
威望: 11 点
贡献值: 0 点
综合积分: 22 分
注册时间: 2010-10-17
最后登录: 2012-02-11
1楼  发表于: 2010-10-21 23:59
折腾一晚上终于知道是为什么了。。。答案就是C编程里面最基础的东西。。。申明问题!!!

所谓的没有申明就是因为被调用函数的必须写在前面,如mini2440_nand_info 这个函数必须在'mini2440_machine_init这个函数的前面。。。。
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
2楼  发表于: 2010-10-22 11:47
看起来基础教育很重要:)
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."