<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mtk-20170518/package/base-files/files/lib, branch master</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>treewide: consolidate upgrade state set</title>
<updated>2018-08-16T19:20:57+00:00</updated>
<author>
<name>Mathias Kresin</name>
<email>dev@kresin.me</email>
</author>
<published>2018-08-15T16:55:01+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=56b8ac1e86eb5b0c500cbf8db60ce00aff01bcec'/>
<id>56b8ac1e86eb5b0c500cbf8db60ce00aff01bcec</id>
<content type='text'>
Set the (sys)upgrade state when sourcing the stage2 script instead of
setting the state for each target individual.

This change fixes the, due to a missing state set, not working upgrade
led on ath79 and apm821xx.

Signed-off-by: Mathias Kresin &lt;dev@kresin.me&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Set the (sys)upgrade state when sourcing the stage2 script instead of
setting the state for each target individual.

This change fixes the, due to a missing state set, not working upgrade
led on ath79 and apm821xx.

Signed-off-by: Mathias Kresin &lt;dev@kresin.me&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>base-files: add function to get mac as text from flash</title>
<updated>2018-08-11T19:36:27+00:00</updated>
<author>
<name>Mathias Kresin</name>
<email>dev@kresin.me</email>
</author>
<published>2018-08-11T08:10:21+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=dfee452713e6b3c10aafc6174f8087a920b54402'/>
<id>dfee452713e6b3c10aafc6174f8087a920b54402</id>
<content type='text'>
Add a function to get a mac stored as text from flash. The octets of
the mac address need to be separated by any separator supported by
macaddr_canonicalize().

Signed-off-by: Dmitry Tunin &lt;hanipouspilot@gmail.com&gt;
Signed-off-by: Mathias Kresin &lt;dev@kresin.me&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a function to get a mac stored as text from flash. The octets of
the mac address need to be separated by any separator supported by
macaddr_canonicalize().

Signed-off-by: Dmitry Tunin &lt;hanipouspilot@gmail.com&gt;
Signed-off-by: Mathias Kresin &lt;dev@kresin.me&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>base-files: use consistent coding style</title>
<updated>2018-08-11T19:36:27+00:00</updated>
<author>
<name>Mathias Kresin</name>
<email>dev@kresin.me</email>
</author>
<published>2018-08-11T08:48:08+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=ec28d2797c1bff4a3a97e54fee648cc56185839a'/>
<id>ec28d2797c1bff4a3a97e54fee648cc56185839a</id>
<content type='text'>
Add the opening bracket right after the function name, to do it the
same way for all functions in this file.

Signed-off-by: Dmitry Tunin &lt;hanipouspilot@gmail.com&gt;
Signed-off-by: Mathias Kresin &lt;dev@kresin.me&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add the opening bracket right after the function name, to do it the
same way for all functions in this file.

Signed-off-by: Dmitry Tunin &lt;hanipouspilot@gmail.com&gt;
Signed-off-by: Mathias Kresin &lt;dev@kresin.me&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>base-files: introduce sysupgrade signature chain verification</title>
<updated>2018-08-08T00:22:54+00:00</updated>
<author>
<name>Daniel Golle</name>
<email>daniel@makrotopia.org</email>
</author>
<published>2018-01-15T02:37:17+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=8174853c78f88b854ac66a3f0a5380d36ededa9a'/>
<id>8174853c78f88b854ac66a3f0a5380d36ededa9a</id>
<content type='text'>
Verify ucert signature chains in sysupgrade images in case ucert is
installed and $CHECK_IMAGE_SIGNARURE = 1.
Also make sure ucert host binary is present and generate a self-signed
ucert in case $TOPDIR/key-build.ucert is missing.

Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Verify ucert signature chains in sysupgrade images in case ucert is
installed and $CHECK_IMAGE_SIGNARURE = 1.
Also make sure ucert host binary is present and generate a self-signed
ucert in case $TOPDIR/key-build.ucert is missing.

Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>base-files: drop fwtool_pre_upgrade</title>
<updated>2018-07-30T15:42:39+00:00</updated>
<author>
<name>John Crispin</name>
<email>john@phrozen.org</email>
</author>
<published>2018-07-30T15:42:39+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=5e1b4c57ded7898be5255aef594fa18ec206f0b2'/>
<id>5e1b4c57ded7898be5255aef594fa18ec206f0b2</id>
<content type='text'>
this feature has never worked, the fw image name was not passed and the -t
parameter was missing in the tool invocation. drop the feature.

Signed-off-by: John Crispin &lt;john@phrozen.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
this feature has never worked, the fw image name was not passed and the -t
parameter was missing in the tool invocation. drop the feature.

Signed-off-by: John Crispin &lt;john@phrozen.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>base-files: network.sh: gracefully handle missing network.interface ubus ns</title>
<updated>2018-07-17T06:10:20+00:00</updated>
<author>
<name>Jo-Philipp Wich</name>
<email>jo@mein.io</email>
</author>
<published>2018-07-17T05:47:33+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=1bad852ff597fd0535e02703f0c4b83447aaff45'/>
<id>1bad852ff597fd0535e02703f0c4b83447aaff45</id>
<content type='text'>
When attempting to use any of the functions in network.sh while netifd is
not started yet, the ubus interface dump query will fail with "Not found",
yielding an empty response.

Subsequently, jsonfilter is invoked with an empty string instead of a valid
JSON document, causing it to emit a second "unexpected end of data" error.

This caused the dnsmasq init script to log the following errors during
early boot on some systems:

    procd: /etc/rc.d/S19dnsmasq: Command failed: Not found.
    procd: /etc/rc.d/S19dnsmasq: Failed to parse json data: unexpected end of data.

Fix the issue by allowing the ubus query to fail with "Not found" but still
logging other failures, and by passing an empty JSON object to jsonfilter
if the interface status cache is empty.

Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When attempting to use any of the functions in network.sh while netifd is
not started yet, the ubus interface dump query will fail with "Not found",
yielding an empty response.

Subsequently, jsonfilter is invoked with an empty string instead of a valid
JSON document, causing it to emit a second "unexpected end of data" error.

This caused the dnsmasq init script to log the following errors during
early boot on some systems:

    procd: /etc/rc.d/S19dnsmasq: Command failed: Not found.
    procd: /etc/rc.d/S19dnsmasq: Failed to parse json data: unexpected end of data.

Fix the issue by allowing the ubus query to fail with "Not found" but still
logging other failures, and by passing an empty JSON object to jsonfilter
if the interface status cache is empty.

Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>base-files: exit if mtd write command fails during sysupgrade</title>
<updated>2018-06-18T04:37:28+00:00</updated>
<author>
<name>Rafał Miłecki</name>
<email>rafal@milecki.pl</email>
</author>
<published>2018-06-11T10:52:42+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=5b2e20807d2b38de1cc4185d15bb4320b8bd743a'/>
<id>5b2e20807d2b38de1cc4185d15bb4320b8bd743a</id>
<content type='text'>
It avoids confusing situations like:
&gt; Could not get image magic
&gt; Image check failed.
&gt; Upgrade completed
&gt; Rebooting system...

Signed-off-by: Rafał Miłecki &lt;rafal@milecki.pl&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It avoids confusing situations like:
&gt; Could not get image magic
&gt; Image check failed.
&gt; Upgrade completed
&gt; Rebooting system...

Signed-off-by: Rafał Miłecki &lt;rafal@milecki.pl&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>base-files: sysupgrade: fix handing get_image unpack commands</title>
<updated>2018-06-11T17:25:40+00:00</updated>
<author>
<name>Matthias Schiffer</name>
<email>mschiffer@universe-factory.net</email>
</author>
<published>2018-06-10T13:41:52+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=3b6f865b011efd025e867bd2a7bb1f880b5d58e0'/>
<id>3b6f865b011efd025e867bd2a7bb1f880b5d58e0</id>
<content type='text'>
On bcm53xx and brcm47xx, commands are passed to default_do_upgrade that
expect the image to be passed on stdin, rather than as an argument.

Fixes: 30f61a34b4cf ("base-files: always use staged sysupgrade")
Signed-off-by: Matthias Schiffer &lt;mschiffer@universe-factory.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On bcm53xx and brcm47xx, commands are passed to default_do_upgrade that
expect the image to be passed on stdin, rather than as an argument.

Fixes: 30f61a34b4cf ("base-files: always use staged sysupgrade")
Signed-off-by: Matthias Schiffer &lt;mschiffer@universe-factory.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>base-files: fix UCI config parsing and callback handling</title>
<updated>2018-06-06T13:00:08+00:00</updated>
<author>
<name>Tony Ambardar</name>
<email>itugrok@yahoo.com</email>
</author>
<published>2018-03-08T05:00:45+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=73d8a6ab7668173d70adbed45b61be5256c505e1'/>
<id>73d8a6ab7668173d70adbed45b61be5256c505e1</id>
<content type='text'>
There are several long-standing issues present in the UCI shell API as
documented in https://wiki.openwrt.org/doc/devel/config-scripting. They
relate both to high-level, user-defined callback functions used to
process UCI config files, and also to low-level functions used within
scripts generally.

The related problems have been encountered now and in the past, e.g.
https://forum.openwrt.org/viewtopic.php?id=54295, and include:

a) UCI parsing option() function and user-defined option_cb() callbacks
being erroneously called during processing of "list" config file entries;

b) normal usage of the low-level config_set() unexpectedy calling any
defined option_cb() if present; and

c) handling of the list_cb() not respecting the NO_CALLBACK variable.

Root causes include a function stack "inversion", where the low-level
config_set() function incorrectly calls the high-level option() function,
intended only for processing the "option" keyword of UCI config files.

This change addresses the inversion and other issues, making the option
handling code more consistent and smaller, and simplifying developers'
usage of UCI callbacks.

Signed-off-by: Tony Ambardar &lt;itugrok@yahoo.com&gt;
Signed-off-by: Hans Dedecker &lt;dedeckeh@gmail.com&gt; [PKG_RELEASE increase]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are several long-standing issues present in the UCI shell API as
documented in https://wiki.openwrt.org/doc/devel/config-scripting. They
relate both to high-level, user-defined callback functions used to
process UCI config files, and also to low-level functions used within
scripts generally.

The related problems have been encountered now and in the past, e.g.
https://forum.openwrt.org/viewtopic.php?id=54295, and include:

a) UCI parsing option() function and user-defined option_cb() callbacks
being erroneously called during processing of "list" config file entries;

b) normal usage of the low-level config_set() unexpectedy calling any
defined option_cb() if present; and

c) handling of the list_cb() not respecting the NO_CALLBACK variable.

Root causes include a function stack "inversion", where the low-level
config_set() function incorrectly calls the high-level option() function,
intended only for processing the "option" keyword of UCI config files.

This change addresses the inversion and other issues, making the option
handling code more consistent and smaller, and simplifying developers'
usage of UCI callbacks.

Signed-off-by: Tony Ambardar &lt;itugrok@yahoo.com&gt;
Signed-off-by: Hans Dedecker &lt;dedeckeh@gmail.com&gt; [PKG_RELEASE increase]
</pre>
</div>
</content>
</entry>
<entry>
<title>base-files: fix ucidef_set_interface() protocol selection</title>
<updated>2018-05-25T05:48:25+00:00</updated>
<author>
<name>Jo-Philipp Wich</name>
<email>jo@mein.io</email>
</author>
<published>2018-05-25T05:28:28+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=7e664b7c2dc00006ba29bf947cf177b5bccdc47d'/>
<id>7e664b7c2dc00006ba29bf947cf177b5bccdc47d</id>
<content type='text'>
The previous refactoring of ucidef_set_interface() removed the protocol
selection heuristic which breaks the networking defaults for the majority
of boards.

Re-add the protocol selection and rename two bad "proto" references to
the expected "protocol" value.

Fixes: 85048a9c1f ("base-files: rework _ucidef_set_interface to be more generic")
Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The previous refactoring of ucidef_set_interface() removed the protocol
selection heuristic which breaks the networking defaults for the majority
of boards.

Re-add the protocol selection and rename two bad "proto" references to
the expected "protocol" value.

Fixes: 85048a9c1f ("base-files: rework _ucidef_set_interface to be more generic")
Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</pre>
</div>
</content>
</entry>
</feed>
