Welcome to AVR32 Linux... Users Groups

Memory Technology Device Utilities

mtdutils is a set of utilities for doing low-level operations on flash devices.

Building mtdutils

mtdutils depends on ZLib , so you need to make sure it has been installed first.

Compile mtdutils by running

make CROSS=avr32-linux-

If everything went well, install the utilities on the target by running

make CROSS=avr32-linux- DESTDIR=<target root> install

Substitute <target_root> with the path to the target root filesystem, e.g. the mount point for the SD card or the directory exported for use as NFS root.

Using mtdutils

You will need to make sure your kernel is compiled without the write lock flag for the flash memory. You can do this by removing the line

.mask_flags = MTD_WRITEABLE,

from linux-2.6.xx/arch/avr32/boards/atngw100/flash.c, inside struct mtd_partition flash_parts[]

As an example, you can install u-boot on the NGW100 like this:

mtd_debug erase /dev/mtd0 0x0 0x20000
mtd_debug write /dev/mtd0 0x0 0x<file length> /path/to/u-boot.bin

Tested versions

Links

r3 - 2007-10-30 - 16:56:05 - JohnVoltz
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.
Atmel®, AVR® and others are registered trademarks or trademarks of Atmel Corporation or its subsidiaries.
All other trademarks are the property of their respective owners.
Syndicate this site RSSATOM