<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mtk-20170518/scripts, branch v17.01.5</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>scripts/dowload.pl: use glob to expand target dir</title>
<updated>2017-12-13T15:29:22+00:00</updated>
<author>
<name>Zoltan Gyarmati</name>
<email>mr.zoltan.gyarmati@gmail.com</email>
</author>
<published>2017-08-26T13:14:20+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=b69ea02a00758a2bcd3981cfb48cc629ff15cfe3'/>
<id>b69ea02a00758a2bcd3981cfb48cc629ff15cfe3</id>
<content type='text'>
If CONFIG_DOWNLOAD_FOLDER is set to for example "~/dl", the download
script fails to create the .hash and .dl files with the following
errors:
 Cannot create file ~/dl/dropbear-2017.75.tar.bz2.dl: No such file or directory
 sh: 1: cannot create ~/dl/dropbear-2017.75.tar.bz2.hash: Directory nonexistent

If the tarball already exists in the ~/dl dir, it's properly found and
used, so this issue only affects the download.pl script.
 This patch calls glob() on the target dir parameter, which will expand `~`.

Signed-off-by: Zoltan Gyarmati &lt;mr.zoltan.gyarmati@gmail.com&gt;
(cherry picked from commit 0a761fe8ef346c6f0a78097938b083e2d078b0e2)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If CONFIG_DOWNLOAD_FOLDER is set to for example "~/dl", the download
script fails to create the .hash and .dl files with the following
errors:
 Cannot create file ~/dl/dropbear-2017.75.tar.bz2.dl: No such file or directory
 sh: 1: cannot create ~/dl/dropbear-2017.75.tar.bz2.hash: Directory nonexistent

If the tarball already exists in the ~/dl dir, it's properly found and
used, so this issue only affects the download.pl script.
 This patch calls glob() on the target dir parameter, which will expand `~`.

Signed-off-by: Zoltan Gyarmati &lt;mr.zoltan.gyarmati@gmail.com&gt;
(cherry picked from commit 0a761fe8ef346c6f0a78097938b083e2d078b0e2)
</pre>
</div>
</content>
</entry>
<entry>
<title>scripts/package-metadata.pl: inhibit compile deps on missing build types</title>
<updated>2017-12-13T15:23:39+00:00</updated>
<author>
<name>Jo-Philipp Wich</name>
<email>jo@mein.io</email>
</author>
<published>2017-07-26T22:18:12+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=b616aa6db7a9952c182ab49d7942fb67c09803d5'/>
<id>b616aa6db7a9952c182ab49d7942fb67c09803d5</id>
<content type='text'>
When a package declares a PKG_BUILD_DEPENDENCY or HOST_BUILD_DEPENDENCY on
a not existing build type, the metadata script will emit a reference to an
unresolvable build target in tmp/.packagedeps, causing the make process to
fail hard in a way not catchable by the IGNORE_ERRORS mechanism.

In a situation where a package "test-a" declares a build dependency
"PKG_BUILD_DEPENDS:=test-b/host" while the Makefile of "test-b" does not
implement a HostBuild, make fails with an unrecoverable error in the form:

    make[1]: Entering directory '...'
    make[1]: *** No rule to make target 'package/test-b/host/compile',
                 needed by 'package/test-a/compile'.  Stop.
    make[1]: Leaving directory '...'
    .../toplevel.mk:200: recipe for target 'package/test-a/compile' failed
    make: *** [package/test-a/compile] Error 2

Extend the metadata generation script to catch such unresolved references
and emit a visable warning upon detection.

After this change, the script will emit a warning similar to:

    WARNING: Makefile "package/test-a/Makefile" has a build dependency on
    "test-b/host" but "package/test-b/Makefile" does not implement a
    "host" build type

Fixes a global build cluster outage which occured after the "python-cffi"
feed package removed its HostBuild which the "python-cryptography" package
build-depended on.

Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
(cherry picked from commit bf5d32af2a675f7577b388b5eef2a11e6ce042eb)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When a package declares a PKG_BUILD_DEPENDENCY or HOST_BUILD_DEPENDENCY on
a not existing build type, the metadata script will emit a reference to an
unresolvable build target in tmp/.packagedeps, causing the make process to
fail hard in a way not catchable by the IGNORE_ERRORS mechanism.

In a situation where a package "test-a" declares a build dependency
"PKG_BUILD_DEPENDS:=test-b/host" while the Makefile of "test-b" does not
implement a HostBuild, make fails with an unrecoverable error in the form:

    make[1]: Entering directory '...'
    make[1]: *** No rule to make target 'package/test-b/host/compile',
                 needed by 'package/test-a/compile'.  Stop.
    make[1]: Leaving directory '...'
    .../toplevel.mk:200: recipe for target 'package/test-a/compile' failed
    make: *** [package/test-a/compile] Error 2

Extend the metadata generation script to catch such unresolved references
and emit a visable warning upon detection.

After this change, the script will emit a warning similar to:

    WARNING: Makefile "package/test-a/Makefile" has a build dependency on
    "test-b/host" but "package/test-b/Makefile" does not implement a
    "host" build type

Fixes a global build cluster outage which occured after the "python-cffi"
feed package removed its HostBuild which the "python-cryptography" package
build-depended on.

Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
(cherry picked from commit bf5d32af2a675f7577b388b5eef2a11e6ce042eb)
</pre>
</div>
</content>
</entry>
<entry>
<title>build: bundle-libraries.sh: do not override argv[0] in inner exec calls</title>
<updated>2017-12-13T15:23:39+00:00</updated>
<author>
<name>Jo-Philipp Wich</name>
<email>jo@mein.io</email>
</author>
<published>2017-07-24T11:33:33+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=2e1a87a3e11b6928b128fcf72570178a250ba072'/>
<id>2e1a87a3e11b6928b128fcf72570178a250ba072</id>
<content type='text'>
Only mangle argv[0] of the first executed process and leave the argument
vector of subsequent invocations as-is to allow child programs to properly
discover resources relative to their binary locations.

Fixes "cc1" discovery when executing the host gcc through the bundled
"ccache" executable.

Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
(cherry picked from commit 9e64874fb2508e49e52898c238d817bd152bf2c2)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Only mangle argv[0] of the first executed process and leave the argument
vector of subsequent invocations as-is to allow child programs to properly
discover resources relative to their binary locations.

Fixes "cc1" discovery when executing the host gcc through the bundled
"ccache" executable.

Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
(cherry picked from commit 9e64874fb2508e49e52898c238d817bd152bf2c2)
</pre>
</div>
</content>
</entry>
<entry>
<title>scripts/download.pl: Adjust URLs</title>
<updated>2017-12-13T15:23:39+00:00</updated>
<author>
<name>Daniel Engberg</name>
<email>daniel.engberg.lists@pyret.net</email>
</author>
<published>2017-06-25T16:14:33+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=89c4f47caa20bba9361882b7c2bd729eb9b030ed'/>
<id>89c4f47caa20bba9361882b7c2bd729eb9b030ed</id>
<content type='text'>
Internet2 isn't considered a trusted issuer meaning that https links to
rit.edu will fail.

The host mirror.csclub.uwaterloo.ca has a trusted SSL cert and peering
is good so it can replace rit.edu without performance issues.

Signed-off-by: Daniel Engberg &lt;daniel.engberg.lists@pyret.net&gt;
[Jo-Philipp Wich: rewrapped commit message]
Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
(cherry picked from commit 99c429512622566ee2bbde69fa8efb0f2bcda33e)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Internet2 isn't considered a trusted issuer meaning that https links to
rit.edu will fail.

The host mirror.csclub.uwaterloo.ca has a trusted SSL cert and peering
is good so it can replace rit.edu without performance issues.

Signed-off-by: Daniel Engberg &lt;daniel.engberg.lists@pyret.net&gt;
[Jo-Philipp Wich: rewrapped commit message]
Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
(cherry picked from commit 99c429512622566ee2bbde69fa8efb0f2bcda33e)
</pre>
</div>
</content>
</entry>
<entry>
<title>build: fix invocation of bundled ld.so in SDK and Imagebuilder</title>
<updated>2017-12-13T15:23:39+00:00</updated>
<author>
<name>Jo-Philipp Wich</name>
<email>jo@mein.io</email>
</author>
<published>2017-07-16T21:43:19+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=338968a17060373e979edd2f53d218cde1bd76b3'/>
<id>338968a17060373e979edd2f53d218cde1bd76b3</id>
<content type='text'>
Commit 72d751cba9 "build: rework library bundling" introduced a new helper
binary "runas" whose sole purpose was mangling the argv vector passed to
the actual called ELF image so that the renamed executable could obtain the
proper name from argv[0].

This approach, however totally defeated the purpose of calling bundled ELF
executables through the shipped ld.so loader since the execv() invocation
performed by "runas" would cause the kernel the interprete the final program
image through the system ELF loader again.

To solve the problem, use an alternative approach of shipping a shared object
"runas.so" which uses an ELF ".init_array" function pointer to obtain the
argv[] vector of the to-be-executed main() function and mangle it in-place.

The actual argv[0] value to use is communicated out-of-band using an
environment variable "RUNAS_ARG0" by the shell wrapper script. The wrapper
script also takes care of setting LD_PRELOAD to instruct the shipped ELF
loader to preload the actual ELF program image with the "runas.so" helper
library.

Fixes FS#909.

Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
(cherry picked from commit ef1cafa736679eb035d405bcdf903fd1fb329865)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit 72d751cba9 "build: rework library bundling" introduced a new helper
binary "runas" whose sole purpose was mangling the argv vector passed to
the actual called ELF image so that the renamed executable could obtain the
proper name from argv[0].

This approach, however totally defeated the purpose of calling bundled ELF
executables through the shipped ld.so loader since the execv() invocation
performed by "runas" would cause the kernel the interprete the final program
image through the system ELF loader again.

To solve the problem, use an alternative approach of shipping a shared object
"runas.so" which uses an ELF ".init_array" function pointer to obtain the
argv[] vector of the to-be-executed main() function and mangle it in-place.

The actual argv[0] value to use is communicated out-of-band using an
environment variable "RUNAS_ARG0" by the shell wrapper script. The wrapper
script also takes care of setting LD_PRELOAD to instruct the shipped ELF
loader to preload the actual ELF program image with the "runas.so" helper
library.

Fixes FS#909.

Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
(cherry picked from commit ef1cafa736679eb035d405bcdf903fd1fb329865)
</pre>
</div>
</content>
</entry>
<entry>
<title>scripts/download.pl: print the command used to download files</title>
<updated>2017-12-13T14:42:08+00:00</updated>
<author>
<name>Felix Fietkau</name>
<email>nbd@nbd.name</email>
</author>
<published>2017-05-09T13:20:42+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=ef43c04c34f23433fea6744eb96b1dfbb1cc4c0d'/>
<id>ef43c04c34f23433fea6744eb96b1dfbb1cc4c0d</id>
<content type='text'>
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
(cherry picked from commit cbe0a7ecc0b76f4d97d87ca59a0ff8074b8946f4)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
(cherry picked from commit cbe0a7ecc0b76f4d97d87ca59a0ff8074b8946f4)
</pre>
</div>
</content>
</entry>
<entry>
<title>scripts: Probe external toolchains for libthread-db</title>
<updated>2017-12-13T14:28:29+00:00</updated>
<author>
<name>Florian Fainelli</name>
<email>f.fainelli@gmail.com</email>
</author>
<published>2017-04-04T02:04:24+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=827f108b42504bd468a771cf610373d16f8fd378'/>
<id>827f108b42504bd468a771cf610373d16f8fd378</id>
<content type='text'>
libthread-db is a package that can be configured for external
toolchains, so let's have the script probe for it.

Signed-off-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
(cherry picked from commit 6704410b158b47aecf507971ad2ee5e3db840e3a)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
libthread-db is a package that can be configured for external
toolchains, so let's have the script probe for it.

Signed-off-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
(cherry picked from commit 6704410b158b47aecf507971ad2ee5e3db840e3a)
</pre>
</div>
</content>
</entry>
<entry>
<title>build: remove absolute path to perl and replace with /usr/bin/env perl</title>
<updated>2017-12-13T14:21:02+00:00</updated>
<author>
<name>Bastian Köcher</name>
<email>git@kchr.de</email>
</author>
<published>2017-03-27T15:21:12+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=040ff6fdbd36d2a202765d241fcb3844851a0678'/>
<id>040ff6fdbd36d2a202765d241fcb3844851a0678</id>
<content type='text'>
Signed-off-by: Bastian Köcher &lt;git@kchr.de&gt;
(cherry picked from commit 5378c856779c590e26910639e28b95a22aa2b9f5)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Bastian Köcher &lt;git@kchr.de&gt;
(cherry picked from commit 5378c856779c590e26910639e28b95a22aa2b9f5)
</pre>
</div>
</content>
</entry>
<entry>
<title>scripts/download.pl: fix error message on hash mismatch</title>
<updated>2017-12-13T14:00:08+00:00</updated>
<author>
<name>Felix Fietkau</name>
<email>nbd@nbd.name</email>
</author>
<published>2017-04-04T09:44:22+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=977db9f08aac4f8f769e0a5bf6e6a188621f2ee4'/>
<id>977db9f08aac4f8f769e0a5bf6e6a188621f2ee4</id>
<content type='text'>
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
(cherry picked from commit 2fd15033783a9dfa84d2a43fb81ff222ab865407)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
(cherry picked from commit 2fd15033783a9dfa84d2a43fb81ff222ab865407)
</pre>
</div>
</content>
</entry>
<entry>
<title>scripts: only generate config from feature flag if fully match</title>
<updated>2017-12-13T13:48:10+00:00</updated>
<author>
<name>Hauke Mehrtens</name>
<email>hauke.mehrtens@intel.com</email>
</author>
<published>2017-03-14T17:55:02+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=5f03ce1213782c9ddb9bb010dac127bb554092cc'/>
<id>5f03ce1213782c9ddb9bb010dac127bb554092cc</id>
<content type='text'>
Without this change the code checked if the string was contained in the
feature option and not if the string matches the complete word. This only
removes the nand option from the omap24xx target, the other changes are
only removing options which were added twice.

Signed-off-by: Hauke Mehrtens &lt;hauke.mehrtens@intel.com&gt;
(cherry picked from commit d5a770f2c139a335e7602bec60dbeabd4add1e8b)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Without this change the code checked if the string was contained in the
feature option and not if the string matches the complete word. This only
removes the nand option from the omap24xx target, the other changes are
only removing options which were added twice.

Signed-off-by: Hauke Mehrtens &lt;hauke.mehrtens@intel.com&gt;
(cherry picked from commit d5a770f2c139a335e7602bec60dbeabd4add1e8b)
</pre>
</div>
</content>
</entry>
</feed>
