Flashing NAND from NAND
Matthias Huber
matthias.huber at wollishausen.de
Sun Oct 18 18:32:47 CEST 2009
Matthias Huber schrieb:
>
> i personally do my backups with "cp"
>
> cp /dev/mtdblock6 /media/card/rootfs
> and vice versa.
>
> #blocksave.sh
> #!/bin/sh -x
> for i in 1 2 3 4 5 6 ; do echo cp /dev/mtdblock$i ${i}_* ; cp
> /dev/mtdblock$i ${i}_* ; done
>
> # blockrestore.sh
> #!/bin/sh -x
> for i in 1 2 3 4 5 6 ; do echo cp ${i}_* /dev/mtdblock$i ; cp ${i}_*
> /dev/mtdblock$i ; done
>
> and in practice, this works for backup _and_ restore
>
but the backup with the assumption, that there are the destination files
already in the directory, like:
-rw-r--r-- 1 root root 262144 Sep 25 09:11 1_uboot
-rw-r--r-- 1 root root 262144 Sep 25 09:11 2_uboot-env
-rw-r--r-- 1 root root 8388608 Sep 25 09:11 3_kernel
-rw-r--r-- 1 root root 655360 Sep 25 09:11 4_splash
-rw-r--r-- 1 root root 262144 Sep 25 09:11 5_factory
-rw-r--r-- 1 root root 258605056 Sep 25 09:16 6_rootfs
> Atilla Filiz schrieb:
>> On IRC, I asked someone to
>> dd if=/dev/mtd0 of=nor.img
>> for me. Does that work? The link in the wiki page is dead.
>> I always flash my kernel and rootfs from NAND u-boot menu.
>>
>> On Sun, Oct 18, 2009 at 5:25 PM, Joachim Ott <jo.omsl at googlemail.com
>> <mailto:jo.omsl at googlemail.com>> wrote:
>>
>> 2009/10/18 Atilla Filiz <atilla.filiz at gmail.com
>> <mailto:atilla.filiz at gmail.com>>:
>> > Hello
>> > I have a blank NOR and didn't have time to hack and flash
>> it(don't want to
>> > buy a debug board). Is it safe to boot into NAND u-boot menu
>> and flash a new
>> > bootloader to NAND? Probably not a good idea.
>>
>> To flash something via USB cable with dfu-util you have to be in the
>> NOR boot menu. But it's totally legal to reflash /dev/mtd1 (u-boot),
>> mtd2 (u-boot_env) or mtd3 (kernel) when you have booted into the
>> rootfs in NAND. When you've booted from sd-card, you can reflash mtd6
>> (rootfs) too. Use flash_eraseall and nand_write for this.
>>
>> Writing to /dev/mtd0 (NOR boot) is possible without debug board too,
>> you need need to enable write access to it. See
>> http://wiki.openmoko.org/wiki/Flashing_NOR
>>
--
Mit freundlichen Grüssen
Matthias Huber
Kohlstattstr. 14
86459 Wollishausen
Tel: 08238-7998
LPI000181125
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openmoko.org/pipermail/support/attachments/20091018/6fb2ff94/attachment.htm
More information about the support
mailing list