Re: Flashing NAND from NAND

2009-10-19 Thread Werner Almesberger
Matthias Huber wrote:
 # 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:

Hmm, don't you also assume that the partition has been erased before
writing ? Also, what happens if you have any bad blocks ?

- Werner

___
support mailing list
support@lists.openmoko.org
https://lists.openmoko.org/mailman/listinfo/support


Re: Flashing NAND from NAND

2009-10-19 Thread Matthias Huber

Werner Almesberger schrieb:

Matthias Huber wrote:
  

# 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:



Hmm, don't you also assume that the partition has been erased before
writing ? Also, what happens if you have any bad blocks ?

  

No, erasing seemed not to be necessary.
why should i erase it ?

Bad Blocks: No i didnt even thing of it.
the four times i did a backup and two or three times i did a restore, 
there was no problem.

but you are of course right, one has to have a look at it.


___
support mailing list
support@lists.openmoko.org
https://lists.openmoko.org/mailman/listinfo/support


Re: Flashing NAND from NAND

2009-10-19 Thread Werner Almesberger
Matthias Huber wrote:
 No, erasing seemed not to be necessary.
 why should i erase it ?

Because a write to NAND normally only clears bits but never sets them:

# flash_eraseall /dev/mtd4
# hexdump -C /dev/mtd4
  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ||
# echo -en '\x0f' | dd bs=1024 count=1 conv=sync /dev/mtd4
# hexdump -C /dev/mtd4
  0f 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |?...|
# echo -en '\xff' | dd bs=1024 count=1 conv=sync /dev/mtd4
dd: writing `standard output': Input/output error
# hexdump -C /dev/mtd4
  0f 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |?...|

Here's a little brain-twister: repeat the example from the beginning,
but instead of trying to write '\xff', do this:

# echo -en '\x17' | dd bs=1024 count=1 conv=sync /dev/mtd4
dd: writing `standard output': Input/output error
# hexdump -C /dev/mtd4
  17 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ||

Can you tell why it worked ?

- Werner

___
support mailing list
support@lists.openmoko.org
https://lists.openmoko.org/mailman/listinfo/support


Re: Charging stops at 66% on a FreeRunner

2009-10-19 Thread Joachim Ott
2009/10/19 Sven Hartrumpf hartru...@gmx.net:
 Hi all.

 I am running a recent SHR version.
 I can charge only till 66%, than the POWER led turns from
 red to blue and the charge level does not change.
 Should I change something to get 100%  ?

This is for SHR only: there was some disagreement about the meaning of
full. I had that some time ago, when the battery icon wouldn't show
more than 66%, while cat /sys/class/power_supply/battery/uevent
would show the real capacity (besides other info). After some certain
upgrade (2 or 3 months ago?) both showed the same values from then on,
sothe icon showed up to 100% too.

___
support mailing list
support@lists.openmoko.org
https://lists.openmoko.org/mailman/listinfo/support


Drained battery

2009-10-19 Thread max
I am attempting to switch on my Freerunner after quite a few months.
However, it just doesn't turn on.

I was trying some suggestions from the following page:
http://wiki.openmoko.org/wiki/Freerunner_Hardware_Issues#Can.27t_boot_with_discharged_or_missing_battery_.28FIXED.29.
I have the external charger, I tried booting into the AUX menu, tried
booting with USB power. Nothing worked. Any suggestions other than getting a
new battery?  :-)
___
support mailing list
support@lists.openmoko.org
https://lists.openmoko.org/mailman/listinfo/support


Re: Flashing NAND from NAND

2009-10-19 Thread Matthias Huber

Werner Almesberger schrieb:

Matthias Huber wrote:
  

No, erasing seemed not to be necessary.
why should i erase it ?



Because a write to NAND normally only clears bits but never sets them:

# flash_eraseall /dev/mtd4
# hexdump -C /dev/mtd4
  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ||
# echo -en '\x0f' | dd bs=1024 count=1 conv=sync /dev/mtd4
# hexdump -C /dev/mtd4
  0f 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |?...|
# echo -en '\xff' | dd bs=1024 count=1 conv=sync /dev/mtd4
dd: writing `standard output': Input/output error
# hexdump -C /dev/mtd4
  0f 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |?...|

Here's a little brain-twister: repeat the example from the beginning,
but instead of trying to write '\xff', do this:

# echo -en '\x17' | dd bs=1024 count=1 conv=sync /dev/mtd4
dd: writing `standard output': Input/output error
# hexdump -C /dev/mtd4
  17 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ||

Can you tell why it worked ?

- Werner
  
i can't. it is possible that i flashed my boot with dfu-util and the 
rootfs directly.
for the other partitions i cant tell. maybe because the contents didn't 
change i did'nt see any error.


just for clearness: is the boot - partition different from the rootfs ?
and how are the other partitions ?
___
support mailing list
support@lists.openmoko.org
https://lists.openmoko.org/mailman/listinfo/support