<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><br>
</p>
<div class="moz-cite-prefix">On 09/04/19 20:44, Jeff Kletsky wrote:<br>
</div>
<blockquote type="cite"
cite="mid:de2889b7-702c-b0b2-cf35-0802f2a812d5@wagsky.com">
<pre>In going through code used by a port of an IPQ4019 device, I see that</pre>
<pre>target/linux/ipq40xx/base-files/lib/upgrade/linksys.sh
in platform_do_upgrade_linksys()
</pre>
<pre>writes the image using
get_image "$1" | mtd write - $part_label
This surprises me as I had thought that NAND-based flash should use
NAND utilities because of the possibility of bad blocks and metadata.</pre>
</blockquote>
<p><br>
</p>
<p>I might be horribly mistaken, but I thought the mtd tool used in<br>
OpenWrt is indeed aware of raw flash writing and bad block
handling.</p>
<p>See the source here (yes it is a custom OpenWrt tool)<br>
</p>
<p><a class="moz-txt-link-freetext" href="https://github.com/openwrt/openwrt/blob/master/package/system/mtd/src/mtd.c">https://github.com/openwrt/openwrt/blob/master/package/system/mtd/src/mtd.c</a></p>
<p><br>
</p>
<p>-Alberto<br>
</p>
</body>
</html>