Hi,

Le 02/25/12 17:56, Jo-Philipp Wich a écrit :
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi.

I think it should be handled in mtd, rewriting the complete image only
because a single block had a transient erase problem is a bit excessive imo.

It also means that sysupgrade would loop forever in case of a really
fatal issue, like when the image is too large for the given mtd partition.

I'd say the mtd util should perform 3-5 consecutive tries in case of a
block erase problem and then finally exit with a non zero code to notify
the caller about the problem.

If you are getting an erase block failure, I see only 3 valid root causes for this: - block is genuinly dead, then you can't do much about it but skip it, but your device has then serious issues, and retries don't help - your Flash controller/driver is not robust enough and reports erase block failures while it should not, retries workaround the issue - your system is running out of memory for processing the erase ioctl() then you also need to workaround this issue.


The exit code could convey the nature of the problem, e.g. erase issue
or mtd too short; this would allow sysupgrade to take appropriate
actions without brute-forcing the flash into death.

If you are really running out of valid erase blocks, then I would suggest moving to a more robust flash-filesystem such as UBI, at the expense of loosing some free space obviously.


~ Jow
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk9JErwACgkQdputYINPTPNlFgCeNaKCXiYIC+jxf2WhGxl7vAG8
988AnAzsUbpU14L5cXIBa3ESqSt3ymns
=ouxM
-----END PGP SIGNATURE-----
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to