#!/bin/sh

avr32program halt

avr32program program -F bin -vefcfi@0 u-boot-atngw100-v1.3.3.bin # (Programming the bootloader) 

# slow, better use SD card method
# avr32program program -F bin -vefcfi@0 -O 0x20000 ngw/ngw_jffs2_root.img # (Programming the filesystem)

# /usr goes into the serial dataflash
# to upgrade it at linux prompt do:
# /etc/init.d/S90reboot
# umount /usr
# flash_eraseall /dev/mtd3
# mount /dev/mmcblk0p1 mnt # (image is on SD card)
# dd if=/mnt/ngw_jffs2_usr.img of=/dev/mtd3 bs=1056
