Thursday, November 11, 2010

Program Linux FileSystem to Flash with UBoot

tftpboot 0x80100000 rootfs.jffs2
HW MAC address: 00:01:90:00:C0:81
ENET:auto-negotiation complete
ENET:FULL DUPLEX
ENET:100MBase
TFTP from server 10.10.20.70; our IP address is 10.10.20.88
Filename 'rootfs.jffs2'.
Load address: 0x80100000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
######################################################
done
Bytes transferred = 5554176 (54c000 hex)
uboot> nand erase 0x590000 0x3a70000
NAND erase: device 0 offset 0x590000, size 0x3a70000
Erasing at 0x590000 -- 0% complete.<0D>
Erasing at 0x624000 -- 1% complete.<0D>
Erasing at 0x6b8000 -- 2% complete.<0D>
Erasing at 0x750000 -- 3% complete.<0D>
Erasing at 0x7e4000 -- 4% complete.<0D>
Erasing at 0x878000 -- 5% complete.<0D>
....................................
Erasing at 0x2648000 -- 56% complete.
Erasing at 0x26dc000 -- 57% complete.
Skipping bad block at 0x026f4000
Erasing at 0x2774000 -- 58% complete.
Erasing at 0x2808000 -- 59% complete.
......................................
Erasing at 0x3f68000 -- 99% complete.<0D>
Erasing at 0x3ffc000 -- 100% complete.
OK
uboot> nand write.jffs2 0x80100000 0x590000 0x54C000
NAND write: device 0 offset 0x590000, size 0x54c000
5554176 bytes written: OK
uboot> setenv bootargs 'console=ttyS0,115200n81 root=/dev/mtdblock3 rw rootfstype
=jffs2 ip=10.10.20.88 init=/sbin/init'
uboot> saveenv
Saving Environment to NAND...
Erasing Nand...
Erasing at 0x1f4000 -- 25% complete.<0D>
Erasing at 0x1f8000 -- 50% complete.<0D>
Erasing at 0x1fc000 -- 75% complete.<0D>
Erasing at 0x200000 -- 100% complete.
Writing to Nand... done
uboot>

No comments: