韦东山-烧写uboot、kernel、文件系统

发布时间 2023-06-25 22:01:54作者: MaxBruce

原文:https://blog.csdn.net/dream_bin123/article/details/77747051

韦东山的烧写方式:
1 oflash烧写
在windows上找到oflash的文件夹 输入 oflash <要烧写的文件名> 之后安装步骤即可。

该方法是用openjtag烧写的。

2 usb+dnw烧写
韦东山uboot的开机界面,在数秒时按空格。电脑端打开dnw软件,configuration->opention连接软件、USB Port->transmit 选择要烧写的文件

3 uboot+tftp烧写flash
3.1 烧写前的准备
一、nandflash分区信息

OpenJTAG> 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 //余下全部

三、设置环境变量

print //打印环境变量

save //保存环境变量

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

setenv ipaddr 192.168.1.226 //设置开发板IP

setenv serverip 192.168.1.200 //设置服务器ip(Windows) 你电脑端的ip,在tftp中要用到

setenv gatewayip 192.168.1.254 //设置网关

setenv netmask 255.255.255.0 //设置子网掩码


3.2 重新烧写整个系统步骤:
格式化:nand scrub

uboot中的环境变量保存到nand flash 中: saveenv


查看分区信息:

 

烧写uboot:(因为要使用tftp所以要打开tftp工具,要配置ipaddr和serverip)

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

nand erase bootloader //擦除bootloader区域 同 nand erase 0x60000 0x20000

nand write 0x30008000 bootloader //烧写到bootloader 同 nand write 0x30008000 0x0 40000


烧写内核

tftp 0x30008000 uImage

nand erase kernel //同 nand erase 60000 200000

nand write 0x30008000 kernel //同 nand write 0x30008000 60000 200000


tftp 0x30008000 fs_mini.yaffs2

nand erase root //同 nand erase 260000 fda0000

nand write.yaffs 0x30008000 260000 $(filesize) // $(filesieze) 是 fs_mini.yaffs2 的大小,在tftp一步会有提示信息说明大小


//烧写JFFS至NandFlash

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

在SecureCRT中依次输入:

tftp 0x30008000 fs_mini.jffs2

nand erase root

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

 


hi35xx spi flash烧写:


uboot烧写:
mw.b 82000000 ff 100000;tftp 0x82000000 uboot3518e.bin;sf probe 0;sf erase 0x0000 0x100000;sf write 82000000 0x0000 0x100000;

内核烧写
mw.b 82000000 ff 300000;tftp 0x82000000 uImage;sf probe 0;sf erase 100000 300000;sf write 82000000 100000 300000;

文件系统烧写
mw.b 82000000 ff c00000;tftp 0x82000000 rootfs.jffs2;sf probe 0;sf erase 400000 c00000;sf write 82000000 400000 c00000;


设置启动参数
setenv bootargs 'mem=32M console=ttyAMA0,115200 root=/dev/mtdblock2 rootfstype=jffs2 mtdparts=hi_sfc:1M(boot),3M(kernel),12M(rootfs)';

setenv bootcmd 'sf probe 0;sf read 0x82000000 0x100000 0x300000;bootm 0x82000000';

saveenv;
————————————————
版权声明:本文为CSDN博主「问道_bin」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/dream_bin123/article/details/77747051