It works as expected.
The 7.09 does not have the support for the MMC/SD device. You cannot boot from MMC/SD unless you backport the drivers to 2.6.22.1 and provide them to the kernel in the initrd (or build the current trunk with your options).
You will have to use the squashfs image. The OpenWrt expects to be executed from the flash memory.
There is no warranty of any kind that the following guide will not blow up your computer, the device or your head.
The NGW100's memory map is as follows:
0x00000000-0x0001ffff: U-Boot
0x00020000-0x007effff: usable flash space
0x007f0000-0x007fffff: U-Boot's environment
nothing
0x10000000-0x20000000: SDRAM
nothing
0x24000000-0x24003fff: internal SRAM
Connect to your NGW100 using the serial terminal (115200 8N1), reset it, press space to get into U-Boot. The U-Boot's manual is your mandatory reading.
WARNING: Using wrong addresses or commands may result in the broken u-boot! Remember that the JTAG solution for the AVR32 family is very expensive!
You need to load the squashfs image. You can use any U-Boot's method including the MMC/SD ext2 access which is built-in into the Atmel's u-boot. Train it until you are able to load the image into U-Boot.
You need to setup the IP information for U-Boot (you can use dhcp as well) and load the image to the specified SDRAM address (notice the address 0x10000000 is the start of the SDRAM space):
UBoot> setenv ipaddr <the NGW100's IP address>
UBoot> setenv serverip <the tftp server's IP address>
UBoot> tftp 0x10000000 openwrt-avr32-2.6-squashfs.img
You can copy the image to the ext2 partition of a MMC/SD card (ex.: to the root of the partition) and load it from there:
UBoot> mmcinit
UBoot> ext2load mmc 0:1 0x10000000 /openwrt-avr32-2.6-squashfs.img
0:1 means the card 0, the partition 1 (modify it as needed, you can have more partitions).
If you managed to get the image to the U-Boot's memory, you can write it to the flash. You have not changed anything so far, the original or previous setup is still working. You will not be able to use the original setup after this step unless you write the original / image back to the flash (using the same steps).
You should backup the mtd2 partition if you want to save your changes to the original jffs partition. Otherwise you can restore it using images provided by Atmel (or built by you).
WARNING: Using wrong addresses or commands may result in the broken u-boot!
The U-Boot is preventing you to damage the unwanted part of memory. You need to unprotect the unused part of the flash memory, erase it, load the image to the SDRAM and write it to the flash (see the memory map above for the meaning of 0x20000 and 0x7EFFFF addresses).
UBoot> protect off 0x20000 0x7EFFFF
UBoot> erase 0x20000 0x7EFFFF
....
UBoot> tftp 0x10000000 openwrt-avr32-2.6-squashfs.img
Bytes transferred = 1900544 (1D0000 hex)
Notice the size of the image (1D0000 hex), you will need this number for the following command.
UBoot> cp.b 0x10000000 0x20000 0x1D0000
Copy to Flash... done
UBoot> protect on all
You are writing the contents of the SDRAM at the address 0x10000000 to the flash address 0x20000 with the length of 0x1D0000.
Now you need to modify the U-Boot's parameters to load the image and provide the kernel with necessary parameters. The U-Boot will expand the kernel from the specified address to the start of the SDRAM and execute it.
UBoot> setenv bootcmd 'bootm 0x20000'
The squashfs image has the kernel image prepended, so it starts at the 0x20000 address (see the memory map above). The flash memory is mapped directly into the memory space, so you do not need to load it to the SDRAM. The U-Boot will get the start (+ the length), and the execute address from the kernel image.
UBoot> setenv bootargs 'console=/dev/ttyS0,115200 root=/dev/mtdblock2 rootfstype=squashfs,jffs2 init=/etc/preinit'
This is the default kernel's command line for OpenWrt, the mtd2 is the squashfs/jffs2 partition.
And finally write all changes to the U-Boot's environment:
UBoot> savenv
Saving Environment to Flash...
...
Now you just press the reset button or issue:
to load the kernel and start your OpenWrt AVR32 experience.
If you are tired looking at the sys led heartbeat, issue:
[ -f /sys/class/leds/sys/trigger ] && echo none > /sys/class/leds/sys/trigger
If you want to switch the sys led on, issue:
[ -f /sys/class/leds/sys/brightness ] && echo 255 > /sys/class/leds/sys/brightness
If you want to switch the sys led off, issue:
[ -f /sys/class/leds/sys/brightness ] && echo 0 > /sys/class/leds/sys/brightness
if you want to load the kernel image directly, you need to use a different SDRAM address so that the U-Boot would not overwrite the image while decompressing it.
UBoot> tftp 0x10300000 openwrt-avr32-2.6-uImage
UBoot> bootm 0x10300000
You can use any SDRAM address higher than the size of the decompressed kernel. Using the address 0x10300000 will reserve 3 MiB of memory at the start (the kernel image size in the trunk is about 2 MiB).
P.S. What is driving people to repeat the error thinking that it will eventually end up with success?