Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Partition name

Device name

Address range

Size

Attributes

Purpose

boot

/dev/mtd0

0x0000 0000 - 0x00F FFFF

0x0010 0000

read/write

bootloader + environment

Environment: last 8KiB

failsafe

/dev/mtd1

0x0010 0000 - 0x003F BFFF

0x002F C000

read/write

user partition (free for customer)

3MiB minus 16k MFG data

reserved

/dev/mtd2

0x003F C000 - 0x003F FFFF

0x0000 4000

read only

MFG (manufacturing data)

Access the SPI flash from linux kernel

...

root@cgtqmx6:~# ls -lad /dev/mtd*
crw-------    1 root     root       90,   0 Feb  7 06:40 /dev/mtd0
crw-------    1 root     root       90,   1 Feb  7 06:40 /dev/mtd0ro
crw-------    1 root     root       90,   2 Feb  7 06:40 /dev/mtd1
crw-------    1 root     root       90,   3 Feb  7 06:40 /dev/mtd1ro
crw-------    1 root     root       90,   4 Feb  7 06:40 /dev/mtd2
crw-------    1 root     root       90,   5 Feb  7 06:40 /dev/mtd2ro
brw-rw----    1 root     disk       31,   0 Feb  7 06:40 /dev/mtdblock0
brw-rw----    1 root     disk       31,   1 Feb  7 06:40 /dev/mtdblock1
brw-rw----    1 root     disk       31,   2 Feb  7 06:40 /dev/mtdblock2

Example howto : how to format user partition with JFF2 and mount it:

...

Access the SPI flash from u-boot

Example to : clear u-boot partition on SPI flash in from u-boot command line:

=> sf probe
SF: Detected w25q64dw with page size 256 Bytes, erase size 4 KiB, total 8 MiB

...