librecmc/librecmc.git
6 years agosamba36: Don't resolve interfaces.
Rosen Penev [Thu, 24 Aug 2017 23:51:24 +0000 (16:51 -0700)]
samba36: Don't resolve interfaces.

It's redundant and also buggy. IPv6 link local addresses and ::1 are not resolved for example. Doesn't matter since lo and br-lan for example, resolve to them.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Acked-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
(cherry picked from commit b2f60e6a7245c192703528a46dfb630c664dbc0c)

6 years agosamba36: Remove guest ok since LuCI configures it.
Rosen Penev [Thu, 24 Aug 2017 23:51:23 +0000 (16:51 -0700)]
samba36: Remove guest ok since LuCI configures it.

guest ok is set per share and as such, don't override it. also, fix an error introduced in the last commit.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry picked from commit ccb79a310c5273bf32d590323a99e72b587a0fb0)

6 years agoconfig: make CONFIG_ALL_* select other CONIFG_ALL_* options
Hauke Mehrtens [Sat, 15 Jul 2017 20:54:33 +0000 (22:54 +0200)]
config: make CONFIG_ALL_* select other CONIFG_ALL_* options

Select the other CONFIG_ALL_* options in the hierarchy when the master
option is selected. Currently CONFIG_ALL_KMODS is not selected when the
build bot selects CONFIG_ALL_NONSHARED for example.

Now the rtc kmods should get build when CONFIG_ALL_KMODS,
CONFIG_ALL_NONSHARED or CONFIG_ALL and CONFIG_RTC_SUPPORT are selected
like it is done by the build bots for targets with rtc support.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 589621b1c03c25e6436d30aaa508aef2484244a6)

6 years agonvram: add help message for nvram magic not found
BangLang Huang [Fri, 24 Feb 2017 02:58:09 +0000 (10:58 +0800)]
nvram: add help message for nvram magic not found

The program would failed if nvram magic not found
in specific partition.

Signed-off-by: BangLang Huang <banglang.huang@foxmail.com>
(cherry picked from commit 69da83d9f12e4e48b546fc3fc3ff555034959211)

6 years agonvram: improve argument check when program start
BangLang Huang [Fri, 24 Feb 2017 02:52:52 +0000 (10:52 +0800)]
nvram: improve argument check when program start

print help message when argument count is less
than 2.

Signed-off-by: BangLang Huang <banglang.huang@foxmail.com>
(cherry picked from commit c7e2a6fe923dc86bab14d94ead322a045efca4c9)

6 years agonvram: add usage() function
BangLang Huang [Fri, 24 Feb 2017 02:45:16 +0000 (10:45 +0800)]
nvram: add usage() function

Merge the help message into a single function,
so that we can use it somewhere else.

Signed-off-by: BangLang Huang <banglang.huang@foxmail.com>
(cherry picked from commit 2a253e7cdbacd1bd19da80ea6f35a93b42655c3b)

6 years agonvram: fix memory leak
BangLang Huang [Fri, 24 Feb 2017 02:16:17 +0000 (10:16 +0800)]
nvram: fix memory leak

Fix memory leak on nvram_open() and nvram_open_rdonly().

For nvram_open(), the 'fd' should be closed on error, and
mmap_area should be unmap when nvram magic can not be found.

For nvram_open_rdonly(), the 'file' variable should free before
return. Once nvram_find_mtd() return successfully, it will allocate
memory to save mtd device string.

Signed-off-by: BangLang Huang <banglang.huang@foxmail.com>
(cherry picked from commit 1948d8e08c72106a01b359a30217cf92657cc79d)

6 years agoca-certificates: Update to 20170717
Christian Schoenebeck [Tue, 15 Aug 2017 18:44:17 +0000 (20:44 +0200)]
ca-certificates: Update to 20170717

Update to 20170717

Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
(cherry picked from commit a2a226e6e83359ca0c7547ce9fed6ce4ecabc24b)

6 years agobase-files: drop unused preinit_echo function
Rafał Miłecki [Mon, 7 Aug 2017 06:41:26 +0000 (08:41 +0200)]
base-files: drop unused preinit_echo function

It isn't used for years since the old 99_10_run_init has been dropped.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 1e13c6f77fc02df2bd8ed237ab9208ecdefb2dab)

6 years agotools/pkg-config: Update to 0.29.2
Daniel Engberg [Tue, 8 Aug 2017 06:14:28 +0000 (08:14 +0200)]
tools/pkg-config: Update to 0.29.2

* Update pkg-config to 0.29.2
* Remove patch as it's upstreamed

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
(cherry picked from commit 965df21fd16e5966c64f207fe053ab8b6863081f)

6 years agobase-files: suppress uci not found output in login.sh
Florian Eckert [Tue, 1 Aug 2017 12:35:18 +0000 (14:35 +0200)]
base-files: suppress uci not found output in login.sh

Fix "uci: Entry not found" output if "ttylogin" is not set in
"etc/config/system"

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit c31f0421ceb47f347ade7317f263fcd09cfe325f)

6 years agoscripts/package-metadata.pl: inhibit compile deps on missing build types
Jo-Philipp Wich [Wed, 26 Jul 2017 22:18:12 +0000 (00:18 +0200)]
scripts/package-metadata.pl: inhibit compile deps on missing build types

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 <jo@mein.io>
(cherry picked from commit bf5d32af2a675f7577b388b5eef2a11e6ce042eb)

6 years agobuild: bundle-libraries.sh: do not override argv[0] in inner exec calls
Jo-Philipp Wich [Mon, 24 Jul 2017 11:33:33 +0000 (13:33 +0200)]
build: bundle-libraries.sh: do not override argv[0] in inner exec calls

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 <jo@mein.io>
(cherry picked from commit 9e64874fb2508e49e52898c238d817bd152bf2c2)

6 years agosamba36: Remove legacy options
Rosen Penev [Fri, 21 Jul 2017 20:04:34 +0000 (13:04 -0700)]
samba36: Remove legacy options

Browseable is now set through LuCI per share, so remove it. Same with
writeable (inverted synonym for read only). domain master and preferred
master seem to be legacy settings for Windows 9x. encrypt passwords
defaults to yes. Probably should not be disabled either.

Also reordered alphabetically.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
[rewrap commit message, fix SoB, fix author, bump pkg revsion]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 9dcb3fe7eb06b42c4f026e6cc5e89b2a18932782)

6 years agoscripts/download.pl: Adjust URLs
Daniel Engberg [Sun, 25 Jun 2017 16:14:33 +0000 (18:14 +0200)]
scripts/download.pl: Adjust URLs

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 <daniel.engberg.lists@pyret.net>
[Jo-Philipp Wich: rewrapped commit message]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 99c429512622566ee2bbde69fa8efb0f2bcda33e)

6 years agobuild: fix invocation of bundled ld.so in SDK and Imagebuilder
Jo-Philipp Wich [Sun, 16 Jul 2017 21:43:19 +0000 (23:43 +0200)]
build: fix invocation of bundled ld.so in SDK and Imagebuilder

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 <jo@mein.io>
(cherry picked from commit ef1cafa736679eb035d405bcdf903fd1fb329865)

6 years agokmod-sched-cake: drop maintainer
Kevin Darbyshire-Bryant [Fri, 16 Jun 2017 19:06:50 +0000 (20:06 +0100)]
kmod-sched-cake: drop maintainer

Drop myself from maintainership of 'cake'.

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
(cherry picked from commit c7f8bcede6be73d0c07e058d57b55e4efc746440)

6 years agozlib: use default Build/Configure rule
Stijn Tintel [Sat, 11 Mar 2017 08:32:19 +0000 (09:32 +0100)]
zlib: use default Build/Configure rule

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
(cherry picked from commit 462ca4e059dbead678163da26fb4e14748f3021e)

6 years agolzo: use default Build/Configure rule
Stijn Tintel [Sat, 11 Mar 2017 08:18:22 +0000 (09:18 +0100)]
lzo: use default Build/Configure rule

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
(cherry picked from commit b3cba687a447478253f95febf17fa9376c98105d)

6 years agonetfilter: add iptables-mod-rpfilter package
Alin Nastac [Fri, 16 Jun 2017 12:16:07 +0000 (14:16 +0200)]
netfilter: add iptables-mod-rpfilter package

Unlike /proc/sys/net/ipv4/conf/INTF/rp_filter flag, rule iptables -t raw
-I PREROUTING -m rpfilter --invert -j DROP prevents conntrack table to
become full when a packet flood with randomly selected source IP addresses
is received from the lan side.

Signed-off-by: Alin Nastac <alin.nastac@gmail.com>
(cherry picked from commit d8748e537f11ab5f2b5e2ed25d94baa5ce353984)

6 years agobzip2: add symlink to binary
Daniel Golle [Wed, 5 Jul 2017 14:25:23 +0000 (16:25 +0200)]
bzip2: add symlink to binary

Other distributions incl. the OpenWrt ImageBuilder and SDK
expect to find the bzip2 executable in /bin.
Create a symlink at that location for compatibility.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit eb7c14d512482e18d05f61afa44205167ea094c0)

6 years agodropbear: add option to set max auth tries
Stijn Tintel [Tue, 27 Jun 2017 20:30:01 +0000 (22:30 +0200)]
dropbear: add option to set max auth tries

Add a uci option to set the new max auth tries paramater in dropbear.
Set the default to 3, as 10 seems excessive.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
(cherry picked from commit 6371159b4ae8b4dd94d6319ac805b0c26962bb14)

6 years agodropbear: server support option '-T' max auth tries
Kevin Darbyshire-Bryant [Sun, 25 Jun 2017 20:40:43 +0000 (21:40 +0100)]
dropbear: server support option '-T' max auth tries

Add support for '-T n' for a run-time specification for maximum number
of authentication attempts where 'n' is between 1 and compile time
option MAX_AUTH_TRIES.

A default number of tries can be specified at compile time using
'DEFAULT_AUTH_TRIES' which itself defaults to MAX_AUTH_TRIES for
backwards compatibility.

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
(cherry picked from commit 9aaf3d3501642640c9ec74268e671171c8de6103)

6 years agohostapd: configure NAS ID regardless of encryption
Yury Shvedov [Tue, 27 Jun 2017 08:43:54 +0000 (11:43 +0300)]
hostapd: configure NAS ID regardless of encryption

RADIUS protocol could be used not only for authentication but for
accounting too. Accounting could be configured for any type of networks.
However there is no way to configure NAS Identifier for non-WPA
networks without this patch.

Signed-off-by: Yury Shvedov <yshvedov@wimarksystems.com>
[cleanup commit message]
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
(cherry picked from commit 37c1513b1f98c93bf84bbcedd9782568e7d4abba)

6 years agohostapd: add acct_interval option
Yury Shvedov [Tue, 27 Jun 2017 07:34:49 +0000 (10:34 +0300)]
hostapd: add acct_interval option

Make an ability to configure Accounting-Interim-Interval via UCI

Signed-off-by: Yury Shvedov <yshvedov@wimarksystems.com>
[add hostapd prefix, cleanup commit message]
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
(cherry picked from commit 0e7bbcd43b6f4b54ecc5c40130b5f86cbc9f1c07)

6 years agovalgrind: bump to 3.13.0
Luiz Angelo Daros de Luca [Sat, 17 Jun 2017 03:54:45 +0000 (00:54 -0300)]
valgrind: bump to 3.13.0

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
(cherry picked from commit 991899cc5449d8595593a66c0130fdcaa088b36a)

6 years agobusybox: backport 'ip rule suppress_{prefixlength, ifgroup}'
Stefan Tomanek [Mon, 19 Jun 2017 10:41:11 +0000 (12:41 +0200)]
busybox: backport 'ip rule suppress_{prefixlength, ifgroup}'

This is a backport from the busybox repository
(192dce4b84fb32346ebc5194de7daa5da3b8d1b4); it enables the use of the
suppress_{prefixlength,ifgroup} flags for policy routing rules.

Signed-off-by: Stefan Tomanek <stefan.tomanek@wertarbyte.de>
(cherry picked from commit de6ff1512955953e56735896c044c7aac97e14d9)

6 years agolibunwind: update to version 1.2.1
Yousong Zhou [Mon, 19 Jun 2017 06:41:47 +0000 (14:41 +0800)]
libunwind: update to version 1.2.1

Changes since 1.2

    a77b0cd Bump version to v1.2.1
    5f354cb mips/tilegx: Add missing unwind_i.h header file
    620d1c3 Add aarch64 getcontext functionality.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
(cherry picked from commit 77dc6a2ae7c94ac3d496ebab589d4574ac7169d0)

6 years agoimagebuilder: don't rewrite package list output
Daniel Golle [Fri, 16 Jun 2017 23:24:43 +0000 (01:24 +0200)]
imagebuilder: don't rewrite package list output

No longer rewrite opkg list output in package_list function, remove
the awk call in the pipe (which was intended for a single specific
use-case).

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit d80d1b6c42aa663e6104f817daa5ea29d2e7073d)

6 years agoimagebuilder: clean package_list
Daniel Golle [Fri, 16 Jun 2017 22:54:46 +0000 (00:54 +0200)]
imagebuilder: clean package_list

commit 19ac879954 (imagebuilder: add package_list function) introduced
a new function 'package_list' to the imagebuilder Makefile.
Unfortunately the package list was poluted by stdout noise of the
Makefile itself as well as opkg. Redirect those outputs to stderr to
make sure that the package_list returned doesn't contain progress
info output but really only packages.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 1b555e1d2b1cb2ae3dd1832225e6c9d2c5df0a37)

6 years agobuild: remove old kernel-headers build directories
Felix Fietkau [Fri, 16 Jun 2017 13:15:37 +0000 (15:15 +0200)]
build: remove old kernel-headers build directories

Saves space after updating kernel versions

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 76b62e602233d1a2e1f8ef1c0833bd22ebaaf832)

6 years agoimagebuilder: add package_list function
Paul Spooren [Tue, 13 Jun 2017 19:59:14 +0000 (21:59 +0200)]
imagebuilder: add package_list function

The imagebuilder can now list all available packages by using make
package_list. This is usefull for scripts to retrieve a list of all
packages with versions (and size)

Signed-off-by: Paul Spooren <paul@spooren.de>
[daniel@makrotopia.org: fixed commit message]
(cherry picked from commit 19ac879954210df3c6a010990bef42ad5c7fd967)

6 years agobase-files: board.json's switch reset means existence, not argument
Jonas Gorski [Sun, 11 Jun 2017 10:50:14 +0000 (12:50 +0200)]
base-files: board.json's switch reset means existence, not argument

Don't pass the value unconditionally to swconfig as a parameter but
instead only call reset if it is 1.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
(cherry picked from commit fd952c7a83e5357f5dcab28c0bcaca756e27eaa0)

6 years agogdb: remove Build/Compile rule ; default one works
Alexandru Ardelean [Fri, 12 May 2017 08:50:05 +0000 (11:50 +0300)]
gdb: remove Build/Compile rule ; default one works

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
(cherry picked from commit ab485383fa4d60d6342cd5a4eb6b5429afba6b97)

6 years agorb532: enable high-res timers, refresh kernel config
Felix Fietkau [Thu, 1 Jun 2017 09:17:13 +0000 (11:17 +0200)]
rb532: enable high-res timers, refresh kernel config

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 2dc23a7576614181e35a0bf6444fc55144dd711b)

6 years agoxburst: enable high-res timers, refresh kernel config
Felix Fietkau [Thu, 1 Jun 2017 09:15:39 +0000 (11:15 +0200)]
xburst: enable high-res timers, refresh kernel config

Helps with system performance

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit f859a7b696d79fae8dd98859a3451a6f9d77570f)

6 years agokernel: add CONFIG_SCHED_HRTICK=y to the generic config
Felix Fietkau [Thu, 1 Jun 2017 09:10:21 +0000 (11:10 +0200)]
kernel: add CONFIG_SCHED_HRTICK=y to the generic config

It is used by pretty much every target

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(backported from commit b47fd7656336162360ebf66147326763ddae3f8d)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
6 years agopackage/grub2: update to 2.02
Alif M. Ahmad [Sat, 20 May 2017 07:11:16 +0000 (14:11 +0700)]
package/grub2: update to 2.02

Update to version 2.02

Signed-off-by: Alif M. Ahmad <alive4ever@live.com>
(cherry picked from commit 415c47de79ada7496c39f435df0b0523472aee58)

6 years agoip17xx: correct aneg_done return value
Sergey Ryazanov [Tue, 6 Jun 2017 22:25:32 +0000 (01:25 +0300)]
ip17xx: correct aneg_done return value

PHY core treats any positive return value as the auto-negotiation done
indication. Since we do not actually check any device register in this
callback then update it to return positive value with a neutral meaning
instead of the register flag to avoid  confusing for future readers.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
(cherry picked from commit 2cc61e6e8e951b1480a024fdb66bc539aa163bbc)

6 years agomvswitch: fix autonegotiation issue
Sergey Ryazanov [Tue, 6 Jun 2017 22:25:31 +0000 (01:25 +0300)]
mvswitch: fix autonegotiation issue

The Marvel 88E6060 switch has an MDIO interface, but does not emulate
regular PHY behavior for the host. The network core can not detect using
the generic code, whether the connection via the attached PHY can be
used or not. The PHY's state machine is stuck in a state of
auto-negotiation and does not go any further so the Ethernet interface
of the router stay forever in the not-runing state.

Fix this issue by implementing the aneg_done callback to be able to
inform the network core that the Ethernet interface link to which the
switch is connected can be marked as RUNNING.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
(cherry picked from commit 913b2290caad437bb523d6f1ee5a70707f7f7ef4)

6 years agoppp: propagate master firewall zone to dynamic slave interface
Hans Dedecker [Wed, 31 May 2017 14:24:11 +0000 (16:24 +0200)]
ppp: propagate master firewall zone to dynamic slave interface

Assign the virtual DHCPv6 interface the firewall zone of the parent interface
so fw3 knows the zone to which the virtual DHCPv6 interface belongs.
This guarantees the firewall settings are applied correctly for the virtual
DHCPv6 interface and allows to query the zone to which the virtual DHCPv6
interface belongs via the fw3 network option.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
(cherry picked from commit 21f25bc4a325b3075d6426047640e9cf6176894c)

6 years agousbmode: remove devices with unsupported modes
Julian Labus [Wed, 24 May 2017 14:32:18 +0000 (16:32 +0200)]
usbmode: remove devices with unsupported modes

remove files which include the following mode options
BlackberryMode OptionMode PantechMode QuantaMode

Signed-off-by: Julian Labus <julian@labus-online.de>
(cherry picked from commit b757de65b3c3aa210022c65445df1d6dbbf9eadd)

6 years agotar: override symlink permissions
Felix Fietkau [Tue, 30 May 2017 13:37:10 +0000 (15:37 +0200)]
tar: override symlink permissions

On Linux, symlink permissions cannot be altered and are always 0777.
On Mac OS X they can be 0755. Force 0777 here to keep tarballs
reproducible across systems

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit e25cedd0b5621dc02e47eea674006578ac062c9f)

6 years agotools/sparse: Update to snapshot 2017-03-31
Daniel Engberg [Wed, 10 May 2017 09:34:10 +0000 (11:34 +0200)]
tools/sparse: Update to snapshot 2017-03-31

Update sparse to snapshot 2017-03-31
Switch to HTTPS

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
(cherry picked from commit 9235a29e1a9764361940d4b38f4fce0358d8d9ee)

6 years agoelfutils: Pass -Wno-unused-result to silence warnings as errors
Florian Fainelli [Mon, 22 May 2017 23:08:57 +0000 (16:08 -0700)]
elfutils: Pass -Wno-unused-result to silence warnings as errors

elfutils turns on -Werror by default, and patch 100-musl-compat.patch
changes how strerror_r is used and we no longer use the function's
return value. This causes the following build error/warning to occur
with glibc-based toolchains:

dwfl_error.c: In function 'dwfl_errmsg':
dwfl_error.c:158:18: error: ignoring return value of 'strerror_r',
declared with attribute warn_unused_result [-Werror=unused-result]
       strerror_r (error & 0xffff, s, sizeof(s));
                  ^
cc1: all warnings being treated as errors

Fixing this would be tricky as there are two possible signatures for
strerror_r (XSI and GNU), just turn off unused-result warnings instead.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
(cherry picked from commit 484f768dfa295d9fccd82c57cae00458f32b7182)

6 years agogcc: fix documentation entries added by 910-mbsd_multi.patch
Felix Fietkau [Wed, 10 May 2017 12:01:54 +0000 (14:01 +0200)]
gcc: fix documentation entries added by 910-mbsd_multi.patch

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 8851a18a88aff548ae2648e26deb7595ebb45733)

6 years agoscripts/download.pl: print the command used to download files
Felix Fietkau [Tue, 9 May 2017 13:20:42 +0000 (15:20 +0200)]
scripts/download.pl: print the command used to download files

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit cbe0a7ecc0b76f4d97d87ca59a0ff8074b8946f4)

6 years agotools/libressl: update to 2.5.4
Hannu Nyman [Sun, 7 May 2017 17:52:32 +0000 (20:52 +0300)]
tools/libressl: update to 2.5.4

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit d7a3120cdcc1aeed5a95636803d250e35ba8706e)

6 years agotools/isl: update to 0.18
Syrone Wong [Sun, 7 May 2017 11:39:12 +0000 (19:39 +0800)]
tools/isl: update to 0.18

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
(cherry picked from commit a0f4b4b3a2cd4db1a2b9bab3c06970361192368f)

6 years agolldpd: bump to 0.9.7
Stijn Tintel [Wed, 24 May 2017 12:56:22 +0000 (14:56 +0200)]
lldpd: bump to 0.9.7

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
(cherry picked from commit 423a7a6b752d4780f7f61722443ed5f4f50e3bda)

6 years agolibunwind: update to 1.2
Yousong Zhou [Mon, 22 May 2017 02:35:10 +0000 (10:35 +0800)]
libunwind: update to 1.2

Addresses CVE-2015-3239: Off-by-one error in the dwarf_to_unw_regnum
function in include/dwarf_i.h in libunwind 1.1 allows local users to
have unspecified impact via invalid dwarf opcodes.

Upstream stable-v1.2 fixed the missing unwind_i.h issue but no new
tarball is released yet

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
(cherry picked from commit 5d48dc1146171520445c43ee894d9dfce09ae4e2)

6 years agolantiq: spi: double time out tolerance
Hauke Mehrtens [Sun, 21 May 2017 19:20:44 +0000 (21:20 +0200)]
lantiq: spi: double time out tolerance

The generic SPI code calculates how long the issued transfer would take
and adds 100ms in addition to the timeout as tolerance. On my 500 MHz
Lantiq Mips SoC I am getting timeouts from the SPI like this when the
system boots up:

m25p80 spi32766.4: SPI transfer timed out
blk_update_request: I/O error, dev mtdblock3, sector 2
SQUASHFS error: squashfs_read_data failed to read block 0x6e

After increasing the tolerance for the timeout to 200ms I haven't seen
these SPI transfer time outs any more.
The Lantiq SPI driver in use here has an extra work queue in between,
which gets triggered when the controller send the last word and the
hardware FIFOs used for reading and writing are only 8 words long.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 6153248052b2e067df9596c2d619345261b1d3f7)

6 years agobase-files: fix default procd reload
Alexandru Ardelean [Fri, 19 May 2017 13:19:20 +0000 (16:19 +0300)]
base-files: fix default procd reload

Bug introduced with 6713694.

I did not count on procd handling reload as mentioned
in this doc:
https://wiki.openwrt.org/inbox/procd-init-scripts

```
procd_set_param file /var/etc/your_service.conf # /etc/init.d/your_service reload will restart the daemon if these files have changed
procd_set_param netdev dev # likewise, except if dev's ifindex changes.
procd_set_param data name=value ... # likewise, except if this data changes.
```

The service would be restarted regardless of any of those params.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
(cherry picked from commit c7ee30d53af12ea725296cc323f68e8fe04e532c)

6 years agoramips: support jumbo frame on mt7621 up to 2k
Michael Lee [Thu, 27 Apr 2017 01:04:31 +0000 (09:04 +0800)]
ramips: support jumbo frame on mt7621 up to 2k

Signed-off-by: Michael Lee <igvtee@gmail.com>
(cherry picked from commit eee09bfe01e8cc2db1501f82dde7b9b6bb424faf)

6 years agolldpd: drop specific respawn params [use system-wide]
Alexandru Ardelean [Thu, 4 May 2017 11:13:40 +0000 (14:13 +0300)]
lldpd: drop specific respawn params [use system-wide]

I think I added these respawn params [a while back],
when I did the conversion to procd init script format.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
(cherry picked from commit ce8bfa9407bc1518107a99edc8568a59fe269fa5)

6 years agoelfutils: bump to 0.169
Luiz Angelo Daros de Luca [Fri, 5 May 2017 23:05:56 +0000 (20:05 -0300)]
elfutils: bump to 0.169

Removed patches (now upstream):
- 004-maybe-uninitialized.patch
- 007-fix_TEMP_FAILURE_RETRY.patch

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
(cherry picked from commit ccc54b29352a7d30762b84761414aa1798ce1183)

6 years agodevel/trace-cmd: Update to 2.6.1
Daniel Engberg [Wed, 10 May 2017 09:19:46 +0000 (11:19 +0200)]
devel/trace-cmd: Update to 2.6.1

Update trace-cmd to version 2.6.1
Switch to tarball download

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
(cherry picked from commit b295966f8767ff84b55e547ae5c2967772c3ede2)

6 years agocomgt-3g: enable modem before to setpin
Giuseppe Lippolis [Tue, 9 May 2017 18:23:35 +0000 (20:23 +0200)]
comgt-3g: enable modem before to setpin

some modems needs to be enabled with CFUN=1 before to set the pin

Signed-off-by: Giuseppe Lippolis <giu.lippolis@gmail.com>
(cherry picked from commit db776c01e1202307b78a4bb757f78db5ea48e27e)

6 years agodevel/strace: Update to 4.16
Daniel Engberg [Sat, 13 May 2017 11:21:11 +0000 (13:21 +0200)]
devel/strace: Update to 4.16

Update strace to 4.16
Refresh patch

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
(cherry picked from commit 4b0a2ca9a47ce30f08161b5b12991f15d590938c)

6 years agonetwork/utils/ipset: Update to 6.32
Daniel Engberg [Sat, 13 May 2017 11:25:16 +0000 (13:25 +0200)]
network/utils/ipset: Update to 6.32

Update ipset to 6.32

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
(cherry picked from commit ea2927e1eaa321033b28f08db0ec59e7df5f7806)

6 years agomac80211: gracefully handle preexisting VIF
Jo-Philipp Wich [Sun, 14 May 2017 17:47:07 +0000 (19:47 +0200)]
mac80211: gracefully handle preexisting VIF

Gracefully handle cases where the to-be-created wireless interface already
exists on the system which might commonly happen with non-multi-SSID capable
wireless drivers.

This fixes commit 8301e613655c2d95fa5430a1a57d92d966fdc70b which caused
previously ignored "Too many open files in system (-23)" errors to fail the
wireless setup procedure.

With the updated approach we'll still try recreating the vif after one
second if the first attempt to do so failed with ENFILE but we will now
consider the operation successfull if a second attempt still yields ENFILE
with the requested ifname already existing on the system.

Fixes FS#664, FS#704.

Suggested-by: Vittorio Gambaletta <openwrt@vittgam.net>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 4a033475453b63d0d5ae41489e7c395882567698)

6 years agoscripts: Probe external toolchains for libthread-db
Florian Fainelli [Tue, 4 Apr 2017 02:04:24 +0000 (19:04 -0700)]
scripts: Probe external toolchains for libthread-db

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 <f.fainelli@gmail.com>
(cherry picked from commit 6704410b158b47aecf507971ad2ee5e3db840e3a)

6 years agobuild: new fixes for symlinked .config handling
Sergey Ryazanov [Sun, 7 May 2017 17:19:13 +0000 (20:19 +0300)]
build: new fixes for symlinked .config handling

When running "make {config|defconfig|oldconfig}" with symlinked .config
(e.g. to env/.config) it renames symlink to .config.old, creates new
.config file, and writes the updated configuration into it.

This breaks the desired workflow when changes in the configuration can
be checked using "scripts/env diff" and commited using "scripts/env
save". Since the env/.config file is not updated.

The things become even worse when working with feeds, since feeds script
quite often silently invokes "make {oldconfig|defconfig}" and breaks the
symlink.

Fix this issue by exporting KCONFIG_OVERWRITECONFIG=1, which forces
mconf to overwrite the .config content, instead of renaming it and
creating a new file. This variable is set only if .config is a symlink,
otherwise the variable is not exported and the old behaviour is
preserved.

This change uses the same behaviour as "make menucofig", which has
already been fixed in commit 5bf98b1acc3b6b178f8954c5075a58e1e6a99d6a.

Also make a tiny cosmetic update to the "make menuconfig" target code
layout to make it look like other config handling targets.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
(cherry picked from commit e06d8f0f6f041c8ac1acba810eea96c32dc983e4)

6 years agobuild: allow val.% targets to bypass the prepare steps
Felix Fietkau [Fri, 5 May 2017 11:12:23 +0000 (13:12 +0200)]
build: allow val.% targets to bypass the prepare steps

Significantly reduces time spent processing those targets and should
also silence some log clutter which could confuse buildbot

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit ddbb036bbb8a1030dd8f6fae0004d390b5f2b8a5)

6 years agox86: keep /boot mounted for kexec
Daniel Golle [Fri, 5 May 2017 03:56:10 +0000 (05:56 +0200)]
x86: keep /boot mounted for kexec

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 63571cb56c7ff2692b5c9aa78133c3f4996e2ac5)

6 years agohostapd: fix reload frequency change patch
Abhilash Tuse [Thu, 23 Mar 2017 06:04:32 +0000 (11:34 +0530)]
hostapd: fix reload frequency change patch

When sta is configured, hostapd receives 'stop' and 'update' command from
wpa_supplicant. In the update command, hostapd gets sta parameters with
which it configures ap.

Problem is, with the default wireless configuration:
mode:11g freq:2.4GHz channel:1
If sta is connected to 5GHz network, then ap does not work. Ideally with
340-reload_freq_change.patch hostapd should reload the frequency changes
and start ap in 5GHz, but ap becomes invisible in the network.

This issue can be reproduced with following /etc/config/wireless:
config wifi-device  radio0
        option type     mac80211
        option channel  1
        option hwmode   11g
        option path     'virtual/uccp420/uccwlan'
        option htmode   'none'

config wifi-iface 'ap'
        option device 'radio0'
        option encryption 'none'
        option mode 'ap'
        option network 'ap'
        option ssid 'MyTestNet'
        option encryption none

config wifi-iface 'sta'
       option device radio0
       option network sta
       option mode sta
       option ssid TestNet-5G
       option encryption psk2
       option key 12345

This change updates current_mode structure based on configured hw_mode
received from wpa_supplicant. Also prepare rates table after frequency
selection.

Signed-off-by: Abhilash Tuse <Abhilash.Tuse@imgtec.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name> [cleanup, patch refresh]
(cherry picked from commit 41feba8c4aa33ca3c6fa7c1a6c3224aae02440a7)

6 years agobuild: remove absolute path to perl and replace with /usr/bin/env perl
Bastian Köcher [Mon, 27 Mar 2017 15:21:12 +0000 (17:21 +0200)]
build: remove absolute path to perl and replace with /usr/bin/env perl

Signed-off-by: Bastian Köcher <git@kchr.de>
(cherry picked from commit 5378c856779c590e26910639e28b95a22aa2b9f5)

6 years agokernel: allow selecting RTC drivers on targets without explicit RTC support
Felix Fietkau [Wed, 12 Apr 2017 07:15:38 +0000 (09:15 +0200)]
kernel: allow selecting RTC drivers on targets without explicit RTC support

Keep them disabled by default to avoid pulling in extra kernel bloat

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 5afe9a054cbcb1630a42200f3ac799432522a87d)

6 years agodropbear: fix procd interface trigger install
Hans Dedecker [Wed, 26 Apr 2017 14:44:02 +0000 (16:44 +0200)]
dropbear: fix procd interface trigger install

Install procd interface triggers only for interfaces which are enabled
so dropbear instances running on (an) enabled interface(s) are not
restarted due to an interface trigger of an interface which is disabled.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
(cherry picked from commit e5bbead1a83944293fccc27679ba9846d133374e)

6 years agoinclude/packages-defaults.mk: Remove LARGEFILE option
Daniel Engberg [Fri, 21 Apr 2017 08:23:20 +0000 (10:23 +0200)]
include/packages-defaults.mk: Remove LARGEFILE option

Remove LARGEFILE option, support was removed back in 2011 (OpenWrt rev 25208).

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
(cherry picked from commit edda8ecd79b181e338e82331ecb45eaeff0f57af)

6 years agonetifd: return error status in reload_service
Hans Dedecker [Fri, 21 Apr 2017 09:44:57 +0000 (11:44 +0200)]
netifd: return error status in reload_service

Based on a patch by Alexandru Ardelean.
netifd ubus reload call returns the actual reload error status;
return error status as well in reload_service

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
(cherry picked from commit 4b195a611fe146969e813ce77ecf74ce5f9c176b)

6 years agogrub2: update to 2.02~rc2
Alif M. Ahmad [Wed, 22 Mar 2017 14:29:12 +0000 (21:29 +0700)]
grub2: update to 2.02~rc2

Update to version 2.02~rc2.

Signed-off-by: Alif M. Ahmad <alive4ever@live.com>
(cherry picked from commit ffd055d5bbc1a223c80eb5bbc03a6465d0ac0bb4)

6 years agobase-files: use restart if no reload hook for service
Alexandru Ardelean [Fri, 31 Mar 2017 06:44:19 +0000 (09:44 +0300)]
base-files: use restart if no reload hook for service

This was also working before, with a slightly
different semantic.

[ Original semantic ]
If no reload hooks was implemented, the default one would
kick in, it would return fail, and restart would happen.

This would happen also in the case where a reload hook
would be implemented, it would fail, and it would restart
the service.

[ New semantic ]
The default reload hook calls restart.
Services can implement their own reload.

If reload fails, then the '/etc/init.d/<service> reload'
would return a non-zero code, and the caller can choose
a way to handle this.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
(cherry picked from commit 6713694fe4377f0988e2d558a6cd9b05ca9b18f1)

6 years agoiproute2: add libgenl.h and ll_map.h to InstallDev section
Hans Dedecker [Sat, 8 Apr 2017 18:40:56 +0000 (20:40 +0200)]
iproute2: add libgenl.h and ll_map.h to InstallDev section

Commit f4e312ddf855375667f43c842c7187934b8aca92 adds libnetlink to
staging dir but did not add the header files libgenl.h and ll_map.h
which define functions belonging to libnetlink lib

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
(cherry picked from commit fc859fb44b4e7a38a1f1825b05b72b81e80f82a8)

6 years agobusybox: fix installation of cron and ntpd scripts in the default config
Felix Fietkau [Tue, 4 Apr 2017 13:05:11 +0000 (15:05 +0200)]
busybox: fix installation of cron and ntpd scripts in the default config

Fixes: 0b24850e9778 ("busybox: don't install NTP scripts if NTP isn't configured")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 3169a6a7ada17e2ea8ef4641edee68134c04b92b)

6 years agokernel: move initramfs's init script out of base-files
Rafał Miłecki [Mon, 27 Mar 2017 09:03:01 +0000 (11:03 +0200)]
kernel: move initramfs's init script out of base-files

Keeping it in base-files was resulting in adding it to the base-files
package. This file is meant to be included manually for initramfs
images only.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit f6433eede79db4f6276b68e815bb17a9364292c7)

6 years agotarget.mk: check that CPU_TYPE has known CPU_CFLAGS mapping
Philip Prindeville [Wed, 4 Jan 2017 01:15:15 +0000 (18:15 -0700)]
target.mk: check that CPU_TYPE has known CPU_CFLAGS mapping

If someone creates a target and indicates a CPU_TYPE, but there's
no corresponding support for that CPU_TYPE's flags in include/target.mk
then that should probably be indicated rather than silently ignored.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
(cherry picked from commit d3bc11857af788e185e8a3ece26ce40757cf3965)

6 years agoscripts/download.pl: fix error message on hash mismatch
Felix Fietkau [Tue, 4 Apr 2017 09:44:22 +0000 (11:44 +0200)]
scripts/download.pl: fix error message on hash mismatch

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 2fd15033783a9dfa84d2a43fb81ff222ab865407)

6 years agonetifd: fix fw3 warnings in dhcp script
Hans Dedecker [Sun, 2 Apr 2017 19:13:08 +0000 (21:13 +0200)]
netifd: fix fw3 warnings in dhcp script

Fix fw3 warnings in dhcp script in case fw3 is not enabled

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
(cherry picked from commit 20e40db524fb6c391f47619b18bf36bf7932478a)

6 years agobuild: allow specifying flow-control to grub on serial console
Philip Prindeville [Tue, 7 Feb 2017 03:33:36 +0000 (20:33 -0700)]
build: allow specifying flow-control to grub on serial console

On the more sophisticated (i.e. deeper FIFO) serial controllers,
flow-control might be needed to avoid dropping output.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
(cherry picked from commit 7fe5963be023fd59a11652ecfb065d3405a91c48)

6 years agokexec-tools: get kexec running on MUSL and x86 hardware
Philip Prindeville [Wed, 22 Mar 2017 03:55:23 +0000 (21:55 -0600)]
kexec-tools: get kexec running on MUSL and x86 hardware

Couple of important upstream patches (slated for 2.0.15) that
are necessary for kexec to run on MUSL and on x86 hardware.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
(cherry picked from commit dfacdc6a99757fcf7804b38784fc24f9fad30650)

6 years agobusybox: don't install NTP scripts if NTP isn't configured
Philip Prindeville [Mon, 6 Feb 2017 22:26:49 +0000 (15:26 -0700)]
busybox: don't install NTP scripts if NTP isn't configured

If you're using Chrony or NTPD you don't want the busybox NTP server
as well.  Make it's installation truly conditional.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name> [simplify]
(cherry picked from commit 0b24850e97789818fadcbce4b8de4abc429fd9f2)

6 years agoar8327: Add workarounds for AR8337 switch.
Vittorio Gambaletta [Sun, 26 Mar 2017 08:08:20 +0000 (10:08 +0200)]
ar8327: Add workarounds for AR8337 switch.

RGMII RX delay setting needs to be always specified for AR8337 to
avoid port 5 RX hang on high traffic / flood conditions.

Also, the HOL registers that set per-port and per-packet-priority
buffer sizes are updated with the reduced values suggested by the
QCA switch team.

Finally, AR8327 reserved register fixups are disabled for the AR8337.

This patch is adapted from the Code Aurora QSDK, but with magic
values mapped to proper defines.

Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net>
(cherry picked from commit 967b6be118e3217e8d6a28df9c615d3255e7b1ae)

6 years agobuild: fix STAMP_PREPARED with quilt
Felix Fietkau [Wed, 22 Mar 2017 19:16:15 +0000 (20:16 +0100)]
build: fix STAMP_PREPARED with quilt

quilt.mk needs to be included first, to ensure that STAMP_PREPARED does
not include the hash if quilt is used.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 89118da865a34ed9537a088196d81ca9e37cb983)

6 years agolantiq: remove lantiq_board_model, it is unused
Felix Fietkau [Fri, 17 Mar 2017 15:21:49 +0000 (16:21 +0100)]
lantiq: remove lantiq_board_model, it is unused

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit fd93f81fd85e964a697a5f550f7f162e3ec1ca05)

6 years agolantiq: remove lantiq_board_name, use the generic function instead
Felix Fietkau [Fri, 17 Mar 2017 15:21:30 +0000 (16:21 +0100)]
lantiq: remove lantiq_board_name, use the generic function instead

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 7e798dab56546d6f8e2fe0f913ff41e8f010af51)

6 years agolantiq: move lantiq_board_detect() to 03_preinit_board.sh
Felix Fietkau [Fri, 17 Mar 2017 15:17:42 +0000 (16:17 +0100)]
lantiq: move lantiq_board_detect() to 03_preinit_board.sh

It is only used there

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit aa95d6cd20f7e08420562b9747c197c2eac1d2e2)

6 years agobase-files: add generic board_name function to functions.sh
Felix Fietkau [Fri, 17 Mar 2017 15:12:27 +0000 (16:12 +0100)]
base-files: add generic board_name function to functions.sh

This will be used to replace all those nasty board specific scripts
that do basically the same thing

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit ec991424749b9eed37d01bc8adb9fb22fb0c98a7)

6 years agomac80211: Fix race condition leading to wifi interfaces not coming up at boot sometimes.
Vittorio Gambaletta [Tue, 14 Mar 2017 13:45:15 +0000 (14:45 +0100)]
mac80211: Fix race condition leading to wifi interfaces not coming up at boot sometimes.

In the drv_mac80211_setup function, mac80211_interface_cleanup
is called to ask the kernel to delete all existing interfaces
for the phy that is being configured via netlink.

Later in the first function, mac80211_prepare_vif is called to
set up the new interfaces as required.

But sometimes, when mac80211_prepare_vif (and so the relevant
`iw phy x interface add y` command) runs, the kernel might still
be cleaning up the old interface with the same ifname. It usually
takes very few time to do that; possibly a few milliseconds of
sleep in the script after detecting this error condition could be
enough, but the busybox sh does not support sub-second sleep
intervals.

When this happens, iw obviously fails to create the new interface;
and the following message is printed in the system log, followed by
subsequent failure messages from hostapd in case this would have been
an AP interface.

Tue Mar 14 04:21:57 2017 daemon.notice netifd: radio1 (2767): command failed: Too many open files in system (-23)

This was a long-standing issue existing since at least OpenWrt Backfire,
and today I finally managed to debug and (hopefully) solve it.
It was happening very few times on most devices; but it was happening
a lot more frequently on fast platforms with multiple radios, such as
the powerpc-based dual-ath9k-radio tl-wdr4900-v1.

Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net>
(cherry picked from commit 8301e613655c2d95fa5430a1a57d92d966fdc70b)

6 years agoscripts: only generate config from feature flag if fully match
Hauke Mehrtens [Tue, 14 Mar 2017 17:55:02 +0000 (18:55 +0100)]
scripts: only generate config from feature flag if fully match

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 <hauke.mehrtens@intel.com>
(cherry picked from commit d5a770f2c139a335e7602bec60dbeabd4add1e8b)

6 years agolzo: Update to 2.10
Daniel Engberg [Sun, 12 Mar 2017 18:43:50 +0000 (19:43 +0100)]
lzo: Update to 2.10

Update lzo to 2.10

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
(cherry picked from commit cc5721c3b8e399126a270fd46f5ac4dffc9b3319)

6 years agotools/coreutils: Update to 8.27
Daniel Engberg [Tue, 14 Mar 2017 06:53:38 +0000 (07:53 +0100)]
tools/coreutils: Update to 8.27

Update coreutils to 8.27

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
(cherry picked from commit 80246ce67ec2a30dda51e3e4e135eab2ff249ccb)

6 years agotools/libressl: Update to 2.5.1
Daniel Engberg [Tue, 14 Mar 2017 06:46:39 +0000 (07:46 +0100)]
tools/libressl: Update to 2.5.1

Update libressl to 2.5.1

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
(cherry picked from commit e45ee66149688747a337a470a19beb182ce4dd61)

6 years agotools/dosfstools: Update to 4.1
Daniel Engberg [Tue, 14 Mar 2017 07:23:10 +0000 (08:23 +0100)]
tools/dosfstools: Update to 4.1

Update to 4.1
Remove 0001-mkfs-Default-to-64-32-heads-sectors-for-targets-smal.patch
as it's included in upstream repo.
Refresh patch

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
(cherry picked from commit 49ded28027e5bba3ce623a8205aac0e8e70e250a)

6 years agotools/sed: Update to 4.4
Daniel Engberg [Wed, 15 Mar 2017 07:52:29 +0000 (08:52 +0100)]
tools/sed: Update to 4.4

Update sed to 4.4

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
(cherry picked from commit 65d2800bd648a73a6814de2d42c074db1d290521)

6 years agolldpd: bump to 0.9.6
Stijn Tintel [Wed, 15 Mar 2017 07:30:26 +0000 (08:30 +0100)]
lldpd: bump to 0.9.6

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
(cherry picked from commit b03b293079ef3e6cd5488ea7f58a43a1b545c3ef)

6 years agox86: image: drop duplicated copy of bzImage into vmlinuz
Rafał Miłecki [Sun, 12 Mar 2017 17:46:59 +0000 (18:46 +0100)]
x86: image: drop duplicated copy of bzImage into vmlinuz

It's already done once few lines earlier in the Image/Build/iso.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 425f958830428f989d7381ddda3a8f503e587c5c)

6 years agolibnl: Fix building with uClibc
Alexey Brodkin [Mon, 13 Mar 2017 09:47:45 +0000 (12:47 +0300)]
libnl: Fix building with uClibc

uClibc doesn't implement strerror_l() and thus libnl starting from
3.2.29 couldn't be compiled with it any longer, see
https://github.com/thom311/libnl/commit/6c2d111177e91184073c44f83d4a6182aaba06d7

To work-around that problem we'll just do a check on strerror_l()
availability during configuration and if it's not there just fall back
to locale-less strerror().

Patch for libnl is alreadfy merged upstream, see
https://github.com/thom311/libnl/commit/e15966ac7f3b43df2acf869f98089762807d0568
and once the next libnl release happens this one must be removed from
Lede/OpenWrt.

Signed-off-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Cc: Felix Fietkau <nbd@nbd.name>
Cc: John Crispin <john@phrozen.org>
Cc: Daniel Engberg <daniel.engberg.lists@pyret.net>
(cherry picked from commit 51d9ac61c711e7e00f8f2eaf5b3503238864508a)

6 years agotoolchain: add musl libc.so to external toolchain
Hauke Mehrtens [Tue, 14 Mar 2017 18:18:57 +0000 (19:18 +0100)]
toolchain: add musl libc.so to external toolchain

musl provides a /lib/libc.so file which should be integrated into the libc
package when the external toolchain with musl is used.

Signed-off-by: Hauke Mehrtens <hauke.mehrtens@intel.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit b6a8b43dd2771d4d237256417218bed862545ef4)

6 years agoiwcap: fix handling kill signal during dump
Felix Fietkau [Thu, 9 Mar 2017 07:53:52 +0000 (08:53 +0100)]
iwcap: fix handling kill signal during dump

Do not run another loop iteration before checking the stop flag

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 2f09a1e3c950c9b2993ae52d1b0e78317c344470)