主题 : uboot for tiny210引导内核问题 复制链接 | 浏览器收藏 | 打印
级别: 禁止发言
UID: 3605
精华: 0
发帖: 54
金钱: 300 两
威望: 66 点
贡献值: 0 点
综合积分: 108 分
注册时间: 2009-01-22
最后登录: 2017-07-10
楼主  发表于: 2013-06-24 00:15
用户被禁言,该主题自动屏蔽!
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2013-06-24 13:12
[    0.000000] Memory: 14MB 0MB = 14MB tota

看起来uboot没有把SDRAM信息正确的传给kernel。在uboot命令行上用bdinfo命令看bi_dram的值正确吗?另外,在include/configs/tiny210.h里有下面的配置吗?
复制代码
  1. #define CONFIG_SETUP_MEMORY_TAGS
"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."
级别: 禁止发言
UID: 3605
精华: 0
发帖: 54
金钱: 300 两
威望: 66 点
贡献值: 0 点
综合积分: 108 分
注册时间: 2009-01-22
最后登录: 2017-07-10
2楼  发表于: 2013-06-24 13:40
用户被禁言,该主题自动屏蔽!
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
3楼  发表于: 2013-06-24 16:32
在内核的arch/arm/kernel/setup.c里的parse_tag_mem32()函数里把tag->u.mem.start和tag->u.mem.size打印出来看看?
"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."
级别: 禁止发言
UID: 3605
精华: 0
发帖: 54
金钱: 300 两
威望: 66 点
贡献值: 0 点
综合积分: 108 分
注册时间: 2009-01-22
最后登录: 2017-07-10
4楼  发表于: 2013-06-25 10:08
用户被禁言,该主题自动屏蔽!
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
5楼  发表于: 2013-06-25 11:45

 回 4楼(pengyb) 的帖子

memory ATAG是由uboot在启动内核前通过arch/arm/lib/bootm.c里的setup_memory_tags()实现的。
"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."
级别: 禁止发言
UID: 3605
精华: 0
发帖: 54
金钱: 300 两
威望: 66 点
贡献值: 0 点
综合积分: 108 分
注册时间: 2009-01-22
最后登录: 2017-07-10
6楼  发表于: 2013-06-25 14:49
用户被禁言,该主题自动屏蔽!
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
7楼  发表于: 2013-06-25 19:41

 回 6楼(pengyb) 的帖子

对于这个16M的tag,内核只有在
1. 对应的machine没有指定bootloader传递过来的ATAG地址
或者
2. 从指定的ATAG地址上没有发现合法的ATAG (对于第一个ATAG结构,tags->hdr.tag != ATAG_CORE)
时才会使用。从这个内核源代码看,更像是第二种情况。也就是说,uboot没有正确的传递ATAG信息给内核。
"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."