Chinaunix首页 | 论坛 | 博客
  • 博客访问: 962478
  • 博文数量: 109
  • 博客积分: 554
  • 博客等级: 中士
  • 技术积分: 2577
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-04 12:49
文章分类

全部博文(109)

文章存档

2019年(5)

2016年(7)

2015年(9)

2014年(1)

2013年(71)

2012年(16)

分类: 嵌入式

2013-10-10 13:43:04

** 擦除内核
nand erase kernel
NAND erase: device 0 offset 0x300000, size 0x400000
Erasing at 0x6e0000 -- 100% complete.
OK
** 下载内核
TQ2416 # tftp zImage.bin
** 烧写内核
TQ2416 # nand write 0x30000000 0x300000 0x400000
NAND write: device 0 offset 0x300000, size 0x400000
 4194304 bytes written: OK


** 下载uboot
TQ2416 # tftp u-boot_2416_nommu.bin

** 擦除uboot
TQ2416 # nand erase bios

NAND erase: device 0 offset 0x0, size 0x80000
Erasing at 0x60000 -- 100% complete.
OK

** 烧写uboot
TQ2416 # nand write 0x30000000 0x0 0x80000
NAND write: device 0 offset 0x0, size 0x80000
 524288 bytes written: OK

 烧写UBI文件系统

** 原始ubi文件系统信息
UBI: attaching mtd4 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    126976 bytes
UBI: smallest flash I/O unit:    2048
UBI: VID header offset:          2048 (aligned 2048)
UBI: data offset:                4096
UBI: max. sequence number:       1396
UBI: attached mtd4 to ubi0
UBI: MTD device name:            "root"
UBI: MTD device size:            249 MiB
UBI: number of good PEBs:        1990
UBI: number of bad PEBs:         2
UBI: number of corrupted PEBs:   0
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     1
UBI: available PEBs:             0
UBI: total number of reserved PEBs: 1990
UBI: number of PEBs reserved for bad PEB handling: 19
UBI: max/mean erase counter: 3/1
UBI: image sequence number:  0

** 制作根文件系统
mkubifsimage -r  ./root_TQ2416_PDA_V1.2 -m 2048 -e 126976 -c 1990 -o rootfs_2416.ubi
root 目录为整合 android root 和 system 文件系统后的目录,应当能够通过 NFS 系统的

UBIFS error (pid 1): validate_sb: LEB size mismatch: 129024 in superblock, 126976 real
UBIFS error (pid 1): validate_sb: bad superblock, error 1

-e: 如果配置的不正确,根据内核提示重新生成ubifs,这里是126976
-c: 249M/128K = 1992 ,取小于1992的值
-m: 最小I/O单位大小

** 擦除 root 分区
nand erase root

** 对 root 分区进行 ubi 格式化
ubi part root

** 创建root分区
ubi create root

** 将文件系统下载到内存
tftp 0xc0008000  rootfs_2416.ubi
 
** 将文件系统烧写到 rootfs  中
ubi write 0xc0008000 root ${filesize}

* uboot 启动参数

TQ2416 # printenv
bootcmd=nand read.jffs2 c0008000 kernel;bootm c0008000
baudrate=115200
ethaddr=10:23:45:67:89:ab
gatewayip=192.168.1.2
ethact=dm9000
mtdids=nand0=nandflash0
serverip=192.168.101.36
ipaddr=192.168.101.10
netmask=255.255.255.0
bootdelay=10
mtdparts=mtdparts=nandflash0:512k@0(bios),512k(params),2048K(logo),4m(kernel),-(root)
bootargs_base=setenv bootargs noinitrd ubi.mtd=4 root=ubi0:root rootfstype=ubifs ${mtdparts} init=/linuxrc console=ttySAC0 mem=64M
tftpboot=run bootargs_base;tftp 0xc0008000 zImage.bin;bootm 0xc0008000
stdin=serial
stdout=serial
stderr=serial
partition=nand0,0
mtddevnum=0
mtddevname=bios

阅读(2823) | 评论(0) | 转发(0) |
0

上一篇:什么是CIF/4CIF/QCIF/D1?

下一篇:UDA1341控制

给主人留下些什么吧!~~