<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mtk-20170518/package/system/mtd/src, 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>mtd: allow writing Seama files to "firmware" on Broadcom targets</title>
<updated>2016-01-28T22:38:30+00:00</updated>
<author>
<name>Rafał Miłecki</name>
<email>zajec5@gmail.com</email>
</author>
<published>2016-01-28T22:38:30+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=b4468a0d61b3370625a7b0a905e0f4cd72bba7f0'/>
<id>b4468a0d61b3370625a7b0a905e0f4cd72bba7f0</id>
<content type='text'>
Signed-off-by: Rafał Miłecki &lt;zajec5@gmail.com&gt;

SVN-Revision: 48534
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Rafał Miłecki &lt;zajec5@gmail.com&gt;

SVN-Revision: 48534
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: enable "fixseama" on bcm53xx</title>
<updated>2016-01-28T08:51:52+00:00</updated>
<author>
<name>Rafał Miłecki</name>
<email>zajec5@gmail.com</email>
</author>
<published>2016-01-28T08:51:52+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=60ef46b9030b18acd3d9fad099c8923378841cca'/>
<id>60ef46b9030b18acd3d9fad099c8923378841cca</id>
<content type='text'>
There are D-Link bcm53xx devices using Seama format.

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

SVN-Revision: 48521
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are D-Link bcm53xx devices using Seama format.

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

SVN-Revision: 48521
</pre>
</div>
</content>
</entry>
<entry>
<title>kirkwood: support Linksys boot counter on EA[34]500</title>
<updated>2015-11-10T00:16:37+00:00</updated>
<author>
<name>Luka Perkov</name>
<email>luka@openwrt.org</email>
</author>
<published>2015-11-10T00:16:37+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=ea8ac0999cb78399acf3af6d8eb6fe5b92d06f53'/>
<id>ea8ac0999cb78399acf3af6d8eb6fe5b92d06f53</id>
<content type='text'>
This is done with existing code from the WRT1900AC port.
It makes sure the "auto_recovery" bootloader option is set,
and resets the s_env boot counter after a successful boot.

This gives users without a serial console connection some
measure of safety.

Signed-off-by: Claudio Leite &lt;leitec@staticky.com&gt;

SVN-Revision: 47433
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is done with existing code from the WRT1900AC port.
It makes sure the "auto_recovery" bootloader option is set,
and resets the s_env boot counter after a successful boot.

This gives users without a serial console connection some
measure of safety.

Signed-off-by: Claudio Leite &lt;leitec@staticky.com&gt;

SVN-Revision: 47433
</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: add missing &lt;endian.h&gt; include</title>
<updated>2015-06-05T09:00:02+00:00</updated>
<author>
<name>Felix Fietkau</name>
<email>nbd@openwrt.org</email>
</author>
<published>2015-06-05T09:00:02+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=9e233fb241157ca30b1f5d462751490f34f0f435'/>
<id>9e233fb241157ca30b1f5d462751490f34f0f435</id>
<content type='text'>
trx.c in mtd would not include endian.h, so on systems that do not have
this header implicitly included from the other headers (like musl), both
__BYTE_ORDER and __BIG_ENDIAN would be undefined and thus 0, leading to
it always presuming a big-endian system. this would lead to issues when
running mtd fixtrx on little-endian systems, as it would never recognize
the TRX magic as result of the broken STORE32_LE() macro.

Signed-off-by: Shiz &lt;hi@shiz.me&gt;
Tested-by: Shiz &lt;hi@shiz.me&gt;

SVN-Revision: 45896
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
trx.c in mtd would not include endian.h, so on systems that do not have
this header implicitly included from the other headers (like musl), both
__BYTE_ORDER and __BIG_ENDIAN would be undefined and thus 0, leading to
it always presuming a big-endian system. this would lead to issues when
running mtd fixtrx on little-endian systems, as it would never recognize
the TRX magic as result of the broken STORE32_LE() macro.

Signed-off-by: Shiz &lt;hi@shiz.me&gt;
Tested-by: Shiz &lt;hi@shiz.me&gt;

SVN-Revision: 45896
</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>package: mtd: move bcm963xx_tag definition into source code</title>
<updated>2015-02-27T17:38:25+00:00</updated>
<author>
<name>Jonas Gorski</name>
<email>jogo@openwrt.org</email>
</author>
<published>2015-02-27T17:38:25+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=92eb27f56d613d9b6119dd05c375390076a0f342'/>
<id>92eb27f56d613d9b6119dd05c375390076a0f342</id>
<content type='text'>
Remove the need for the header file to be exported - we don't need most
of it anyway; all we care about are the offset of the rootfs length and
header crc fields.

Signed-off-by: Jonas Gorski &lt;jogo@openwrt.org&gt;

SVN-Revision: 44557
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove the need for the header file to be exported - we don't need most
of it anyway; all we care about are the offset of the rootfs length and
header crc fields.

Signed-off-by: Jonas Gorski &lt;jogo@openwrt.org&gt;

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