openwrt/staging/mkresin.git
5 years agoiperf3: update to 3.6
Philip Prindeville [Tue, 26 Jun 2018 04:34:49 +0000 (22:34 -0600)]
iperf3: update to 3.6

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
5 years agonetfilter: add bpf match support
Alin Nastac [Mon, 25 Jun 2018 08:22:21 +0000 (10:22 +0200)]
netfilter: add bpf match support

Add xt_bpf modules to {kmod-ipt,iptables-mod}-filter.

Match using Linux Socket Filter. Expects a BPF program in decimal
format. This is the format generated by the nfbpf_compile utility.

Signed-off-by: Alin Nastac <alin.nastac@gmail.com>
5 years agokernel: bump 4.14 to 4.14.51
Kevin Darbyshire-Bryant [Thu, 21 Jun 2018 19:24:05 +0000 (19:24 +0000)]
kernel: bump 4.14 to 4.14.51

The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
Refresh patches.

Remove patch that can be reverse applied:
mvebu/patches-4.14/530-ATA-ahci_mvebu-enable-stop_engine-override.patch
mvebu/patches-4.14/531-ATA-ahci_mvebu-pmp-stop-errata-226.patch

Update patch that no longer applied:
ipq806x/patches-4.14/0035-clk-mux-Split-out-register-accessors-for-reuse.patch

Compiled-tested-for: lantiq, ramips
Run-tested-on: lantiq BT hh5a, ramips MIR3g

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Tested-by: Michael Yartys <michael.yartys@protonmail.com>
Tested-by: Rosen Penev <rosenp@gmail.com>
5 years agoath79: add support for ON Networks N150R
Zoltan HERPAI [Wed, 20 Jun 2018 14:21:08 +0000 (16:21 +0200)]
ath79: add support for ON Networks N150R

This is a rebranded Netgear WNR612v2, specs are the same.

 - Atheros AR7240 (Python) @400MHz
 - flash 4MB
 - ram 32MB
 - ethernet 10/100: 1xwan + 2xlan (only two)
 - radio AR9285

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
5 years agoath79: add Netgear WNR612 v2
Zoltan HERPAI [Wed, 20 Jun 2018 14:21:07 +0000 (16:21 +0200)]
ath79: add Netgear WNR612 v2

Netgear WNR612 v2:
 - cpu Atheros AR7240 (Python) @400MHz
 - flash 4MB
 - ram 32MB
 - ethernet 10/100: 1xwan + 2xlan (only two)
 - radio AR9285

As there is a rebranded WNR612v2 called ON Networks N150R, add
a dtsi which includes all device support, and add a separate dts
for the device only (with a separate one for the subsequent N150R).

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
5 years agofirmware-utils: tplink-safeloader: switch RE350 to dynamic partitions
Alex Maclean [Wed, 20 Jun 2018 13:56:22 +0000 (14:56 +0100)]
firmware-utils: tplink-safeloader: switch RE350 to dynamic partitions

Use the new dynamic partition split in tplink-safeloader so we no longer
have to worry about kernel size increases.

Signed-off-by: Alex Maclean <monkeh@monkeh.net>
5 years agoramips: RE350: add rootfs offset to header
Alex Maclean [Wed, 20 Jun 2018 13:56:21 +0000 (14:56 +0100)]
ramips: RE350: add rootfs offset to header

Have mktplinkfw fill in the rootfs offset so the firmware splitter can
find it without aligning to erase blocks.

Signed-off-by: Alex Maclean <monkeh@monkeh.net>
5 years agofirmware-utils: tplink-safeloader: add dynamic partitions
Alex Maclean [Wed, 20 Jun 2018 13:56:20 +0000 (14:56 +0100)]
firmware-utils: tplink-safeloader: add dynamic partitions

Add support to dynamically split the firmware partition into os-image
and file-system partitions. This is done by replacing those entries in
the partition table with a single unified firmware partition, which is
then split according to actual kernel image size.

The factory image will have the file-system partition aligned to a 64K
erase block, but the sysupgrade image skips this and aligns only the
JFFS2 EOF marker to squeeze out more space.

This should prevent further creeping updates to the kernel partition
size while maximizing space for the overlay filesystem on smaller
devices.

Signed-off-by: Alex Maclean <monkeh@monkeh.net>
5 years agofirmware-utils: mktplinkfw: add rootfs offset for combined images
Alex Maclean [Wed, 20 Jun 2018 13:56:19 +0000 (14:56 +0100)]
firmware-utils: mktplinkfw: add rootfs offset for combined images

Add an option (-O) to calculate rootfs offset for combined images.

This is needed for the TP-Link mtdsplit driver to locate the rootfs
when the start is not aligned to an erase block. This will be the
case for sysupgrade images produced by tplink-safeloader with upcoming
dynamic partition splitting.

Signed-off-by: Alex Maclean <monkeh@monkeh.net>
5 years agomac80211: enable ath10k LED support by default
Stijn Tintel [Fri, 22 Jun 2018 11:42:20 +0000 (14:42 +0300)]
mac80211: enable ath10k LED support by default

Commit 61d57a2f88b90ba951012e66c7c6fae9234c97b4 adds ath10k LED
support, but doesn't add an option to actually enable it.

After enabling this option, a LED named ath10k-phy0 appears in sysfs,
and a trigger can be assigned to it. Since 60deb3cdef4a the default set
trigger is the tpt one.

Enable it by default, as most devices using ath10k chips shouldn't be
severely space-constrained. There are likely many devices that can
benefit from having it enabled, like my testing device.

Before:
   text    data     bss     dec     hex filename
 245311    8899      16  254226   3e112 ath10k_core.ko

After:
   text    data     bss     dec     hex filename
 245979    8899      16  254894   3e3ae ath10k_core.ko

Tested on a D-Link DAP-2695-A1 (ar71xx).

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
5 years agomac80211: ath10k: use tpt LED trigger by default
Mathias Kresin [Fri, 22 Jun 2018 17:11:08 +0000 (19:11 +0200)]
mac80211: ath10k: use tpt LED trigger by default

Use the tpt LED trigger for each created phy led. Ths way LEDs attached
to the ath10k GPIO pins are indicating the phy status and blink on
traffic.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years agoramips: add support for TP-Link Archer C2
Franz Flasch [Thu, 17 May 2018 09:57:00 +0000 (11:57 +0200)]
ramips: add support for TP-Link Archer C2

Specification:

- System-On-Chip: MT7620A
- CPU/Speed: 580 MHz
- Flash-Chip: Winbond 25Q64BVSIG
- Flash size: 8192 KiB
- RAM: 64 MiB
- Wireless No1: SoC-integrated: MT7620A 2.4GHz 802.11bgn
- Wireless No2: On-board chip: MT7610EN 5GHz 802.11ac
- Switch: RTL8367RB Gigabit Switch
- USB: Yes 1 x 2.0

Preparing a TFTP recovery image for initial flashing:

Currently the only method to install openwrt for the first time is via
TFTP download in u-boot. After first install you can use regular updates.
WARNING: This method also overwrites the bootloader partition!

Create a TFTP recovery image:

1) Download a stock TP-Link Firmware file here:
     https://www.tp-link.com/en/download/Archer-C2_V1.html#Firmware
2) Extract u-boot from the binary file:
     #> dd if=c2v1_stock_firmware.bin of=c2v1_uboot.bin bs=1 skip=512 count=131072
3) Now merge the sysupgrade image and the u-boot into one binary:
     #> cat c2v1_uboot.bin openwrt-squashfs-sysupgrade.bin > ArcherC2V1_tp_recovery.bin

The resulting image can be flashed via TFTP recovery mode.

Flash instructions:

1) To flash the recovery image, start a TFTP server from IP address
   192.168.0.66 and serve the recovery image named
   ArcherC2V1_tp_recovery.bin.
2) Connect your device to the LAN port, then press the WPS/Reset button
   and power it up. Keep pressing the WPS/Reset button for 10 seconds.
   It will try to download the recovery image and flash it.

It can take up to 20-25 minutes to finish. When it reaches 100%, the
router will reboot itself.

Signed-off-by: Serge Vasilugin <vasilugin@yandex.ru>
Signed-off-by: Franz Flasch <franz.flasch@gmx.at>
5 years agoramips: fix ZyXEL Keenetic Viva switch config
Franz Flasch [Thu, 17 May 2018 09:51:38 +0000 (11:51 +0200)]
ramips: fix ZyXEL Keenetic Viva switch config

The rtl8367b driver never supported a mdio property and it is quite
likely that the switch never worked for the board.

Use the mii-bus property instead to manage the switch via a mdio bus.

Signed-off-by: Franz Flasch <franz.flasch@gmx.at>
5 years agokernel: rtl8366-smi: add Realtek switch management via mii-bus
Franz Flasch [Thu, 17 May 2018 09:51:38 +0000 (11:51 +0200)]
kernel: rtl8366-smi: add Realtek switch management via mii-bus

Current version of rtl8366-smi module only supports Realtek switch
managment via two gpio lines. This adds Realtek switch
management via mii_bus. Tested on a Tp-link Archer C2 v1 (Mediatek
SoC mt7620a based)

dts-file configuration should look like this:

rtl8367rb {
compatible = "realtek,rtl8367b";
realtek,extif1 = <1 0 1 1 1 1 1 1 2>;
mii-bus = <&mdio0>;
};

&ethernet {
status = "okay";
mtd-mac-address = <&rom 0xf100>;
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;

port@5 {
status = "okay";
mediatek,fixed-link = <1000 1 1 1>;
phy-mode = "rgmii";
};

mdio0: mdio-bus {
status = "okay";
};
};

Signed-off-by: Serge Vasilugin <vasilugin@yandex.ru>
Signed-off-by: Franz Flasch <franz.flasch@gmx.at>
5 years agokernel: rtl8367b: drop redundant compatible
Mathias Kresin [Wed, 20 Jun 2018 20:10:50 +0000 (22:10 +0200)]
kernel: rtl8367b: drop redundant compatible

Remove the compatible without vendor prefix. It is formal wrong and not
used in the tree.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years agodropbear: let opkg manage symlinks of ssh, scp
Yousong Zhou [Mon, 25 Jun 2018 05:16:09 +0000 (13:16 +0800)]
dropbear: let opkg manage symlinks of ssh, scp

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
5 years agomusl: sys/socket.h: fix SO_PEERSEC value on MIPS
Matthias Schiffer [Sun, 24 Jun 2018 15:20:43 +0000 (17:20 +0200)]
musl: sys/socket.h: fix SO_PEERSEC value on MIPS

Differing from all other archs supported by musl, MIPS defines SO_PEERSEC
to 30 instead of 31.

Patch has also been submitted upstream.

Reported-by: Andrey Jr. Mlenikov <temnota.am@gmail.com>
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
5 years agoar71xx: Add support for TP-Link CPE210 v2
Adrian Schmutzler [Fri, 19 Jan 2018 13:45:42 +0000 (14:45 +0100)]
ar71xx: Add support for TP-Link CPE210 v2

This PR adds support for a popular low-cost 2.4GHz N based AP

Specifications:
 - SoC: Qualcomm Atheros QCA9533 (650MHz)
 - RAM: 64MB
 - Storage: 8 MB SPI NOR
 - Wireless: 2.4GHz N based built into SoC 2x2
 - Ethernet: 1x 100/10 Mbps, integrated into SoC, 24V POE IN

Installation:
Flash factory image through stock firmware WEB UI
or through TFTP
To get to TFTP recovery just hold reset button while powering on for
around 4-5 seconds and release.
Rename factory image to recovery.bin
Stock TFTP server IP:192.168.0.100
Stock device TFTP adress:192.168.0.254

Notes:
TP-Link does not use bootstrap registers so without this patch reference
clock detects as 40MHz while it is actually 25MHz.
This is due to messed up bootstrap resistor configuration on the PCB.
Provided GPL code just forces 25MHz reference clock.
That causes booting with completely wrong clocks, for example, CPU tries
to boot at 1040MHz while the stock is 650MHz.
So this PR depends on PR #672 to remove 40MHz reference clock.
Thanks to Sven Eckelmann <sven@narfation.org> for properly patching that.

Signed-off-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoar71xx: Add TP-Link Pharos v2 board detection
Adrian Schmutzler [Fri, 19 Jan 2018 11:58:40 +0000 (12:58 +0100)]
ar71xx: Add TP-Link Pharos v2 board detection

Add support for detecting TP-Link Pharos v2 boards.
They use different format in product-info partition than v1 boards.

Code was written mostly by Alexander Couzens <lynxis@fe80.eu>

Signed-off-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoRe-enable arbitrary IPv6 addresses as outer ip4-in-ip6 tunnel source address
Axel Neumann [Mon, 21 May 2018 18:32:09 +0000 (20:32 +0200)]
Re-enable arbitrary IPv6 addresses as outer ip4-in-ip6 tunnel source address

The 666-Add-support-for-MAP-E-FMRs-mesh-mode.patch kernel patches
break the possibility for using an ip4ip6 tunnel interface as a fall
back interface accepting ip4-in-ip6 tunneled packets from any remote
address. This works out of the box with any normal (non-666-patched)
kernel and can be configured by setting up an 'ip -6 tunnel' with type
'any' or 'ip4ip6' and a remote address of '::'.

The misbehavior comes with line 290 the patch which discards all packets
that do not show the expected saddr, even if no single fmr rule was
defined and despite the validity of the saddr was already approved earlier.

Signed-off-by: Axel Neumann <neumann@cgws.de>
Acked-by: Hans Dedecker <dedeckeh@gmail.com>
5 years agobuild: change version.mk defaults to OpenWrt
Jo-Philipp Wich [Fri, 22 Jun 2018 11:45:03 +0000 (13:45 +0200)]
build: change version.mk defaults to OpenWrt

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agoiptables: set nonshared flag
John Crispin [Fri, 22 Jun 2018 09:46:21 +0000 (11:46 +0200)]
iptables: set nonshared flag

this makes sure that offloading support is properly included for v4.14 targets.

Signed-off-by: John Crispin <john@phrozen.org>
5 years agomediatek: Add support for the UniElec U7623-02
Kristian Evensen [Tue, 19 Jun 2018 23:17:40 +0000 (01:17 +0200)]
mediatek: Add support for the UniElec U7623-02

This commit adds support for the MT7623A-based UniElec U7623-02 router,
with eMMC storage and 512MB RAM. The router can be delivered with NAND
Flash and more memory, but I only have access to the one configuration.
The DTS is structured in such a way that adding support for
more/different storage/memory should be straight forward.

The device has the following specifications:

* MT7623A (quad-core, 1.3 GHz)
* 512MB RAM (DDR3)
* 8GB storage (eMMC 4.5)
* 2x normal miniPCIe slots
* 1x miniPCIe slot that is connected via an internal USB OTG port
* 5x 1Gbps Ethernet (MT7530 switch)
* 1x UART header
* 1x USB 3.0 port
* 1x SATA 3.0
* 1x 40P*0.5mm FPC for MIPI LCD
* 1x SIM slot
* 12x LEDs (2 GPIO controlled)
* 1x reset button
* 1x DC jack for main power (12V)

The following has been tested and is working:
* Ethernet switch
* miniPCIe slots (tested with Wi-Fi cards)
* USB 3.0 port
* sysupgrade
* reset button

Not working:
* The miniPCIe connected via USB OTG. For the port to work, some MUSB
glue must be added. I am currently in the process of porting the glue
from the vendor SDK.

Not tested:
* SATA 3.0
* MIPI LCD

Installation:

The board ships with u-boot, and the first installation needs to be done
via the bootloader using tftp. Step number one is to update the MBR of
the eMMC, as the one that ships with the device is broken. Since the
device can ship with different storage sizes, I will not provide the
exact steps for creating a valid MBR. However, I have made some
assumptions about the disk layout - there must be one 8MB recovery
partition (FAT32) and a partition for the rootfs (Linux).

The board loads the kernel from block 0xA00 (2560) and I have reserved
32MB for the kernel (65536 blocks). I have aligned the partitions on the
erase block size (4096 byte), so the recovery partition must start on
block 69632 and end on 86016 (16385 sectors). The rootfs is assumed to
start on sector 90112.

In order to install the mbr, you run the following commands from the
u-boot command line:

* tftpboot ${loadaddr} <name of mbr file>
* mmc device 0
* mmc write ${loadaddr} 0x00 1

Run the following commands to install + boot OpenWRT:

* tftpboot ${loadaddr} openwrt-mediatek-mt7623-7623a-unielec-u7623-02-emmc-512m-squashfs-sysupgrade-emmc.bin.gz
* run boot_wr_img
* run boot_rd_img
* bootm

Recovery:

In order to recover the router, you need to follow the installation
steps above (no need to replace MBR).

Notes:

* F2FS is used as the overlay filesystem.

* The device does not ship with any valid MAC address, so a random
address has to be generated. As a work-around, I write the initial
random MAC to a file on the recovery partition. The MAC of the WAN
interface is set to the MAC-address contained in this file on each boot,
and the address of the LAN-interfaces are WAN + 1. The MAC file is kept
across sysupgrade/firstboot.

My approach is slightly different than what the stock image does. The
first fives bytes of the MAC addresses in the stock image are static,
and then the last byte is random. I believe it is better to create fully
random MAC addresses.

* In order to support the miniPCIe-slots, I needed to add missing
pcie-nodes to mt7623.dtsi. The nodes are just c&p from the upstream
dtsi.

* One of the USB3.0 phys (u3phy2) on the board can be used as either USB
or PCI, and one of the wifi-cards is connected to this phy. In order to
support switching the phy from USB to PCI, I needed to patch the
phy-driver. The patch is based on a rejected (at least last time I
checked) PCI-driver submitted to the linux-mediatek mailing list.

* The eMMC is configured to boot from the user area, and according to
the data sheet of the eMMC this value can't be changed.

* I tried to structure the MBR more nicely and use for example a
FAT32-parition for the kernel, so that we don't need to write/read from
some offset. The bootloader does not support reading from
FAT32-paritions. While the command (fatload) is there, it just throws an
error when I try to use it.

* I will submit and hope to get the DTS for the device accepted
upstream. If and when that happens, I will update the patches
accordingly.

Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
5 years agokernel: cleanup offload hooks on netdev unregister
Chen Minqiang [Sun, 29 Apr 2018 06:15:59 +0000 (14:15 +0800)]
kernel: cleanup offload hooks on netdev unregister

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
5 years agomac80211: drop 355-ath9k-limit-retries-for-powersave-response-frames.patch
John Crispin [Fri, 22 Jun 2018 07:43:56 +0000 (09:43 +0200)]
mac80211: drop 355-ath9k-limit-retries-for-powersave-response-frames.patch

several people reported this bug to be causing drop out issues

Signed-off-by: John Crispin <john@phrozen.org>
5 years agomac80211: ath10k fix vht160 firmware crash
Ansuel Smith [Sun, 17 Jun 2018 20:35:42 +0000 (22:35 +0200)]
mac80211: ath10k fix vht160 firmware crash

When the 160mhz width is selected the ath10k firmware crash. This fix this problem.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
5 years agomac80211: ath10k add leds support
Ansuel Smith [Sun, 17 Jun 2018 20:36:46 +0000 (22:36 +0200)]
mac80211: ath10k add leds support

This adds support for leds handled by the wireless chipset.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
5 years agowwan: Add support for Gemalto Cinterion cellular modules
David Thornley [Fri, 22 Jun 2018 06:25:22 +0000 (16:25 +1000)]
wwan: Add support for Gemalto Cinterion cellular modules

Includes specific support for PH8(1e2d-0053) / ELS61(1e2d-005b) modules.

Note for ELS61, the serial driver changes from serial option(ttyUSB) to usb-cdc (ttyACM).

Two additional fixes in this commit resolve issues with ttyACM devices: -

* wwan.sh - sys-fs has a subdirectory indirection (*/tty/ttyACMx) which was not handled properly
* wwan.usb - dependent scripts were not included, so this never actually called proto_set_available for example (and relied on inadvertent call for ttyUSB case)

Signed-off-by: David Thornley <david.thornley@touchstargroup.com>
5 years agobusybox: rename udhcpc-remove-code-which-requires-server-ID-to-be-on patch
Hans Dedecker [Thu, 21 Jun 2018 20:44:19 +0000 (22:44 +0200)]
busybox: rename udhcpc-remove-code-which-requires-server-ID-to-be-on patch

Move udhcpc-remove-code-which-requires-server-ID-to-be-on patch from 500
to 400

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
5 years agobusybox: udhcpc: replace udhcpc_no_msg_dontroute patch by upstream fix
Hans Dedecker [Thu, 21 Jun 2018 20:26:18 +0000 (22:26 +0200)]
busybox: udhcpc: replace udhcpc_no_msg_dontroute patch by upstream fix

Replace 204-udhcpc_no_msg_dontroute patch by the upstream busybox fix
which removes the code which requires the server ID to be on local
network

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
5 years agolantiq: fix arcadyan vg3503j switch port indexing
Mathias Kresin [Thu, 21 Jun 2018 18:45:53 +0000 (20:45 +0200)]
lantiq: fix arcadyan vg3503j switch port indexing

Both version of the vg3503j have the LAN1 labelled port connected to
switch port 4 and the LAN2 labelled port connected to switch port 2.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years agoramips: Add support for Phicomm K2G
Chuanhong Guo [Wed, 20 Jun 2018 16:56:38 +0000 (00:56 +0800)]
ramips: Add support for Phicomm K2G

Specification:
- SoC: MediaTek MT7620A
- Flash: 8 MB
- RAM: 64 MB
- Ethernet: 4 FE ports and 1 GE port (RTL8211F on port 5)
- Wireless radio: MT7620 for 2.4G and MT7612E for 5G, both equipped with external PA.
- UART: 1 x UART on PCB - 57600 8N1

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

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
5 years agokernel: define THERMAL_EMERGENCY_POWEROFF_DELAY_MS
Stijn Tintel [Tue, 19 Jun 2018 17:58:51 +0000 (20:58 +0300)]
kernel: define THERMAL_EMERGENCY_POWEROFF_DELAY_MS

Enabling CONFIG_ATH10K_THERMAL on targets that don't have CONFIG_THERMAL
enabled in their kernel config causes build to fail due to missing
symbol THERMAL_EMERGENCY_POWEROFF_DELAY_MS. Add it to kmod-thermal.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
5 years agoltq-vdsl-fw: fix ltq-vdsl-vr9-vectoring-fw-installer package install
Daniel Golle [Thu, 21 Jun 2018 10:00:12 +0000 (12:00 +0200)]
ltq-vdsl-fw: fix ltq-vdsl-vr9-vectoring-fw-installer package install

The package is not being generated otherwise, which is fatal because
it is part of the subtargets default package set...

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years agomt76: update to the latest version
Felix Fietkau [Thu, 21 Jun 2018 09:18:39 +0000 (11:18 +0200)]
mt76: update to the latest version

1d4ca10 mt76x2: track rssi for gain adjustment per station

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agoramips: Add support for Mikrotik RouterBOARD RBM33g
Tobias Schramm [Fri, 4 May 2018 01:47:23 +0000 (03:47 +0200)]
ramips: Add support for Mikrotik RouterBOARD RBM33g

This commit adds support for the Mikrotik RouterBOARD RBM33g.

=Hardware=

The RBM33g is a mt7621 based device featuring three gigabit ports, 2
miniPCIe slots with sim card sockets, 1 M.2 slot, 1 USB 3.0 port and a male
onboard RS-232 serial port. Additionally there are a lot of accessible
GPIO ports and additional buses like i2c, mdio, spi and uart.

==Switch==

The three Ethernet ports are all connected to the internal switch of the
mt7621 SoC:

port 0: Ethernet Port next to barrel jack with PoE printed on it
port 1: Innermost Ethernet Port on opposite side of RS-232 port
port 2: Outermost Ethernet Port on opposite side of RS-232 port
port 6: CPU

==Flash==

The device has two spi flash chips. The first flash chips is rather small
(512 kB), connected to CS0 by default and contains only the RouterBOOT
bootloader and some factory information (e.g. mac address).
The second chip has a size of 16 MB, is by default connected to CS1 and
contains the firmware image.

==PCIe==

The board features three PCIe-enabled slots. Two of them are miniPCIe
slots (PCIe0, PCIe1) and one is a M.2 (Key M) slot (PCIe2).
Each of the miniPCIe slots is connected to a dedicated mini SIM socket
on the back of the board.

Power to all three PCIe-enabled slots is controlled via GPIOs on the
mt7621 SoC:

PCIe0: GPIO9
PCIe1: GPIO10
PCIe2: GPIO11

==USB==

The board has one external USB 3.0 port at the rear. Additionally PCIe
port 0 has a permanently enabled USB interface. PCIe slot 1 shares its
USB interface with the rear USB port. Thus only either the rear USB port
or the USB interface of PCIe slot 1 can be active at the same time. The
jumper next to the rear USB port controls which one is active:

open: USB on PCIe 1 is active
closed: USB on rear USB port is active

==Power==

The board can accept both, passive PoE and external power via a 2.1 mm
barrel jack. The input voltage range is 11-32 V.

=Installation=

==Prerequisites==

A USB -> RS-232 Adapter and a null modem cable are required for
installation.

To install an OpenWRT image to the device two components must be built:

1. A openwrt initramfs image
2. A openwrt sysupgrade image

===initramfs & sysupgrade image===

Select target devices "Mikrotik RBM33G" in
openwrt menuconfig and build the images. This will create the images
"openwrt-ramips-mt7621-mikrotik_rbm33g-initramfs-kernel.bin" and
"openwrt-ramips-mt7621-mikrotik_rbm33g-squashfs-sysupgrade.bin" in the output
directory.

==Installing==

**Make sure to back up your RouterOS license in case you do ever want to
go back to RouterOS using "/system license output" and back up the created
license file.**

Serial settings: 115200 8N1

The installation is a two-step process. First the
"openwrt-ramips-mt7621-mikrotik_rbm33g-initramfs-kernel.bin" must be booted
via tftp:

1. Set up a dhcp server that points the bootfile to tftp server serving
   the "openwrt-ramips-mt7621-mikrotik_rbm33g-initramfs-kernel.bin"
   initramfs image
2. Connect to WAN port (left side, next to sys-LED and power indicator)
3. Connect to serial port of board
4. Power on board and enter RouterBOOT setup menu
5. Set boot device to "boot over ethernet"
6. Set boot protocol to "dhcp protocol" (can be omitted if DHCP server
   allows dynamic bootp)
6. Save config
7. Wait for board to boot via Ethernet

On the serial port you should now be presented with the OpenWRT boot log.
The next steps will install OpenWRT persistently.

1. Copy "openwrt-ramips-mt7621-mikrotik_rbm33g-squashfs-sysupgrade.bin" to the device
   using scp.
2. Write openwrt to flash using "sysupgrade
   openwrt-ramips-mt7621-mikrotik_rbm33g-squashfs-sysupgrade.bin"

Once the flashing completes reboot the router and let it boot from flash.
It should boot straight to OpenWRT.

Signed-off-by: Tobias Schramm <tobleminer@gmail.com>
5 years agoramips: Add lzma-loader targets
Tobias Schramm [Thu, 3 May 2018 16:44:27 +0000 (18:44 +0200)]
ramips: Add lzma-loader targets

Signed-off-by: Tobias Schramm <tobleminer@gmail.com>
5 years agoramips: Add support for mt7621 to lzma-loader
Tobias Schramm [Thu, 3 May 2018 14:27:10 +0000 (16:27 +0200)]
ramips: Add support for mt7621 to lzma-loader

Signed-off-by: Tobias Schramm <tobleminer@gmail.com>
5 years agoramips: fix Newifi D1 mtd partition
Deng Qingfang [Wed, 20 Jun 2018 17:34:51 +0000 (01:34 +0800)]
ramips: fix Newifi D1 mtd partition

Newifi D1 has 32 MiB flash, so the firmware partition size should be 0x1fb0000

Signed-off-by: Deng Qingfang <dengqf6@mail2.sysu.edu.cn>
5 years agowireguard: bump to 0.0.20180620
Kevin Darbyshire-Bryant [Wed, 20 Jun 2018 19:59:42 +0000 (19:59 +0000)]
wireguard: bump to 0.0.20180620

0bc4230 version: bump snapshot
ed04799 poly1305: add missing string.h header
cbd4e34 compat: use stabler lkml links
caa718c ratelimiter: do not allow concurrent init and uninit
894ddae ratelimiter: mitigate reference underflow
0a8a62c receive: drop handshake packets if rng is not initialized
cad9e52 noise: wait for crng before taking locks
83c0690 netlink: maintain static_identity lock over entire private key update
0913f1c noise: take locks for ss precomputation
073f31a qemu: bump default kernel
bec4c48 wg-quick: android: don't forget to free compiled regexes
7ce2ef3 wg-quick: android: disable roaming to v6 networks when v4 is specified
9132be4 dns-hatchet: apply resolv.conf's selinux context to new resolv.conf
41a5747 simd: no need to restore fpu state when no preemption
6d7f0b0 simd: encapsulate fpu amortization into nice functions
f8b57d5 queueing: re-enable preemption periodically to lower latency
b7b193f queueing: remove useless spinlocks on sc
5bb62fe tools: getentropy requires 10.12
4e9f120 chacha20poly1305: use slow crypto on -rt kernels on arm too

Compiled-for: ar71xx, lantiq
Run-tested-on: ar71xx Archer C7 v2 & lantiq HH5a

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
5 years agobrcm2708: Add wifi driver, firmware and NVRAM for Raspberry Pi 3 b
Christo Nedev [Wed, 20 Jun 2018 19:29:39 +0000 (19:29 +0000)]
brcm2708: Add wifi driver, firmware and NVRAM for Raspberry Pi 3 b

2708 -> 43430 -> pi0w

2709 -> 43430 -> pi3b
2709 -> 43455 -> pi3bplus

2710 -> 43430 -> pi3b
2710 -> 43455 -> pi3bplus

Signed-off-by: Christo Nedev <christo.nedev@gmail.com>
5 years agoodhcp6c: update to latest git HEAD
Hans Dedecker [Wed, 20 Jun 2018 13:34:18 +0000 (15:34 +0200)]
odhcp6c: update to latest git HEAD

b99c1f6 odhcp6c: remove len check in option parsing handle

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
5 years agoar71xx: add support for TP-LINK Archer C7 v5
Arvid E. Picciani [Mon, 16 Apr 2018 11:18:37 +0000 (13:18 +0200)]
ar71xx: add support for TP-LINK Archer C7 v5

TP-Link Archer C7 v5 is a dual-band AC1750 router, based on Qualcomm/Atheros
QCA9563+QCA9880.

Specification:

- 750/400/250 MHz (CPU/DDR/AHB
- 128 MB of RAM (DDR2)
- 16 MB of FLASH (SPI NOR)
- 3T3R 2.4 GHz
- 3T3R 5 GHz
- 5x 10/100/1000 Mbps Ethernet
- 10x LED, 2x button
- UART header on PCB

Flash instruction:
1. Upload lede-ar71xx-generic-archer-c7-v5-squashfs-factory.bin via Web interface

Flash instruction using TFTP recovery:
1. Set PC to fixed ip address 192.168.0.66
2. Download lede-ar71xx-generic-archer-c7-v5-squashfs-factory.bin
and rename it to ArcherC7v5_tp_recovery.bin
3. Start a tftp server with the file tp_recovery.bin in its root directory
4. Turn off the router
5. Press and hold Reset button
6. Turn on router with the reset button pressed and wait ~15 seconds
7. Release the reset button and after a short time
the firmware should be transferred from the tftp server
8. Wait ~30 second to complete recovery.

Signed-off-by: Arvid E. Picciani <aep@exys.org>
5 years agoocteon: Add and set CPU type Octeon+ as default
Daniel Engberg [Tue, 19 Jun 2018 06:44:54 +0000 (08:44 +0200)]
octeon: Add and set CPU type Octeon+ as default

The lowest CPU type used by supported Octeon platform
is Octeon+ (EdgeRouter Lite) while EdgeRouter Pro/ER-8 uses
Octeon II which is backwards compatible with Octeon+.

Sources:
https://community.ubnt.com/t5/EdgeRouter/EdgeRouter-Pro-CPU/td-p/654599
https://www.cavium.com/octeon-II-CN68XX.html
"OCTEON II family is fully software compatible with the widely-adopted
OCTEON Plus family"

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
5 years agoethtool: Update to 4.17
Robert Marko [Mon, 18 Jun 2018 15:50:47 +0000 (17:50 +0200)]
ethtool: Update to 4.17

Tested on 8devices Jalapeno(ipq40xx)
Introduces following changes
* Fix: In ethtool.8, remove superfluous and incorrect \
* Fix: fix uninitialized return value
* Fix: fix RING_VF assignment
* Fix: remove unused global variable
* Fix: several fixes in do_gregs()
* Fix: correctly free hkey when get_stringset() fails
* Fix: remove unreachable code
* Fix: fix stack clash in do_get_phy_tunable and do_set_phy_tunable
* Feature: Add register dump support for MICROCHIP LAN78xx

Signed-off-by: Robert Marko <robimarko@gmail.com>
5 years agoltq-vdsl-fw: add meaningful version information
Daniel Golle [Wed, 20 Jun 2018 12:38:13 +0000 (14:38 +0200)]
ltq-vdsl-fw: add meaningful version information

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years agodnsmasq: fix dnsmasq startup issue
Hans Dedecker [Wed, 20 Jun 2018 11:21:28 +0000 (13:21 +0200)]
dnsmasq: fix dnsmasq startup issue

Commit ecd954d530 installs specific interface triggers which rewrites the dnsmasq config
file and restarts dnsmasq if the network interface becomes active for which a trigger
has been installed.
In case no dhcp sections are specified or ignore is set to 1 dnsmasq will not be started
at startup which breaks DNS resolving.
Fix this by ditching the BOOT check in start_service and always start dnsmasq at startup.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
5 years agobrcm2708: Add wifi driver, firmware and NVRAM for RPi1
Daniel Golle [Wed, 20 Jun 2018 09:16:54 +0000 (11:16 +0200)]
brcm2708: Add wifi driver, firmware and NVRAM for RPi1

Apparently there are RPi1 devices with BRCM43430 wifi, such as the
Pi Zero W. Add the necessary packages for that to the image generated
for those boards as well.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years agoath79: ar934x: use irq-ath79-intc driver and enable wmac
Johann Neuhauser [Tue, 19 Jun 2018 06:16:01 +0000 (08:16 +0200)]
ath79: ar934x: use irq-ath79-intc driver and enable wmac

Signed-off-by: Johann Neuhauser <johann@it-neuhauser.de>
5 years agoath79: qca95xx: add new intc2, correct intc3 and add second pcie on qca9557
Johann Neuhauser [Tue, 19 Jun 2018 06:16:28 +0000 (08:16 +0200)]
ath79: qca95xx: add new intc2, correct intc3 and add second pcie on qca9557

Signed-off-by: Johann Neuhauser <johann@it-neuhauser.de>
5 years agoath79: fix irq-ath79-intc driver and add support for other ath79 SoCs
Johann Neuhauser [Mon, 18 Jun 2018 17:15:21 +0000 (19:15 +0200)]
ath79: fix irq-ath79-intc driver and add support for other ath79 SoCs

Add the missing enable and disable function.
Remove dummy mask and unmask function and use the one provided by
irq_dummy_chip.
Allow interrupt status register being defined from dts.
Add ddr_wb_flush for ar934x/qca953x.
Rename controller name to qca,ar9340-intc because this design was
first introduced in AR934x.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
Signed-off-by: Johann Neuhauser <johann@it-neuhauser.de>
5 years agoramips: add support for ELECOM WRC-1167GHBK2-S
INAGAKI Hiroshi [Fri, 15 Jun 2018 15:27:51 +0000 (00:27 +0900)]
ramips: add support for ELECOM WRC-1167GHBK2-S

ELECOM WRC-1167GHBK2-S is a 2.4/5 GHz band 11ac router, based on
MediaTek MT7621A.

Specification:

- MT7621A (2-Cores, 4-Threads)
- 128 MB of RAM (DDR3)
- 16 MB of Flash (SPI)
- 2T2R 2.4/5 GHz
  - MediaTek MT7615D
- 5x 10/100/1000 Mbps Ethernet
- 6x LEDs, 2x keys
- UART header on PCB
  - Vcc, GND, TX, RX from ethernet port side
  - baudrate: 57600 bps

Flash instruction using factory image:

1. Rename the factory image to "wrc-1167ghbk2-s_v0.00.bin"
2. Connect the computer to the LAN port of WRC-1167GHBK2-S
3. Connect power cable to WRC-1167GHBK2-S and turn on it
4. Access to "http://192.168.2.1/details.html" and open firmware
update page ("手動更新(アップデート)")
5. Select the factory image and click apply ("適用") button
6. Wait ~150 seconds to complete flashing

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
5 years agoipq806x: add support for NEC Aterm WG2600HP
INAGAKI Hiroshi [Thu, 17 May 2018 07:06:02 +0000 (16:06 +0900)]
ipq806x: add support for NEC Aterm WG2600HP

NEC Aterm WG2600HP is a 2.4/5 GHz band 11ac router, based on Qualcomm
IPQ8064.

Specification:

- IPQ8064 (384 - 1,400 MHz)
- 512 MB of RAM
- 32 MB of Flash (SPI)
- 4T4R 2.4/5 GHz
- 5x 10/100/1000 Mbps Ethernet
- 12x LEDs, 4x keys
- 1x USB 3.0 Type-A
- UART header on PCB
  - RX, TX, NC, GND, Vcc from power connector side
  - baudrate: 115200 bps

Flash instruction using initramfs image:
1. Connect serial cable to UART header
2. Connect power cable and turn on the router
3. When the "Press the [f] key and hit [enter] to enter failsafe mode"
message is displayed on the console, press the "f" key and Enter key
sequentially to enter the failsafe mode
4. create fw_env.config file with following contents on failsafe mode:
  /dev/mtd9 0x0 0x10000 0x10000
5. Execute following commands to add and change the environment
variables of U-Boot
  fw_setenv ipaddr "192.168.0.1"
  fw_setenv serverip "192.168.0.2"
  fw_setenv autostart "yes"
  fw_setenv bootcmd "tftpboot 0x44000000 wg2600hp-initramfs.bin;
  bootipq"
6. Set the IP address of the computer to 192.168.0.2, connect to the LAN
port of WG2600HP, and start the TFTP server on the computer
7. Rename OpenWrt initramfs image for WG2600HP to
"wg2600hp-initramfs.bin" and place it in the TFTP directory
8. Remove power cable from WG2600HP, reconnect it and restart WG2600HP
9. WG2600HP downloads initramfs image from TFTP server on the computer,
loads it and boot with initramfs image
10. On the initramfs image, execute "mtd erase firmware" to erase stock
firmware and execute sysupgrade with the sysupgrade image
11. Wait ~180 seconds to complete flashing

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
5 years agoramips: mt7621: fix wireless package selection
Mathias Kresin [Tue, 19 Jun 2018 18:44:36 +0000 (20:44 +0200)]
ramips: mt7621: fix wireless package selection

Add wpad-mini if wireless drivers are included. Drop the mt76 package if
both of the provided drivers are included with their own packages.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years agoltq-vdsl-fw: add nonshared flag
Daniel Golle [Tue, 19 Jun 2018 15:55:22 +0000 (17:55 +0200)]
ltq-vdsl-fw: add nonshared flag

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years agoarc770: bump kernel to 4.14
Evgeniy Didin [Tue, 19 Jun 2018 10:40:54 +0000 (13:40 +0300)]
arc770: bump kernel to 4.14

Currently arc770 is no more "source-only".
Lets update Linux kernel version from 4.9 to 4.14 for arc770.
config-4.14 was simply regenerated with "make kernel_menuconfig".

Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
Cc: Alexey Brodkin <abrodkin@synopsys.com>
Cc: John Crispin <john@phrozen.org>
5 years agomwlwifi: update to version 10.3.8.0-20180615
Kabuli Chana [Thu, 14 Jun 2018 18:39:22 +0000 (12:39 -0600)]
mwlwifi: update to version 10.3.8.0-20180615

fix mcs rate for HT
support 88W8997
protect rxringdone

Signed-off-by: Kabuli Chana <newtownBuild@gmail.com>
5 years agoar71x: add support for Mikrotik Routerboard wAP R
David Ehrmann [Sun, 10 Jun 2018 01:33:24 +0000 (18:33 -0700)]
ar71x: add support for Mikrotik Routerboard wAP R

This commit adds support for the Mikrotik wAP R (RBwAPR-2nD). The change
is based on 3b15eb0 which added support for the wAP 2nD. This change lacks
LED support.

Specifications:

- SoC: Qualcomm QCA9531 (650 MHz)
- RAM: 64 MB
- Storage: 16 MB NOR SPI flash
- Wireless: built-in QCA9531, 802.11b/g/n 2x2:2
- Ethernet: 1x100Mbps
- Power: 9-30V Passive PoE, 9-30V DC jack, 9-30V automotive jack
- SIM card slot
- Mini-PCIe slot

Installation:

1. Login to the Mikrotik WebUI to backup your licence key
2. Change the following settings in System->Routerboard->Settings:
  - Boot device: try ethernet once then NAND
  - Boot protocol: DHCP
  - Force Backup Booter: checked
3. Setup a DHCP/BOOTP server with:
  - DHCP-Option 66 (TFTP server name) pointing to a local TFTP
    server within the same subnet of the DHCP range
  - DHCP-Option 67 (Bootfile-Name) matching the initramfs filename
    of the to be booted image, e.g.
    openwrt-ar71xx-mikrotik-vmlinux-initramfs.elf
4. Power off the device
5. If this is the second attempt to boot OpenWRT or the boot device isn't
   "try ethernet once then NAND," press and hold the reset button while
   powered off. If this is the first attempt, this step isn't necessary.
6. Power on the device, holding the reset button for 15-20s if already
   pressed from the previous step.

The board should load and start the initramfs image from the TFTP
server. Login as root/without password to the started OpenWRT via SSH
listing on IPv4 address 192.168.1.1. Use sysupgrade to install OpenWRT.

Revert to RouterOS

Use the "rbcfg" package on in OpenWRT:
- rbcfg set boot_protocol bootp
- rbcfg set boot_device ethnand
- rbcfg apply

Open Netinstall and reboot routerboard. Now Netinstall sees RouterBOARD
and you can install RouterOS. If NetInstall gets stuck on Sending offer
just wait for it to timeout and then close and open Netinstall again.

Click on install again.

In order for RouterOS to function properly, you need to restore license
for the device. You can do that by including license in NetInstall.

Signed-off-by: David Ehrmann <ehrmann@gmail.com>
5 years agoramips: improve ethernet driver performance with GRO/TSO
Felix Fietkau [Wed, 6 Jun 2018 07:56:13 +0000 (09:56 +0200)]
ramips: improve ethernet driver performance with GRO/TSO

GRO stores packets as fraglist. If they are routed back to the ethernet
device, they need to be re-segmented if the driver does not support
sending fraglists.
Add the missing support for that, along with a missing feature flag that
allows full routed GRO->TSO offload.
Considerably reduces CPU utilization for routing

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agoath79: fix qm5p-ac-v2 dts file
John Crispin [Mon, 18 Jun 2018 21:23:08 +0000 (23:23 +0200)]
ath79: fix qm5p-ac-v2 dts file

Signed-off-by: John Crispin <john@phrozen.org>
5 years agoar71xx: add support for Fritz!WLAN Repeater 450E
David Bauer [Sat, 26 May 2018 16:19:53 +0000 (18:19 +0200)]
ar71xx: add support for Fritz!WLAN Repeater 450E

This commit adds support for the AVM Fritz!WLAN Repeater 450E

SOC:    Qualcomm QCA9556 (Scorpion) 560MHz MIPS74Kc
RAM:    64MB Zentel A3R12E40CBF DDR2
FLASH:  16MiB Winbond W25Q128 SPI NOR
WLAN1:  QCA9556 2.4 GHz 802.11b/g/n 3x3
INPUT:  WPS button
LED:    Power, WiFi, LAN, RSSI indicator
Serial: Header Next to Black metal shield
        Pinout is 3.3V - RX - TX - GND (Square Pad is 3.3V)
        The Serial setting is 115200-8-N-1.

Tested and working:
 - Ethernet
 - 2.4GHz WiFi (correct MAC)
 - Installation via EVA bootloader
 - OpenWRT sysupgrade
 - Buttons
 - Most LEDs

Not working:
 - 2 RSSI LEDs
   AVM used for RSSI{0,1} two of the Ethernet PHYs LEDs which they
   control over MDIO. Our driver doesn't expose these LEDs as GPIOs.
   While it is possible to implement this feature, it would require an
   additional kernel patch for a minor functionality.

Installation via EVA:
In the first seconds after Power is connected, the bootloader will
listen for FTP connections on 192.168.178.1. Firmware can be uploaded
like following:

  ftp> quote USER adam2
  ftp> quote PASS adam2
  ftp> binary
  ftp> debug
  ftp> passive
  ftp> quote MEDIA FLSH
  ftp> put openwrt-sysupgrade.bin mtd1

Note that this procedure might take up to two minutes.
You need to powercycle the Device afterwards to boot OpenWRT.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agoar71xx: fix incorrect speed setting on QCA9556
David Bauer [Tue, 8 May 2018 18:59:05 +0000 (20:59 +0200)]
ar71xx: fix incorrect speed setting on QCA9556

The QCA9556 only has a SGMII interface. However the speed on the
ethernet link is set for the non-existant xMII interface.

This commit fixes this behavior.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agokernel/modules: kmod-chaoskey: Add missing dependency
Hauke Mehrtens [Mon, 18 Jun 2018 20:49:21 +0000 (22:49 +0200)]
kernel/modules: kmod-chaoskey: Add missing dependency

This new package was missing the dependency to kmod-random-core which
caused some build errors.

Fixes: 163ab9135a9 ("kernel/modules: add chaoskey module, hardware TRNG")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years agobusybox: update to 1.28.4
Magnus Kroken [Sun, 17 Jun 2018 14:16:39 +0000 (16:16 +0200)]
busybox: update to 1.28.4

Signed-off-by: Magnus Kroken <mkroken@gmail.com>
5 years agoltq_atm: burn ifx_atm_alloc_tx with fire
Kevin Darbyshire-Bryant [Mon, 18 Jun 2018 18:01:07 +0000 (18:01 +0000)]
ltq_atm: burn ifx_atm_alloc_tx with fire

Drop code that was never used.

Tested on: BT HomeHub 5a

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
5 years agobuild: add busybox support to `time` prereq-check
Andy Boyett [Thu, 17 May 2018 05:09:57 +0000 (22:09 -0700)]
build: add busybox support to `time` prereq-check

Busybox time supports the GNU time '-f' syntax used by the build time
logging implemented in ff6e62b288c, however the prerequisite check added
only works with GNU time installed as `time` or `gtime`.

As busybox is a multicall binary, the name of the symlink setup by
SetupHostCommand also must be changed from `gtime` to `time` to fix the
value of argv[0]. This causes a number of shells (including bash) to use
their builtin impelementation of time, so the sole invocation has been
changed to use `env time` to use the value found on the $PATH.

Signed-off-by: Andy Boyett <agb@agb.io>
5 years agoath79: add support for tl-wr1043nd v2/v3
Lucian Cristian [Mon, 18 Jun 2018 17:22:13 +0000 (19:22 +0200)]
ath79: add support for tl-wr1043nd v2/v3

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
5 years agoath79: add initial nand support for gl-ar300m
Marty E. Plummer [Tue, 29 May 2018 08:02:59 +0000 (03:02 -0500)]
ath79: add initial nand support for gl-ar300m

Signed-off-by: Marty E. Plummer <hanetzer@startmail.com>
5 years agoath79: initial gl-ar300m support
Marty E. Plummer [Sun, 27 May 2018 05:37:22 +0000 (00:37 -0500)]
ath79: initial gl-ar300m support

Signed-off-by: Marty E. Plummer <hanetzer@startmail.com>
5 years agob43-tools: update to latest git HEAD
Krystian Kozak [Sun, 27 May 2018 19:58:07 +0000 (21:58 +0200)]
b43-tools: update to latest git HEAD

122ca37 Rename bits in hostflags to match new identifiers for the hostflags
32c2a3c Change order of identifiers to be ascending with the spr numbers
f7016b5 Remove definitions which are not Broadcom specific
b77c0a3 debug: Fix ordering of HF bits
3f46e61 fwcutter: Add firmware 9.10.178.27
27892ef fwcutter/make: Avoid _DEFAULT_SOURCE warning

Signed-off-by: Krystian Kozak <krystian.kozak20@gmail.com>
5 years agomvebu: enable CONFIG_HW_RANDOM
Hannu Nyman [Sun, 17 Jun 2018 18:11:44 +0000 (21:11 +0300)]
mvebu: enable CONFIG_HW_RANDOM

Enable the Hardware Random Number Generator Core infrastructure
in kernel.

Needed for hardware random number generator drivers like chaoskey

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
5 years agokernel/modules: add chaoskey module, hardware TRNG
Hannu Nyman [Sun, 17 Jun 2018 17:54:41 +0000 (20:54 +0300)]
kernel/modules: add chaoskey module, hardware TRNG

Package the driver for Chaoskey, a USB dongle that provides a
True Random Number Generator (TRNG) and feeds entropy to kernel.

Chaoskey driver is included the upstream Linux sources, so
only packaging it is needed.

Run-tested with ipq806x/R7800 and mvebu/WRT3200ACM.

(Requires CONFIG_HW_RANDOM kernel option.)

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
5 years agoinclude/image-commands.mk: shorter version in Netgear factory header
Hannu Nyman [Sun, 17 Jun 2018 19:59:03 +0000 (22:59 +0300)]
include/image-commands.mk: shorter version in Netgear factory header

Shorten the version string in Netgear factory image header in order
to enable u-boot TFTP recovery flash mode to work again.

Strip 'r7210-14cb05909a' into 'r7210' in the Netgear image header
by removing the hash (anything after "-").

background:
Some Netgear routers have recently been unable to flash Openwrt
factory image with the TFTP recovery flash mode provided by Netgear
u-boot. That is due to over-long Openwrt version string overflowing
into the router type string in u-boot code. Modern git versions
produce 10-digit short hashes for the Openwrt main repo, and that
causes the version string to be too long in the image header,
breaking the image ID verification by the TFTP flash routine.

(Other option could be to force a shorter hash in scripts/getver.sh,
but as the problem only concerns Netgear routers, let's patch just
them.)

More detailed explanations in FS#1583

Tested with WNDR3800

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
5 years agoipq806x: D7800 only has a single sata port
John Crispin [Mon, 18 Jun 2018 16:52:28 +0000 (18:52 +0200)]
ipq806x: D7800 only has a single sata port

Signed-off-by: John Crispin <john@phrozen.org>
5 years agomips: fix dynamic ftrace
Vincent Wiemann [Sat, 9 Jun 2018 20:56:47 +0000 (22:56 +0200)]
mips: fix dynamic ftrace

The kernel patch *-mips_module_reloc.patch breaks dynamic ftrace as
dynamic ftrace depends on -mlong-calls.
See http://patchwork.linux-mips.org/patch/675/
Thus we always set -mlong-calls if the kernel is being
compiled with dynamic ftrace support.

Signed-off-by: Vincent Wiemann <webmaster@codefetch.de>
5 years agombedtls: Cosmetic cleanups
Daniel Engberg [Sun, 10 Jun 2018 22:22:36 +0000 (00:22 +0200)]
mbedtls: Cosmetic cleanups

This is more of a cosmetic change and a reminder that the CMake script hardcodes -O2.
Source:
https://github.com/ARMmbed/mbedtls/blob/mbedtls-2.7/CMakeLists.txt#L73
https://github.com/ARMmbed/mbedtls/blob/master/CMakeLists.txt#L97

Remove the release type option as it's already provided by the toolchain.
Source:
https://github.com/openwrt/openwrt/blob/master/include/cmake.mk#L50

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
5 years agomvebu: backport ahci_mvebu errata patchset
Jeremiah McConnell [Sat, 16 Jun 2018 04:26:44 +0000 (22:26 -0600)]
mvebu: backport ahci_mvebu errata patchset

Marvell ahci hardware requires a workaround to prevent eSATA failures
on hotplug/reset when used with multi-bay external enclosures.

Errata Ref#226 - SATA Disk HOT swap issue when connected through Port
Multiplier in FIS-based Switching mode.

These patches backport the workaround from 4.17.

Signed-off-by: Jeremiah McConnell <miah@miah.com>
5 years agouboot-oxnas: fix typo accidentally committed during oxnas reboot
Daniel Golle [Mon, 18 Jun 2018 16:54:26 +0000 (18:54 +0200)]
uboot-oxnas: fix typo accidentally committed during oxnas reboot

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years agoath79: fix rx ring buffer stall qca956x
Lucian Cristian [Mon, 18 Jun 2018 15:55:13 +0000 (18:55 +0300)]
ath79: fix rx ring buffer stall qca956x

when ported from ar71xx to ath79 the qca9560-eth was omitted

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
5 years agocron: add procd listeners for crontabs
Paul Spooren [Thu, 14 Jun 2018 01:21:11 +0000 (10:21 +0900)]
cron: add procd listeners for crontabs

Add procd file listeners to check files in `/etc/crontabs/`.

Also unified a bit the function style.

Signed-off-by: Paul Spooren <mail@aparcar.org>
5 years agoar71xx: add kmod-usb-ehci to fix USB on RB hAP AC
Thomas Nixon [Tue, 20 Mar 2018 00:00:50 +0000 (00:00 +0000)]
ar71xx: add kmod-usb-ehci to fix USB on RB hAP AC

Signed-off-by: Thomas Nixon <tom@tomn.co.uk>
5 years agonftables: bump to version 0.9.0
Rosy Song [Tue, 12 Jun 2018 07:49:50 +0000 (15:49 +0800)]
nftables: bump to version 0.9.0

Signed-off-by: Rosy Song <rosysong@rosinson.com>
5 years agolibnftnl: bump to version 1.1.1
Rosy Song [Tue, 12 Jun 2018 07:49:32 +0000 (15:49 +0800)]
libnftnl: bump to version 1.1.1

Signed-off-by: Rosy Song <rosysong@rosinson.com>
5 years agoipq40xx: add support for ZyXEL WRE6606
Magnus Frühling [Mon, 11 Jun 2018 21:10:43 +0000 (23:10 +0200)]
ipq40xx: add support for ZyXEL WRE6606

Specifications:
SOC: Qualcomm IPQ4018 (DAKOTA) ARM Quad-Core
RAM: 128 MB Nanya NT5CC64M16GP-DI
FLASH: 16 MiB Macronix MX25L12845EMI-12G
ETH: Qualcomm QCA8072
WLAN1:  Qualcomm Atheros QCA4018 2.4GHz 802.11b/g/n 2x2
WLAN2:  Qualcomm Atheros QCA4018 5GHz 802.11n/ac W2 2x2
INPUT:  WPS, Mode-toggle-switch
LED: Power, WLAN 2.4GHz, WLAN 5GHz, LAN, WPS
        (LAN not controllable by software)
        (WLAN each green / red)
SERIAL: Header next to eth-phy.
        VCC, TX, GND, RX (Square hole is VCC)
        The Serial setting is 115200-8-N-1.

Tested and working:
 - Ethernet (Correct MAC-address)
 - 2.4 GHz WiFi (Correct MAC-address)
 - 5 GHz WiFi (Correct MAC-address)
 - Factory installation from tftp
 - OpenWRT sysupgrade
 - LEDs
 - WPS Button

Not Working:
 - Mode-toggle-switch

Install via TFTP:

Connect to the devices serial. Hit Enter-Key in bootloader to stop
autobooting. Command `tftpboot` will pull an initramfs image named
`C0A86302.img` from a tftp server at `192.168.99.08/24`.
After successfull transfer, boot the image with `bootm`.

To persistently write the firmware, flash an openwrt sysupgrade image
from inside the initramfs, for example transfer
via `scp <sysupgrade> root@192.168.1.1:/tmp` and flash on the device
with `sysupgrade -n /tmp/<sysupgrade>`.

append-cmdline patch taken from chunkeeys work on the NBG6617.

Signed-off-by: Magnus Frühling <skorpy@frankfurt.ccc.de>
Co-authored-by: David Bauer <mail@david-bauer.net>
Co-authored-by: Christian Lamparter <chunkeey@googlemail.com>
5 years agoath79: add tl-wr1043nd-v4 support everything is working
Lucian Cristian [Sat, 16 Jun 2018 10:37:55 +0000 (13:37 +0300)]
ath79: add tl-wr1043nd-v4 support everything is working

tplink-safeloader: resize kernel partition
kernel 4.14 is much bigger, resize the partition

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
5 years agoath79: add ubiquiti unifi ap ac lite/lr
Lucian Cristian [Tue, 5 Jun 2018 12:38:02 +0000 (15:38 +0300)]
ath79: add ubiquiti unifi ap ac lite/lr

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
5 years agoath79: ag71xx: fix pll-data setting for ar7242/ar934x/qca955x/qca956x
Weijie Gao [Wed, 13 Jun 2018 13:41:59 +0000 (21:41 +0800)]
ath79: ag71xx: fix pll-data setting for ar7242/ar934x/qca955x/qca956x

ar71xx/ar913x series use the old pll registers and settings.

However started from ar7242, a new pll register is introduced and the
pll setting is much simpler.

This can be observed from dev-eth.c from the ar71xx target.

Signed-off-by: Weijie Gao <hackpascal@gmail.com>
5 years agoath79: add support for Phicomm K2T
Weijie Gao [Wed, 13 Jun 2018 13:14:49 +0000 (21:14 +0800)]
ath79: add support for Phicomm K2T

This patch adds dts for qca956x and also support for Phicomm K2T

The qca965x.dtsi adds nearly all the necessary components.
Both ath9k AHB and PCIe worked well.

The Phicomm K2T uses MTD partition 'config' to store the mac addresses in
JSON format. To extract these fields correctly, a script is introduced:
    /lib/functions/k2t.sh
This script provides a helper function to extract mac addresses, and is used
in three places.

Hardware spec of Phicomm K2T:
CPU: QCA9563
DRAM: 64MB DDR2
Flash: 16MB SPI-NOR
Switch: QCA8337
WiFi 5.8GHz: QCA9886

Flash instruction:
Apply sysupgrade.bin via serial console:

tftp 0x80000000 sysupgrade.bin && erase 0x9f090000 +$filesize && cp.b $fileaddr 0x9f090000 $filesize

Signed-off-by: Weijie Gao <hackpascal@gmail.com>
5 years agoipq40xx: essedma: fixup ip align
Chen Minqiang [Sat, 16 Jun 2018 20:31:43 +0000 (04:31 +0800)]
ipq40xx: essedma: fixup ip align

This fixup ip align in essedma driver rx path
see cat /proc/cpu/alignment
which reports alignment-fixups without this fix.

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
5 years agoiptables: increment PKG_RELEASE to force update
Mirko Parthey [Wed, 13 Jun 2018 14:29:50 +0000 (16:29 +0200)]
iptables: increment PKG_RELEASE to force update

While support for the FLOWOFFLOAD target is available in the firmware
images, it is still missing in some of the binary packages on
downloads.openwrt.org, e.g. for the mipsel_mips32 architecture.

Increment PKG_RELEASE to force an update of these packages.
Also adjust the package description to include the FLOWOFFLOAD target.

Signed-off-by: Mirko Parthey <mirko.parthey@web.de>
5 years agokernel: atm: pppoatm fix vc-mux connection failures
Kevin Darbyshire-Bryant [Mon, 18 Jun 2018 09:08:05 +0000 (09:08 +0000)]
kernel: atm: pppoatm fix vc-mux connection failures

Backport a hot off the press upstream kernel ATM fix:

Preserve value of skb->truesize when accounting to vcc

"There's a hack in pskb_expand_head() to avoid adjusting skb->truesize
for certain skbs. Ideally it would cover ATM too. It doesn't. Just
stashing the accounted value and using it in atm_raw_pop() is probably
the easiest way to cope."

The issue was exposed by upstream with:

commit 14afee4b6092fde451ee17604e5f5c89da33e71e
Author: Reshetova, Elena <elena.reshetova@intel.com>
Date:   Fri Jun 30 13:08:00 2017 +0300

    net: convert sock.sk_wmem_alloc from atomic_t to refcount_t

But an earlier commit left the ticking timebomb:

158f323b9868 ("net: adjust skb->truesize in pskb_expand_head()

Sincerest thanks to Mathias Kresin <dev@kresin.me> for debugging
assistance and to David Woodhouse <dwmw2@infradead.org> for further
guidance, cajoling & patience in interpreting the debug I was giving him
and producing a fix!

Fixes FS#1567

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
5 years agolantiq: atm: fix ifx_atm driver integration
Kevin Darbyshire-Bryant [Mon, 18 Jun 2018 09:09:09 +0000 (09:09 +0000)]
lantiq: atm: fix ifx_atm driver integration

When upstream kernel introduced commit c55fa3cccbc2c672e7f118be8f7484e53a8e9e77
we incorrectly updated our hack integration patch that updates atm/common.c

+++ b/net/atm/common.c
@@ -62,10 +62,16 @@ static void vcc_remove_socket(struct soc
        write_unlock_irq(&vcc_sklist_lock);
 }

+struct sk_buff* (*ifx_atm_alloc_tx)(struct atm_vcc *, unsigned int) = NULL;
+EXPORT_SYMBOL(ifx_atm_alloc_tx);
+
 static bool vcc_tx_ready(struct atm_vcc *vcc, unsigned int size)
 {
        struct sock *sk = sk_atm(vcc);

+       if (ifx_atm_alloc_tx != NULL)
+               return ifx_atm_alloc_tx(vcc, size)

The correct solution is to drop our ifx_atm_alloc_tx replacement hack
entirely and let the kernel do its thing.

In reality neither pppoatm or BR2684 interfaces actually hit this code,
so the incorrect integration would only be noticed with direct socket
calls which we are unaware of a use-case.

This is not the solution to pppoatm vc-mux failing to work which started
the whole investigation, but let's fix it up anyway.

With sincerest thanks to David Woodhouse <dwmw2@infradead.org> &
Mathias Kresin <dev@kresin.me>.

Tested-on: lantiq, BT HomeHub 5a

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
5 years agokernel: bump 4.14 to 4.14.50
Koen Vandeputte [Mon, 18 Jun 2018 12:33:59 +0000 (14:33 +0200)]
kernel: bump 4.14 to 4.14.50

Refreshed all patches

Compile-tested on: cns3xxx, imx6, x86_64
Runtime-tested on: cns3xxx, imx6, x86_64

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agokernel: bump 4.9 to 4.9.109
Koen Vandeputte [Mon, 18 Jun 2018 12:33:58 +0000 (14:33 +0200)]
kernel: bump 4.9 to 4.9.109

Refreshed all patches

Compile-tested on: ar71xx
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agobcm53xx: exit if writing kernel during sysupgrade fails
Rafał Miłecki [Mon, 18 Jun 2018 11:46:04 +0000 (13:46 +0200)]
bcm53xx: exit if writing kernel during sysupgrade fails

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years agomt76: update to the latest version
Felix Fietkau [Mon, 18 Jun 2018 10:35:49 +0000 (12:35 +0200)]
mt76: update to the latest version

072fdac mt76x2: mac: consider multicast/broadcast frames in ewma rssi estimation
f450659 mt76x2: improve gain adjustment in noisy environments

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agobcm53xx: drop not ready support for Luxul devices
Rafał Miłecki [Mon, 18 Jun 2018 06:42:56 +0000 (08:42 +0200)]
bcm53xx: drop not ready support for Luxul devices

Support for these devices isn't ready yet and it was only accidentally
pushed in the commit 0da9303e5b44 ("mac80211: backport "brcmfmac:
cleanup and some rework" from 4.17").

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years agomac80211: backport brcmfmac changes from kernel 4.18
Rafał Miłecki [Mon, 18 Jun 2018 05:32:34 +0000 (07:32 +0200)]
mac80211: backport brcmfmac changes from kernel 4.18

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years agomac80211: backport brcmfmac firmware & clm_blob loading rework
Rafał Miłecki [Mon, 18 Jun 2018 05:09:14 +0000 (07:09 +0200)]
mac80211: backport brcmfmac firmware & clm_blob loading rework

It backports remaining brcmfmac changes from 4.17.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years agomvebu: replace espressobin spi patch with upstream one
Tomasz Maciej Nowak [Sat, 9 Jun 2018 14:13:42 +0000 (16:13 +0200)]
mvebu: replace espressobin spi patch with upstream one

For easier future kernel bumps replace spi patch with upstream version
slightly modified. The modification removes partition definitions which
has been diffrent for some U-Boot versions.
Also this removes unnecessary i2c definition which was in the old patch.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>