<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mtk-20170518/package/system/mtd/src/mtd.c, branch reboot</title>
<subtitle>MTK 20170518 : Mediatek SDK based on OpenWRT Barrier Breaker</subtitle>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/'/>
<entry>
<title>mtd: fix reading of image magic bytes in smaller chunks</title>
<updated>2016-03-03T20:24:38+00:00</updated>
<author>
<name>John Crispin</name>
<email>john@openwrt.org</email>
</author>
<published>2016-03-03T20:24:38+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=4a4c324cd22e590990e323ed0ece974c7fa00d22'/>
<id>4a4c324cd22e590990e323ed0ece974c7fa00d22</id>
<content type='text'>
The image_check currently fails when it cannot read all magic bytes in a
single chunk. But this can happen when the data are read from a pipe. This
currently breaks the openmesh.sh upgrade script with musl because it uses
dd with a blocksize of 1 to copy the image file to the mtd process.

The read can simply be repeated until enough bytes are read for the magic
byte check. It only stops when either an error was returned or 0 bytes were
read.

Signed-off-by: Sven Eckelmann &lt;sven.eckelmann@open-mesh.com&gt;

SVN-Revision: 48891
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The image_check currently fails when it cannot read all magic bytes in a
single chunk. But this can happen when the data are read from a pipe. This
currently breaks the openmesh.sh upgrade script with musl because it uses
dd with a blocksize of 1 to copy the image file to the mtd process.

The read can simply be repeated until enough bytes are read for the magic
byte check. It only stops when either an error was returned or 0 bytes were
read.

Signed-off-by: Sven Eckelmann &lt;sven.eckelmann@open-mesh.com&gt;

SVN-Revision: 48891
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: fix Seama format after replacing EOF with sysupgrade data</title>
<updated>2016-02-10T11:35:50+00:00</updated>
<author>
<name>Rafał Miłecki</name>
<email>zajec5@gmail.com</email>
</author>
<published>2016-02-10T11:35:50+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=358ae42152224bd9c0379ee56b793aebd2555369'/>
<id>358ae42152224bd9c0379ee56b793aebd2555369</id>
<content type='text'>
Seama header has MD5 similarly to TRX and its CRC32. We need to update
it after replacing anything in Seama entity content to make bootloader
accept it.

Signed-off-by: Rafał Miłecki &lt;zajec5@gmail.com&gt;

SVN-Revision: 48688
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Seama header has MD5 similarly to TRX and its CRC32. We need to update
it after replacing anything in Seama entity content to make bootloader
accept it.

Signed-off-by: Rafał Miłecki &lt;zajec5@gmail.com&gt;

SVN-Revision: 48688
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: detect image format when writing</title>
<updated>2016-02-06T16:29:12+00:00</updated>
<author>
<name>Rafał Miłecki</name>
<email>zajec5@gmail.com</email>
</author>
<published>2016-02-06T16:29:12+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=b5c41ad28c31d61d6eb9a0c0f3550e75ea74e09f'/>
<id>b5c41ad28c31d61d6eb9a0c0f3550e75ea74e09f</id>
<content type='text'>
Recently TRX checking code was changed to detect Seama format and don't
abort whole writing operation because of it. This isn't a good long-term
solution. It's a poor idea to teach every format handler recognizing all
possible formats. Instead it should be handled in a generic code which
should run check depending on the detected format.

This will also allow further improvements like fixing formats other than
TRX after replacing JFFS2.

Signed-off-by: Rafał Miłecki &lt;zajec5@gmail.com&gt;

SVN-Revision: 48639
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Recently TRX checking code was changed to detect Seama format and don't
abort whole writing operation because of it. This isn't a good long-term
solution. It's a poor idea to teach every format handler recognizing all
possible formats. Instead it should be handled in a generic code which
should run check depending on the detected format.

This will also allow further improvements like fixing formats other than
TRX after replacing JFFS2.

Signed-off-by: Rafał Miłecki &lt;zajec5@gmail.com&gt;

SVN-Revision: 48639
</pre>
</div>
</content>
</entry>
<entry>
<title>mvebu: add support for the Linksys boot counter</title>
<updated>2015-08-19T08:31:23+00:00</updated>
<author>
<name>Imre Kaloz</name>
<email>kaloz@openwrt.org</email>
</author>
<published>2015-08-19T08:31:23+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=20fac016e432cf384289b3fefadf3f4909924faf'/>
<id>20fac016e432cf384289b3fefadf3f4909924faf</id>
<content type='text'>
The u-boot boot counter was never reset after a successful boot,
which sometimes could make some variables become out of sync.
This patch adds support for the boot counter and enables
auto_recovery unconditionally.

Signed-off-by: Jonas Gorski &lt;jogo@openwrt.org&gt;
Signed-off-by: Rob Mosher &lt;nyt-openwrt@countercultured.net&gt;
Signed-off-by: Imre Kaloz &lt;kaloz@openwrt.org&gt;

SVN-Revision: 46690
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The u-boot boot counter was never reset after a successful boot,
which sometimes could make some variables become out of sync.
This patch adds support for the boot counter and enables
auto_recovery unconditionally.

Signed-off-by: Jonas Gorski &lt;jogo@openwrt.org&gt;
Signed-off-by: Rob Mosher &lt;nyt-openwrt@countercultured.net&gt;
Signed-off-by: Imre Kaloz &lt;kaloz@openwrt.org&gt;

SVN-Revision: 46690
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: fix md5sum error checking</title>
<updated>2015-03-05T20:25:02+00:00</updated>
<author>
<name>John Crispin</name>
<email>john@openwrt.org</email>
</author>
<published>2015-03-05T20:25:02+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=b48b7a7689b15754938c77449d59c16fc3765b1f'/>
<id>b48b7a7689b15754938c77449d59c16fc3765b1f</id>
<content type='text'>
In mtd_verify(), the return value of md5sum() has been
interpreted as error if nonzero, while the function
returns number of processed bytes, which caused
mtd_verify() to always fail.

This patch fixes error checking to interpret only
negative values as errors.

Signed-off-by: Zefir Kurtisi &lt;zefir.kurtisi@neratec.com&gt;

SVN-Revision: 44605
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In mtd_verify(), the return value of md5sum() has been
interpreted as error if nonzero, while the function
returns number of processed bytes, which caused
mtd_verify() to always fail.

This patch fixes error checking to interpret only
negative values as errors.

Signed-off-by: Zefir Kurtisi &lt;zefir.kurtisi@neratec.com&gt;

SVN-Revision: 44605
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: make the dump commnd honour the -o option</title>
<updated>2014-12-03T20:22:32+00:00</updated>
<author>
<name>John Crispin</name>
<email>john@openwrt.org</email>
</author>
<published>2014-12-03T20:22:32+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=c3bb3906ee5abbee7ead3970d395d2d44937a1d8'/>
<id>c3bb3906ee5abbee7ead3970d395d2d44937a1d8</id>
<content type='text'>
Signed-off-by: John Crispin &lt;blogic@openwrt.org&gt;

SVN-Revision: 43512
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: John Crispin &lt;blogic@openwrt.org&gt;

SVN-Revision: 43512
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: make the mtd dump call run properly on nand flash</title>
<updated>2014-12-02T19:28:23+00:00</updated>
<author>
<name>John Crispin</name>
<email>john@openwrt.org</email>
</author>
<published>2014-12-02T19:28:23+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=ff02ea36e0acd996f3374ad1814e2b131356c9e0'/>
<id>ff02ea36e0acd996f3374ad1814e2b131356c9e0</id>
<content type='text'>
Signed-off-by: John Crispin &lt;blogic@openwrt.org&gt;

SVN-Revision: 43503
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: John Crispin &lt;blogic@openwrt.org&gt;

SVN-Revision: 43503
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: add ability to dump a mtd device</title>
<updated>2014-12-02T18:27:49+00:00</updated>
<author>
<name>John Crispin</name>
<email>john@openwrt.org</email>
</author>
<published>2014-12-02T18:27:49+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=da988d582f30879381debf9e9ddf1f8cd646c3a3'/>
<id>da988d582f30879381debf9e9ddf1f8cd646c3a3</id>
<content type='text'>
this can be used on nand flashes and will skip bad blocks and run ecc on the
read data before dumping it.

Signed-off-by: John Crispin &lt;blogic@openwrt.org&gt;

SVN-Revision: 43500
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
this can be used on nand flashes and will skip bad blocks and run ecc on the
read data before dumping it.

Signed-off-by: John Crispin &lt;blogic@openwrt.org&gt;

SVN-Revision: 43500
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: fix 2 compiler warnings</title>
<updated>2014-11-26T08:59:17+00:00</updated>
<author>
<name>John Crispin</name>
<email>john@openwrt.org</email>
</author>
<published>2014-11-26T08:59:17+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=9a70c8ef9b4978f169adb40231987ec44af3e77d'/>
<id>9a70c8ef9b4978f169adb40231987ec44af3e77d</id>
<content type='text'>
mtd.c:544:7: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘ssize_t’ [-Wformat]
mtd.c:602:1: warning: label ‘done’ defined but not used [-Wunused-label]

Signed-off-by: John Crispin &lt;blogic@openwrt.org&gt;

SVN-Revision: 43383
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
mtd.c:544:7: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘ssize_t’ [-Wformat]
mtd.c:602:1: warning: label ‘done’ defined but not used [-Wunused-label]

Signed-off-by: John Crispin &lt;blogic@openwrt.org&gt;

SVN-Revision: 43383
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: fix compile error with musl</title>
<updated>2014-05-21T14:09:53+00:00</updated>
<author>
<name>Felix Fietkau</name>
<email>nbd@openwrt.org</email>
</author>
<published>2014-05-21T14:09:53+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=962575f201db7723bbcbdbbf7a82203e0351022d'/>
<id>962575f201db7723bbcbdbbf7a82203e0351022d</id>
<content type='text'>
Signed-off-by: Felix Fietkau &lt;nbd@openwrt.org&gt;

SVN-Revision: 40819
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Felix Fietkau &lt;nbd@openwrt.org&gt;

SVN-Revision: 40819
</pre>
</div>
</content>
</entry>
</feed>
