Updating flash via linux

Background

The 'mtd' subsystem of the linux kernel has a map of the flash which it prints at boot time:


...
SA1100 flash: probing 16-bit flash bus
 Amd/Fujitsu Extended Query Table v1.0 at 0x0040
number of CFI chips: 1
Using static partition definition
Creating 3 MTD partitions on "SA1100 flash":
0x00000000-0x00010000 : "boot firmware"
0x00010000-0x000e0000 : "kernel"
0x000e0000-0x00200000 : "initrd"
...

The mapping from flash sections to mtd devices is as follows:

	mtdblock0	00000000 - 0000ffff	blob boot loader
	mtdblock1	00010000 - 000dffff	pboot loader (kernel)
	mtdblock2	000e0000 - 001fffff	ramdisk (unused)

The primary boot loader (blob) and secondary boot loader (pboot) can be updated from linux as follow:


       cat blob >/dev/mtdblock0
       cat pboot >/dev/mtdblock1
       sync

It should be pointed out that if this operation is interrupted or fails you may have to go back to the jtag program and use the jtag buffer board to reprogram the flash.