常用uboot命令

17 篇文章 0 订阅

1、nandflash分区信息

 mtdpart

device nand0 <nandflash0>, # parts = 4

 #: name                size            offset          

 0: bootloader          0x00040000      0x00000000     //256k 

 1: params             0x00020000      0x00040000     //128k 

 2: kernel              0x00200000      0x00060000     //2m  

 3: root                0x0fba0000      0x00460000     //余下全部

   

2、设置机器ID

set machid 16a  

 

3、设置环境变量

print       //打印环境变量

save         //保存环境变量

setenv bootdelay 5    //设置bootcmd延时为5

setenv ipaddr  192.168.1.226      //设置开发板IP

setenv serverip  192.168.1.200    //设置服务器ip(Windows)

setenv gatewayip  192.168.1.254   //设置网关

setenv netmask       255.255.255.0 //设置子网掩码

setenv bootargs noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySAC0,115200

//清除某个环境变量

setenv bootargs  //以bootargs为例

save

 

//清除全部的环境变量

nand erase params

 

4、tftp烧写

//通过tftp烧写u-boot.bin到nand Flash步骤:

在SecureCRT中依次输入:

tftp 0x30008000 u-boot.bin //将uboot.bin 下载到sdram 0x30008000

nand erase bootloader //擦除bootloader区域

nand write 0x30008000 bootloader //烧写到bootloader

 

//通过tftp烧写uImage到nand Flash步骤:

在SecureCRT中依次输入:

tftp 0x30008000 uImage

nand erase kernel

nand write 0x30008000 kernel

 

//烧写YAFFS至Nand Flash

打开 tftpd32.exe 软件, 将 fs_mini.yaffs2 拷贝至工作目录

在SecureCRT中依次输入:

tftp 0x30008000 fs_mini.yaffs2

nand erase root 

nand write.yaffs 0x30008000 root $(filesize) // $(filesieze) 是fs_mini.yaffs2 的大小

 

//烧写JFFS至Nand Flash

打开 tftpd32.exe 软件,将 fs_mini.jffs2 拷贝至工作目录

在SecureCRT中依次输入:

tftp 0x30008000 fs_mini.jffs2

nand erase root 

nand write.jffs2 0x30008000 root $(filesize) // $(filesieze) 是fs_mini.yaffs2 大小

 

 

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
=> help ? - alias for 'help' autoscr - run script from memory base - print or set address offset bdinfo - print Board Info structure boot - boot default, i.e., run 'bootcmd' bootd - boot default, i.e., run 'bootcmd' bootm - boot application image from memory bootp - boot image via network using BootP/TFTP protocol cmp - memory compare coninfo - print console devices and information cp - memory copy crc32 - checksum calculation dhcp - invoke DHCP client to obtain IP/boot params echo - echo args to console erase - erase FLASH memory flinfo - print FLASH memory information go - start application at address 'addr' help - print online help iminfo - print header information for application image imls - list all images found in flash itest - return true/false on integer compare loadb - load binary file over serial line (kermit mode) loads - load S-Record file over serial line loop - infinite loop on address range md - memory display mm - memory modify (auto-incrementing) mtest - simple RAM test mw - memory write (fill) nfs - boot image via network using NFS protocol nm - memory modify (constant address) printenv - print environment variables protect - enable or disable FLASH write protection rarpboot - boot image via network using RARP/TFTP protocol reset - Perform RESET of the CPU run - run commands in an environment variable saveenv - save environment variables to persistent storage setenv - set environment variables sleep - delay execution for some time tftpboot - boot image via network using TFTP protocol version - print monitor version
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值