<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mtk-20170518/package/utils/nvram/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>nvram: get rid of NVRAM_SPACE</title>
<updated>2015-07-08T06:05:43+00:00</updated>
<author>
<name>Rafał Miłecki</name>
<email>zajec5@gmail.com</email>
</author>
<published>2015-07-08T06:05:43+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=4497c35bd0b84931a4d8be1f5545ba9f0e4c906b'/>
<id>4497c35bd0b84931a4d8be1f5545ba9f0e4c906b</id>
<content type='text'>
Now we support NVRAM whatever its size is.

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

SVN-Revision: 46262
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now we support NVRAM whatever its size is.

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

SVN-Revision: 46262
</pre>
</div>
</content>
</entry>
<entry>
<title>nvram: fix displayed info about NVRAM size</title>
<updated>2015-07-08T05:42:30+00:00</updated>
<author>
<name>Rafał Miłecki</name>
<email>zajec5@gmail.com</email>
</author>
<published>2015-07-08T05:42:30+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=d3721674913e4be33583b30901321b4852b2134d'/>
<id>d3721674913e4be33583b30901321b4852b2134d</id>
<content type='text'>
Use actual partition size and content offset to calculate it.

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

SVN-Revision: 46260
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use actual partition size and content offset to calculate it.

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

SVN-Revision: 46260
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Revert "nvram: increase NVRAM size to 64 KiB""</title>
<updated>2015-07-07T22:06:04+00:00</updated>
<author>
<name>Rafał Miłecki</name>
<email>zajec5@gmail.com</email>
</author>
<published>2015-07-07T22:06:04+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=4014ba376c685bb151324183b64d01cd523aed63'/>
<id>4014ba376c685bb151324183b64d01cd523aed63</id>
<content type='text'>
This reverts commit r45579.

With the latest change r46251 ("nvram: fix "Segmentation fault" caused
by setting memory out of buffer") nvram utility shouldn't crash anymore.

It was tested on 3 brcm47xx devices:
1) Unknown with 0x10000 NVRAM size (0x8000 offset)
2) Linksys E1000 V2.1 with 0x10000 (0x8000 offset)
3) Linksys WRT300N V1 with 0x10000 (0x8000 offset)

And 3 bcm53xx devices:
1) Buffalo WZR-600DHP2 with 0x160000 NVRAM size
2) Buffalo WZR-1750DHP with 0x10000 NVRAM size
3) Netgear R6250 V1 with 0x180000 NVRAM size
(all using 0 offset)

This is an important change as it allows reading whole NVRAM. This may
critical when reading some basic configuration (e.g. switch ports).

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

SVN-Revision: 46253
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit r45579.

With the latest change r46251 ("nvram: fix "Segmentation fault" caused
by setting memory out of buffer") nvram utility shouldn't crash anymore.

It was tested on 3 brcm47xx devices:
1) Unknown with 0x10000 NVRAM size (0x8000 offset)
2) Linksys E1000 V2.1 with 0x10000 (0x8000 offset)
3) Linksys WRT300N V1 with 0x10000 (0x8000 offset)

And 3 bcm53xx devices:
1) Buffalo WZR-600DHP2 with 0x160000 NVRAM size
2) Buffalo WZR-1750DHP with 0x10000 NVRAM size
3) Netgear R6250 V1 with 0x180000 NVRAM size
(all using 0 offset)

This is an important change as it allows reading whole NVRAM. This may
critical when reading some basic configuration (e.g. switch ports).

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

SVN-Revision: 46253
</pre>
</div>
</content>
</entry>
<entry>
<title>nvram: fix "Segmentation fault" caused by setting memory out of buffer</title>
<updated>2015-07-07T21:21:49+00:00</updated>
<author>
<name>Rafał Miłecki</name>
<email>zajec5@gmail.com</email>
</author>
<published>2015-07-07T21:21:49+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=9f158499108eae39555bc65d1abfd86bd0c65533'/>
<id>9f158499108eae39555bc65d1abfd86bd0c65533</id>
<content type='text'>
Some MTD partitions with NVRAM have content starting in the middle. In
such case offset is set and nvram_header returns pointer to the middle.
It means we have to respect offset when calculating remaining space.

By the way use real MTD partition size (nvram_part_size variable) as we
may want to bump NVRAM_SPACE in the (very near) future.

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

SVN-Revision: 46251
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some MTD partitions with NVRAM have content starting in the middle. In
such case offset is set and nvram_header returns pointer to the middle.
It means we have to respect offset when calculating remaining space.

By the way use real MTD partition size (nvram_part_size variable) as we
may want to bump NVRAM_SPACE in the (very near) future.

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

SVN-Revision: 46251
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "nvram: increase NVRAM size to 64 KiB"</title>
<updated>2015-04-24T15:38:38+00:00</updated>
<author>
<name>Rafał Miłecki</name>
<email>zajec5@gmail.com</email>
</author>
<published>2015-04-24T15:38:38+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=63bb07b28c07ef42bc6a2c8c225f24e3e49b6bd7'/>
<id>63bb07b28c07ef42bc6a2c8c225f24e3e49b6bd7</id>
<content type='text'>
This reverts commit ff84c27a281bc19df19bc62ee8688cca5586f6e3.
This tool has really broken size handling (many values hardcoded), it
crashes right now in case of NVRAM not filling whole MTD partition.

Conflicts:
	package/utils/nvram/src/nvram.h

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

SVN-Revision: 45579
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit ff84c27a281bc19df19bc62ee8688cca5586f6e3.
This tool has really broken size handling (many values hardcoded), it
crashes right now in case of NVRAM not filling whole MTD partition.

Conflicts:
	package/utils/nvram/src/nvram.h

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

SVN-Revision: 45579
</pre>
</div>
</content>
</entry>
<entry>
<title>nvram: fix regression in finding NVRAM beginning</title>
<updated>2015-04-24T14:28:57+00:00</updated>
<author>
<name>Rafał Miłecki</name>
<email>zajec5@gmail.com</email>
</author>
<published>2015-04-24T14:28:57+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=97a0e165a621c8b2d3b2e3e623ee1629166e66ed'/>
<id>97a0e165a621c8b2d3b2e3e623ee1629166e66ed</id>
<content type='text'>
The loop was giving up too early as it never expected NVRAM smaller
than 0x10000.

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

SVN-Revision: 45578
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The loop was giving up too early as it never expected NVRAM smaller
than 0x10000.

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

SVN-Revision: 45578
</pre>
</div>
</content>
</entry>
<entry>
<title>nvram: increase NVRAM size to 64 KiB</title>
<updated>2015-04-22T19:07:24+00:00</updated>
<author>
<name>Rafał Miłecki</name>
<email>zajec5@gmail.com</email>
</author>
<published>2015-04-22T19:07:24+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=7e3272f422526c7161c1bd8ae8755af1b12948bb'/>
<id>7e3272f422526c7161c1bd8ae8755af1b12948bb</id>
<content type='text'>
For years Broadcom devices use 64 KiB NVRAM partition size and some of
them indeed have it filled in more than 50%. This change allows handling
whole NVRAM e.g. on Netgear WNDR4500 and Netgear R8000.

The same fix was applied to kernel in upstream commit 6ab7c29.

Reported-by: Hante Meuleman &lt;meuleman@broadcom.com&gt;
Signed-off-by: Rafał Miłecki &lt;zajec5@gmail.com&gt;

SVN-Revision: 45566
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For years Broadcom devices use 64 KiB NVRAM partition size and some of
them indeed have it filled in more than 50%. This change allows handling
whole NVRAM e.g. on Netgear WNDR4500 and Netgear R8000.

The same fix was applied to kernel in upstream commit 6ab7c29.

Reported-by: Hante Meuleman &lt;meuleman@broadcom.com&gt;
Signed-off-by: Rafał Miłecki &lt;zajec5@gmail.com&gt;

SVN-Revision: 45566
</pre>
</div>
</content>
</entry>
<entry>
<title>nvram: refuse to open NVRAM for writing if it's too big to be handled</title>
<updated>2015-04-22T19:07:19+00:00</updated>
<author>
<name>Rafał Miłecki</name>
<email>zajec5@gmail.com</email>
</author>
<published>2015-04-22T19:07:19+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=3931288caa4da33d45571d9101010e95d8739738'/>
<id>3931288caa4da33d45571d9101010e95d8739738</id>
<content type='text'>
Otherwise writing anything will result in loosing data.

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

SVN-Revision: 45565
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Otherwise writing anything will result in loosing data.

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

SVN-Revision: 45565
</pre>
</div>
</content>
</entry>
<entry>
<title>nvram: drop check for WGT634U using /proc/diag/model</title>
<updated>2015-04-22T19:07:12+00:00</updated>
<author>
<name>Rafał Miłecki</name>
<email>zajec5@gmail.com</email>
</author>
<published>2015-04-22T19:07:12+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=d94fb398f682374407b926bf8a85afade3136788'/>
<id>d94fb398f682374407b926bf8a85afade3136788</id>
<content type='text'>
We don't have broadcom-diag for months or years now and the correct
solution is to simply don't have "nvram" partition on WGT634U anyway.

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

SVN-Revision: 45564
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We don't have broadcom-diag for months or years now and the correct
solution is to simply don't have "nvram" partition on WGT634U anyway.

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

SVN-Revision: 45564
</pre>
</div>
</content>
</entry>
<entry>
<title>nvram: use correct variable name for MTD partition size</title>
<updated>2015-04-22T19:07:06+00:00</updated>
<author>
<name>Rafał Miłecki</name>
<email>zajec5@gmail.com</email>
</author>
<published>2015-04-22T19:07:06+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=0c4c05f0e7b691c43d541de2280400190dcf9343'/>
<id>0c4c05f0e7b691c43d541de2280400190dcf9343</id>
<content type='text'>
Sytax of /proc/mtd is following:
dev:    size   erasesize  name
which means that sscanf "mtd%d: %08x" reads size, not erasesize.

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

SVN-Revision: 45563
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sytax of /proc/mtd is following:
dev:    size   erasesize  name
which means that sscanf "mtd%d: %08x" reads size, not erasesize.

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

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