Commit Graph

17661 Commits

Author SHA1 Message Date
Felix Fietkau 60f8d388c6 kernel: merge a pending fix for HFSC warnings/slowdowns (fixes FS#1136)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2018-03-11 09:30:28 +01:00
Matthias Schiffer 9bdea6a296
generic: revert broken LED core patch
At least on some devices, LEDs don't work anymore since kernel 4.4.120.
Revert the broken change.

See also: https://www.spinics.net/lists/stable/msg223656.html

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2018-03-08 22:23:57 +01:00
Stijn Segers 2ae9ebf374 kernel: bump 4.4 to 4.4.120 for 17.01
Bump the 4.4 kernel for the 17.01 release to 4.4.120. Refresh patches.

Compile-tested: ar71xx, ramips/mt7621, x86/64
Run-tested: ar71xx, x86/64

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
2018-03-04 20:36:43 +01:00
Zoltan HERPAI 571d3def6b x86: add preinit hook to reload microcode
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2018-03-04 17:37:15 +01:00
Zoltan HERPAI f7a6b6724a x86: enable microcode loading for Intel and AMD
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2018-03-04 17:37:15 +01:00
Matteo Scordino 92ea65b36a sunxi: disable LPAE to allow kernel to run on A13
Fixes issue FS#1355.
LPAE extensions are enabled, but the A13 does not support them.
The result is the boot process stopping at "Starting kernel ..."

Fixes: 468735c3a2 ("target: sunxi: enable kvm support")
Signed-off-by: Matteo Scordino <matteo.scordino@gmail.com>
2018-02-27 19:38:12 +01:00
Rafał Miłecki 7dcbe0e22d bcm53xx: fix fallback code for picking status LED
Looking for a wrong LED file name was stopping this code from find any
LED. This affects devices with only a red/amber power LED.

Fixes: 3aaee1ba02 ("bcm53xx: failsafe support")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2018-02-27 17:01:48 +01:00
Stijn Segers b934aa2f21 kernel: update 17.01 kernel to 4.4.116
This bumps the 4.4. kernel in LEDE 17.01 to 4.4.116.
More Meltdown & Spectre mitigation.

* Refresh patches.
* Refresh x86/config for RETPOLINE.
* Deleted 8049-PCI-layerscape-Add-fsl-ls2085a-pcie-compatible-ID.patch (accepted upstream)
* Deleted 8050-PCI-layerscape-Fix-MSG-TLP-drop-setting.patch (accepted upstream)
* 650-pppoe_header_pad.patch does not apply anymore (code was replaced).

Bumps from 4.4.113 to 4.4.115 were handled by Kevin Darbyshire-Bryant.

Compile-tested on: ar71xx, ramips/mt7621, x86/64
Run-tested on: ar71xx, ramips/mt7621, x86/64

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
2018-02-20 08:34:14 +01:00
Koen Vandeputte 31ae7381b8 kernel: refresh patches
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2018-02-18 09:34:32 +01:00
Koen Vandeputte 3b227103e6 kernel: backport raw-ip mode for newer QMI LTE modems
Backport support for raw-ip mode including all known fixes afterwards.

Newer LTE modems only tend to support this mode, which was only
introduced in kernel 4.5.

Also backport support for the Quectel EC2x LTE modem series which is
a very popular device.

No custom changes were needed in order to apply these patches.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2018-02-18 09:34:32 +01:00
Jo-Philipp Wich 623cdc4ffe ramips: backport mt7530/762x switch fixes
dc7a1e8555 ("ramips: fix reporting effective VLAN ID on MT7621 switches")
341b1427fc ("ramips: properly map pvid for vlans with remapped vid on mt7530/762x switches")
bb4002c79d ("ramips: don't clobber vlans with remapped vid on mt7530/762x switches")

Fixes FS#991, FS#1147, FS#1341

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-02-15 10:48:02 +01:00
David Bauer 2e26bdfeca
ar71xx: remove bs-partition ro-flag for UniFi AC
This removes the read-only flag from the bs (bootselect) partition
on UniFi AC devices. This allows to correct the indicator from which
partition the device is booting its kernel from.

See also:
 - https://github.com/freifunk-gluon/gluon/issues/1301
 - https://bugs.lede-project.org/index.php?do=details&task_id=662

Signed-off-by: David Bauer <mail@david-bauer.net>
2018-02-11 19:07:43 +01:00
Matthias Schiffer b1205a9211
ar71xx: /lib/ar71xx.sh: add model detection for TP-Link TL-WR810N
Properly report the revision in /tmp/sysinfo/model.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2018-02-03 14:14:35 +01:00
Kevin Darbyshire-Bryant d5278cc48b kernel: bump 4.4 to 4.4.112 for 17.01
Refresh patches.
Remove upstreamed patches:

target/linux/generic/patches-4.4/030-2-smsc75xx-use-skb_cow_head-to-deal-with-cloned-skbs.patch
target/linux/generic/patches-4.4/030-3-cx82310_eth-use-skb_cow_head-to-deal-with-cloned-skb.patch
target/linux/generic/patches-4.4/030-4-sr9700-use-skb_cow_head-to-deal-with-cloned-skbs.patch
target/linux/generic/patches-4.4/030-5-lan78xx-use-skb_cow_head-to-deal-with-cloned-skbs.patch

CVEs completely or partially addressed:

CVE-2017-5715
CVE-2017-5753
CVE-2017-17741
CVE-2017-1000410

Compile-tested: ar71xx Archer C7 v2
Run-tested: ar71xx Archer C7 v2

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2018-01-22 08:49:06 +01:00
Kevin Darbyshire-Bryant f0336975be kernel: bump 4.4 to 4.4.111 for 17.01
Refresh patches

Tested-on: ar71xx Archer C7 v2

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2018-01-17 10:35:08 +01:00
Stijn Segers 2e8a3bb35f ar71xx: Netgear WNR2000v4: do not include USB packages [17.01]
The Netgear WNR2000v4 does not have a USB port. Hence, including USB packages into the default images is useless.
It looks like the WNR2000v4 definition in master is OK.

v2 fixes the silly typo in the patch title (WNR2000v4 instead of WNR200v4)

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
2018-01-13 17:47:23 +01:00
Chuanhong Guo 987a7e3175 ramips: fix lenovo newifi-y1 switch and LED config
There are 3 ethernet ports on Y1. LAN1 on port1, LAN2 on port0 and WAN on
port4.

Use a standalone switch configuration to match this and use the switch
trigger so that LAN LED could indicate the connetction status for both
lan ports correctly.

This patch also drop the internet led configuration, because there is a
WAN led for port4 and eth0.2 isn't always used as WAN.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2018-01-09 22:09:26 +01:00
Mathias Kresin dbb5ffaed5 ramips: firewrt: indicate boot status via LED
Add the Firefly FireWRT gree power LED to diag.sh to indicate the boot
status via the power LED.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2018-01-09 22:09:26 +01:00
Vittorio Gambaletta c3cdc53164
ag71xx: Fix rx ring buffer stall on small packets flood on qca956x and qca953x.
Backported from Code Aurora QSDK

Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net>
2018-01-09 15:08:28 +01:00
Henryk Heisig e07ee06aad
ar71xx: QCA956X: add missing register
Signed-off-by: Henryk Heisig <hyniu@o2.pl>
2018-01-09 15:08:12 +01:00
Jo-Philipp Wich 7bc25dfa63 mvebu: fix mvneta build with Linux 4.4.110
Kernel 4.4.109 added pp->link, pp->duplex and pp->speed setters to
mvneta_port_disable() which the mvneta patchset failed to patch out after
rebasing, leading to the following build error:

      CC      drivers/net/ethernet/marvell/mvneta.o
    drivers/net/ethernet/marvell/mvneta.c: In function 'mvneta_port_disable':
    drivers/net/ethernet/marvell/mvneta.c:1199:4: error: 'struct mvneta_port' has no member named 'link'
      pp->link = 0;
        ^
    drivers/net/ethernet/marvell/mvneta.c:1200:4: error: 'struct mvneta_port' has no member named 'duplex'
      pp->duplex = -1;
        ^
    drivers/net/ethernet/marvell/mvneta.c:1201:4: error: 'struct mvneta_port' has no member named 'speed'
      pp->speed = 0;
        ^

Fix the issue by rebasing 134-net-mvneta-convert-to-phylink.patch to remove
these struct member accesses as well.

Fixes: 7f5a040359 ("kernel: update kernel 4.4 to version 4.4.110")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-01-08 14:35:21 +01:00
Hauke Mehrtens 7f5a040359 kernel: update kernel 4.4 to version 4.4.110
This fixes:  CVE-2017-5754

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2018-01-07 13:37:04 +01:00
Hauke Mehrtens ddedcb19e5 brcm47xx: relocate the stack in loader
By default we are reusing the stack provided by CFE, like it is intended
by CFE. On my WRT54GS it is located at 0x8043BF30, so a big kernel image
could overwrite it. Relocate it to a different memory region which is
still under the 8MB RAM, but in the higher area. We only need this
memory region for the stack of the loader, Linux will set up this
for its own.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2018-01-06 00:40:00 +01:00
Hauke Mehrtens da43069f5b brcm47xx: relocate loader to higher address
The boot process on a WRT54GL works the following way:
1. CFE gets loaded by the boot rom from flash
2. CFE loads the loader from the flash and gzip uncompresses it
3. CFE starts the loader
4. The loader stores the FW arguments and relocates itself to
   BZ_TEXT_START (now 0x80600000)
5. The loader reads the Linux image from flash
6. The loader lzma decompresses the Linux image to LOADADDR (0x80001000)
7. The loader executes the uncompress Linux image at LOADADDR

The BZ_TEXT_START was set to 0x80400000 before. When the kernel gets
uncompressed and is bigger than BZ_TEXT_START - LOADADDR it overwrote
the loader which was currently uncompressing it and made the board
crash. Increase the BZ_TEXT_START my 2 MB to have more space for the
kernel. Even on 16MB RAM devices the memory goes till 0x80FFFFFF so this
should not be a problem.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2018-01-06 00:40:00 +01:00
Rafał Miłecki ffbbcc9b34 brcm47xx: image: build firmware for Asus WL-500g Deluxe
It's a device based on BCM5365P (0x5365 package 0x00). This SoC has
USB 1.1 controller but device has two USB 2.0 parts. They are handled by
PCI-based controllers: 1106:3038 UHCI and 1106:3104 EHCI.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2018-01-02 16:58:13 +01:00
Kevin Darbyshire-Bryant ee55629a30 kernel: bump 4.4 to 4.4.108 for 17.01
Refresh patches.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2017-12-30 00:36:25 +01:00
Mathias Kresin 959a49dc15 ramips: fix widora neo diag led
The diag LED is named widora🍊wifi and can't be derived from the
boardname.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-12-29 22:33:46 +01:00
Etienne Haarsma f8a441e020 kernel: bump 4.4 to 4.4.107
Bump 4.4 to 4.4.107 and refreshed all patches.
Made the following patch for Mediatek and Oxnas compatible with kernel 4.4.107:
0072-mtd-backport-v4.7-0day-patches-from-Boris.patch

Compile-tested: ar71xx
Run-tested: ar71xx

Signed-off-by: Etienne Haarsma <bladeoner112@gmail.com>
Reviewed-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Tested-by: Rosen Penev <rosenp@gmail.com>
2017-12-23 09:42:33 +01:00
Jo-Philipp Wich ebb54740c7 brcm47xx: remove target specific network preinit config
The generic preinit code is now able to setup network and switch vlan settings
from the /etc/board.json file, therefor drop the target specific code.

Fixes FS#790.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 833c500cb2)
2017-12-13 18:50:55 +01:00
João Chaínho aaa73fea36 ar71xx: fix switch port numbering on RB750r2 and RB750UPr2
This patch fixes the switch port numbering on Mikrotik RB750r2 (hEX lite) and RB750UPr2 (hEX PoE lite).
Tested on a RB750UPr2. Maybe this patch is applicable to other devices (e.g. RB951Ui-2nD, RB952Ui-5ac2nD) but I have no way to test them.

Signed-off-by: João Chaínho <joaochainho@gmail.com>
(cherry picked from commit 61027e3430)
2017-12-13 16:29:22 +01:00
Daniel Golle 59004433e9 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 d80d1b6c42)
2017-12-13 16:00:57 +01:00
Daniel Golle 74eeb07817 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 1b555e1d2b)
2017-12-13 16:00:57 +01:00
Paul Spooren c7234e3036 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 19ac879954)
2017-12-13 15:59:35 +01:00
Felix Fietkau 9a99039989 rb532: enable high-res timers, refresh kernel config
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 2dc23a7576)
2017-12-13 15:55:55 +01:00
Felix Fietkau e802cbfc25 xburst: enable high-res timers, refresh kernel config
Helps with system performance

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit f859a7b696)
2017-12-13 15:55:45 +01:00
Felix Fietkau e01367e3af 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 b47fd76563)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-12-13 15:54:53 +01:00
Sergey Ryazanov 13a5568d6e 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 2cc61e6e8e)
2017-12-13 15:53:16 +01:00
Sergey Ryazanov 816fb3433b 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 913b2290ca)
2017-12-13 15:52:49 +01:00
Hauke Mehrtens e5612d6640 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 6153248052)
2017-12-13 15:35:07 +01:00
Michael Lee 108a42bcba ramips: support jumbo frame on mt7621 up to 2k
Signed-off-by: Michael Lee <igvtee@gmail.com>
(cherry picked from commit eee09bfe01)
2017-12-13 15:33:04 +01:00
Daniel Golle 90575776b7 x86: keep /boot mounted for kexec
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 63571cb56c)
2017-12-13 15:24:47 +01:00
Felix Fietkau 98588273b1 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 5afe9a054c)
2017-12-13 15:20:38 +01:00
Rafał Miłecki 9ce30f7175 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 f6433eede7)
2017-12-13 15:00:42 +01:00
Philip Prindeville f69d73f1b2 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 7fe5963be0)
2017-12-13 14:59:27 +01:00
Vittorio Gambaletta 7ccfa826ee 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 967b6be118)
2017-12-13 14:59:03 +01:00
Felix Fietkau 80304ace58 lantiq: remove lantiq_board_model, it is unused
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit fd93f81fd8)
2017-12-13 14:54:50 +01:00
Felix Fietkau 8be5b12ea1 lantiq: remove lantiq_board_name, use the generic function instead
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 7e798dab56)
2017-12-13 14:54:44 +01:00
Felix Fietkau 0f0d742ae3 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 aa95d6cd20)
2017-12-13 14:54:12 +01:00
Rafał Miłecki 3225fbfcbf 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 425f958830)
2017-12-13 14:45:31 +01:00
Rafał Miłecki 1411493569 x86: image: drop unneeded grub call
It appears there isn't any Image/Build/grub/* define so this step looks
redundant.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit f5d403488e)
2017-12-13 14:41:35 +01:00
Rafał Miłecki 58e0c0feec x86: image: drop unused ROOTDELAY variable
It's unused since commit 7427007193 ("x86: remove the olpc subtarget,
it has been unmaintained for a long time").

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 9a267e6a4b)
2017-12-13 14:41:04 +01:00
Jo-Philipp Wich 1d0f7e3136 imagebuilder: make submake invocations less verbose
Use silent make invocations for sub-makes like build_image or checksum to
avoid bloating the IB output with non-status info.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 0d1765b4ba)
2017-12-13 14:17:32 +01:00
Felix Fietkau 82615922b0 bcm53xx: suppress osafeloader info error messages during flashing
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 727e244fae)
2017-12-13 14:15:09 +01:00
Felix Fietkau 157b892994 kernel: remove out of tree direct-io disable hack
Direct-IO support has to be enabled for the release build anyway, so
this hack is not worth keeping

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(backported from commit 0b7ed65cec)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-12-13 12:57:41 +01:00
Etienne Haarsma 2b664499cd kernel: bump 4.4 to 4.4.103 for 17.01
Refreshed all patches.

Removed upstream ramips patches:
0101-MIPS-ralink-Fix-MT7628-pinmux.patch
0102--MIPS-ralink-Fix-typo-in-mt7628-pinmux-function.patch

Compile-tested: ar71xx
Run-tested: ar71xx

Signed-off-by: Etienne Haarsma <bladeoner112@gmail.com>
2017-12-12 11:10:47 +01:00
Mathias Kresin d77fe9219a ramips: backport MT7628 pinmux fixes
According to the datasheet the REFCLK pin is shared with GPIO#37 and
the PERST pin is shared with GPIO#36.

While at it fix a typo inside the pinmux setup code. The function is called
refclk and not reclk.

Update device tree source files accordingly.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-11-27 21:28:34 +01:00
INAGAKI Hiroshi 9601e6a0e2 ramips: add missing reset button for Nexx WT1520
This commit adds missing the GPIO key used as reset button.
Nexx WT1520 has a GPIO key for factory reset, but it's not defined in
WT1520.dtsi and cannot use it.

Drop the UART (full) from the device tree source file, it was never
used for this board. Adjust the kernel bootargs accordingly.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
[add note about dropped UART (full) to the commit message]
Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-11-27 20:36:46 +01:00
Etienne Haarsma 7f3dab2fc3 kernel: bump 4.4 to 4.4.102
Refreshed all patches.

Removed upstream ramips patch: 0063-set-CM_GCR_BASE_CMDEFTGT_MEM-according-to-datasheet.patch

Compile-tested: ar71xx
Run-tested: ar71xx

Signed-off-by: Etienne Haarsma <bladeoner112@gmail.com>
Tested-by: Stijn Segers <francesco.borromini@inventati.org>
2017-11-26 15:10:36 +01:00
Mathias Kresin 7ec639451d ramips: fix Planex CS-QR10 device packages
Add kmod-sound-core, it is a dependency of kmod-sound-mt7620 and will
not be autoselected.

Remove kmod-i2c-core, it will be autoselected by kmod-i2c-ralink.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-11-22 08:19:37 +01:00
Mathias Kresin 6cfa7e5788 ramips: fix DCH-M225 support
Setting the pins of the uartf group to gpio+i2s at the time the i2c
driver loads is to late for the WPS gpio button.

The gpio-keys driver fails to load since the pin used by the WPS button
is not yet set to GPIO. The WPS button with the rfkill keycode is
essential for this wifi only board.

Add the missing sound and i2c kernel modules corresponding to the
device nodes.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-11-22 08:19:37 +01:00
Antony Black ecaad8b2cb brcm47xx: fix switch port mapping on D-Link DIR-330
D-Link DIR-330 is clone of ASUS WL500GP2, by default conf the WAN port is
eth1, it's not working cus eth1 not soldered and wan port function
performs 5th port of the switch.

Signed-off-by: Antony Black <gtrtfm@gmail.com>
2017-11-16 22:57:06 +01:00
Jo-Philipp Wich 421754191d 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.

(cherry picked from commit 96ed69101da254b0cb61a0dfc42bd48d27bfacb9
  and squashed with commit f2fdd68664)

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-11-10 15:00:57 +01:00
Florian Beier 9740523763 ar71xx: fix LED config for DIR-869 A1
This fixes the LED configuration for the D-Link DIR-869 A1. In order to
support the device I probed around using an initramfs image for the
UniFi AC. Pulling GPIO 15 to low enabled the LEDs while high disabled them.
GPIO 16 set to low meant that the color was white while pulling it to high
made the color change to orange. The past code was written based upon these
findings.
However, running a flashed image I now discovered that GPIO 15 controls the
orange LEDs while GPIO 16 controls the white ones and that both are active
when low. This means that the GPIOs were inverted and one active_low was set
wrong which this patch fixes.

Behavior of the LED front after this patch is applied:

cat /sys/devices/platform/leds-gpio/leds/d-link:white:status/brightness
0   -> white LEDs are OFF
255 -> white LEDs are ON

cat /sys/devices/platform/leds-gpio/leds/d-link🍊status/brightness
0   -> orange LEDs are OFF
255 -> orange LEDs are ON

If the brightness of both is set to 255 the LED front will be white.
If the brightness of both is set to 0 the LED front will be off.

Signed-off-by: Florian Beier <beier.florian@gmail.com>
2017-11-03 22:59:20 +01:00
Stefan Lippers-Hollmann bdf19eec35 ipq806x: nbg6817: sync MAC addresses to the upstream values
The ZyXEL NBG6817 calculates all MAC addresses based on the ethaddr
value stored in the U-Boot environment (0:APPSBLENV). No MAC addresses
are stored in the ART partition and the generated MAC addresses for the
wlan interfaces alternate randomly between 12:34:56:78:90:12 and
00:03:7f:12:34:56.

interface	  new/ OEM MAC	old MAC

wlan-2.4g (phy1): ethaddr	undefined
wlan-5g   (phy0): ethaddr + 1	undefined
lan             : ethaddr + 2	ethaddr
wan             : ethaddr + 3	ethaddr + 1

This patch defines stable MAC addresses for the wlan interfaces for
the first time instead of generating them at random. The previously
defined values for lan/ wan are changed to follow the settings of the
OEM firmware.

Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
2017-11-03 22:59:20 +01:00
Stefan Lippers-Hollmann 2aff2add31 ipq806x: nbg6817: add kmod-fs-ext4 to device packages
The ZyXEL NBG6817 uses an eMMC flash for the rootfs, which is split
into the readonly squashfs and ext4 for the overlay. This adds the
required package to the device packages to allow mounting the overlay
by default.

/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/loop0 on /overlay type ext4 (rw,noatime,data=ordered)
overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,mode=600,ptmxmode=000)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
mountd(pid1040) on /tmp/run/blockd type autofs (rw,relatime,fd=7,pgrp=1,timeout=30,minproto=5,maxproto=5,indirect)

Before this commit, the ext4 based overlayfs could not be mounted,
which left only the tmpfs based/ volatile  emergency overlay in place.

Fixes: https://forum.lede-project.org/t/zyxel-nbg6817-flashing-from-oem/768

Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
2017-11-03 22:59:19 +01:00
Edmunt Pienkowsky 3eae19acee ramips: fix Youku-YK1 support
Remove the ephy-pins from the ethernet device tree node. The ephy-pins
are useed to controll the ePHY LEDs and this board doesn't have these.
Instead one of the ePHY pins is used in GPIO mode to control the WAN
LED.

Use the switch LED trigger to control the WAN LED. Move the power LED
handling to diag.sh to show the boot status via this LED.

Add the missing kernel packages for USB and microSD card reader to the
default package selection.

Fix the maximum image size value. The board has a 32MByte flash chip.

Fixes: FS#1055

Signed-off-by: Edmunt Pienkowsky <roed@onet.eu>
[make the commit message more verbose, remove GPIO pinmux for pins not
used as GPIOs]
Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-10-27 11:19:07 +02:00
Mathias Kresin ee6fa8d839 lantiq: add missing default lan interface
With removing the boards from the the default case to fix the xDSL WAN
MAC-Address, the setting for the default LAN interface wasn't added.

Fixes: 92a12c434c ("lantiq: fix avm fritz box mac addresses")

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-10-25 08:45:53 +02:00
Tolga Cakir 2bee675d33 ipq806x: fix Zyxel NBG6817 WiFi button
Zyxel NBG6817 features a WiFi button, which becomes functional by setting
correct GPIO. It is a switch-type button, so it emits KEY_RFKILL on each ON
and OFF state. This is achieved by setting input-type to EV_SW.

Signed-off-by: Tolga Cakir <tolga@cevel.net>
2017-10-24 22:46:25 +02:00
Alberto Bursi f5935f78a1 ramips: fix default usb support for nexx wt3020-8M
the nexx wt3020-8M has a usb 2.0 port,
add usb 2.0 support packages to its default package list.

Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
2017-10-24 20:36:08 +02:00
Mathias Kresin 98c003e3da lantiq: ARV752DPW22: fix wireless mac address
The ARV752DPW22 has the same generic mac address in the EEPROM as it
was already noticed for other lantiq boards using a ralink wireless.

Use the base mac address from the boardconfig partition as it is done
by the stock firmware.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-10-18 22:14:25 +02:00
Mathias Kresin 50db9a4004 lantiq: ARV752DPW22: set correct wireless led trigger
The ARV752DPW22 has a ralink based wireless and can not use the ath9k
only phy0tpt trigger.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-10-18 22:14:25 +02:00
Kevin Darbyshire-Bryant 373fa54d35 kernel: bump 4.4 to 4.4.93 for 17.01
Refresh patches.
Compile-tested for ar71xx - Archer C7 v2
Runtime-tested on  ar71xx - Archer C7 v2

Fixes CVE-2017-15265.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
[remove 2nd CVE as it was fixed in mac80211 in commit bff16304b0]
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-10-18 19:58:02 +03:00
Jo-Philipp Wich 46e29bd078 x86: partly revert cabf775
The subtarget cleanups made in cabf775 "x86: Refresh subtargets kernel config"
removed some important symbol disable statements, so revert the changes to the
subtarget configs for now.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-10-16 17:21:43 +02:00
Stijn Tintel fa0b5fce1f kernel: bump 4.4 to 4.4.92
Refresh patches.

Fixes the following CVEs:
- CVE-2017-1000252
- CVE-2017-12153
- CVE-2017-12154

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-10-16 13:35:06 +03:00
Felix Fietkau e6fd17d04c ramips: fix compile warning in MT7621 NAND driver
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-10-16 12:18:19 +02:00
Felix Fietkau 2e9f3c6225 ramips: fix typo in MT7621 NAND driver
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-10-16 12:18:19 +02:00
Baptiste Jonglez cdd093b539 x86/64: add xen DomU support
Xen support for x86/generic was added in 296772f9.  This commit also
enables it for x86/64.

This was successfully tested with Xen 4.5.

Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
2017-10-16 09:44:19 +02:00
Baptiste Jonglez cabf775e64 x86: Refresh subtargets kernel config
This was done by simply running `make kernel_menuconfig CONFIG_TARGET=subtarget`
and then saving without changing any option.

Having consistent kernel config is important to avoid surprises, such
as the issue fixed with 6f0367c9 (where Xen support was silently
disabled when building the kernel, although it was present in the
initial config)

As far as I understand the build system, this shouldn't have any
user-visible impact, because the build system already merges the
various kernel configs during build.

Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
2017-10-16 09:43:43 +02:00
Baptiste Jonglez da0219ed9f x86: Fix xen serial console by removing conflicting PATA driver
The Xen serial console has been broken since the xen_domu subtarget
was merged in the generic x86 subtarget (commits 296772f9 and b36e24f3).

The reason for the broken serial console seems to be an IRQ conflict
between the serial console driver and the PATA_LEGACY driver:

[    1.330125] genirq: Flags mismatch irq 8. 00000000 (hvc_console) vs. 00000000 (platform[pata_legacy.4])
[    1.330134] hvc_open: request_irq failed with rc -16.
[    1.330148] Warning: unable to open an initial console.

Just drop the PATA_LEGACY driver from the x86/generic and x86_64
subtargets, since this driver is marked experimental and only supports
very old ISA devices anyway.  It is still included in the x86/legacy
subtarget where it rightfully belongs.

Fixes: FS#787

Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
2017-10-16 09:43:35 +02:00
Baptiste Jonglez f52b404aee x86/generic: use HIGHMEM64G instead of HIGHMEM4G to fix PAE and Xen
This is a backport of 641a65fd06 in master.

This change re-enables PAE for the 32-bit x86 subtarget, which is
interesting in its own right but also necessary for Xen support.

Commit af1d1ebd ("x86: enable 4G high memory support for generic (32bit)
subtarget") inadvertently disabled both PAE and Xen support.

Fixes: FS#908

Cc: Daniel Golle <daniel@makrotopia.org>
Cc: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
2017-10-16 09:40:26 +02:00
Rafał Miłecki 8ad1b09c6d kernel: add fix for bgmac with B50212E B1 PHY
This PHY requires some extra programming to work reliably with all
devices. Backport upstream fix for it.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-10-13 14:14:45 +02:00
Felix Fietkau c1023c8075 mt76: sync with version 878456caf6 from master
Backport required DT changes from commit dabdd123c9.
Significantly improves stability and performance for MT76x2 and MT7603

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-10-13 11:56:25 +02:00
Rafał Miłecki baa8eaaba6 bcm53xx: backport DTS changes up to the first 4.15 queued commits
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-10-10 10:24:49 +02:00
Mathias Kresin 94aa2b8af0 ar71xx: add rssileds to WA850RE v1 image
A default rssileds config exists for the TP-Link WA850RE v1 but the
rssiled package is not included by default.

The compressed 17.01.3 image size increases by 3302 bytes which should
be tolerable even for a 4MB flash board.

Fixes: FS#1043

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-10-07 17:05:57 +02:00
Thibaut VARENE f9a849ca84 ramips: mt7620: do not pad sysupgrade Archer images
The current makefile unnecessarily pads sysupgrade image for Archer devices.

This has three implications:
1. higher risk of OOM when uploading the binary image to the device
2. much slower upgrade due to time wasted erasing and writing padding
3. grows image beyond available flash size if metadata are appended

This is already fixed in master, albeit in a completely different way (the
whole target have been reworked)

Fixes: FS#1025, FS#1039

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
2017-10-04 22:22:56 +02:00
Matthias Schiffer 3350137bd3 sunxi: clean up modules definitions
Module definitions for kmod-wdt-sunxi and kmod-eeprom-sunxi are removed
(wdt-sunxi was builtin anyways; nvmem-sunxi, which is the new name of
eeprom-sunxi is changed to builtin). As kmod-eeprom-sunxi was specified
in DEFAULT_PACKAGES, but not available on kernel 4.4, it was breaking the
image builder.

Support for kmod-sunxi-ir is added for kernel 4.4 (it is unclear why it
was disable before, it builds fine with with kernel 4.4).

Condtionals only relevant for pre-4.4 kernels are removed from modules.mk,
as sunxi does't support older kernels anymore.

Fixes FS#755.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2017-10-01 10:04:12 +02:00
Florian Fainelli 37e1bd27d0 generic: drop 704-phy-no-genphy-soft-reset.patch
4.4.80+ contains 71a165f6397df07a06ce643de5c2dbae29bd3cfb, 4.9.41+ contains
6c78197e4a69c19e61dfe904fdc661b2aee8ec20 which are all backports of upstream
commit 0878fff1f42c18e448ab5b8b4f6a3eb32365b5b6 ("net: phy: Do not perform
software reset for Generic PHY").

Our local patch is no longer needed, all this patch was doing was utilizing
gen10g_soft_reset which does nothing either, so just keep the code unchanged.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2017-09-30 13:58:03 +02:00
Hauke Mehrtens 720b0e2e2d kernel: update 4.4 to 4.4.89
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2017-09-30 13:58:00 +02:00
Daniel Gonzalez Cabanelas af802bc687 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>
2017-09-20 21:45:39 +02:00
Baptiste Jonglez 97ebdf93a3 ipq806x: Archer C2600: fix switch ports numbering
The order of LAN ports shown in Luci is reversed compared to what is
written on the case of the device.  Fix the order so that they match.

Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
2017-09-14 20:47:54 +02:00
David Yang 4f162ac3ce ramips: fix hg255d LED status support
Use the green power LED for boot status indication.

Source: https://my.oschina.net/osbin/blog/278782 Para 3

Signed-off-by: David Yang <mmyangfl@gmail.com>
2017-09-13 08:07:39 +02:00
Matthias Schiffer 415175246e
ar71xx: fix MAC addresses on TP-Link TL-WR1043ND v4
The addresses were read from the 'config' partition, which would not always
contain the addresses at the same offsets, depending on the stock firmware
version used before flashing LEDE. Change this to get the addresses from
the 'product-info' partition, which is read-only.

Reported-and-tested-by: Andreas Ziegler <ml@andreas-ziegler.de>
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2017-09-11 19:48:28 +02:00
Kevin Darbyshire-Bryant ca53effdd6 kernel: update 4.4 to 4.4.86
Refresh patches

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2017-09-04 14:41:56 +02:00
Rafał Miłecki 1100bbf833 brcm47xx: refresh Linux 4.4 config
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-09-04 08:07:42 +02:00
Rafał Miłecki dc8392f6a1 kernel: backport usbport LED trigger driver support for DT
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-08-21 16:46:18 +02:00
Rafał Miłecki 86722ab0bb kernel: fix of_node handling in LEDs core code
This backports fixes for setting of_node and making it possible to read
extra info from DT. This was partially fixed by:
[PATCH] leds: leds-gpio: Set of_node for created LED devices
but it didn't work during initialization.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-08-21 16:45:30 +02:00
Kevin Darbyshire-Bryant 4a1b87aba4 kernel: update 4.4 to 4.4.83
Refresh patches.
Minor update 704-phy-no-genphy-soft-reset.patch which was partially
accepted upstream.
Compile-tested on ar71xx.
Runtime-tested on ar71xx.

Fixes the following vulnerabilities:
- CVE-2017-7533 (4.4.80)
- CVE-2017-1000111 (4.4.82)
- CVE-2017-1000112 (4.4.82)

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
2017-08-17 19:47:27 +02:00
Rafał Miłecki cae20f64b5 bcm53xx: backport DTS commits that setup USB LEDs
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-08-17 10:33:37 +02:00
Mathias Kresin ff414fb575 ramips: fix WHR-1166D WAN port
By adding the ICPlus IP1001 phy driver an already set RGMII delay mode
is reset during driver load.

Set the rgmii rx delay to fix corrupt/no packages in case the WAN port
negotiates to 1000MBit.

Fixes: FS#670

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-08-11 18:13:38 +02:00
Thibaut VARENE 982612dba2 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>
2017-08-06 09:31:05 +02:00