First you need to erase the entire flash:
Then, use the following command to write the uboot into the on board flash:
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:
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.
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.