Commit Graph

38461 Commits

Author SHA1 Message Date
John Crispin
a02cb1f311 mediatek: add support for the NAND-ePHY board
This is the same as the NAND board but gmac1 is wired to an external phy.

Signed-off-by: John Crispin <john@phrozen.org>
2017-04-24 11:11:52 +02:00
John Crispin
4c6ae885c5 mediatek: add DSA multi cpu port support
Signed-off-by: John Crispin <john@phrozen.org>
2017-04-24 11:11:52 +02:00
John Crispin
f3bae0fa4b mediatek: fix support for gmac1 using external PHY
Signed-off-by: John Crispin <john@phrozen.org>
2017-04-24 11:11:52 +02:00
Thomas Reifferscheid
956e31b1e4 ipq8064: fix dwc3-of-simple module unloading for Netgear R7500
Without patch unloading the dwc3-of-simple module went stuck after
successfully removing hcd.1 during the hcd.0 removal:

root@LEDE:/# rmmod dwc3-of-simple
[   21.391846] xhci-hcd xhci-hcd.1.auto: remove, state 1
[   21.391931] usb usb4: USB disconnect, device number 1
[   21.397038] xhci-hcd xhci-hcd.1.auto: USB bus 4 deregistered
[   21.401111] xhci-hcd xhci-hcd.1.auto: remove, state 1
[   21.406685] usb usb3: USB disconnect, device number 1
[   21.412848] xhci-hcd xhci-hcd.1.auto: USB bus 3 deregistered
[   21.417248] xhci-hcd xhci-hcd.0.auto: remove, state 1
[   21.422521] usb usb2: USB disconnect, device number 1
followed by nothing.

Sometimes a stall CPU was detected, or a kernel panic,
or a reboot occurred after a couple of minutes.

At the same time unloading the dwc3 module followed by dwc3-of-simple
module was working repeatedly.

root@LEDE:/# rmmod dwc3
[   53.827328] xhci-hcd xhci-hcd.1.auto: remove, state 1
[   53.827412] usb usb4: USB disconnect, device number 1
[   53.832630] xhci-hcd xhci-hcd.1.auto: USB bus 4 deregistered
[   53.836452] xhci-hcd xhci-hcd.1.auto: remove, state 1
[   53.842314] usb usb3: USB disconnect, device number 1
[   53.848412] xhci-hcd xhci-hcd.1.auto: USB bus 3 deregistered
[   53.852542] xhci-hcd xhci-hcd.0.auto: remove, state 1
[   53.857882] usb usb2: USB disconnect, device number 1
[   53.863956] xhci-hcd xhci-hcd.0.auto: USB bus 2 deregistered
[   53.867875] xhci-hcd xhci-hcd.0.auto: remove, state 1
[   53.873696] usb usb1: USB disconnect, device number 1
[   53.879742] xhci-hcd xhci-hcd.0.auto: USB bus 1 deregistered
root@LEDE:/# rmmod dwc3-of-simple
root@LEDE:/#

For the non-working case, the code was stuck in a readl() in
http://lxr.free-electrons.com/source/drivers/usb/host/xhci.c#L91
because
http://lxr.free-electrons.com/source/drivers/usb/dwc3/dwc3-of-simple.c#L126
was disabling the wrong clocks when removing hcd.1 (it was disabling
the clock of hcd.0). That's why the readl() went stuck when removing
hcd.0

The patch however addresses the clock assignment from the Netgear R7500
dts file and backs off the previous attempt.

Now unloading and repeated module loading is working just fine.

root@LEDE:/# rmmod dwc3-of-simple
[   24.089679] xhci-hcd xhci-hcd.1.auto: remove, state 1
[   24.089765] usb usb4: USB disconnect, device number 1
[   24.094856] xhci-hcd xhci-hcd.1.auto: USB bus 4 deregistered
[   24.098963] xhci-hcd xhci-hcd.1.auto: remove, state 1
[   24.104522] usb usb3: USB disconnect, device number 1
[   24.111194] xhci-hcd xhci-hcd.1.auto: USB bus 3 deregistered
[   24.115086] xhci-hcd xhci-hcd.0.auto: remove, state 1
[   24.120396] usb usb2: USB disconnect, device number 1
[   24.126503] xhci-hcd xhci-hcd.0.auto: USB bus 2 deregistered
[   24.130347] xhci-hcd xhci-hcd.0.auto: remove, state 1
[   24.135948] usb usb1: USB disconnect, device number 1
[   24.142085] xhci-hcd xhci-hcd.0.auto: USB bus 1 deregistered
root@LEDE:/#

Fixes: dwc3-of-simple module unloading for Netgear R7500

Signed-off-by: Thomas Reifferscheid <thomas@reifferscheid.org>
2017-04-24 09:20:23 +02:00
Thomas Reifferscheid
8db079a9ff ipq8064: Fix dwc3 module unloading
The patch follows the qualcomm code comments setting
SSUSB_CTRL_TEST_POWERDOWN to 0x1 and is testing and clearing the
bit during USB superspeed PHY init. According to Andy Gross it
needs to be BIT(26).

Signed-off-by: Thomas Reifferscheid <thomas@reifferscheid.org>
Acked-by: Andy Gross <andy.gross@linaro.org>
2017-04-24 09:19:49 +02:00
Álvaro Fernández Rojas
2db05cd199 kernel: use skb_cow_head() to deal with cloned skbs
We need to ensure there is enough headroom to push extra header,
but we also need to check if we are allowed to change headers.

skb_cow_head() is the proper helper to deal with this.

Fixes Ethernet<->WiFi bridge for Raspberry Pi and probably other devices.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2017-04-23 13:51:55 +02:00
Yousong Zhou
50fcfd4b65 scripts/qemustart: initial version
The script can be used to quickly spin up QEMU virtual machines with lan
and wan network.  Please read the initial part of the script for
instructions about how to configure host machine

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-04-23 09:19:34 +08:00
Yousong Zhou
88468f7e53 armvirt: merge arm64 as subtarget 64
Original armvirt target is now subtarget 32.  Other than that the built
result should remain the same as before

Besides old features already available with arm64, the new armvirt/64
subtarget will also have those features originally enabled for
armvirt/32 with commit 44ecfc2 ("armvirt: new target")
 - pl011, uart
 - pl031, rtc
 - pl061, gpio
 - pci-host-generic
 - virtio_{mmio,pci,net,blk,scsi,9p,console,balloon}
 - smp with NR_CPUS=4
 - cpu-hotplug
 - ext4
 - DEBUG_BUGVERBOSE for debug purposes

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-04-23 09:19:33 +08:00
Yousong Zhou
b889d1e3cf build: fix aarch64 default cpu selection
Not sure since when the issue emerged, but according to the current doc of gcc
and as, armv8-a is intended as argument of -march

The change will affect at the moment arm64 and layerscape/64b

Below is the relevant error messages when building toolchain

    Assembler messages:
    Error: unknown cpu `armv8-a'
    Error: unrecognized option -mcpu=armv8-a
    /home/yousong/git-repo/lede-project/lede/build_dir/toolchain-aarch64_armv8-a_gcc-5.4.0_musl/gcc-5.4.0/libgcc/libgcc2.c:1:0: error: unknown value 'armv8-a' for -mcpu

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-04-23 09:19:33 +08:00
Ansuel Smith
e80a041348 iptables: fix wrong depends for nftables support (FS#707)
The dep for the nftables support was wrong, if someone actually enable
that option gain a compilation error. This fix this problem.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2017-04-22 21:33:46 +02:00
Matthias Schiffer
96414cb407
ar71xx: fix minor syntax error in /lib/upgrade/platform.sh
Fix a '==' that should be a '=' in a test condition. Busybox fortunately
doesn't care.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2017-04-22 18:58:44 +02:00
Matthias Schiffer
411c1b64f0
ramips: update DEVICE_PACKAGES for Ubiquiti EdgeRouter X
Fixes removal of unneeded kernel modules with per-device rootfs.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2017-04-22 18:55:22 +02:00
Daniel Golle
f66e7cb30b ramips: add former board names to PSG1218 variants
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2017-04-21 14:52:46 +02:00
Jo-Philipp Wich
8ed5c6d3b1 busybox: fix build of nslookup_lede applet without IPv6 (#728)
Protect any IPv6 related with appropriate guards to fix compilation with
disabled IPv6 support in Busybox.

Fixes #728.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-04-21 13:20:24 +02:00
Kevin Darbyshire-Bryant
e1d433b293 lantiq: improve DGN3500 LED definitions
Add red:internet led on gpio 30 previously claimed as missing.
Wifi led was claimed as blue however there are no blue leds on the
board at all.  Actually there are two wifi leds, green & amber so add
definitions for those.  Make the newly discovered green wifi led gpio
14 the default.

There is no amber power led on this board. The mention of the amber
power led in the manual means power red and power green at the same
time.

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
[removed unnecessary aliases, add migration script]
Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-04-21 07:50:55 +02:00
Mathias Kresin
18618695ae ramips: dont replace the board name
Use fixed led names and add each board variant instead of manipulating
the board name.

It makes the ramips board name function less different to the one used
in other targets and allows to merge them with a common function.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-04-21 07:47:59 +02:00
Mathias Kresin
9e468f7829 ramips: add former used board names to metadata
We need to keep the former used (unmodified) boardname in the metadata.
Otherwise an upgrade from an board using the old boardname will be
refused.

Fixes: a75ce960ac ("ramips: use different board names for variants")
Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-04-21 07:47:59 +02:00
Daniel Golle
c6fe325587 ramips: rename PSG1218 to match label
Fix previous commit to be less ambigous:
PSG1218 rev.A = 5 ports, external PA, heatsinks
PSG1218 rev.B = 4 ports, internal PA, no heatsinks

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2017-04-21 02:55:36 +02:00
Daniel Golle
c5a7dc49d1 ramips: split Phicomm PSG1218 and PSG1218K2C
PSG1218 got only 4 Ethernet ports and WAN on port 3 while
PSG1218K2C got 5 Ethernet ports and WAN on port 4
Switch to use kmod-kt76x2 instead of kmod-mt76 for both devices while
at it.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2017-04-21 02:29:21 +02:00
Rafał Miłecki
23d7c4d632 bcm53xx: enable Northstar thermal driver
It allows monitoring CPU temp and will shutdown system on critical
value.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-04-20 22:45:05 +02:00
Rafał Miłecki
b0fcb9b85c bcm53xx: backport DT patches for serial, thermal and MDIO
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-04-20 22:45:05 +02:00
Mathias Kresin
226e194335 generic: mtd: backport mx25u25635f stateless 4b support
Use the stateless 4-byte op codes for this flash chip to fix reboot
hangs on SoCs expecting the flash chip in 3-byte mode.

Fixes: FS#179

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-04-19 21:00:52 +02:00
Tomislav Požega
e209988a17 mac80211: rt2800: fix mt7620 E2 channel registers
update RF register 47 and 54 values according to vendor driver

Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
[daniel@makrotopia.org: moved changes into a separate patch]
2017-04-18 12:00:51 +02:00
Tomislav Požega
d2f864f7bf mac80211: rt2800: fix mt7620 vco calibration registers
Use register values from init LNA function instead of the ones from
restore LNA function. Apply register values based on rx path
configuration.

Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
[daniel@makrotopia.org: moved changes into a separate patch]
2017-04-18 11:24:58 +02:00
Felix Fietkau
00b32b8326 mac80211: fix kconfig recursive dependency warning
Make brcmfmac depend on !TARGET_uml.
Technically, brcmfmac could be built for uml because only SDIO support
won't work on that target. However, selectively avoiding the dependency
propagation of !TARGET_uml from kmod-mmc to avoid including a reference
to BRCMFMAC_SDIO doesn't work.

In practice, brcmfmac is completely useless on uml, so let's just
disable it there.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-04-18 09:45:18 +02:00
Daniel Golle
97d1c49cac mac80211: rt2x00: fix MT7620 LNA gain and VCO-after-ALC
This should fix issues with bad RX as well as AP not coming up and/or
scanning failing.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2017-04-17 21:38:32 +02:00
Bastian Bittorf
56457dbcb7 dnsmasq: fix uninitialized varname in init-script
minor/cosmetic: fixes the following misleading message:

root@box:~ /etc/init.d/dnsmasq restart
sh: out of range

Signed-off-by: Bastian Bittorf <bb@npl.de>
2017-04-17 13:10:31 +02:00
Felix Fietkau
047695a029 Revert "mvebu: remove linux 4.4 support"
This reverts commit 51397d7d95.
There are some unresolved random crashes on WRT1900AC v1 that still need
to be sorted out

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-04-17 08:44:37 +02:00
Jo-Philipp Wich
aefa195749 kernel: update kernel 4.4 to 4.4.61
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-04-15 18:26:41 +02:00
Rafał Miłecki
da529d5410 brcm2708: disable CONFIG_BCM2835_THERMAL by default
This fixes:
  Thermal sensors on bcm2835 SoC (BCM2835_THERMAL) [N/m/y/?] (NEW) aborted!

This symbol depends on ARCH_BCM2835 so it should be OK to disable it at
brcm2708 target only.

Fixes: 7d32caa61fb0 ("brcm2708: backport upstream sdhost controller driver")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-04-15 08:24:42 +02:00
Rafał Miłecki
74b69ffea7 kernel: backport Broadcom thermal drivers
This includes driver for Northstar and for Raspberry Pi.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-04-14 22:57:47 +02:00
Mathias Kresin
8322dba029 ramips: really drop the rt-n56u factory image
Remove the stale reference to the factory image.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-04-13 19:22:23 +02:00
Mathias Kresin
e20965811d ar71xx: fix ath9k default LED changes fallout
Since 192f0a3db8 ("ath9k: unset the default LED pin if used by
platform leds") the default ath9k wireless LED is not set as soon as
any pin of the ath ath9k gpio controller is used.

All touched boards have leds defined which are using the gpio pins
exposed by the ath9k driver but rely on a default set wireless led
trigger.

Add the wireless leds were missing and setup the wireless phy trigger
in userspace.

Signed-off-by: Russell Senior <russell@personaltelco.net>
Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-04-13 08:18:57 +02:00
Mathias Kresin
ae0facdf1d ramips: fix Netgear R6220 package selection
The Netgear R6220 requires the kmod-usb3 package and misses
kmod-usb-ledtrig-usbport package to setup the configured usb led
trigger.

Drop the already target selected kmod-mt76.

Fixes: FS#686

Fixes: 38bee61dab ("ramips: add support for Netgear R6220")
Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-04-13 08:18:57 +02:00
Mathias Kresin
b4be4617b5 ramips: add RP-N53 pcie wireless eeprom
Fix the PCIe 5GHz wireless by using the on flash eeprom/caldata.
Disable the 2.4GHz band as this band has no antennas attached but is
enabled in the eeprom/caldata.

Fixes: FS#691

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-04-13 08:18:57 +02:00
Mathias Kresin
21abb7492c ramips: fix WHR-600D eeprom dt property
Fix the PCIe 5GHz wireless by using the ralink mtd-eeprom property as
this board have a RT5592 and uses the rt2x00 driver. The mediathek
device tree bindings do not work here.

Fixes: FS#691

Fixes: d8dd207ea6 ("ramips: use the ralink,mtd-eeprom device tree property")
Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-04-13 08:18:57 +02:00
Mathias Kresin
1b5ae14162 ramips: drop rt-n56u factory image
The factory image has an uImage header covering the entire image and
not only the kernel. The original uImage header which covers only the
kernel is appended to the end of the image.

During LEDE boot the uImage rootfs splitter skips the whole filesystem,
can't find a valid filesystem magic and panics.

The last known working version was OpenWrt 14.07, which simply kept on
searching for an uImage header if the first found didn't resulted into
a working rootfs. This behaviour is kind of error prone since it could
produce false positives.

Since the sysupgrade image works fine in combination with the tftp
recovery for doing the initial installation of LEDE, simply drop the
factory image.

Related: FS#462

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-04-13 08:18:57 +02:00
Florian Fainelli
7ae58bebc8 busybox: Move libresolv detection to LEDE Makefile
Since the LEDE nslookup applet is already specific to LEDE, move the
libresolv detection into the busybox Makefile that LEDE uses.

This fixes builds with external toolchains that don't automatically
search for headers and/or libraries without being told so.

Fixes: de5b8e5d2f ("busybox: add musl compatible nslookup replacement")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2017-04-12 09:12:18 -07:00
Jonas Gorski
7d4147d869 mac80211: add rt2x00 debug symbols to PKG_CONFIG_DEPENDS
Chaning these symbols require a recompilation of the modules, so make the
system aware of it.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
2017-04-12 12:48:35 +02:00
Jonas Gorski
5ba8185866 mac80211: manually apply dependencies to prevent a recoursive one
Apply the !UML dependency to both the symbol and the DEPENDS so there is
no recursive dependency anymore.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
2017-04-12 12:48:35 +02:00
Koen Vandeputte
06997d2635 cns3xxx: enable mpcore watchdog
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2017-04-12 12:13:16 +02:00
Koen Vandeputte
84acff2865 cns3xxx: fix mpcore watchdog
The original implementation loaded the count register with (wrong) semi-
random values due to its implemenation nature.

If the wrongly calulated value was below the kickrate,
the WD was triggered and rebooted the system.

Rework this, partly based on upstream patches, to dynamically fetch the
current clockrate and calculate the proper offset for the WD countdown
register.

Before:

[  143.800000] count val: 27219720
[  148.820000] count val: 50623201
[  153.830000] count val: 96425250
[  158.830000] count val: 89735401
[  163.840000] count val: 4756110

After:

[    0.700000] MPCore WD init. clockrate: 299984500 prescaler: 256
countrate: 1171814 timeout: 60s
[  358.530000] count val: 35154751
[  363.540000] count val: 35154750
[  368.540000] count val: 35154751
[  373.550000] count val: 35154750

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2017-04-12 12:13:15 +02:00
Koen Vandeputte
6f8a552796 cns3xxx: refresh kernel config
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2017-04-12 12:13:15 +02:00
Koen Vandeputte
2611f67423 cns3xxx: remove linux 4.4 support
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2017-04-12 12:12:49 +02:00
Alif M. Ahmad
ffd055d5bb grub2: update to 2.02~rc2
Update to version 2.02~rc2.

Signed-off-by: Alif M. Ahmad <alive4ever@live.com>
2017-04-12 11:24:57 +02:00
Matthias Fritzsche
796629207b mac80211: conistent wireless.wiki.kernel.org
Change all the URLs to wireless.wiki.kernel.org to have
the same protocol, domain and path.

Signed-off-by: Matthias Fritzsche <txt.file@txtfile.eu>
2017-04-12 10:57:54 +02:00
Felix Fietkau
5e2d15b4a6 iptables: set ABI_VERSION to force rebuild of dependent packages
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-04-12 10:51:36 +02:00
Ansuel Smith
98e43b13a7 iptables: bump to 1.6.1
Switch to git repo
Removed musl patch
Refreshed existing patch

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name> [cleanup]
2017-04-12 10:51:29 +02:00
Hauke Mehrtens
efb22b6f06 binutils: fix build with host gcc < 4.9
binutils 2.27 checks if the target compiler supports -Wstack-
usage=262144, and also uses this setting for the host compiler. If the
host compiler is gcc < 4.9 binutils build will fail. This backports 2
commits which are fixing this problem for binutils 2.28.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2017-04-12 09:54:39 +02:00
Alexandru Ardelean
6713694fe4 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>
2017-04-12 09:54:21 +02:00