记录在tiny6410平台上采用4GSD卡来启动uboot和烧写nand flash uboot

下面这种方法是从网上转的 没有验证

环境:ubuntu 13.04
一、首先制作sd启动盘:
 插入SD卡
    sudo dd iflag=dsync oflag=dsync if=tiny210v2-uboot.binof=/dev/mmcblk0 seek=1
 tiny210v2-uboot.bin来自:
  http://www.arm9home.net/read.php?tid-80476.html
二、SD卡分区
   卸载SD卡,
  sudo /sbin/fdisk /dev/mmcblk0
    如果你的SD卡上有几个分区
    Command (mfor help): d   回车 删除硬盘分割区属性
    Partitionnumber (1-N):1  回车 删除1分区,
    Command (mfor help): d   回车
    Partition number (1-N):2 回车删除2分区
    你的SD卡里有几个区 就一一删除分区。 
    Command (mfor help): P 回车查看信息

    Command (m for help):n 回车

      p回车

    partition uumber(1-4):1 回车 这是选分第1个分区。
    first cylinder (1-17183,default 1):309248回车 前面预留100M左右
    Last cylinder or +size or +sizeM or +sizeK (1-17183, default17183): +400M 回车 
    同理再分一个区。:n+p+2+(500)+(default)

上面的分区就会预留出前面的启动uboot
    第一个分区格式化为FAT
    Command (mfor help): t回车
    Partitionnumber (1-4): 1回车
    Hex code(type L to list codes): b 回车    这里要们要设定这个区为w95 FAT323分区。
--------------
    Command (mfor help): t 回车
    Partitionnumber (1-4): 2 回车
    Hex code(type L to list codes): 83 回车    这里要们要设定这个区为LinuxEXT3分区。 
    Command (mfor help):w 写入退出。
三、把tiny210v2-uboot.bin和uImage复制到fat分区。
   插入到开发板上,sd启动模式
四、烧录到nand中
   1、烧写uboot

#mw.b 0x50008000 0xff 0x200000
   #fatload mmc 0 0x50008000 uboot-nand256.bin
    #nanderase.chip(这里一定要擦除全部nand否则就会出问题)
    #nand write 0x50008000 0x0 0x200000

(下面的是从网上转的 没有验证)
   2、烧写内核
    #fatload mmc 0:1 21000000uImage
    #nand erase200000  f200000 
    #nand write21000000  200000 34cb08
  3、烧写yaff文件系统
五、环境变量设置
  #setenv bootcmd nand read 0x20008000 0x2000000x34cb08\; bootm
  #saveenv
  #setenv bootargsroot=/dev/mmcblk0p2 rootfstype=ext4init=/linuxrc console=ttySAC0,115200
  #saveenv 
---------------------
作者:eastgeneral
来源:CSDN
原文:https://blog.csdn.net/eastgeneral/article/details/88421720
版权声明:本文为博主原创文章,转载请附上博文链接!

posted @ 2019-04-11 09:54  eastgeneral  阅读(349)  评论(0编辑  收藏  举报