summaryrefslogtreecommitdiffstats
path: root/doc/local-flash
blob: 9ba487a952ea591071c3f60219c038bdb4b98722 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
It is possible to flash directly from the device, so this brings the possibility
to completely replace the bootloader flasher by a userland one with extended
features for backuping and recovering data.

The way to flash is using mtd-utils:

 $ flash_eraseall -j /dev/mtd3
 $ nandwrite -a -p /dev/mtd3 initfs.jffs2

This is an specific example plagied from initfs_flasher of bootmenu.

The '-j' flag says that this is a jffs2 partition. Theoretically this
flag is not required for zImage, and the bootloader pieces.

The '-a' creates the OOB data automatically, and the '-p' flag pads
the data to fill the block.

These flags are only fine for initfs, so this will be probably wrong
for other pieces. Using the dump functionality you can check if you
have flashed properly every piece inside the device, but keep in mind
that it is dangerous and you can brick your device.

But feel free to send feedback to provide a full support for local
flashing on 770 and n800.


Nokia N900 using ubi layout on top of /dev/mtd5 rootfs partition. Therefor
formatting rootfs should be done via ubiformat tool which preserve erase counters.

Erasing N900 rootfs:

 $ ubiformat /dev/mtd5

Flashing new ubi image to N900 rootfs:

 $ ubiformat /dev/mtd5 -s 512 -O 512 -f image.ubi