Commit Graph

17661 Commits

Author SHA1 Message Date
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
Mathias Kresin 48798af6d2 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>
2017-08-02 21:16:20 +02:00
Mathias Kresin 1a050c83ac 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>
2017-08-02 21:16:20 +02:00
Mathias Kresin 57a8f36ac4 ramips: add missing partitions
The partitions were lost during migration to device tree.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-08-02 21:16:20 +02:00
John Crispin 6f4a903533 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

Backport of 9551d91b1d "ralink: fix rcu_sched stalls on mt7621".

Signed-off-by: John Crispin <john@phrozen.org>
2017-08-01 06:54:07 +02:00
Thibaut VARENE c407e6c2f2 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>
2017-07-29 12:07:16 +02:00
Thibaut VARENE 8e67c358e7 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>
2017-07-29 09:25:00 +02:00
Thibaut VARENE a9439344e7 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>
2017-07-29 09:24:59 +02:00
Mathias Kresin 5e409f0e69 ramips: fix Mercury MAC1200R v2.0 board name
With d2b6bf1416 ("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>
2017-07-29 09:24:59 +02:00
Mathias Kresin 5e87b01275 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>
2017-07-29 09:24:55 +02:00
Mathias Kresin 2247af82df 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>
2017-07-29 09:24:52 +02:00
Mathias Kresin 1807a0ef83 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>
2017-07-29 09:24:47 +02:00
Hauke Mehrtens 69acb2533a kernel: update kernel 4.4 to version 4.4.79
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2017-07-28 23:49:35 +02:00
Thibaut VARENE a5822dbd0f 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>
2017-07-25 21:02:27 +02:00
Giuseppe Lippolis e08b8255ec ramips: fix wps button gpio for DWR-512
The WPS button is at GPIO#7.

Signed-off-by: Giuseppe Lippolis <giu.lippolis@gmail.com>
2017-07-25 21:02:27 +02:00
Paul Wassi ece85e2e49 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>
2017-07-25 21:02:27 +02:00
Piotr Dymacz 870ca0da7a ar71xx: fix switch port mapping for TP-Link TL-WR74xN/D series
Backport of ad8c315: "ar71xx: fix switch port mapping for TP-Link
TL-WR74xN/D series".

Fixes FS#843

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-07-23 00:26:51 +02:00
Piotr Dymacz 3959110c5b 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>
2017-07-23 00:26:51 +02:00
Mathias Kresin 8fbef4b11b imx6: fix DualLite/Solo GW551X board detection
The model name is a different one in the device tree source file.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-07-14 08:04:58 +02:00
Jo-Philipp Wich c047c344c6 x86: add missing kernel config symbols to Geode target
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-07-13 01:25:26 +02:00
Jo-Philipp Wich 05643bd64d x86: enable ACPI support for the Geode subtarget
Backport of 9b940fe "x86: enable ACPI support for the Geode subtarget".

Fixes FS#577.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-07-12 22:40:22 +02:00
Matthias Schiffer d0ec502510
ar71xx: set US region code for TP-Link TL-WR710N v1 image
Non-US versions of the TP-Link TL-WR710N v1 don't have a region code so
far, so we can just set US unconditionally.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2017-07-12 21:34:33 +02:00
Mathias Kresin 3214e174a0 ramips: fix Xiaomi MiWiFi Nano firmware partition size
Even the commit message of the patch adding support for the MiWiFi Nano
says that a 16 MB flash chip is used. Extend the firmware partition to
make use of all available flash space.

Fixes: FS#622

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-07-08 08:53:52 +02:00
Sergey Sergeev d71ffb9639 ar71xx: Fix UBIFS work on Mikrotik RB95x devices
If nand chip has no NAND_NO_SUBPAGE_WRITE flag on its options
ubifs can't use it mtd devices and the kernel crashes with error:
__nand_correct_data: uncorrectable ECC error

Signed-off-by: Sergey Sergeev <adron@yapic.net>
2017-07-05 12:48:58 +02:00
Mathias Kresin 52617669c2 lantiq: use img file extension for DGN3500 factory images
The Netgear UI in basic mode refuses the upgrade file if the the
fileextension is not img. The expert/advanced mode accepts any
fileextension. Use img to make it work in any case.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-07-04 16:28:44 +02:00
Stijn Tintel 8d3d7f6b52 kernel: update kernel 4.4 to 4.4.74
Refresh patches.
Compile-tested on ar71xx, octeon.
Runtime-tested on ar71xx, octeon.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-06-27 15:00:35 +02:00
Stijn Tintel 53eba6f58f ipq806x: fixup thermal patches
Fix conflict with thermal patches added in
c03d4317a6.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-06-27 10:05:04 +02:00
Rafał Miłecki f197a2a4c9 bcm53xx: include wpad-mini only on devices with (supported) wireless
Don't include wpad-mini when it's useless just like we don't include
useless wireless drivers.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-06-26 23:45:07 +02:00
Rafał Miłecki 5b0b27eb48 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-06-22 11:08:05 +02:00
Rafał Miłecki c03d4317a6 kernel: backport Broadcom thermal drivers
This includes driver for Northstar and for Raspberry Pi.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-06-22 11:06:46 +02:00
小桥 2e206c79cc ramips: fix Phicomm K1S(PSG1208) pinmux
Use gpio function for pins with LEDs.

Signed-off-by: 小桥 <29551030@qq.com>
2017-06-12 21:10:14 +02:00
Jo-Philipp Wich 4fbd072624 kernel: update kernel 4.4 to 4.4.71
Fixes the following security vulnerabilities:

CVE-2017-8890
The inet_csk_clone_lock function in net/ipv4/inet_connection_sock.c in the
Linux kernel through 4.10.15 allows attackers to cause a denial of service
(double free) or possibly have unspecified other impact by leveraging use
of the accept system call.

CVE-2017-9074
The IPv6 fragmentation implementation in the Linux kernel through 4.11.1
does not consider that the nexthdr field may be associated with an invalid
option, which allows local users to cause a denial of service (out-of-bounds
read and BUG) or possibly have unspecified other impact via crafted socket
and send system calls.

CVE-2017-9075
The sctp_v6_create_accept_sk function in net/sctp/ipv6.c in the Linux kernel
through 4.11.1 mishandles inheritance, which allows local users to cause a
denial of service or possibly have unspecified other impact via crafted
system calls, a related issue to CVE-2017-8890.

CVE-2017-9076
The dccp_v6_request_recv_sock function in net/dccp/ipv6.c in the Linux
kernel through 4.11.1 mishandles inheritance, which allows local users to
cause a denial of service or possibly have unspecified other impact via
crafted system calls, a related issue to CVE-2017-8890.

CVE-2017-9077
The tcp_v6_syn_recv_sock function in net/ipv6/tcp_ipv6.c in the Linux kernel
through 4.11.1 mishandles inheritance, which allows local users to cause a
denial of service or possibly have unspecified other impact via crafted
system calls, a related issue to CVE-2017-8890.

CVE-2017-9242
The __ip6_append_data function in net/ipv6/ip6_output.c in the Linux kernel
through 4.11.3 is too late in checking whether an overwrite of an skb data
structure may occur, which allows local users to cause a denial of service
(system crash) via crafted system calls.

Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-8890
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9074
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9075
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9076
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9077
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9242
Ref: https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.71

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-06-07 21:24:41 +02:00
Kristian Evensen 443d705e38 Add missing APU1 reference to x86 board.d
x86 board.d only contains a case for the APU2, not the APU1. This
causes, for example, network configuration not to be created correctly.
Even though the APU1 seems to reaching EOL, there a still a lot of them
out there.

The APU1 and APU2 is configured in the same way and this patch should
also be considered for stable, as the error also exists there.

Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
2017-06-06 23:02:20 +02:00
Mathias Kresin bf6216e5e3 lantiq: fix broadcasts and vlans in two iface mode
The two phy operation mode where one phy is assigned to an interface
without lantiq,* device tree property and the other phy is assigned to
an interface with the lantiq,wan device property was broken with the
multicast package leaks between vlans fixes.

Move the multicast packages relevant portmap settings to the condition
which handles multicast packages for better readability.

Replace the priv->port_map based port_map only for the interface which
has the lantiq,switch device tree property set, to allow tagged
multicast packages in two phy mode where the lantiq,switch device tree
property isn't used.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-06-03 16:51:42 +02:00
Felix Fietkau 36ccbbdab1 lantiq: select kmod-mt7603 instead of kmod-mt76 for WBMR-300HPD
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-06-03 16:51:41 +02:00
Mathias Kresin 4186d737f6 lantiq: use the P2812HNUF* wan port as wan
The port is labeled as wan and was only used as lan port because of the
"tx ring full" issues fixed with 8f02f7c.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-06-03 16:51:41 +02:00
Mathias Kresin 254bf7961e lantiq: xrx200: use vlan for ethernet wan port
Using the lantiq,wan device tree property for one interface node and
the lantiq,switch device tree property for another interface node at
the same time was never intended/isn't supported at the moment.

The property is meant to be used in two phy operation mode where one
phy is assigned to an interface without lantiq,* device tree property
and the other phy is assigned to an interface with the lantiq,wan
device property to have two netdevs.

If both properties are used at the same time, the lantiq,wan interface
is shown as independent netdev but not able to operate independent. The
port needs to be managed via swconfig. These dependency is not obvious
and fooled already a lot of users.

Add a default WAN vlan for xrx200 devices having an ethernet WAN port
and remove the lantiq,wan device tree property. Leave it up to the user
to set the ethernet WAN port as default WAN interface or to use this
port as additional LAN port.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-06-03 16:09:33 +02:00
Jo-Philipp Wich b78bcdf619 x86: disable X2APIC support for legacy subtargets
Explicitely disable X2APIC support on legacy targets since the targeted
processor types do not support it anyway there.

Fixes FS#285.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-06-02 01:52:14 +02:00
Piotr Dymacz b1257d8d73 ar71xx: fix Wallys DR344 GPIO-connected LEDs and button
This fixes wrong GPIO numbers for LEDs and button in Wallys DR344 board
and sets color of all LEDs to green as the mass production boards have
only green one.

Actually, DR344 has 6 GPIO-connected LEDs and one button:

- GPIO11: status
- GPIO12: sig1
- GPIO13: sig2
- GPIO14: sig3
- GPIO15: sig4
- GPIO16: reset button
- GPIO17: lan

WAN LED is connected directly with AR8035 PHY.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-05-30 14:57:09 +02:00
Piotr Dymacz 21a7e40941 ar71xx: set GE interface as wan by default in Wallys DR344
This aligns default network interfaces configuration with vendor
firmware: GE (eth0) -> wan, FE (eth1) -> lan.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-05-30 14:57:00 +02:00
Piotr Dymacz a412350684 ar71xx: fix GE interface support in Wallys DR344
GMAC0 interface of AR9344 SOC in Wallys DR344 board is connected with
AR8035, not with AR8327. Without this fix, GE interface doesn't work at
all or shows high packet loss ratio.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-05-30 14:56:53 +02:00
Thomas Reifferscheid 20198f7330 ipq806x: fix Netgear X4 R7500 ath10k firmware selection
Netgear X4 R7500 comes with a QCA988X. Select a firmware that matches
the ath10k chipset

Signed-off-by: Thomas Reifferscheid <thomas@reifferscheid.org>
2017-05-27 14:23:14 +02:00
Mathias Kresin 784ceba269 treewide: select ath10k firmware explicit
Do not rely on the default firmware selected by ath10k.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-05-27 14:23:07 +02:00
Hauke Mehrtens e02b12c4cf kernel: update kernel 4.4 to 4.4.70
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2017-05-27 00:43:02 +02:00
Stijn Segers 215c1d05b8 kernel: update kernel 4.4 to 4.4.69
Bump the 17.01 tree kernel to 4.4.69. Trunk 4.4 and 17.01 4.4 have diverged, talked this
through with jow, he was okay with a clean diff against 17.01 and not a backported trunk
patch.

The following patches were applied upstream:

* 062-[1-6]-MIPS-* series
* 042-0004-mtd-bcm47xxpart-fix-parsing-first-block

Reintroduced lantiq/patches-4.4/0050-MIPS-Lantiq-Fix-cascaded-IRQ-setup, as
it was incorrectly included upstream thus dropped from LEDE, but subsequently
reverted upstream. Thanks to Kevin Darbyshire-Bryant for pointing me to it.

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

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

Signed-off-by: Stijn Segers <francesco.borromini@inventati.org>
2017-05-24 22:47:01 +02:00
Rafał Miłecki 74100f3788 bcm53xx: add support for TP-LINK Archer C5 V2
This model also contains few partitions non-discoverable partitions we
need to "protect". Othen than that it uses non-deprecated serial entry
in DTS that doesn't work with LEDE so we need to workaround it as well.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-05-22 11:38:03 +02:00
Jo-Philipp Wich 379155dc0f imagebuilder: fix bundling of DTS sources
Refer to LINUX_KARCH instead of ARCH when bundling DTS files in the image
builder tarball.

While we're at it, also dereference symbolic links when copying as some
kernel architectures contain symbolic links in their DTS directories.

This fixes aarch64 imagebuilders such as brcm2708/bcm2710 ones in particular
as the kernel refers to "aarch64" as "arm64" internally.

Ref: https://forum.lede-project.org/t/lede-image-builder-problem/3680

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-05-16 17:38:33 +02:00
Steffen Weinreich 4bd98e9224 ramips: add om-watchdog to rut5xx DEVICE_PACKAGES
Add om-watchdog as default package for rut5xx.

Signed-off-by: Steffen Weinreich <steve@weinreich.org>
2017-05-15 22:56:01 +02:00
Felix Fietkau 8011215ad2 ar71xx: enable nand-utils in the mikrotik subtarget to ensure it makes it to initramfs
Without it, sysupgrade from initramfs to nand fails

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-05-12 13:33:22 +02:00
Jo-Philipp Wich 7f3ec01069 ramips: fixup-mac-address: add missing include
Add missing include of ramips.sh in order to import the missing
ramips_board_name() procedure.

Fixes FS#774.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-05-11 00:54:06 +02:00
Rafał Miłecki d1e0cc8cd5 bcm53xx: backport DT patches for serial, thermal and MDIO
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-05-09 11:18:39 +02:00
Henryk Heisig 8619683037 ramips: add factory firmware for Tp-Link C20i/C50
TP-Link firmware doesn't accept sysupgrade.bin with metadata.

Signed-off-by: Henryk Heisig <hyniu@o2.pl>
2017-05-05 20:00:57 +02:00
Marcin Jurkowski d90ff22c8c brcm63xx: fix invalid Asmax AR 1004g DTS reference
Build profile for Asmax AR 1004g refers to an invalid DTS "rg100a". The
correct DTS for this device is "ar1004g".

Signed-off-by: Marcin Jurkowski <marcin1j@gmail.com>
2017-05-05 19:59:18 +02:00
Mathias Kresin d49920e450 lantiq: fix avm fritz box mac addresses
It has been shown that the Fritz boxes have the correct mac address set
in the wireless calibration data/eeeprom. Use this mac address as base
for the ethernet and xdsl interface increment/decrement the address to
match the values stored in the tffs.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-05-05 19:59:18 +02:00
Paul Spooren 79cd14152c ramips: enable ramdisk for mt7621
Fixes #758

Signed-off-by: Paul Spooren <paul@spooren.de>
2017-05-04 01:03:25 +02:00
Jo-Philipp Wich bc0de2751c ipq806x: fix EA8500 switch configuration
Do not assign the CPU port twice, this confuses LuCI and possible other
programs relying on topology information in board.json.

Ref: https://github.com/openwrt/luci/issues/1086

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-05-03 14:16:04 +02:00
Thibaut VARENE 8b9f7bd7bd ramips: WN3000RPv3: do not setup switch
The WN3000RPv3 is a repeater with a single ethernet port. Setting up the
switch, even to disable it, is unnecessary and possibly confusing.

Configure LAN as eth0 instead.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
2017-04-28 17:10:01 +02:00
Daniel Gonzalez Cabanelas bf534e45ea brcm63xx: Add Observa VH4032N support
Add support for the Observa Telecom VH4032N router.

This is another BCM6368 router, 128 MB RAM, 32MB flash and 3 USB
host ports.

The wifi chip is an onboard Broadcom BCM43222.

Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
[jonas.gorski: use gpio-hog instead of abusing ephy-reset]
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
2017-04-28 17:09:55 +02:00
Koen Vandeputte 105d5b6f03 cns3xxx: use proper macro's for ID handling
Compiled & tested on cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2017-04-28 17:09:49 +02:00
Kristian Evensen 49ce6d04b0 ramips: add support for Sanlinking D240
The Sanlinking Technologies D240
(http://www.sanlinking.com/en/29-dual-4g-wifi-router.html) is basically the same
device as the ZBT WE826, so adding support for it in LEDE is straight forward.
The differences is that the D240 has two mini-PCIe slots (instead of one), blue
LEDs and supports PoE.

Specification:
* CPU: MT7620A
* 1x 10/100Mbps POE (802.3af/802.3at) Ethernet, 4x 10/100Mbps.
* 16 MB Flash.
* 128 MB RAM.
* 1x USB 2.0 port.
* 2x mini-PCIe slots.
* 2x SIM slots.
* 1x 2.4Ghz WIFI.
* 1x button.

Wifi, USB, switch and both mini-PCIe slots are working. I have not been able to
test the SD card reader.

The device comes pre-installed with an older version of OpenWRT, including Luci.
In order to install LEDE, you need to follow the existing procedure for updating
OpenWRT/LEDE using Luci. I.e., you need to access the UI and update the firmware
using the sysupgrade-image. Remember to select that you do not want to keep
existing settings. The default router address is 192.168.10.1 and
username/password admin/root (at least on my devices).

If you brick the device, the procedure for recovery is the same as for the
WE826. Please see the wiki page for that device for instructions.

Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
2017-04-28 17:09:45 +02:00
Piotr Dymacz 58ec566331 ar71xx: select ATH79_NVRAM only by boards actually use it
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-04-28 17:09:40 +02:00
Mathias Kresin 7e2ad9cbb8 ramips: fix Sercomm NA930 compatible string
The Sercomm NA930 is not a mt7620a evaluation board and shouldn't use
the eval board compatible string.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-04-28 17:09:36 +02:00
Mathias Kresin 88cc06abb7 ramips: remove Planex CS-QR10 sound device tree node
The comptible string is neither added by any LEDE patch nor exists in
in the kernel. Drop the sound node which was obviously added
accidentally with 9195d8da ("ramips: DTS rework").

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-04-28 17:09:29 +02:00
Mathias Kresin f1f0b92a79 ramips: cleanup SPI flash device tree properties usage
Use only the jedec,spi-nor compatible string. Everything else either
never worked or is only support to keep compatibility.

Remove the linux,modalias property. It is obsolete since kernel 4.4.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-04-28 17:09:24 +02:00
Felix Fietkau 6aa0a85fc6 ramips: remove DT pcie nodes for GL-MT300A/N
These devices don't have a secondary wifi chip

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-04-28 17:09:18 +02:00
Vitaly Chekryzhev 28d626556d ramips: ZyXEL Keenetic Omni/Omni2: export gpio usb power
Export gpio usb to allow power management of USB port.

Signed-off-by: Vitaly Chekryzhev <13hakta@gmail.com>
2017-04-28 17:09:08 +02:00
Vitaly Chekryzhev fd693bc0e8 ramips: ZyXEL Keenetic Viva: align factory images
ZyXEL web-flasher requires squashfs to be aligned to 64kb.

Signed-off-by: Vitaly Chekryzhev <13hakta@gmail.com>
2017-04-28 17:09:02 +02:00
Vitaly Chekryzhev 5b2624d618 ramips: ZyXEL Keenetic Viva: export gpio usb power
Export gpio usb to allow power management of USB port.

Signed-off-by: Vitaly Chekryzhev <13hakta@gmail.com>
2017-04-28 17:08:56 +02:00
Yo Abe a66623639a ramips: add ip17xx support to WLI-TX4-AG300N
ramips/rt288x WLI-TX4-AG300N was missing support for its 100Mbit switch which
should be included by default.

Signed-off-by: Yo Abe <abe.geel@gmail.com>
[Jo-Philipp Wich: picked from OpenWrt PR#359, rewrap commit msg, fix Sob]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-04-28 17:08:50 +02:00
Joseph C. Lehner 0405851eb2 ramips: fix EX2700 wireless mac
On some EX2700 devices, the MAC address from the eeprom data differs
from the actual MAC address. Fix that, and cleanup the DTS file
while we're at it.

Signed-off-by: Joseph C. Lehner <joseph.c.lehner@gmail.com>
2017-04-28 17:08:42 +02:00
Vitaly Chekryzhev a12655a840 ramips: ZyXEL Keenetic series update wan mac
Signed-off-by: Vitaly Chekryzhev <13hakta@gmail.com>
2017-04-28 17:07:48 +02:00
Vitaly Chekryzhev 94948252e2 ramips: ZyXEL Keenetic Omni align factory images
ZyXEL web-flasher requires squashfs to be aligned to 64kb.

Signed-off-by: Vitaly Chekryzhev <13hakta@gmail.com>
2017-04-28 17:07:42 +02:00
Vitaly Chekryzhev 85bca2d0fb ramips: correct keenetic-series switch index
Fix switch name typo

Signed-off-by: Vitaly Chekryzhev <13hakta@gmail.com>
2017-04-28 17:07:35 +02:00
Thibaut VARENE 1aee42c6a9 ramips: add support for Netgear WN3000RPv3
This patch adds support for the Netgear WN3000RPv3
http://www.netgear.com/support/product/wn3000rpv3.aspx

Specifications:
- SoC: MediaTek MT7620A (580MHz, ramips)
- RAM: 32MB DDR
- Storage: 8MB NOR SPI flash
- Wireless: builtin MT7620A, 2x2:2 with u.FL connectors
- Ethernet: 1x100M
- Serial: JP1 header, 57600-8N1
- Stock firmware based on OpenWRT Kamikaze

Like the EX2700, the bootloader expects a secondary image signature,
see https://forum.openwrt.org/viewtopic.php?pid=312577#p312577
This is why the same fakeroot image is used for the WN3000

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
2017-04-28 17:07:24 +02:00
BangLang Huang 846457fdbf ramips: fix mac address of miwifi-mini
For the miwifi-mini, the offset of ethernet mac should be 0x28
which you can easyily dump from 'Factory' partition.

Signed-off-by: BangLang Huang <banglang.huang@foxmail.com>
2017-04-28 17:07:04 +02:00
Furong Xu 0f3c2d031a ramips: Clean duplicated status property for Omega2 WMAC in dtsi
At the tail of dtsi, wmac is enabled twice, clean the first one

Signed-off-by: Furong Xu <xfr@outlook.com>
2017-04-28 17:02:48 +02:00
Giuseppe Lippolis 26f07f668a ramips: fixed sms led polarity into dwr-512 DT
Signed-off-by: Giuseppe Lippolis <giu.lippolis@gmail.com>
2017-04-28 17:02:48 +02:00
Thibaut VARENE dbd2212205 ramips: WN3000RPv3: do not setup switch
The WN3000RPv3 is a repeater with a single ethernet port. Setting up the
switch, even to disable it, is unnecessary and possibly confusing.

Configure LAN as eth0 instead.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
2017-04-28 17:02:48 +02:00
Jo-Philipp Wich af1d1ebdda x86: enable 4G high memory support for generic (32bit) subtarget
This is required to fully support a number of 32bit x86 systems equipped
with more than one GB ram, e.g. certain Atom CPU machines.

Ref: https://forum.lede-project.org/t/17-01-1-x86-doesnt-detect-all-of-the-ram/3295

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-04-27 15:26:48 +02:00
Yousong Zhou 3bfe7ee632 generic: keep module aliases inside .modinfo
It seems module aliases are actually essential info.  E.g. other modules
may call xt_request_find_match(NFPROTO_IPV{4,6}, "hashlimit", 1) and the
kernel will request user mode modprobe helper for ipt_hashlimit and
ip6t_hashlimit respectively which are aliases of xt_hashlimit.ko

Compile-tested for armvirt, there is nearly no size impact.

Before

    -rw-r--r-- 1 yousong yousong     304 Jan 10 17:37 config.seed
    -rw-r--r-- 1 yousong yousong    1634 Jan 11 11:07 lede-armvirt-default.manifest
    -rw-r--r-- 1 yousong yousong 1533647 Jan 11 11:07 lede-armvirt-default-rootfs.tar.gz
    -rw-r--r-- 1 yousong yousong 1802711 Jan 11 11:07 lede-armvirt-root.ext4.gz
    -rw-r--r-- 1 yousong yousong 1544597 Jan 11 11:07 lede-armvirt-rootfs.cpio.gz
    -rw-r--r-- 1 yousong yousong 1174984 Jan 11 11:07 lede-armvirt-root.squashfs.gz
    -rwxr-xr-x 1 yousong yousong 1654712 Jan 11 11:07 lede-armvirt-zImage
    -rwxr-xr-x 1 yousong yousong 2738296 Jan 11 11:07 lede-armvirt-zImage-initramfs
    drwxr-xr-x 2 yousong yousong    4096 Jan 10 17:35 packages
    -rw-r--r-- 1 yousong yousong     739 Jan 10 17:37 sha256sums

After

    -rw-r--r-- 1 yousong yousong     304 Jan 10 17:37 config.seed
    -rw-r--r-- 1 yousong yousong    1634 Jan 11 11:10 lede-armvirt-default.manifest
    -rw-r--r-- 1 yousong yousong 1533646 Jan 11 11:10 lede-armvirt-default-rootfs.tar.gz
    -rw-r--r-- 1 yousong yousong 1802711 Jan 11 11:10 lede-armvirt-root.ext4.gz
    -rw-r--r-- 1 yousong yousong 1544593 Jan 11 11:10 lede-armvirt-rootfs.cpio.gz
    -rw-r--r-- 1 yousong yousong 1174984 Jan 11 11:10 lede-armvirt-root.squashfs.gz
    -rwxr-xr-x 1 yousong yousong 1654736 Jan 11 11:10 lede-armvirt-zImage
    -rwxr-xr-x 1 yousong yousong 2738144 Jan 11 11:10 lede-armvirt-zImage-initramfs
    drwxr-xr-x 2 yousong yousong    4096 Jan 10 17:35 packages
    -rw-r--r-- 1 yousong yousong     739 Jan 10 17:37 sha256sums

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-04-27 14:46:31 +08:00
Álvaro Fernández Rojas 1ab41265c3 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:55:03 +02:00
Matthias Schiffer 1d1935b242
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 19:01:28 +02:00
Matthias Schiffer 9117ef8d6a
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 19:01:21 +02:00
Rafał Miłecki 9437fbb7ab bcm53xx: backport BCM5301X patches
This fixes GIC interrupts (required before switching to 4.9), adds few
new entires & introduces DTS for Archer C5.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-04-20 23:04:24 +02:00
Rafał Miłecki 3ff31f8a78 bcm53xx: parepare for building more Linksys images
We still can't enable them by default without proper TRX support.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-04-20 23:03:08 +02:00
Rafał Miłecki ad145e03cc bcm53xx: prepare for building Archer C5 V2 image
Don't enable it yet as kernel needs to be updated first.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-04-20 23:03:07 +02:00
Vittorio Gambaletta 3dbc4175a8
ar71xx: add TP-LINK TL-WR841N/ND v12 image
This router has the same hardware as TP-LINK TL-WR841N/ND v11 (same FCC
ID, same TFTP image name...).

If the stock firmware web interface doesn't accept LEDE factory image,
it can be flashed via the U-Boot TFTP recovery mode, by long-pressing
the reset button after power on.

The TFTP image name is wr841nv11_tp_recovery.bin (yes, v11, not v12).

Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net>
2017-04-20 16:52:54 +02:00
Jo-Philipp Wich 6ca5ccc620 kernel: update kernel 4.4 to 4.4.61
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-04-15 17:20:51 +02:00
Mathias Kresin f2f672c32c 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-12 10:13:40 +02:00
Mathias Kresin f3dc2ffdd4 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-12 10:13:37 +02:00
Jing Qiu 638ca50f3b kernel: Fix the incorrect i_nlink count after jffs2's RENAME_EXCHANGE operations.
The problem is caused by the incorrect handling of the parent inode's
i_nlink count for the dentry to be RENAME_EXCHANGED. There are 3 cases
to consider. Assume we want to RENAME_EXCHANGE struct dentry *a and
struct dentry *b, and inode_a is pointed to by dentry_a, inode_b is
pointed to by dentry_b:

1. If inode_a is a directory, but inode_b isn't, then we must decrease
   the i_nlink count of old_dir_i, and increase the i_nlink of new_dir_i.
2. If inode_a isn't a directory, but inode_b is a directory, then we
   must increase the i_nlink of old_dir_i, and decrease the i_nlink count
   of new_dir_i.
3. If the types of inode_a and inode_b are the same, we don't change the
   i_nlink for either old_dir_i or new_dir_i.

Signed-off-by: Jing Qiu <aqiu0720@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-04-05 09:57:41 +02:00
Piotr Dymacz 1bdd23231b ar71xx: fix Wallys DR344 ethernet MAC addresses offsets
Without this fix, ethernet interfaces on Wallys DR344 use random MAC
addresses.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-04-02 15:09:09 +02:00
Hauke Mehrtens 0dcc4d239d kernel: update kernel 4.4 to 4.4.59
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2017-04-02 14:37:49 +02:00
Henryk Heisig fc90e87b65 mvebu: wrt3200acm enable SDIO interface
add mwifiex-sdio package to wrt3200acm

Signed-off-by: Henryk Heisig <hyniu@o2.pl>
2017-03-11 20:34:33 +01:00
Álvaro Fernández Rojas 9d84accea1 brcm2708: remove duplicated gzip from image generation
Images are now automatically gziped so remove custom image command

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2017-03-11 13:08:20 +01:00
Stijn Segers 1bba5789af ar71xx: add ath10k driver and firmware for Netgear R6100 to firmware image
A Netgear R6100 owner reported the LEDE images lack the ath10k driver and firmware [1]. This patch adds both to the R6100 image.

[1] https://forum.lede-project.org/t/netgear-r6100-5ghz-wifi-not-working-after-initial-install/2222

Signed-off-by: Stijn Segers <francesco.borromini@inventati.org>
2017-03-11 12:46:43 +01:00
Stijn Tintel 4a405ac8f9 brcm2708: add support for the new Raspberry Pi Zero W
Tested-by: Stijn Tintel <stijn@linux-ipv6.be>
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2017-03-09 08:47:41 +01:00
Stijn Tintel e091e8951d brcm2708: order boards and models alphabetically
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-03-08 09:55:37 +01:00
Álvaro Fernández Rojas 8b52a8906b brcm2708: update linux 4.4 patches to latest version
As usual these patches were extracted and rebased from the raspberry pi repo:
https://github.com/raspberrypi/linux/tree/rpi-4.4.y

- led1 can't be controlled on rpi-3 for linux 4.4, remove it.
- Fix modules.mk typos.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2017-03-08 09:54:01 +01:00
Jo-Philipp Wich f8e08ffd94 ramips: fix Linksys RE6500 switch port mapping
Properly map the internal switch ports to the proper LAN1..LAN4 labels.

Fixes #530.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-03-07 17:39:34 +01:00
Kevin Darbyshire-Bryant 09a8183ce8 kernel: update kernel 4.4 to 4.4.52
Bump kernel from 4.4.50 to 4.4.52

Refresh patches

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
2017-03-03 18:18:49 +01:00