sama5d2 板子 win7下烧写文件系统

win7 64位

首先,在Centos服务器215上面执行如下指令:

/srv/msc/ubiCreate/rootfs_to_ubi.sh

得到如下文件:

sama5d2x-rootfs.ubi

将sama5d2x-rootfs.ubi 拷贝到目录:
sudo rm ~/ArmProject/multi-serial/burnTool/xin02-Images/sama5d2x-rootfs.ubi
sudo cp /srv/msc/ubiCreate/sama5d2x-rootfs.ubi ~/ArmProject/multi-serial/burnTool/xin02-Images

sudo cp  /srv/msc/ubiCreate/sama5d2x-rootfs.ubi  ~/ArmProject/multi-serial/burnTool/xin02-Images

Z:\ArmProject\multi-serial\burnTool\xin02-Images>

启动板子,参考博客内另外一个文档
《sama5d2 开发板 使用(一)》
https://blog.csdn.net/wowocpp/article/details/79656380
这里写图片描述

进入烧录模式:

这里写图片描述

串口控制台打印如下内容:
这里写图片描述

进入如下目录:

Z:\ArmProject\multi-serial\burnTool\xin02-Images

cd /D  Z:\ArmProject\multi-serial\burnTool\xin02-Images

执行如下命令:

Z:\ArmProject\multi-serial\burnTool\xin02-Images>Z:\ArmProject\multi-serial\burnTool\sam-ba_3.1.4-win32\sam-ba_3.1.4\sam-ba.exe -x multi_serial_rootfs.qml

中间有可能会出错,
多重复执行程序sam-ba.exe几次
这里写图片描述

其中:multi_serial_rootfs.qml 的内容如下:

import SAMBA 3.1
import SAMBA.Connection.Serial 3.1
import SAMBA.Device.SAMA5D2 3.1

AppletLoader {
    connection: SerialConnection {
        //port: "ttyACM0"
        //port: "COM85"
        //baudRate: 57600
    }

    device: SAMA5D2 {
        config {
            nandIoset: 2
            nandBusWidth: 8
            nandHeader: 0xc0902405
        }
    }

    onConnectionOpened: {
        // initialize NAND flash applet
        appletInitialize("nandflash")

        // erase all memory
        //appletErase(0, connection.applet.memorySize)
        //appletErase(0, 0x800000)
             appletErase(0x800000, connection.applet.memorySize-0x800000)   
        // write files
        //appletWrite(0x000000, "myd_ja5d2x-nandflashboot-uboot-3.8.7.bin", true)
        //appletWrite(0x040000, "u-boot.bin")

            //appletWrite(0x0c0000, "u-boot-env.bin")
        //appletWrite(0x180000, "myd_ja5d2x.dtb")

        //appletWrite(0x180000, "myd_ja5d2x_lcd7i.dtb")
        //appletWrite(0x200000, "zImage")
       // appletWrite(0x800000, "myd-ja5d2x-buildroot-qt5.ubi") //fsimage.ubi
        appletWrite(0x800000, "sama5d2x-rootfs.ubi")
        /*
        // initialize boot config applet
        appletInitialize("bootconfig")

        // Use BUREG0 as boot configuration word
        appletWriteBootCfg(BootCfg.BSCR, BSCR.fromText("VALID,BUREG0"))

        // Enable external boot only on NFC IOSET2
        appletWriteBootCfg(BootCfg.BUREG0,
            BCW.fromText("EXT_MEM_BOOT,UART1_IOSET1,JTAG_IOSET1," +
                         "SDMMC1_DISABLED,SDMMC0_DISABLED,NFC_IOSET2," +
                         "SPI1_DISABLED,SPI0_DISABLED," +
                         "QSPI1_DISABLED,QSPI0_DISABLED"))
        */
    }
}

板子原来的文件系统加载方式:

=> printenv
arch=arm
baudrate=115200
board=myd_ja5d2x
board_name=myd_ja5d2x
bootargs=root=/dev/nfs rw nfsroot=192.168.99.215:/srv/msc/rootfs,nfsvers=3 ip=192.168.99.43:192.168.99.1:255.255.255.0 console=ttyS0,115200
bootcmd=nand read 0x21000000 0x180000 0x80000;nand read 0x22000000 0x200000 0x600000;bootz 0x22000000 - 0x21000000
bootdelay=3
cpu=armv7
ethact=gmac0
serverip=192.168.99.205
soc=at91
stderr=serial
stdin=serial
stdout=serial
vendor=myir

Environment size: 471/131067 bytes
=>

设置从nfs服务器中的文件系统启动:

setenv bootargs root=/dev/nfs rw nfsroot=192.168.99.215:/srv/msc/rootfs,nfsvers=3 ip=192.168.99.43:192.168.99.1:255.255.255.0 console=ttyS0,115200

设置从nandflash启动:

setenv bootargs console=ttyS0,115200 earlyprintk mtdparts=atmel_nand:256k(bootstrap)ro,512k(uboot)ro,256K(env),256k(env_redundent),256k(spare),512k(dtb),6M(kernel)ro,-(rootfs) rootfstype=ubifs ubi.mtd=7 root=ubi0:rootfs
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值