Skip to content

Board Start Up

Wenfeng CAI edited this page Sep 22, 2016 · 4 revisions

烧写 MLO

  1. 加载 MLO 到内存

    fatload mmc 0:1 0x82000000 MLO
    
  2. 擦除 flash

    nand erase 0x0 0x80000
    
  3. 设置 ecc 校验为 hamming

    nandecc hw hamming
    
  4. 烧写

    nand write 0x82000000 0x0 0x80000
    

烧写 u-boot Environment

  1. 加载 env.bin 到内存

    fatload mmc 0:1 0x82000000 env.bin
    
  2. 擦除 flash

    nand erase 0x240000 0x40000
    
  3. 设置 ecc 校验为 bch8

    nandecc sw bch8
    
  4. 烧写

    nand write 0x82000000 0x240000 0x40000
    

启动 MMC 上的 Linux

  1. 加载 kernel 到内核

    fatload mmc 0:1 ${loadaddr} zImage
    
  2. 加载 DeviceTree

    fatload mmc 0:1 ${fdtaddr} omap3-tele.dtb
    
  3. 从 MMC 启动

    run mmcargs; bootz ${loadaddr} - ${fdtaddr}
    

为在 MMC 上的 Linux 上烧写 flash 作准备

sudo -i
mount /dev/mmcblk0p1 /mnt/mmc
cd  /mnt/mmc

烧写 u-boot, kernel, DTB

flashcp u-boot.img /dev/mtd1
nandwrite -p /dev/mtd1 u-boot.img
flashcp zImage /dev/mtd3
nandwrite -p /dev/mtd3 zImage
flashcp omap3-tele.dtb /dev/mtd5
nandwrite -p /dev/mtd5 omap3-tele.dtb

烧写文件系统

mount -t yaffs2 /dev/mtdblock7 /mnt/nand
cd /mnt/nand
tar xpf /home/debian/rootfs-tele.tar