openwrt/staging/lynxis.git
7 years agotools/expat: Update to 2.2.3
Daniel Engberg [Mon, 7 Aug 2017 03:00:46 +0000 (05:00 +0200)]
tools/expat: Update to 2.2.3

Update (lib)expat to 2.2.3
Remove poor entropy hack, 2.2.3 uses /dev/urandom in worst case

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
7 years agoutils/e2fsprogs: Update to 1.43.5
Daniel Engberg [Mon, 7 Aug 2017 02:44:27 +0000 (04:44 +0200)]
utils/e2fsprogs: Update to 1.43.5

Update e2fsprogs to 1.43.5

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
7 years agotools/e2fsprogs: Update to 1.43.5
Daniel Engberg [Mon, 7 Aug 2017 02:42:21 +0000 (04:42 +0200)]
tools/e2fsprogs: Update to 1.43.5

Update e2fsprogs to 1.43.5

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
7 years agolantiq: fix missing otg_cap on danube platform
Daniel Gonzalez Cabanelas [Sat, 29 Jul 2017 12:54:15 +0000 (14:54 +0200)]
lantiq: fix missing otg_cap on danube platform

USB doesn't work in some danube boards because otg_cap
is missing since previous changes made on the USB-dwc2
lantiq driver. Fix it.

Tested on the ARV7518PW router.

Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
7 years agobase-files: don't setup network in preinit if failsafe is disabled
Rafał Miłecki [Mon, 7 Aug 2017 09:09:33 +0000 (11:09 +0200)]
base-files: don't setup network in preinit if failsafe is disabled

With failsafe disabled there is no point in early network setup. We
don't send announcement over UDP and there is no way to ssh to the
device.

A side effect of this is avoiding a possibly incorrect network config
(only with failsafe disabled). This problem is related to possible
changes made by user in /etc/config/network.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years agoprocd: update to the latest git HEAD
Hans Dedecker [Tue, 8 Aug 2017 12:50:36 +0000 (14:50 +0200)]
procd: update to the latest git HEAD

a17e1e8 watchdog: fix inline watchdog_get_magicclose function prototype

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
7 years agoramips: ArcherC50v1: fix wlan2g MAC address
Thibaut VARENE [Fri, 4 Aug 2017 15:22:03 +0000 (17:22 +0200)]
ramips: ArcherC50v1: fix wlan2g MAC address

By default the wlan eprom contains the generic ralink MAC which is not
the vendor (TP-Link) one. Based on OFW bootlog, it appears that addresses
are decremented from the ethernet MAC.

This patch fixes the MAC address for wlan2g in line with OFW.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
7 years agolantiq: board.d: use auto xfer_mode as default
Martin Schiller [Thu, 3 Aug 2017 06:37:53 +0000 (08:37 +0200)]
lantiq: board.d: use auto xfer_mode as default

If xfer_mode is set to auto the vdsl_cpe_control daemon assumes that
ATM should be used for ADSL and PTM for VDSL.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
7 years agoltq-vdsl-app: add support for auto xfer_mode and auto line_mode
Martin Schiller [Thu, 3 Aug 2017 07:55:00 +0000 (09:55 +0200)]
ltq-vdsl-app: add support for auto xfer_mode and auto line_mode

If xfer_mode is set to auto the vdsl_cpe_control daemon assumes that
ATM should be used for ADSL and PTM for VDSL.

xfer_mode and line_mode can be set to fixed value independantly from
each other.

The syntax for the tc_layer argument of vdsl_cpe_control is as follow:

-T<TcADSL>:<TcCfgUsADSL>:<TcCfgDsADSL>_<TcVDSL>:<TcCfgUsVDSL>:<TcCfgDsVDSL>

where TcADSL and TcVDSL can be: 1=ATM, 2=PTM/EFM, 4=Auto TC-Layer

and TcCfgUsADSL, TcCfgUsVDSL, TcCfgDsADSL, TcCfgDsVDSL can be:
1=64/65-octet encapsulation supported
2=64/65-octet encapsulation with pre-emption
3=64/65-octet encapsulation with short packets

Default: In case of no '-T' option is given, ADSL will be configured
in ATM and VDSL in PTM/EFM: -T1:0x1:0x1_2:0x1:0x1

The '-M' argument of dsl_cpe_control defines the initial DSL mode
(NextMode) for ADSL/VDSL multimode handling.

Possible Values: 0=API-default, 1=ADSL, 2=VDSL

Default: In case of no '-M' option is given, '0' (API-default) will
be selected.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
7 years agoltq-vdsl-app: mask out ADSL bits when VDSL is requested
Martin Schiller [Thu, 3 Aug 2017 07:50:03 +0000 (09:50 +0200)]
ltq-vdsl-app: mask out ADSL bits when VDSL is requested

If the line_mode is fixed configured to vdsl, than only G.993 VDSL
should be used.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
7 years agoltq-vdsl-app: use notification based ATM/PTM driver load
Martin Schiller [Thu, 3 Aug 2017 07:44:21 +0000 (09:44 +0200)]
ltq-vdsl-app: use notification based ATM/PTM driver load

This patch removes the fixed atm/ptm driver loading and
switches to notification based driver loading.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
7 years agolantiq: ltq-atm/ltq-ptm: fix showtime handling on driver load
Martin Schiller [Thu, 29 Jun 2017 04:54:00 +0000 (06:54 +0200)]
lantiq: ltq-atm/ltq-ptm: fix showtime handling on driver load

This is needed to be able to load the ltq-atm/ltq-ptm driver
from a notify script during synchronization, because the line can
reach showtime state before the driver is fully loaded.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
7 years agolantiq: split up dsl_notify.sh into separate notification handlers
Martin Schiller [Thu, 29 Jun 2017 04:49:49 +0000 (06:49 +0200)]
lantiq: split up dsl_notify.sh into separate notification handlers

This makes it possible to simply add additional notification handlers
by putting new scripts in the /etc/hotplug.d/dsl directory.

the following Environment Variables are used:

(values marked with an * are only available when bonding support is
compiled in)

DSL_NOTIFICATION_TYPE with one of these values:
- DSL_STATUS
- DSL_INTERFACE_STATUS
- DSL_DATARATE_STATUS_US
- DSL_DATARATE_STATUS_DS

DSL_LINE_NUMBER=<0|1> *

If DSL_NOTIFICATION_TYPE == DSL_STATUS, these variables are set:

- DSL_XTU_STATUS=<ADSL|VDSL>
- DSL_TC_LAYER_STATUS=<ATM|EFM>
- DSL_EFM_TC_CONFIG_US=<NORMAL|PRE_EMPTION>
- DSL_EFM_TC_CONFIG_DS=<NORMAL>

If DSL_NOTIFICATION_TYPE == DSL_INTERFACE_STATUS, these variables are
set:

- DSL_INTERFACE_STATUS=<DOWN|READY|HANDSHAKE|TRAINING|UP>
- DSL_BONDING_STATUS=<INACTIVE|ACTIVE> *

If DSL_NOTIFICATION_TYPE == DSL_DATARATE_STATUS_US, these variables are
set:

- DSL_DATARATE_US_BC0=<Upstream data rate in bit/s for Channel 0>
- DSL_DATARATE_US_BC1=<Upstream data rate in bit/s for Channel 1> *

If DSL_NOTIFICATION_TYPE == DSL_DATARATE_STATUS_DS, these variables are
set:

- DSL_DATARATE_DS_BC0=<Downstream data rate in bit/s for Channel 0>
- DSL_DATARATE_DS_BC1=<Downstream data rate in bit/s for Channel 1> *

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
7 years agoltq-xdsl-app: drop esi call
Mathias Kresin [Thu, 3 Aug 2017 19:11:57 +0000 (21:11 +0200)]
ltq-xdsl-app: drop esi call

The esi call was added to workaround a race condition between applying
a configured mac address to the wan interface and starting the protocol
(handler) as it was observed in a DHCP over ATM bridge configuration.

Martin Schiller, TDT GmbH was so kind to test with their local
infrastructure if the race condition still exists. The provided package
dumps captured behind the DSLAM shows that it doesn't. It was most
likely fixed with adding carrier support to the lantiq ptm/atm driver.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agokernel: add missing patch
John Crispin [Sat, 5 Aug 2017 07:47:41 +0000 (09:47 +0200)]
kernel: add missing patch

This patch was accidentally dropped.

Signed-off-by: John Crispin <john@phrozen.org>
7 years agokernel: split patches folder up into backport, pending and hack folders
John Crispin [Sun, 25 Dec 2016 19:11:34 +0000 (20:11 +0100)]
kernel: split patches folder up into backport, pending and hack folders

* properly format/comment all patches
* merge debloat patches
* merge Kconfig patches
* merge swconfig patches
* merge hotplug patches
* drop 200-fix_localversion.patch - upstream
* drop 222-arm_zimage_none.patch - unused
* drop 252-mv_cesa_depends.patch - no longer required
* drop 410-mtd-move-forward-declaration-of-struct-mtd_info.patch - unused
* drop 661-fq_codel_keep_dropped_stats.patch - outdated
* drop 702-phy_add_aneg_done_function.patch - upstream
* drop 840-rtc7301.patch - unused
* drop 841-rtc_pt7c4338.patch - upstream
* drop 921-use_preinit_as_init.patch - unused
* drop spio-gpio-old and gpio-mmc - unused

Signed-off-by: John Crispin <john@phrozen.org>
7 years agoramips: fix cd-poll sd card remove randomly
Qin Wie [Tue, 1 Aug 2017 06:26:49 +0000 (14:26 +0800)]
ramips: fix cd-poll sd card remove randomly

Fix when add 'mediatek,cd-poll' to dts cause the sd card be removed randomly.
Special for the device without card-detect pin.

Signed-off-by: Qin Wie <me@vonger.cn>
7 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>
7 years agoodhcpd: update to latest git HEAD (FS#402, FS#524)
Hans Dedecker [Thu, 3 Aug 2017 19:20:47 +0000 (21:20 +0200)]
odhcpd: update to latest git HEAD (FS#402, FS#524)

296b4a0 dhcpv6: assign all viable DHCPv6 addresses by default (FS#402, FS#524)
f4d38e0 treewide: reflect managed mode is related to RA

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
7 years agoramips: move common parts into dtsi
Mathias Kresin [Sun, 30 Jul 2017 11:50:36 +0000 (13:50 +0200)]
ramips: move common parts into dtsi

Move the common parts of boards with multiple flash size variants into
dtsi files.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agoramips: update device tree source files
L. D. Pinney [Sat, 29 Jul 2017 02:14:07 +0000 (10:14 +0800)]
ramips: update device tree source files

Use the GPIO dt-bindings macros and add compatible strings in the
ramips device tree source files.

Signed-off-by: L. D. Pinney <ldpinney@gmail.com>
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agotools/firmware-utils: document reserved fields in mkchkimg
Thibaut VARENE [Sun, 30 Jul 2017 10:40:25 +0000 (12:40 +0200)]
tools/firmware-utils: document reserved fields in mkchkimg

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
7 years agoramips: Add support for Netgear EX3800
Thibaut VARENE [Sun, 30 Jul 2017 10:17:44 +0000 (12:17 +0200)]
ramips: Add support for Netgear EX3800

The Netgear EX3800 is essentially an EX3700 with a mains output socket.

Both devices use the exact same firmware image (original firmware is named
EX3700-EX3800-version.chk).

This patch adds suport by renaming the EX3700 device to EX3700/EX3800 and
updating the necessary glue.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
7 years agoramips: EX3700: rename factory.bin to factory.chk
Thibaut VARENE [Sun, 30 Jul 2017 10:02:55 +0000 (12:02 +0200)]
ramips: EX3700: rename factory.bin to factory.chk

The stock firmware upgrade interface requires the file to end with a .chk
extension.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
7 years agoramips: cleanup EX2700 and WN3000RPv3 LEDs
Thibaut VARENE [Sun, 30 Jul 2017 13:42:38 +0000 (15:42 +0200)]
ramips: cleanup EX2700 and WN3000RPv3 LEDs

This patch cleans up the WN3000RPv3 and EX2700 setup, bringing it in line
with other similar devices:

The power led is a bicolor one. The bootloader brings the red side on at
powerup.

Instead of blinking the red side in diag.sh and need to forcefully turn it off
in 01_leds, this patch simplifies the setup by relying on the default off state
of the gpio-led driver for the red side and blinking the green side as with
other devices.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
7 years agoramips: cleanup AsiaRF AWM002 eval board support
Mathias Kresin [Sun, 30 Jul 2017 09:08:03 +0000 (11:08 +0200)]
ramips: cleanup AsiaRF AWM002 eval board support

Cleanup the dtsi files and remove one layer of dtsi. Set the size of
the firmware partition to a value matching the flash size from the
board (variant) name.

Remove the usb led trigger. There is neither a default config for the
usb led trigger nor a LED for usb activity indication.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agoramips: drop AsiaRF AWM003 eval board
Mathias Kresin [Sun, 30 Jul 2017 09:16:09 +0000 (11:16 +0200)]
ramips: drop AsiaRF AWM003 eval board

Everything is identical to the AWM002 8m eval board. No need to
duplicate it once more.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agoramips: fix Omnima MiniEMBWiFi image
Mathias Kresin [Mon, 31 Jul 2017 18:21:12 +0000 (20:21 +0200)]
ramips: fix Omnima MiniEMBWiFi image

Reference the Omnima MiniEMBWiFi device tree source file in the image
build code. Otherwise the dts of the image processed before is used.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agoramips: build HuaWei HG255D image
Mathias Kresin [Mon, 31 Jul 2017 18:19:14 +0000 (20:19 +0200)]
ramips: build HuaWei HG255D image

The code to build an image was disabled some time ago for unknown
reasons albeit the image looks fine.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agoramips: drop Edimax BR-6425 support
Mathias Kresin [Mon, 31 Jul 2017 16:02:40 +0000 (18:02 +0200)]
ramips: drop Edimax BR-6425 support

Code to build an image for the Edimax BR-6425 never existed.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agoramips: add missing partitions
Mathias Kresin [Mon, 31 Jul 2017 16:00:35 +0000 (18:00 +0200)]
ramips: add missing partitions

The partitions were lost during migration to device tree.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agomediatek: move mt7623 support into a 32bit subtarget
John Crispin [Tue, 1 Aug 2017 06:36:49 +0000 (08:36 +0200)]
mediatek: move mt7623 support into a 32bit subtarget

this is in preparation for adding the new 64bit mt7622 support.

Signed-off-by: John Crispin <john@phrozen.org>
7 years agoramips: fix PCI init on MT7620 with Linux 4.9+
Ilya Katsnelson [Sun, 9 Jul 2017 08:24:58 +0000 (11:24 +0300)]
ramips: fix PCI init on MT7620 with Linux 4.9+

So, this is kind of complicated. This has been upstream for a while,
imported from OpenWRT/LEDE with some cleanups. LEDE ramips has stayed
on linux-4.4 this whole time, with the old(er) version of the patch
that had correct behavior[0], while upstream got changed[1].

When LEDE updated to kernel 4.9, the older version of the code from
the patch got replaced with the upstream version containing the bug.

The original behavior, however, seems to be correct here, as the
official programming guide[2] indicates that bit 31 (PDRV_SW_SET)
in register PPLL_CFG1 is reserved, but bit 23 (added as PPLL_LD)
is the PPLL lock state (which also happens to line up with the
error message).

The original confusion probably comes from the double definition
of PDRV_SW_SET[3, 4] in the upstream code, with one correct definition
(31) and one incorrect one (23).

I've also used the opportunity to clean up the error message a bit -
it's still not really helpful to anyone who doesn't already know what
the PPLL is, but at least it's slightly more readable now.

This will probably need to be upstreamed as well, since with the way
it's currently set up, it's unlikely PCI ever worked for anyone who's
running an upstream kernel on that SoC.

[0]: https://github.com/lede-project/source/blob/05d6e92594c507dcd1f4be6c1bcb2282fe1abe1f/target/linux/ramips/patches-4.4/0009-PCI-MIPS-adds-mt7620a-pcie-driver.patch#L259
[1]: https://github.com/torvalds/linux/blob/026d15f6b9878794fae1f794cae881ccd65052e5/arch/mips/pci/pci-mt7620.c#L246
[2]: http://www.anz.ru/files/mediatek/MT7620_ProgrammingGuide.pdf
[3]: https://github.com/torvalds/linux/blob/026d15f6b9878794fae1f794cae881ccd65052e5/arch/mips/pci/pci-mt7620.c#L36
[4]: https://github.com/torvalds/linux/blob/026d15f6b9878794fae1f794cae881ccd65052e5/arch/mips/pci/pci-mt7620.c#L39

Signed-off-by: Ilya Katsnelson <me@0upti.me>
7 years agoprocd: update to latest git HEAD
John Crispin [Mon, 31 Jul 2017 17:20:16 +0000 (19:20 +0200)]
procd: update to latest git HEAD

f062b30 procd: Do not leak pipe file descriptors to children

Signed-off-by: John Crispin <john@phrozen.org>
7 years agofstools: update to latest git HEAD
John Crispin [Mon, 31 Jul 2017 17:15:36 +0000 (19:15 +0200)]
fstools: update to latest git HEAD

8ab4fda fstools: add btrfs support

Signed-off-by: John Crispin <john@phrozen.org>
7 years agofirmware-utils: mktplinkfw2: respect -e option when reading fw info
Rafał Miłecki [Sun, 23 Jul 2017 20:19:21 +0000 (22:19 +0200)]
firmware-utils: mktplinkfw2: respect -e option when reading fw info

When -e option it specified a corresponding flag is set in the
custom_board. By using custom_board as fallback -e option gets respected
for unknown boards.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years agofirmware-utils: mktplinkfw2: fix info for images with LE kernel LA/EP
Rafał Miłecki [Sun, 23 Jul 2017 20:19:20 +0000 (22:19 +0200)]
firmware-utils: mktplinkfw2: fix info for images with LE kernel LA/EP

With this change endianness is also respected when reading firmware
info.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years agofirmware-utils: mktplinkfw2: replace "endian_swap" field with "flags"
Rafał Miłecki [Sun, 23 Jul 2017 20:19:19 +0000 (22:19 +0200)]
firmware-utils: mktplinkfw2: replace "endian_swap" field with "flags"

This will allow adding more similar tricks needed by other hardware.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years agoramips: Archer C50v1: fix power led
Thibaut VARENE [Sat, 29 Jul 2017 09:32:44 +0000 (11:32 +0200)]
ramips: Archer C50v1: fix power led

01_leds had a workaround for the power led to compensate for the
inverted GPIO state. This patch was missing from my previous commit.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
[add the power led default-state which was omitted in the last commit
by me]
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agoramips: Archer C50v1: fix switch port numbering
Thibaut VARENE [Fri, 28 Jul 2017 20:36:52 +0000 (22:36 +0200)]
ramips: Archer C50v1: fix switch port numbering

Luci shows switch ports in wrong order on that device.
This patch fixes switch port numbering and matches them to the device
silkscreen.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
7 years agoramips: Archer C50v1: fix LEDs active levels
Thibaut VARENE [Fri, 28 Jul 2017 21:26:40 +0000 (23:26 +0200)]
ramips: Archer C50v1: fix LEDs active levels

All LEDs GPIOs are active low on this device.

WAN and POWER states were inverted. Add default state for power.

Tested on Archer C50v1.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
7 years agoramips: fix Mercury MAC1200R v2.0 board name
Mathias Kresin [Fri, 28 Jul 2017 17:22:55 +0000 (19:22 +0200)]
ramips: fix Mercury MAC1200R v2.0 board name

With d2b6bf141662 ("ramips: fix image validation errors") the board
name was changed to fix an image validation error. But this change
wasn't applied to all other files using the board name, which broke
sysupgrade.

Revert this change and use the former board name in the metadata
instead.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agoramips: mt7621: add compatible strings
L. D. Pinney [Thu, 27 Jul 2017 16:49:06 +0000 (00:49 +0800)]
ramips: mt7621: add compatible strings

Add compatible strings to all mt7621 based device tree source files to
fix formal issues.

Signed-off-by: L. D. Pinney <ldpinney@gmail.com>
7 years agobrcm63xx: add NULL clock fix send upstream
Mathias Kresin [Fri, 28 Jul 2017 18:09:53 +0000 (20:09 +0200)]
brcm63xx: add NULL clock fix send upstream

Make the behaviour of clk_get_rate consistent with common clk's
clk_get_rate by accepting NULL clocks as parameter. Some device
drivers rely on this, and will cause an OOPS otherwise.

Fixes: FS#735
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agoramips: add NULL clock fix send upstream
Mathias Kresin [Fri, 28 Jul 2017 17:38:04 +0000 (19:38 +0200)]
ramips: add NULL clock fix send upstream

Make the behaviour of clk_get_rate consistent with common clk's
clk_get_rate by accepting NULL clocks as parameter. Some device
drivers rely on this, and will cause an OOPS otherwise.

Fixes: FS#735
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agoar7: add NULL clock fix send upstream
Mathias Kresin [Fri, 28 Jul 2017 17:05:33 +0000 (19:05 +0200)]
ar7: add NULL clock fix send upstream

Make the behaviour of clk_get_rate consistent with common clk's
clk_get_rate by accepting NULL clocks as parameter. Some device
drivers rely on this, and will cause an OOPS otherwise.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agoopenssl: update to version 1.0.2l
Lucian Cristian [Mon, 24 Jul 2017 23:17:56 +0000 (02:17 +0300)]
openssl: update to version 1.0.2l

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
7 years agotcpdump: Update to 4.9.1
Daniel Engberg [Mon, 24 Jul 2017 22:10:58 +0000 (00:10 +0200)]
tcpdump: Update to 4.9.1

Update tcpdump to 4.9.1

Fixes:
 * CVE-2017-11108: Fix bounds checking for STP.

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
7 years agokernel: update kernel 4.4 to version 4.4.79
Hauke Mehrtens [Sun, 23 Jul 2017 12:25:40 +0000 (14:25 +0200)]
kernel: update kernel 4.4 to version 4.4.79

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years agokernel: update kernel 4.9 to version 4.9.40
Hauke Mehrtens [Sun, 23 Jul 2017 11:40:40 +0000 (13:40 +0200)]
kernel: update kernel 4.9 to version 4.9.40

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years agoopkg: bump to version 2017-07-28
Jo-Philipp Wich [Fri, 28 Jul 2017 11:18:32 +0000 (13:18 +0200)]
opkg: bump to version 2017-07-28

Commits since last 2017-07-11:

4bd8601 pkg_parse: fix segfault when parsing descriptions with leading newlines

Fixes FS#933.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years agobrcm63xx: DTS: fix AV4202N flash layout
Paul Wassi [Sun, 23 Jul 2017 10:07:58 +0000 (12:07 +0200)]
brcm63xx: DTS: fix AV4202N flash layout

Fix incorrect offset and size of linux partition.

Fixes: 97b36aca09da ("brcm63xx: add pflash for remaining pflash equipped boards")
Signed-off-by: Paul Wassi <p.wassi@gmx.at>
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years agoramips: drop stray kernel 4.4 configs
Mathias Kresin [Tue, 25 Jul 2017 17:37:08 +0000 (19:37 +0200)]
ramips: drop stray kernel 4.4 configs

The kernel 4.4 patches where already removed with the bump to 4.9. Drop
the the subtarget configs as well.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agoramips: add support for Loewe WMDR-143N
Oliver Fleischmann [Thu, 20 Jul 2017 19:02:33 +0000 (21:02 +0200)]
ramips: add support for Loewe WMDR-143N

The WMDR-143N is a small module originally used as a Wifi client
in some Loewe smart TV sets. It is sold cheaply at german surplus
shops. The module contains a RT3662 SOC.

Specifications:

- 500 MHz CPU Clock
- 1x 10/100Mbps Ethernet (pin header)
- 32 MB of RAM
- 8 MB of FLASH
- 2T3R 2.4/5 GHz (SOC internal)
- 3 Antennas on PCB
- UART pads on PCB (J3: 1 = +3.3V, 2 = RX, 3 = TX, 4 = GND), TX
  and RX are 3,3V only! The square hole is pin 1
- Power supply pads on PCB (J6: 1 and 2 = +5V, 3 and 4 = GND)
  The square hole is pin 1

The original firmware has two identical kernel/rootfs images and
two "Factory" calibration data blocks in flash. The LEDE image
leaves only the first "Factory" block in place and uses both
"Kernel" blocks and the redundant "Factory" block together to gain
enough space for the jffs2 partition.

Flash instructions:

You need UART and Ethernet connections to flash the board. Use
the LEDE "sysupgrade.bin" image with tftp.

Apply power to the board and in the first 5 seconds, hit 2 to
select TFTP upload. The bootloader asks for board- and server IP
addresses and filename.

Alternate method: With the vendor firmware running, assign an IP
address to the ethernet port, tftp the firmware image to
/tmp and write to mtd4 ("KernelA").

Signed-off-by: Oliver Fleischmann <ogf@bnv-bamberg.de>
[remove pinctrl node from dts, no pin is used as GPIO]
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agoramips: pinctrl: return proper error if pinctrl0 is empty
Mathias Kresin [Tue, 25 Jul 2017 18:23:28 +0000 (20:23 +0200)]
ramips: pinctrl: return proper error if pinctrl0 is empty

Children of the pinctrl0 node are optional. Return EINVAL (=missing)
instead of 0. Fixes a hang if the pinctrl0 has no children.

Signed-off-by: Mathias Kresin <dev@kresin.me>
Acked-by: John Crispin <john@phrozen.org>
7 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>
7 years agoramips: refresh the rcu_sched patch and remove debug info
John Crispin [Wed, 26 Jul 2017 07:32:22 +0000 (09:32 +0200)]
ramips: refresh the rcu_sched patch and remove debug info

Signed-off-by: John Crispin <john@phrozen.org>
7 years agoralink: fix rcu_sched stalls on mt7621
John Crispin [Tue, 25 Jul 2017 12:46:01 +0000 (14:46 +0200)]
ralink: fix rcu_sched stalls on mt7621

there were 2 bugs
*) core1 came up with a bad bogo mips, looks like the clock needed time to stabilize
*) HPT frequency was not set making r4k timers not come up properly

Signed-off-by: John Crispin <john@phrozen.org>
7 years agoramips: add support for the GnuBee Personal Cloud One
L. D. Pinney [Sat, 22 Jul 2017 01:15:56 +0000 (09:15 +0800)]
ramips: add support for the GnuBee Personal Cloud One

    The GnuBee Personal Cloud One crowdfunded on https://www.crowdsupply.com
    It is a low-cost, low-power, network-attached storage device.

    Specifications:

    - SoC: MediaTek MT7621AT
    - RAM: DDR3 512 MB
    - Flash: 32 MB
    - Six SATA ports for 2.5" Drives
    - One micro SDcard
    - One USB 3.0
    - Two USB 2.0
    - Gigabit Ethernet: 1 x WAN and 1 x LAN
    - UART 3.5mm Audio Jack or 3 pin header - 57600 8N1
    - Four GPIOs available on a pin header

    Flash instructions:

    The GnuBee Personal Cloud One ships with libreCMC installed.
    libreCMC is a Free Software Foundation approved fork of LEDE/OpenWrt.
    As such one can upgrade using the webinterface or sysupgrade.

    Das U-Boot has multiple options for recovery or updates including :

    - USB
    - http
    - tftp

Signed-off-by: L. D. Pinney <ldpinney@gmail.com>
[use switchdev led trigger, all interfaces are in vlan1; rename leds
according to board.d setting; remove ge2 group from the pinmux, this
group doesn't exist in the driver]
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agoramips: DIR-860L-B1 fix switch port numbering
Thibaut VARENE [Tue, 25 Jul 2017 10:29:14 +0000 (12:29 +0200)]
ramips: DIR-860L-B1 fix switch port numbering

Luci shows switch ports in inverted order on that device.
This patch fixes switch port numbering and matches them to the device
silkscreen.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
7 years agokernel: netfilter: fix nf-nathelper(-extra) description
Uwe Arnold [Thu, 20 Jul 2017 18:04:26 +0000 (20:04 +0200)]
kernel: netfilter: fix nf-nathelper(-extra) description

The tftp and irc netfilter modules are provided by nf-nathelper-extra
and not by nf-nathelper.

Signed-off-by: Uwe Arnold <donvipre@gmail.com>
[move the irc module as well]
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agoramips: fix wps button gpio for DWR-512
Giuseppe Lippolis [Tue, 18 Jul 2017 20:55:53 +0000 (22:55 +0200)]
ramips: fix wps button gpio for DWR-512

The WPS button is at GPIO#7.

Signed-off-by: Giuseppe Lippolis <giu.lippolis@gmail.com>
7 years agoramips: DTS: VoCore2 improvements/fixes
Paul Wassi [Sat, 22 Jul 2017 09:15:55 +0000 (11:15 +0200)]
ramips: DTS: VoCore2 improvements/fixes

The VoCore2 features 128MB of RAM, therefore set
memory in DTS to 128*1024*1024 = 0x8000000
The board's LED is connected to GND, set it to
ACTIVE_HIGH here.
Make serial console working again on kernel 4.9 by
change of pinmux configuration.

Signed-off-by: Paul Wassi <p.wassi@gmx.at>
7 years agoramips: add support for TP-Link RE350
Alex Maclean [Sun, 23 Jul 2017 19:06:44 +0000 (20:06 +0100)]
ramips: add support for TP-Link RE350

The TP-Link RE350 is a wall-wart AC1200 range extender/access point with
a single gigabit ethernet port and two non-detachable antennas, based on
the MT7621A SoC with MT7603E and MT7612E radios.

Firmware wise it is very similar to the QCA based RE450.

SoC: MediaTek MT7621A (880MHz)
Flash: 8MiB (Winbond W25Q64)
RAM:   64MiB (DDR2)
Ethernet: 1x 1Gbit
Wireless: 2T2R 2.4Ghz (MT7603E) and 5GHz (MT7612E)
LEDs: Power, 2.4G, 5G (blue), WPS (red and blue), ethernet link/act
(green)
Buttons: On/off, LED, reset, WPS

Serial header at J1, 57600 8n1:
Pin 1 TX
Pin 2 RX
Pin 3 GND
Pin 4 3.3V

Factory image can be uploaded directly through the stock UI.

Signed-off-by: Alex Maclean <monkeh@monkeh.net>
7 years agofirmware-utils: tplink-safeloader: add support for TP-Link RE350
Alex Maclean [Mon, 3 Jul 2017 20:05:44 +0000 (21:05 +0100)]
firmware-utils: tplink-safeloader: add support for TP-Link RE350

Signed-off-by: Alex Maclean <monkeh@monkeh.net>
7 years agoath9k: fix regression in multicast buffering fix
Felix Fietkau [Tue, 25 Jul 2017 17:47:48 +0000 (19:47 +0200)]
ath9k: fix regression in multicast buffering fix

Update the more data flag on the last frame, but tx from the first frame
on.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agoath9k: fix typo in US tx power reduction fix
Felix Fietkau [Tue, 25 Jul 2017 07:13:24 +0000 (09:13 +0200)]
ath9k: fix typo in US tx power reduction fix

Use max_t instead of min_t to prevent the value from going below zero

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 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>
7 years agoath9k: fix more-data flag for buffered multicast packets
Felix Fietkau [Mon, 24 Jul 2017 08:48:26 +0000 (10:48 +0200)]
ath9k: fix more-data flag for buffered multicast packets

The flag needs to be cleared for the last packet in the list, not the
first one. Fixes some issues with multicast packet loss for powersave
clients connected to an ath9k AP.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agoath9k: adjust tx power reduction for US regulatory domain
Felix Fietkau [Wed, 19 Jul 2017 06:54:53 +0000 (08:54 +0200)]
ath9k: adjust tx power reduction for US regulatory domain

FCC regulatory rules allow for up to 3 dBi antenna gain. Account for
this in the EEPROM based tx power reduction code.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agofirmware-utils: drop mktplinkfw-kernel tool
Piotr Dymacz [Thu, 6 Jul 2017 16:26:23 +0000 (18:26 +0200)]
firmware-utils: drop mktplinkfw-kernel tool

As we can now use combined mode in "mktplinkfw" tool to generate the
same header/image, this tool is no longer needed.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years agoar71xx: image: use tplink-v1-header in place of mktplinkfw-kernel
Piotr Dymacz [Thu, 6 Jul 2017 16:24:37 +0000 (18:24 +0200)]
ar71xx: image: use tplink-v1-header in place of mktplinkfw-kernel

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years agobuild: move mktplinkfw-combined command to image-commands.mk
Piotr Dymacz [Thu, 6 Jul 2017 16:10:22 +0000 (18:10 +0200)]
build: move mktplinkfw-combined command to image-commands.mk

We will need "mktplinkfw-combined" command also in the "ramips" target
for new MediaTek based TP-Link devices, with "safeloader" image type.

Also, rename the command to "tplink-v1-header", use "VERSION_DIST"
variable instead of "OpenWrt" and allow passing additional parameters.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years agofirmware-utils: mktplinkfw: rework combined image option
Piotr Dymacz [Thu, 6 Jul 2017 14:34:47 +0000 (16:34 +0200)]
firmware-utils: mktplinkfw: rework combined image option

We use combined option in "mktplinkfw" tool for generating initramfs
kernel images and header for kernel inside "safeloader" image type (in
fact, only for TL-WR1043ND v4 at this moment).

There is also "mktplinkfw-kernel" tool, a stripped-down version, used
only for generating "simple" header, for safeloader image types.

This changes how "mktplinkfw" handles combined images (which then will
allow us to drop the stripped-down version of the tool):

- drop "ignore size" command line option (it was used only for combined
  images anyway)
- don't require "flash layout id" for combined images (we don't need and
  shouldn't limit size of the initramfs kernel and for kernels inside
  safeloader images, the "tplink-safeloader" tool does the size check)
- require kernel address and entry point in command line parameters for
  combined images (consequence of previous point)
- don't include md5 sum and firmware length values in header (they are
  needed only for update from vendor GUI and are ingored in case of
  initramfs and "tplink-safeloader" images)
- drop "fake" flash layout for TL-WR1043ND v4 as it's no longer needed

Also, adjust "mktplinkfw-combined" command in ar71xx/image/tp-link.mk to
match introduced changes in "mktplinkfw" tool.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years agouboot-envtools: add support for ALFA Network AP121F
Piotr Dymacz [Fri, 31 Mar 2017 11:43:06 +0000 (13:43 +0200)]
uboot-envtools: add support for ALFA Network AP121F

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years agoar71xx: add support for ALFA Network AP121F
Piotr Dymacz [Fri, 31 Mar 2017 11:37:31 +0000 (13:37 +0200)]
ar71xx: add support for ALFA Network AP121F

ALFA Network AP121F is a pocket-size router dedicated for VPN/TOR users.
Device is based on Atheros AR9331 WiSoC and is running a custom version
(updated from OpenWrt CC to LEDE 17.01 release) of NetAidKit firmware.

Specification:

- 400/400/200 MHz (CPU/DDR/AHB)
- 64 MB of RAM (DDR1)
- 16 MB of FLASH (SPI NOR)
- 1x 10/100 Mbps Ethernet
- 1T1R 2.4 GHz
- 1x microSD (optional, on separate PCB)
- 3x LED, 1x button, 1x switch
- UART header on PCB

Flash instruction (under U-Boot web recovery mode):

1. Configure PC with static IP 192.168.1.2/24.
2. Connect PC with RJ45 port, press the reset button, power up device,
   wait for first blink of all LEDs (indicates network setup), then keep
   button for 3 following blinks and release it.
3. Open 192.168.1.1 address in your browser and upload sysupgrade image.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years agofirmware-utils: tplink-safeloader: add support for TL-WR902AC v1 US
Piotr Dymacz [Wed, 19 Jul 2017 20:12:07 +0000 (22:12 +0200)]
firmware-utils: tplink-safeloader: add support for TL-WR902AC v1 US

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 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>
7 years agomwlwifi: update to version 10.3.4.0 / 2017-07-13
Jo-Philipp Wich [Sat, 22 Jul 2017 14:19:00 +0000 (16:19 +0200)]
mwlwifi: update to version 10.3.4.0 / 2017-07-13

Ref: https://github.com/lede-project/source/pull/1217
Reported-by: Kabuli Chana <newtownBuild@gmail.com>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years agonetifd: update to git HEAD
Stijn Tintel [Fri, 21 Jul 2017 19:59:16 +0000 (21:59 +0200)]
netifd: update to git HEAD

d397e8c netifd: Fix printf calls + function declarations.
34afb76 system-linux: fix GRE ikey/okey endianness

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
7 years agoRevert "kernel: do not try to probe builtin modules on empty kmod package install"
Jo-Philipp Wich [Fri, 21 Jul 2017 16:53:07 +0000 (18:53 +0200)]
Revert "kernel: do not try to probe builtin modules on empty kmod package install"

This change currently causes some issues with loading out of tree kernel modules
so revert that commit for now.

Reverts commit 34c01e68b5d6b06ce3794ef0e2b06e81ec3ce8ca. Fixes FS#919.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years agomt76: update to the latest version, fixes stability issues
Felix Fietkau [Fri, 21 Jul 2017 16:53:32 +0000 (18:53 +0200)]
mt76: update to the latest version, fixes stability issues

8a649c3 mt7603: mac: code optimization
8dee788 mt7603: mac: stop netdev queues during watchdog reset
3c4c9a6 tx: move state check in mt76_txq_send_burst()

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agoipset: split libipset as a subpackage
Alexandru Ardelean [Tue, 20 Jun 2017 12:18:11 +0000 (15:18 +0300)]
ipset: split libipset as a subpackage

Intent is to link against it, and have the option to
not install the ipset utility (if needed).

One example/use-case is keepalived (from package)
feeds, where it would be nice to just depend on a
`libipset` (sub)package.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
7 years agoag71xx: add support for port mirroring
Milan Krstić [Wed, 26 Apr 2017 19:52:44 +0000 (21:52 +0200)]
ag71xx: add support for port mirroring

This exposes hardware port mirroring in ag71xx driver (e.g. TL-WR841ND) via
swconfig API.

Signed-off-by: Milan Krstić <milan.krstic@gmail.com>
7 years agodnsmasq: introduce config support for forced DHCP options
Jo-Philipp Wich [Wed, 21 Jun 2017 14:48:41 +0000 (16:48 +0200)]
dnsmasq: introduce config support for forced DHCP options

Introduce a new UCI list setting `list dhcp_option_force` which is available
in sections of type `dnsmasq` and `dhcp`.

The `dhcp_option_force` setting has the same semantics as `dhcp_option` but
generates `dhcp-option-force` directives instead of `dhcp-option` ones in
emitted native configuration.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 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>
7 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>
7 years agobrcm47xx: fix switch port mapping on Asus RT-N12 and RT-N16 models
Jo-Philipp Wich [Wed, 19 Jul 2017 08:39:10 +0000 (10:39 +0200)]
brcm47xx: fix switch port mapping on Asus RT-N12 and RT-N16 models

On Asus RT-N12 and RT-N16 models, the WAN and LAN4 ports are swapped in the
initial switch configuration since the presets present in nvram appear to be
wrong.

Add special casing for these models to detect_by_model() in order to ensure
a proper switch configuration.

Fixes FS#502.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years agobase-files: upgrade: don't loop forever trying to kill processes
Matthias Schiffer [Wed, 12 Jul 2017 22:19:32 +0000 (00:19 +0200)]
base-files: upgrade: don't loop forever trying to kill processes

When processes don't die on SIGKILL (usually because of kernel bugs), it's
better to give up instead of looping forever.

upgraded will trigger a reboot in this case (and if this fails, a hardware
watchdog will eventually time out and reset the system, if present).

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years agoprocd: update to latest version
Matthias Schiffer [Wed, 12 Jul 2017 22:18:50 +0000 (00:18 +0200)]
procd: update to latest version

17026f4 system: return ubus error when sysupgrade_exec_upgraded() has failed
13f252f upgraded: Check chroot() return value
85ccb95 init: Check chroot return value in sysupgrade_exec_upgraded()
76dcbee upgraded: improve error handling
d749b2a upgraded: register stage2 process in uloop as intended

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years agoar71xx: use the RB912UAG-{2, 5}HPnD Power LED for diag
Sergey Ryazanov [Fri, 14 Jul 2017 08:59:16 +0000 (11:59 +0300)]
ar71xx: use the RB912UAG-{2, 5}HPnD Power LED for diag

The Power LED of RB912UAG-{2,5}HPnD boards can be controlled by sofware,
so use it for diag purposes and make the User LED free for other tasks.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
7 years agoar71xx: keep the RouterBOARD Power LED in On state
Sergey Ryazanov [Fri, 14 Jul 2017 08:58:54 +0000 (11:58 +0300)]
ar71xx: keep the RouterBOARD Power LED in On state

It is quite unexpected behaviour when the Power LED switches off as soon
as the kernel starts booting. So set the default state to 'Keep' for
the Power LEDs of all RouterBOARDs (e.g. RB91x, SXT Lite series, etc.).

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
[switch the default state to keep instead of on]
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agoramips: add support for Phicomm K2P
Chuanhong Guo [Tue, 18 Jul 2017 05:02:51 +0000 (13:02 +0800)]
ramips: add support for Phicomm K2P

It uses one MT7615D radio chip with DBDC mode enabled. This mode allows
this single chip act as an 2x2 11n radio and an 2x2 11ac radio at the
same time. However mt76 doesn't  support it currently so there is no
wireless available.

Specification:
- SoC: MediaTek MT7621AT
- Flash: 16 MB
- RAM: 128 MB
- Ethernet: 1 x WAN (10/100/1000Mbps) and 4 x LAN (10/100/1000 Mbps)
- Wireless radio: MT7615D on PCIE0
- UART: 1 x UART on PCB - 57600 8N1

Issue:
- Wireless radio doesn't work due to the lack of driver.

Flash instruction:
Using UART:
1. Configure PC with a static IP address and setup an TFTP server.
2. Put the firmware into the tftp directory.
3. Connect the UART line as described on the PCB.
4. Power up the device and press 2,then follow the instruction to
   set device and tftp server IP address and input the firmware
   file name.U-boot will then load the firmware and write it into
   the flash.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
7 years agolantiq: fix sleep with spinlock held in xrx200 network driver
Andrea Merello [Sat, 8 Jul 2017 08:11:11 +0000 (10:11 +0200)]
lantiq: fix sleep with spinlock held in xrx200 network driver

In the xrx200_close() function we call napi_disable(), that could
sleep, with priv->hw->chan[i].lock held. This could lead to deadlock
and causes the kernel to complain.

Look at the code I couldn't convince myself about why we
need to protect that specific code part with the lock. IMHO there
seems no reason to protect the refcount variables, because AFAIK
ndo_close() and ndo_open() callbacks are already called with a
semaphore held. Neither I could figure out why napi_disable() have to
be called with that lock held. The only remaining code part for
which I could guess the lock is useful for is ltq_dma_close()
function call.

This patch reduces the lock to the said function call, avoiding the
sleep-with-spinlock-held situation

Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
[fold into 0025-NET-MIPS-lantiq-adds-xrx200-net.patch, backport to
kernel 4.4]
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agokernel: do not try to probe builtin modules on empty kmod package install
Jonas Gorski [Sun, 18 Jun 2017 15:40:01 +0000 (17:40 +0200)]
kernel: do not try to probe builtin modules on empty kmod package install

Builtin modules are always present, and trying to load them will cause
modprobe to spew errors when installing the empty kmod packages.

Fix this by never generating any postinst module install instructions
for builtin modules.

Fixes #842.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years agouml: Backport upstream fix to build against static libpthread
Florian Fainelli [Tue, 18 Jul 2017 21:52:51 +0000 (14:52 -0700)]
uml: Backport upstream fix to build against static libpthread

Backport upstream commit f44f1e7da7c8e3f4575d5d61c4df978496903fcc ("um:
Avoid longjmp/setjmp symbol clashes with libpthread.a") to fix build
issues on hosts that only have a static libpthread.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years agotoolchain/arc: update to the most recent release arc-2017.03
Evgeniy Didin [Wed, 12 Jul 2017 15:00:31 +0000 (18:00 +0300)]
toolchain/arc: update to the most recent release arc-2017.03

arc-2017.03 is the most recent release toolchain for ARC cores
and it is based on upstream Binutils 2.28 and GCC 6.3.0

Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
Cc: Alexey Brodkin <abrodkin@synopsys.com>
Cc: John Crispin <john@phrozen.org>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
7 years agodnsmasq: backport remove ping check of configured dhcp address
Hans Dedecker [Tue, 18 Jul 2017 20:55:29 +0000 (22:55 +0200)]
dnsmasq: backport remove ping check of configured dhcp address

Remove ping check in DHCPDISCOVER case as too many buggy clients leave
an interface in configured state causing the ping check to fail.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
7 years agotools: expat: fix build on older host systems
Jo-Philipp Wich [Tue, 18 Jul 2017 20:50:11 +0000 (22:50 +0200)]
tools: expat: fix build on older host systems

Expat release 2.2.2 requires support for either syscall(SYS_getrandom) which
is available on Linux 3.17 or support for getrandom() which is only available
in glibc 2.25 or later.

Since some of our builders still run on Linux 3.16, we need to forcibly
disable the use of getrandom() for the host builds.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years agotools/expat: Update host version to 2.2.2
Ted Hess [Mon, 17 Jul 2017 20:42:29 +0000 (16:42 -0400)]
tools/expat: Update host version to 2.2.2

Ref: CVE-2017-9233, CVE-2016-9063

Signed-off-by: Ted Hess <thess@kitschensync.net>