Thursday, November 11, 2010

Program Linux Kernel to Flash with UBoot

uboot> tftpboot 0x80100000 uImage
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 'uImage'.
Load address: 0x80100000
Loading: *<08>#################################################################
##########################################################
done
Bytes transferred = 1801676 (1b7dcc hex)
uboot>nand erase 0x190000 0x270000
NAND erase: device 0 offset 0x190000, size 0x270000
Erasing at 0x190000 -- 0% complete.<0D>
Erasing at 0x194000 -- 1% complete.<0D>
Erasing at 0x19c000 -- 2% complete.<0D>
Erasing at 0x1a0000 -- 3% complete.<0D>
Erasing at 0x1a8000 -- 4% complete.<0D>
Erasing at 0x1ac000 -- 5% complete.<0D>
.......................................
Erasing at 0x3f0000 -- 98% complete.<0D>
Erasing at 0x3f8000 -- 99% complete.<0D>
Erasing at 0x3fc000 -- 100% complete.<0A>

OK
uboot>nand write.jffs2 0x80100000 0x190000 0x1B8000
NAND write: device 0 offset 0x190000, size 0x1b8000
1802240 bytes written: OK
uboot>setenv bootcmd 'nboot.jffs2 0x80100000 0x0 0x190000; bootm'
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: