CubieBoard中文论坛

 找回密码
 立即注册
搜索
热搜: unable
查看: 7209|回复: 3

为什么在linux下边不能从A20 的 NAND读出系统的引导程序 boot0 和 boo1

[复制链接]
发表于 2014-9-20 09:43:10 | 显示全部楼层 |阅读模式
昨天下午被人问了个问题,说为什么在linux下边不能从A20 的 NAND读出系统的引导程序 boot0 和 boo1 。  于是我找到这段话,更加迷惑了。

Then there is the NAND hw randomizer that gets in the way. Allwinner uses one setting for the BROM and the second boot stage (boot0/SPL), and another setting for normal use. With this setup, it is currently not implemented to access both bits at the same time. This currently provides another barrier for implementation, as one first needs to be able to read/write this area. While this is not beyond fixing, these are quite a few hoops to jump through.

其中,NAND hw randonmizer是干嘛用的?

因为在linux sunxi里面关于NAND启动的资料,有一篇是说NAND的boot0跟boot1是写在NAND的头1M空间的,所以分区前最好备份头1M空间。事实上我们将/dev/nand 的头1M读出来,发现0地址开始的是MBR,并非boot0和boo1的代码。


回复

使用道具 举报

发表于 2014-9-20 19:20:23 | 显示全部楼层
全志的nand前2M都是特殊的分区表 ,标准的fdisk和sfdisk都读不到,至于这个说明和实际对不上是常有的事了。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2014-9-21 23:26:16 | 显示全部楼层
lin 发表于 2014-9-20 19:20
全志的nand前2M都是特殊的分区表 ,标准的fdisk和sfdisk都读不到,至于这个说明和实际对不上是常有的事了。 ...

哦  谢谢!
回复 支持 反对

使用道具 举报

发表于 2014-9-23 09:39:52 | 显示全部楼层
下面是SD卡的前1M分区内容,参考下,正确与否希望各位指正


A20 芯片上电启动的时候,会读取SD卡最前面的 1M 内容,从而得到 bootloader,所以我们需要把 u-boot 写到SD卡的前1M区间。

其中详细的SD卡布局如下:
起始           大小         用途
0           8KB         存放分区表等内容
8           24KB         SPL loader
32           512KB         u-boot
544           128KB         environment
672           352KB         保留
1024    -                 用于剩余分区
回复 支持 反对

使用道具 举报

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

本版积分规则

QQ|Archiver|手机版|粤ICP备13051116号|cubie.cc---深刻的嵌入式技术讨论社区

GMT+8, 2024-4-23 16:38 , Processed in 0.022559 second(s), 15 queries .

Powered by Discuz! X3.4

© 2001-2012 Comsenz Inc. | Style by Coxxs

返回顶部