醉月 发表于 2014-9-20 09:43:10

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

昨天下午被人问了个问题,说为什么在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的代码。


lin 发表于 2014-9-20 19:20:23

全志的nand前2M都是特殊的分区表 ,标准的fdisk和sfdisk都读不到,至于这个说明和实际对不上是常有的事了。

醉月 发表于 2014-9-21 23:26:16

lin 发表于 2014-9-20 19:20 static/image/common/back.gif
全志的nand前2M都是特殊的分区表 ,标准的fdisk和sfdisk都读不到,至于这个说明和实际对不上是常有的事了。 ...

哦谢谢!

smileFei 发表于 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    -                 用于剩余分区
页: [1]
查看完整版本: 为什么在linux下边不能从A20 的 NAND读出系统的引导程序 boot0 和 boo1