First you need to erase the entire flash:
avr32program erase -fcfi@0
Then, use the following command to write the uboot into the on board flash:
avr32program program -e -v -fcfi@0 your_uboot_img.bin
Note that I found out although the -e argument tells the avr32program to unlock and erase before programming, but it will not erase certain part of the memory for some reason. The first command gives you a complete erase of the flash.
Further problems I encountered:
1/ When finishing upgrading uboot through JTAGICEmkII, you will need to load the Linux /root and /usr images to the onboard Flash(Instructions). At the end, u might see an error message like the following:
Writing environment variables Warning: Bad CRC1, using default environment Segmentation fault
I don't know exactly why, but certainly something to do with the environment variables. I looked back to the original setting when I got the NGW, and set the environment variables in uboot exactly like it. Reloaded the images, and the error message went away. My original setting was the following, set whatever is missing.
baudrate=115200 ethaddr= (calculate your own MAC address here, instructions) bootdelay=1 ethact=macb0 serverip=192.168.0.106 tftpip=192.168.0.106 eth1addr= (calculate your own MAC address here) bootargs=console=ttyS0 root=/dev/mtdblock1 rootfstype=jffs2 bootcmd=fsload;bootm stdin=serial stdout=serial stderr=serial
2/ When you try to access the Linux filesystem under Busybox, you may see the file system is listed strangely:BusyBox v1.4.2 (2007-04-17 15:34:55 CEST) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
~ # ls 1;34mbin0m 1;34metc0m 1;36mlinuxrc0m 1;34mproc0m 1;34mtmp0m 1;34mvar0m 1;34mconfig0m 1;34mhome0m 1;34mmedia0m 1;34msbin0m 0;0muImage0m 1;34mwww0m 1;34mdev0m 1;34mlib0m 1;34mmnt0m 1;34msys0m 1;34musr0m
Something I couldn't explain happened to your console - didn't parse the right characters. Just close the console, and open a new one. It should be fine.
Good Luck!
没有评论:
发表评论