This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

am335x 从SD卡向nand烧写程序

Other Parts Discussed in Thread: AM3358

利用am3358开发产品,开始是在SD卡中调试,没问题后都烧写到nand中。命令如下:

U-Boot #mmc rescan

U-Boot #nand erase 0x0 0x280000

U-Boot #nandecc hw 2

U-Boot #fatload mmc 0 0x82000000 MLO

U-Boot #nand write 0x82000000 0x0 0x20000

U-Boot #fatload mmc 0 0x82000000 u-boot.img

U-Boot #nand write 0x82000000 0x80000 0x1E0000

U-Boot #nand erase 0x280000 0x500000

U-Boot #nandecc hw 2

U-Boot #fatload mmc 0 0x82000000 uImage

U-Boot #nand write 0x82000000 0x280000 0x500000

U-Boot#nand erase 0x780000 0x3200000

U-Boot#nandecc hw 2

U-Boot#fatload mmc 0 0x82000000 ubi.img

U-Boot#nand write 0x82000000 0x780000 0x2000000

每次都要输入这么多命令,非常麻烦,并且容易出错。有没有好的办法可以自动完成这些操作。比如提前写好命令,在uboot下自动执行这些命令。