openwrt/staging/jow.git
5 years agotoolchain: Replace YASM with NASM
Ted Hess [Thu, 28 Jun 2018 23:28:02 +0000 (19:28 -0400)]
toolchain: Replace YASM with NASM

Packages libx264 and ffmpeg are built with ASM options on x86 platforms.
The current libx264 version no longer builds with YASM and requires NASM.
ffmpeg 3.x can be built with either YASM or NASM however, furture 4.x versions
will require NASM.

Signed-off-by: Ted Hess <thess@kitschensync.net>
Acked-by: Rosen Penev <rosenp@gmail.com>
(backported from 0f543883cd0505a98fdc680ce2f08cbfca6d52a7)

5 years agodownload.mk: enable DownloadMethod/github_archive
Yousong Zhou [Fri, 29 Jun 2018 06:40:46 +0000 (14:40 +0800)]
download.mk: enable DownloadMethod/github_archive

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
(backported from 9009efa18b45b4b573111fafa777f7b642486e3e)

5 years agoscripts/dl_github_archive.py: rename from download.py
Yousong Zhou [Thu, 28 Jun 2018 10:27:27 +0000 (18:27 +0800)]
scripts/dl_github_archive.py: rename from download.py

 - Make the code more GitHub-specific
 - Requires mirror hash to work with .gitattributes
 - Use different API depending on whether PKG_SOURCE_VERSION is a
   complete commit id or other ref types like tags
 - Fix removing symbolic link
 - pre-clean dir_untar for possible leftovers from previous run

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
(backported from 04b9f8587370f96366c6e53fb411473279ba7c02)

5 years agodownload.mk: add more comments
Yousong Zhou [Tue, 3 Jul 2018 08:15:35 +0000 (16:15 +0800)]
download.mk: add more comments

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
(backported from e48ea13b3bac5393d6400156ddb066ec5de2ea4e)

5 years agoelfutils: bump to 0.173
Luiz Angelo Daros de Luca [Sun, 17 Jun 2018 09:08:51 +0000 (06:08 -0300)]
elfutils: bump to 0.173

- Removed hacks to use standalone argp as upstream now detects it nicely.
- As we are already installing files, use files from PKG_INSTALL_DIR and
  not PKG_BUILD_DIR
- Only changes Makefile.am as PKG_FIXUP:=autoreconf is in use

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
(backported from b724443f9f4c8d691fc0e7355e1388920cdb9b96)

5 years agoramips: add support for TL-WA801ND v5
Romain MARIADASSOU [Tue, 26 Jun 2018 23:24:39 +0000 (01:24 +0200)]
ramips: add support for TL-WA801ND v5

Specification:

- System-On-Chip: MediaTek MT7628NN
- CPU/Speed: 580 MHz
- Flash-Chip: ELM Technology GD25Q64
- Flash size: 8192 KiB
- RAM: 64 MiB
- Wireless No1: SoC-integrated: MT7628N 2.4GHz 802.11bgn

Currently the only method to install openwrt for the first time is via
TFTP recovery. After first install you can use regular updates.

Flash instructions:

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

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

Signed-off-by: Romain MARIADASSOU <roms2000@free.fr>
(backported from ce31bdc20c3f2eb387a84c277dff76324a8e39c7)

5 years agoramips: add support for ZyXEL Keenetic Extra II
Maxim Anisimov [Sun, 8 Apr 2018 14:04:11 +0000 (17:04 +0300)]
ramips: add support for ZyXEL Keenetic Extra II

Specification:
- System-On-Chip: MT7628N/N
- CPU/Speed: 580 MHz
- Flash-Chip: Winbond w25q256
- Flash size: 32768 KiB
- RAM: 128 MiB
- 5x 10/100 Mbps Ethernet
- 4x external, non-detachable antennas
- UART (J1) header on PCB (57600 8n1)
- Wireless No1 (2T2R): SoC-integrated: MT7628N 2.4GHz 802.11bgn
- Wireless No2 (2T2R): On-board chip: MT7612EN 5GHz 802.11ac
- USB: Yes 1 x 2.0
- 4x LED, 3x button

The device supports dual boot mode. So we use only first half of flash.

Flash instruction:

The only way to flash OpenWrt image is to use
tftp recovery mode in U-Boot:

1. Configure PC with static IP 192.168.1.2/24 and tftp server.
2. Rename "openwrt-ramips-mt76x8-zyxel_keenetic-extra-ii-squashfs-factory.bin"
   to "kextra2_recovery.bin" and place it in tftp server directory.
3. Connect PC with one of LAN ports, press the reset button, power up
   the router and keep button pressed until power led start blinking.
4. Router will download file from server, write it to flash and reboot.

Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
(backported from 7d07bc96b7e686244ed096d3bbfad297a2ec1ce9)

5 years agoramips: move zyimage define to common Makefile
Maxim Anisimov [Thu, 28 Jun 2018 05:26:39 +0000 (08:26 +0300)]
ramips: move zyimage define to common Makefile

Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
(backported from 9e2c28472c3f3a76e16afb582fd8807d08c6dda6)

5 years agoramips: add support for MikroTik RouterBOARD RBM11g
Tobias Schramm [Mon, 25 Jun 2018 20:51:43 +0000 (22:51 +0200)]
ramips: add support for MikroTik RouterBOARD RBM11g

This commit adds support for the MikroTik RouterBOARD RBM11g.

=Hardware=

The RBM11g is a mt7621 based device featuring one GbE port and one
miniPCIe slot with a sim card socket and USB 2.0.

==Switch==

The single onboard Ethernet port is connected the CPU directly.
The internal switch of the mt7621 SoC is disabled.

==Flash==

The device has one spi nor flash chip. It is a 128 Mbit winbond 25Q128FVS
connected to CS0.

==PCIe==

The board features a single miniPCIe slot. It has a dedicated mini SIM
socket and a USB 2.0 port. Power to the miniPCIe slot is controlled via
GPIO9.

==USB==

There are no external USB ports.

==Power==

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

==Serial port==

The device does have an onboard UART on an unpopulated header next to the
flash chip:

GND: pin 2
 TX: pin 7
 RX: pin 6

Settings: 115200, 8N1

See below illustration for positioning of the header.

0 = screw hole
* = some pin
T = TX  pin
R = RX  pin
G = GND pin

Pinout:
+---------------
|O
|             __
|            /  \
|            \__/
|
|
|
|               +---+
|               |RAM|
| +--+          |   |
| |**|  <- unpopulated header with UART
| |*T|          +---+
| |R*|        +--------+
| |**|        |        |
| |G*|        |  CPU   |
| +--+        |        |
|    +--+     |        |
|    |  |     +--------+
|    +--+  <- flash chip
|O
|       +-----+
|       |     |
|+--+   |     |
||  |   |     |
+---------------------

=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 RBM11G" in
openwrt menuconfig and build the images. This will create the images
"openwrt-ramips-mt7621-mikrotik_rbm11g-initramfs-kernel.bin" and
"openwrt-ramips-mt7621-mikrotik_rbm11g-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.**

When rebooted the board will try booting via ethernet first. If your
board does not boot via ethernet automatically you will have to attach
to the serial port and set ethernet as boot device within RouterBOOT.

1. Set up a dhcp server that points the bootfile to tftp server serving
   the "openwrt-ramips-mt7621-mikrotik_rbm11g-initramfs-kernel.bin"
   initramfs image
2. Connect to ethernet port on board
3. Power on the board
4. Wait for OpenWrt to boot

Right now OpenWrt will be running with a SSH server listening. Now
OpenWrt must be flashed to the devices flash:

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

Once the flashing completes the board will reboot. Disconnect from the
devices ethernet port or stop the DHCP/TFTP server to prevent the device
from booting via ethernet again.
The device should now boot straight to OpenWrt.

Signed-off-by: Tobias Schramm <tobleminer@gmail.com>
(backported from faf64056ddd46992a75b1e277d94541c7251035c)

5 years agolantiq: enlarge AVM Fritz!Box 3370 flash
Michael Kuron [Sun, 1 Jul 2018 08:03:38 +0000 (10:03 +0200)]
lantiq: enlarge AVM Fritz!Box 3370 flash

Increase the available flash memory size in AVM Fritz!Box 3370 by
incorporating the unused extra partitions located after the ubi partition.

Note that users upgrading from a previous OpenWRT version need to
re-install from the boot loader to pick up the new partition layout.

Available flash space for rootfs+overlay increases from 48MB to 124MB.

Reverting to the OEM firmware is still possible (via the recovery utility
provided by AVM) as the OEM firmware appears to reformat the config and
nand-filesystem partitions upon first boot if necessary. The
reserved-kernel and reserved-filesystem partitions are overwritten by the
OEM firmware when installing an update, so their contents do not matter.

Boot loader and device-specific information (MAC addresses, calibration
data, etc.) are not located in NAND flash and remain unharmed by this
changed.

Tested with OEM firmware 06.54 on device with HWRevision 5 and Micron
flash chip.

Signed-off-by: Michael Kuron <m.kuron@gmx.de>
(backported from d0b89e48d712725c341842e60aadf802b6debc29)

5 years agofirmware-utils: tplink-safeloader: add calloc error handling
Hyeonsik Song [Mon, 25 Jun 2018 02:02:43 +0000 (11:02 +0900)]
firmware-utils: tplink-safeloader: add calloc error handling

Signed-off-by: Hyeonsik Song <blogcin@naver.com>
(backported from c2766270efcba795f1d14f9a51f07898eb8a62c1)

5 years agozynq: remove config options handled by generic
Luis Araneda [Sat, 30 Jun 2018 07:15:55 +0000 (03:15 -0400)]
zynq: remove config options handled by generic

The options are now handled for all targets by
the generic configuration

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
(backported from efa112261bf8086014272dd2ba5d2d31257cc288)

5 years agodownload.mk: restore the old dl_method implementation
Yousong Zhou [Fri, 29 Jun 2018 05:49:34 +0000 (13:49 +0800)]
download.mk: restore the old dl_method implementation

Seems like the python download.py dl_method call causes serious
performance regression for fresh "make defconfig" as reported in
FS#1621.  GitHub tarball download will also be disabled with this

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
(backported from e15565a01cea6a61c537f5fb91c4e4d27fb7b290)

5 years agoipq806x: switch the NBG6817 wlan LEDs from amber to white
Stefan Lippers-Hollmann [Thu, 28 Jun 2018 12:04:46 +0000 (14:04 +0200)]
ipq806x: switch the NBG6817 wlan LEDs from amber to white

The original device support patch configured the amber wlan LEDs (which
are meant as error indicator by the OEM) controlled by the SOC's GPIO
as wlan traffic indicators, as the correct white wlan LEDs are
connected to GPIOs controlled by the QCA9984/ ath10k wlan cards were
not accessible. The recent addition of GPIO/ LED support to ath10k now
makes it possible to use the correct white LEDs instead - and
"mac80211: ath10k: use tpt LED trigger by default" also enables them by
default. While both LEDs are independent of each other (two separate
LEDs sharing one light tunnel), triggering both on wlan traffic is not
the intended behaviour (bright yellow light).

Tested on the ZyXEL NBG6817.

Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
(backported from 7c7ca66109468b57f06d20eafbb9523aecc91706)

5 years agoscripts/download.py: use a more terse api for fetching git commit date
Yousong Zhou [Wed, 27 Jun 2018 07:20:21 +0000 (15:20 +0800)]
scripts/download.py: use a more terse api for fetching git commit date

The previous api [1] includes in its response patch data among other
things, as such the response size can vary and be big.  Use another
api[2] to improve it a bit

 [1] Get a single commit, Repositories, https://developer.github.com/v3/repos/commits/#get-a-single-commit
 [2] Git Commits, Git Data, https://developer.github.com/v3/git/commits/#get-a-commit

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
(backported from 6e3c2d757a5745dee5cce0b53175b56ad3621d73)

5 years agouboot-kirkwood: fix whitespaces
Alberto Bursi [Mon, 18 Jun 2018 17:49:16 +0000 (19:49 +0200)]
uboot-kirkwood: fix whitespaces

remove whitespaces from the patches

Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
(backported from ccd1dc3d2044b3cf624f93c86e127f55c5632231)

5 years agobuild: download code from github using archive API
Yousong Zhou [Sun, 11 Feb 2018 09:42:22 +0000 (17:42 +0800)]
build: download code from github using archive API

A new python script scripts/download.py is added to fetch tarballs using
GitHub archive API [1], then repack in a reproducible way same as the
current DownloadMethod/git

GitHub imposes a 60 reqs/hour rate limit on unauthenticated API
access[2].  This affects fetching commit date for feeding tar --mtime=
argument.  However, observation indicates that archive download is NOT
subject to this limit at the moment.  In the rare cases where download
fails because of this, we will falback to using DownloadMethod/git

The missing piece in the GitHub API is that it cannot provide in the
tarball dependent submodules's source code.  In that case, the
implementation will also fallback to using DownloadMethod/git

 [1] Get archive link, https://developer.github.com/v3/repos/contents/#get-archive-link
 [2] Rate limiting, https://developer.github.com/v3/#rate-limiting

v2 <- v1:

 - allow passing multiple urls with --urls argument
 - add commit ts cache.  can be helpful on retry

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
(backported from 75ab064d2b38e70746af1718ed7cdbafb906249e)

5 years agopackage/utils/e2fsprogs: Update to 1.44.2
Daniel Engberg [Sat, 9 Jun 2018 20:25:25 +0000 (22:25 +0200)]
package/utils/e2fsprogs: Update to 1.44.2

Update e2fsprogs to 1.44.2

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
(backported from 1b46bce8509180914d2f44ea2374e41b6bbc0752)

5 years agoipq40xx: add support for the ZyXEL NBG6617
Christian Lamparter [Thu, 21 Jun 2018 12:24:59 +0000 (14:24 +0200)]
ipq40xx: add support for the ZyXEL NBG6617

This patch adds support for ZyXEL NBG6617

Hardware highlights:

SOC:    IPQ4018 / QCA Dakota
CPU:    Quad-Core ARMv7 Processor rev 5 (v7l) Cortex-A7
DRAM:   256 MiB DDR3L-1600/1866 Nanya NT5CC128M16IP-DI @ 537 MHz
NOR:    32 MiB Macronix MX25L25635F
ETH:    Qualcomm Atheros QCA8075 Gigabit Switch (4 x LAN, 1 x WAN)
USB:    1 x 3.0 (via Synopsys DesignWare DWC3 controller in the SoC)
WLAN1:  Qualcomm Atheros QCA4018 2.4GHz 802.11bgn 2:2x2
WLAN2:  Qualcomm Atheros QCA4018 5GHz 802.11a/n/ac 2:2x2
INPUT:  RESET Button, WIFI/Rfkill Togglebutton, WPS Button
LEDS:   Power, WAN, LAN 1-4, WLAN 2.4GHz, WLAN 5GHz, USB, WPS

Serial:
WARNING: The serial port needs a TTL/RS-232 3.3v level converter!
The Serial setting is 115200-8-N-1. The 1x4 .1" header comes
pre-soldered. Pinout:
  1. 3v3 (Label printed on the PCB), 2. RX, 3. GND, 4. TX

first install / debricking / restore stock:
 0. Have a PC running a tftp-server @ 192.168.1.99/24
 1. connect the PC to any LAN-Ports
 2. put the openwrt...-factory.bin (or V1.00(ABCT.X).bin for stock) file
    into the tftp-server root directory and rename it to just "ras.bin".
 3. power-cycle the router and hold down the the WPS button (for 30sek)
 4. Wait (for a long time - the serial console provides some progress
    reports. The u-boot says it best: "Please be patient".
 5. Once the power LED starts to flashes slowly and the USB + WPS LEDs
    flashes fast at the same time. You have to reboot the device and
    it should then come right up.

Installation via Web-UI:
 0. Connect a PC to the powered-on router. It will assign your PC a
    IP-address via DHCP
 1. Access the Web-UI at 192.168.1.1 (Default Passwort: 1234)
 2. Go to the "Expert Mode"
 3. Under "Maintenance", select "Firmware-Upgrade"
 4. Upload the OpenWRT factory image
 5. Wait for the Device to finish.
    It will reboot into OpenWRT without any additional actions needed.

To open the ZyXEL NBG6617:
 0. remove the four rubber feet glued on the backside
 1. remove the four philips screws and pry open the top cover
    (by applying force between the plastic top housing from the
    backside/lan-port side)

Access the real u-boot shell:
ZyXEL uses a proprietary loader/shell on top of u-boot: "ZyXEL zloader v2.02"
When the device is starting up, the user can enter the the loader shell
by simply pressing a key within the 3 seconds once the following string
appears on the serial console:

|   Hit any key to stop autoboot:  3

The user is then dropped to a locked shell.

|NBG6617> HELP
|ATEN    x[,y]     set BootExtension Debug Flag (y=password)
|ATSE    x         show the seed of password generator
|ATSH              dump manufacturer related data in ROM
|ATRT    [x,y,z,u] RAM read/write test (x=level, y=start addr, z=end addr, u=iterations)
|ATGO              boot up whole system
|ATUR    x         upgrade RAS image (filename)
|NBG6617>

In order to escape/unlock a password challenge has to be passed.
Note: the value is dynamic! you have to calculate your own!

First use ATSE $MODELNAME (MODELNAME is the hostname in u-boot env)
to get the challange value/seed.

|NBG6617> ATSE NBG6617
|012345678901

This seed/value can be converted to the password with the help of this
bash script (Thanks to http://www.adslayuda.com/Zyxel650-9.html authors):

- tool.sh -
ror32() {
  echo $(( ($1 >> $2) | (($1 << (32 - $2) & (2**32-1)) ) ))
}
v="0x$1"
a="0x${v:2:6}"
b=$(( $a + 0x10F0A563))
c=$(( 0x${v:12:14} & 7 ))
p=$(( $(ror32 $b $c) ^ $a ))
printf "ATEN 1,%X\n" $p
- end of tool.sh -

|# bash ./tool.sh 012345678901
|
|ATEN 1,879C711

copy and paste the result into the shell to unlock zloader.

|NBG6617> ATEN 1,0046B0017430

If the entered code was correct the shell will change to
use the ATGU command to enter the real u-boot shell.

|NBG6617> ATGU
|NBG6617#

Co-authored-by: David Bauer <mail@david-bauer.net>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: David Bauer <mail@david-bauer.net>
(backported from 82618062cf7ed6b40d2c52c6f6b96364888ffda6)

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>
(backported from d375d5fafefb4de453ee36108b64f8df49aa2bec)

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>
(backported from 97da92b1277a40fa7daf354ed52b8ea25e06a779)

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>
(backported from 2f23a0583a3092d9076ceecca16be0f8ccdce217)

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>
(backported from 408c54b02f6a6dd2c0ae30a7885a37c9ac4c1b53)

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>
(backported from 0a2f21fa715bcf2e2975e32a1843a13fa088c640)

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>
(backported from 34e22653ac18b6ac7fd368ca47625f665808067f)

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>
(backported from 60deb3cdef4ac50a7d0fe9964a0f4a55aca1567e)

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>
(backported from 8375623a064037bbdd914bd9e7529eefa7172560)

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>
(backported from abb7524683cbc0185ee2d0b590c045065de354b7)

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>
(backported from d4ac26ec4920036fe15414e47a0f1a3df6e8b9fb)

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>
(backported from f9e7f193344fcee585b454e3884297f721187f4a)

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>
(backported from f9a42ae2d707b63b2bbe72945a2816da7d4fe30c)

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>
(backported from a704a2c06f13ade699d24616322a1339c4321cb5)

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>
(backported from 48f311a112b63a54c7d17e4fa1537dff1ac12219)

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>
(backported from c6e02b49f65cb4eff624a0831d3db265b3fadd2a)

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>
(backported from 3d20bee2cd11f83400e925870a03fb47cedceae3)

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>
(backported from 969fe206bdb910789bebd064d4b3be00238b0012)

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>
(backported from 512c57e7f3aa3cde0889a517f5f4c01783a3a57a)

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>
(backported from 56f3aee53149c82687fb90b2551defea6d0df8e9)

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>
(backported from 81d446b045176e3e25bb0ef74e3d060b51a0a353)

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>
(backported from 9a4253b81f3b3fff833ef92737ef73ad4c455ade)

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>
(backported from d661a5d754d1fb4731a5524a20c8c24eaf59f627)

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>
(backported from 83f31b794737adff3604474f0d09135fb3359ee5)

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>
(backported from 142477e75112f0c3a21d43a1b36922d46c67bd33)

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>
(backported from 414ce80c074142be4933978fcce7cb530b63c863)

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>
(backported from 163ab9135a9148d510cd19ca90782835e8ca80bb)

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>
(backported from c84ef1f1886e0803a7b8d8a0ec18c06df4f198c2)

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>
(backported from 0276e1f7608a2b5252aee0c92c9834a150582ffe)

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>
(backported from f5bce268b0e836a7e6ae9162cc0962601364d589)

5 years agouboot-sunxi: update Orange Pi R1 and Zero Plus
Hauke Mehrtens [Sat, 9 Jun 2018 16:40:17 +0000 (18:40 +0200)]
uboot-sunxi: update Orange Pi R1 and Zero Plus

The device tree files are now matching the kernel 4.17 and this will be
send also for integration into mainline U-Boot.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(backported from 9a26a9e8b9624d59e9d19b386d2365bb713e28b0)

5 years agouboot-sunxi: update to version 2018.05
Hauke Mehrtens [Sat, 9 Jun 2018 16:40:16 +0000 (18:40 +0200)]
uboot-sunxi: update to version 2018.05

This patch 220-add-sunxi50i-nanopi-neo-plus2.patch was merged upstream.
The u-boot-sunxi-with-spl.bin is now also created for the ARM64 sunxi
boards by U-Boot itself, no need to do it manually any more.

This was tested on a H2+ Orange Pi R1 and a H5 Orange Pi Zero Plus.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(backported from f2135e7811fec7174f5a74bc579a6a8f936d1100)

5 years agoarm-trusted-firmware-sunxi: update to version from 2018-02-10
Hauke Mehrtens [Sat, 9 Jun 2018 16:40:15 +0000 (18:40 +0200)]
arm-trusted-firmware-sunxi: update to version from 2018-02-10

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(backported from 7afe1caf7000f4ca671d3d681feef11af01e8551)

5 years agogemini: Cook SQ201 images
Linus Walleij [Fri, 15 Jun 2018 21:34:57 +0000 (23:34 +0200)]
gemini: Cook SQ201 images

This generates the "rd.gz" and "hddapp.tgz" that doesn't contain
anything of the sort but rather the OpenWRT rootfs. It works the
same way as how we generate the same layout for the NAS4220b.
For some reason the ImageInfo file is different for the SQ201.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
(backported from 1c1e2542445040b62a13862e42f961ac9c7e54f5)

5 years agogemini: Add appropriate Wireless kernel modules
Linus Walleij [Wed, 13 Jun 2018 15:47:58 +0000 (17:47 +0200)]
gemini: Add appropriate Wireless kernel modules

The D-Link DIR-685 has a RealTek RT2880 mini-PCI card in a
slot. Activate the appropriate kernel module.

The Square One SQ201 has a Ralink RT61-based mini-PCI card.
Activate the appropriate kernel modules. This fixes the
previous error just activating the firmware: the kernel
module will bring in the firmware it needs.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
(backported from d8072a3530ea083a90044ef272de344a733dcacb)

5 years agogemini: Cook a WRGG firmware image
Linus Walleij [Wed, 13 Jun 2018 15:45:04 +0000 (17:45 +0200)]
gemini: Cook a WRGG firmware image

This makes the Gemini build a WRGG-type firmware update
image for the DIR-685. This should hopefully install the
kernel from the web firmware upgrade API on the product
switching it permanently to use OpenWRT.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
(backported from dc7f540ce180707a8f0bc3a57634964687b48dd3)

5 years agotools: build squashfs (v3) for ath79
Zoltan HERPAI [Wed, 13 Jun 2018 08:51:50 +0000 (10:51 +0200)]
tools: build squashfs (v3) for ath79

Certain Netgear and AVM devices use BE squashfs for the kernel image. As
squashfs4 only supports creating LE images, add squashfs (v3) into
the tools to be built for ath79.

Trying to use an LE squashfs (thus trying to use squashfs4 only for
building the image) for the kernel image results in the bootloader
barfing and stopping.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
(backported from 3e0489dcd91faa3954a05e3fcdaf5de2d1892e67)

5 years agoltq-vdsl-fw: strip legacy dsl_fw logic
Daniel Golle [Fri, 15 Jun 2018 11:30:47 +0000 (13:30 +0200)]
ltq-vdsl-fw: strip legacy dsl_fw logic

We unfortunately dropped support for persistent in-flash DSL firmware.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(backported from 70f4845777cd3835f0f5b6e0294a5a53044576be)

5 years agoltq-vdsl-app: use downloaded vectoring firmware
Daniel Golle [Fri, 15 Jun 2018 11:28:38 +0000 (13:28 +0200)]
ltq-vdsl-app: use downloaded vectoring firmware

Use vectoring firmware downloaded via vdsl_fw_install.sh from
ltq-vdsl-fw package for annex B and annex J.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(backported from c8ac28237ddc3dd5d6c78983a949e30c02b7f0b5)

5 years agolantiq-vdsl-fw: update to provide recent vectoring firmware
Daniel Golle [Fri, 15 Jun 2018 10:21:03 +0000 (12:21 +0200)]
lantiq-vdsl-fw: update to provide recent vectoring firmware

Recent Speedport firmware downloads only work over HTTPS, so the user
either needs to provide the already downloaded file or install
ustream-ssl-* as well as ca-certificates or ca-bundle.

So to get VDSL2 with vectoring on xRX200, simply run
vdsl_fw_install.sh
on the target and either provide the downloaded file as instructed or
make sure the device is connected to the Internet and can download that
HTTPS url itself.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(backported from 0653e3127054993e908878f70fbbe1a1b784dd61)

5 years agoRevert "lantiq: get rid of ltq-vdsl-fw"
Daniel Golle [Fri, 15 Jun 2018 09:56:05 +0000 (11:56 +0200)]
Revert "lantiq: get rid of ltq-vdsl-fw"

This reverts commit 0938233fcdef67d969f9429a10761cc640c6d56d.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(backported from 8e2f8b0c835091e0c0cabc70f219cff317f4823d)

5 years agoucert: fix build
Daniel Golle [Fri, 15 Jun 2018 06:57:44 +0000 (08:57 +0200)]
ucert: fix build

set PKG_BUILD_DIR before including package.mk to avoid problems as
seen on buildbot.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(backported from f47d7df6a89ae9457fc99dcb44c35969aa40b7a8)

5 years agoucert: add package
Daniel Golle [Thu, 14 Jun 2018 17:39:25 +0000 (19:39 +0200)]
ucert: add package

ucert is a wrapper around usign to allow delegation and revocation of
public keys for future use in sysupgrade.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This work was sponsored by WIO (wiowireless.com)
(backported from 1b8f3d9c2ec3dd89dda524c37e4d69c3d213918e)

5 years agobrcm2708: move wifi calibration EEPROMs out of base-files
Daniel Golle [Thu, 14 Jun 2018 15:21:19 +0000 (17:21 +0200)]
brcm2708: move wifi calibration EEPROMs out of base-files

Ship EEPROM blobs for specific supported board only and don't have them
lurking around in our source tree but rather download them from
@github/RPi-Distro/firmware-nonfree upstream.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(backported from 037ef13a161c6167b328aaf6ca0e259a5b7db037)

5 years agobrcm2708: add brcmfmac-firmware-43455-sdio to DEFAULT_PACKAGES
Daniel Golle [Wed, 13 Jun 2018 22:42:09 +0000 (00:42 +0200)]
brcm2708: add brcmfmac-firmware-43455-sdio to DEFAULT_PACKAGES

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(backported from a2f17214cd40c3557db34e262b28e25dcbf47edf)

5 years agobrcm2708: add RPi3+ wifi calibration data
Daniel Golle [Wed, 13 Jun 2018 22:37:27 +0000 (00:37 +0200)]
brcm2708: add RPi3+ wifi calibration data

Add files from
https://github.com/RPi-Distro/firmware-nonfree/raw/master/brcm/brcmfmac43455-sdio.txt
https://github.com/RPi-Distro/firmware-nonfree/raw/master/brcm/brcmfmac43455-sdio.clm_blob

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(backported from 3a40a7d5a549c85a3f0072fa03a43d2fc56547b9)

5 years agolinux-firmware: add firmware for BCM43455 SDIO wlan found on RPi3B+
Daniel Golle [Wed, 13 Jun 2018 22:36:01 +0000 (00:36 +0200)]
linux-firmware: add firmware for BCM43455 SDIO wlan found on RPi3B+

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(backported from 2826471254f8ee955acc1f197eac443b3c34fd5b)

5 years agoramips: rename ethernet driver folder to the same one that upstream uses
Felix Fietkau [Mon, 30 Apr 2018 07:24:50 +0000 (09:24 +0200)]
ramips: rename ethernet driver folder to the same one that upstream uses

Preparation for sharing offload code with the mediatek target through
generic files/

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(backported from ec502cd3fe926f0dbc5f6020ee22929b18ef16ee)

5 years agopopt: Add backup site
Daniel Engberg [Sat, 9 Jun 2018 20:29:25 +0000 (22:29 +0200)]
popt: Add backup site

Add Gentoo's distfiles repo as backup site.

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
(backported from 79bab45772f9f67e9c1c0bcde3268ded8a970ec1)

5 years agokernel/modules: fix kmod-mdio-gpio module dependencies
Hauke Mehrtens [Sun, 10 Jun 2018 20:00:02 +0000 (22:00 +0200)]
kernel/modules: fix kmod-mdio-gpio module dependencies

On some targets this module depends on kmod-of-mdio.

This is similar to the fixes done in:
dc629d9cf5a ("kernel: fix kmod-switch-rtl8366-smi dependency")
56bd23cf529 ("kernel: let kmod-rtl8366-smi conditionally depend on kmod-of-mdio")

Fixes: 32f32398af976e ("kernel/modules: add kmod-mdio-gpio module")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(backported from 83483ba787e5c972099da1e983e95f396961c7f2)

5 years agokernel/modules: add kmod-switch-rtl8306 module
Martin Schiller [Wed, 26 Jul 2017 10:02:25 +0000 (12:02 +0200)]
kernel/modules: add kmod-switch-rtl8306 module

Add kernel module for kmod-switch-rtl8306.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
(backported from 5609bbabf194a56058afb3e3b7b91a308cb01f05)

5 years agokernel/modules: add kmod-mdio-gpio module
Martin Schiller [Wed, 26 Jul 2017 09:51:05 +0000 (11:51 +0200)]
kernel/modules: add kmod-mdio-gpio module

Add kernel module package for kmod-mdio-gpio.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
(backported from 32f32398af976e38de4b656dfe4fc49b98b038ea)

5 years agokernel/modules: add kmod-adcxx module
Florian Eckert [Tue, 25 Jul 2017 14:38:56 +0000 (16:38 +0200)]
kernel/modules: add kmod-adcxx module

Add kernel module package for kmod-adcxx.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(backported from 2f46f4375480838b3e9b89e4bcd5117e71aae8cc)

5 years agokernel/modules: add kmod-random-tpm module
Martin Schiller [Wed, 2 Aug 2017 04:04:50 +0000 (06:04 +0200)]
kernel/modules: add kmod-random-tpm module

Add kernel module package for kmod-random-tpm.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
(backported from 503ac967c5fa88c37d7d3f8ed348677cee29f0f9)

5 years agomac80211: ath10k: Allow to enable the thermal code of ath10k
Sven Eckelmann [Tue, 30 Jan 2018 08:41:45 +0000 (09:41 +0100)]
mac80211: ath10k: Allow to enable the thermal code of ath10k

Some ath10k firmware versions allow to access the chip internal a
temperature sensor and allow to reduce the amount of the time when the card
is allowed to send. The latter is required on devices which tend to
overheat.

An userspace service has to read
/sys/class/ieee80211/phy*/device/hwmon/hwmon*/temp1_input regularly and
then decide how much the device has to be throttled. This can be done by
writing to /sys/class/ieee80211/phy*/device/cooling_device/cur_state. By
default it is not throttled (0) but it can be throttled up to 100(%).

Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
(backported from 4270847a2c2b8e4b890de16b51bd2e50c64077d2)
(rebased patches)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agosparse: updated to version 0.5.2
Krystian Kozak [Sun, 27 May 2018 20:35:18 +0000 (22:35 +0200)]
sparse: updated to version 0.5.2

Updated to latest stable release

Signed-off-by: Krystian Kozak <krystian.kozak20@gmail.com>
(backported from 0e9927d157f0e98303279d1049aa02ac43a49e0b)

5 years agoramips: mt7621: Fix some cosmetic DTC warnings
Rosen Penev [Thu, 7 Jun 2018 21:21:38 +0000 (14:21 -0700)]
ramips: mt7621: Fix some cosmetic DTC warnings

Node /cpus/cpu@0 has a unit name, but no reg property
Node /cpus/cpu@1 has a unit name, but no reg property
Node /cpuintc@0 has a unit name, but no reg property
Node /cpuclock@0 has a unit name, but no reg property
Node /sysclock@0 has a unit name, but no reg property
Node /pcie@1e140000/pcie0 missing ranges for PCI bridge (or not a bridge)
Node /pcie@1e140000/pcie0 missing bus-range for PCI bridge
Node /pcie@1e140000/pcie1 missing ranges for PCI bridge (or not a bridge)
Node /pcie@1e140000/pcie1 missing bus-range for PCI bridge
Node /pcie@1e140000/pcie2 missing ranges for PCI bridge (or not a bridge)
Node /pcie@1e140000/pcie2 missing bus-range for PCI bridge

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(backported from 289b2f5e8541943c08bcd37d61093e2fd29bc80a)

5 years agoramips: mmc: Add back some non-mt7621 code that staging removed
Rosen Penev [Thu, 7 Jun 2018 17:36:19 +0000 (10:36 -0700)]
ramips: mmc: Add back some non-mt7621 code that staging removed

This reverts commit 8a570921b5ba49a2d3824f1220e4c53809063468.

This seems to have been accidentally reverted. This fixes mt7620 and
mt7628.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Acked-by: Daniel Golle <daniel@makrotopia.org>
(backported from 66cc6dd6c4b19a8ef9e5d2ebed3e10876c8aeaf0)

5 years agoramips: mir3g dts define usb port Vcc volt regulator GPIO
Kevin Darbyshire-Bryant [Thu, 7 Jun 2018 16:33:57 +0000 (16:33 +0000)]
ramips: mir3g dts define usb port Vcc volt regulator GPIO

Define USB port power on/off GPO as voltage regulator type instead of
exposing as a normal GPIO.

The GPO is now controlled by the USB driver via the voltage regulator
definition.  The regulator is of fixed output type (5V for USB) hence the
GPO switches power on/off to USB pin 1 (Vcc)

USB port power is enabled on driver load and disabled on driver unload.

Enable kernel support for fixed voltage regulator types on mt7621.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
(backported from 8110bf18f4c1d04e8dfe94438caeadf78ceac892)

5 years agoipq40xx: flesh out MR33's pcie dts definitions
Christian Lamparter [Thu, 7 Jun 2018 15:36:58 +0000 (17:36 +0200)]
ipq40xx: flesh out MR33's pcie dts definitions

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(backported from 4363b5362fc48cf3d3ae9d7f5363d4efeba8bf7c)

5 years agoipq40xx: fix OpenMesh A62 dtc warnings
Christian Lamparter [Thu, 7 Jun 2018 15:36:57 +0000 (17:36 +0200)]
ipq40xx: fix OpenMesh A62 dtc warnings

Warning (pci_bridge): Node /soc/pci@40000000/pcie@0 missing ranges for PCI bridge (or not a bridge)
Warning (pci_bridge): Node /soc/pci@40000000/pcie@0 missing bus-range for PCI bridge
Warning (pci_bridge): Node /soc/pci@40000000/pcie@0/ath10k@0,0 node name is not "pci" or "pcie"
Warning (pci_bridge): Node /soc/pci@40000000/pcie@0/ath10k@0,0 missing ranges for PCI bridge (or not a bridge)
Warning (pci_bridge): Node /soc/pci@40000000/pcie@0/ath10k@0,0 incorrect #address-cells for PCI bridge
Warning (pci_bridge): Node /soc/pci@40000000/pcie@0/ath10k@0,0 incorrect #size-cells for PCI bridge
Warning (pci_bridge): Node /soc/pci@40000000/pcie@0/ath10k@0,0 missing bus-range for PCI bridge
Warning (unit_address_format): Failed prerequisite 'pci_bridge'
Warning (pci_device_reg): Failed prerequisite 'pci_bridge'
Warning (pci_device_bus_num): Failed prerequisite 'pci_bridge'

Cc: Sven Eckelmann <sven.eckelmann@openmesh.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Tested-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
(backported from 146fbeb81cc6eae1bba63a708b5a28071acc874e)

5 years agoipq40xx: fix dtc warning about /soc/ad-hoc-bus missing a unit name
Christian Lamparter [Thu, 7 Jun 2018 15:36:56 +0000 (17:36 +0200)]
ipq40xx: fix dtc warning about /soc/ad-hoc-bus missing a unit name

This patch fixes a dtc warning that shows up for every device
Warning (unit_address_vs_reg): Node /soc/ad-hoc-bus has a reg or ranges property, but no unit name

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(backported from 2f1fa045878d13c565012f855fa767a10286d8c1)

5 years agoipq40xx: set #size-cells to 0 to fix warning
Christian Lamparter [Thu, 7 Jun 2018 15:36:55 +0000 (17:36 +0200)]
ipq40xx: set #size-cells to 0 to fix warning

qcom-ipq4018-ex6100v2.dtb: Warning (reg_format): "reg" property in
/led_spi/led_gpio@0 has invalid length (4 bytes)
qcom-ipq4018-ex6100v2.dtb: Warning (avoid_default_addr_size):
Relying on default #size-cells value for /led_spi/led_gpio@0

Cc: Thomas Hebb <tommyhebb@gmail.com>
Cc: David Bauer <mail@david-bauer.net>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(backported from b22e37528beec22d8e98ebe9f2db049b218313c9)

5 years agoimx-uuc: updated to latest git HEAD
Krystian Kozak [Sun, 27 May 2018 20:54:04 +0000 (22:54 +0200)]
imx-uuc: updated to latest git HEAD

8e29d86 linuxrc: remove superfluous shebang line
12d2045 gitignore: remove Windows stuff
57d8969 Add travis hint
8edf4cc sdimage: use fsync before closing the device (fixes #1)
d395b31 uuc: fix some compiler warnings

Signed-off-by: Krystian Kozak <krystian.kozak20@gmail.com>
(backported from c844d6a8e43a5b76f4aba0a7ab59fe8286482044)

5 years agoath79: fix qca956x SoC boot
Lucian Cristian [Sun, 3 Jun 2018 23:09:15 +0000 (02:09 +0300)]
ath79: fix qca956x SoC boot

based on old ar71xx irq.c driver

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
(backported from a0a616e1b8d8f3a0cfe1b91b29eef5a8326769f7)

5 years agogdb: Update to 8.1
Rosen Penev [Thu, 7 Jun 2018 01:22:26 +0000 (18:22 -0700)]
gdb: Update to 8.1

Tested on Turris Omnia (mvebu).

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(backported from 525b8f06501233414ad6e56fe1134ae82ab28fc2)

5 years agozynq: refresh kernel 4.14 configuration
Luis Araneda [Sun, 13 May 2018 23:39:36 +0000 (19:39 -0400)]
zynq: refresh kernel 4.14 configuration

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
(backported from 19c3dc60e4e86356349513d66da10afea3542477)

5 years agozynq: copy config to kernel 4.14
Luis Araneda [Sun, 13 May 2018 22:22:10 +0000 (18:22 -0400)]
zynq: copy config to kernel 4.14

The file will be used as a base configuration
for kernel 4.14

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
(backported from 74dffd592b72dd723ca18c54633259b5284431e2)

5 years agouboot-zynq: update to 2017.03
Luis Araneda [Sun, 13 May 2018 22:12:21 +0000 (18:12 -0400)]
uboot-zynq: update to 2017.03

Compile-tested: ZedBoard

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
(backported from 8c8499f0ea790fdf69547d868803a29da6d0e7bd)

5 years agokernel: modules: package module for Exar 8250 UARTs
Daniel Golle [Tue, 5 Jun 2018 03:35:47 +0000 (05:35 +0200)]
kernel: modules: package module for Exar 8250 UARTs

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(backported from 187da94808a634477b5e5a69109ea0c566dfa64b)
(rebased patches)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agogcc: remove support for version 6.3.0
Felix Fietkau [Sat, 12 May 2018 12:56:36 +0000 (14:56 +0200)]
gcc: remove support for version 6.3.0

It is obsoleted by gcc 7

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(backported from 29e2f9ea5b2eaafc5e184be71cfe915b6f46cee4)

5 years agokernel: re-add export ipv6_push_frag_opts for tunneling now patch
Hans Dedecker [Fri, 1 Jun 2018 11:37:09 +0000 (13:37 +0200)]
kernel: re-add export ipv6_push_frag_opts for tunneling now patch

The patch got removed by commit 7dca1bae82 (kernel: bump to 4.9.105)
but is still required as ipv6_push_frag_opts needs to be exported.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
(backported from 0777a3e773ef61059d6aae91aae6006257cba5fa)
(rebased patches)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agoRevert "ramips: Add back some non-mt7621 code that staging removed"
John Crispin [Fri, 1 Jun 2018 09:41:04 +0000 (11:41 +0200)]
Revert "ramips: Add back some non-mt7621 code that staging removed"

This reverts commit 048e41f6496697863cc7d73ab95fa89a6ddf2470.

Signed-off-by: John Crispin <john@phrozen.org>
(backported from 8a570921b5ba49a2d3824f1220e4c53809063468)

5 years agoath79: add AR7240 dtsi
Alex Maclean [Wed, 30 May 2018 13:18:51 +0000 (14:18 +0100)]
ath79: add AR7240 dtsi

Signed-off-by: Alex Maclean <monkeh@monkeh.net>
(backported from 34f874b872251de2fd73758df428bf5e3266dd36)

5 years agoath10k-ct: Update driver to latest
Koen Vandeputte [Thu, 31 May 2018 08:21:06 +0000 (10:21 +0200)]
ath10k-ct: Update driver to latest

127f98189ee5 ath10k:  Fix bad return w/out unlock, compile w/out debugfs
b8f48f3c138f Fix survey-dump for 4.7, 4.9 and 4.13 kernels.
fa8259ad5d6d ath10k-ct:  Support survey dump in 10.1 firmware.
2853e1337ecf ath10k-ct:  Add 4.16 ath10k-ct driver to package.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
CC: Ben Greear <greearb@candelatech.com>
(backported from e5ff84d1f0d999545341af2e2f1b15e1522a4829)

5 years agoRevert "kernel: backport export ipv6_push_frag_opts for tunneling now"
Daniel Golle [Thu, 31 May 2018 23:37:51 +0000 (01:37 +0200)]
Revert "kernel: backport export ipv6_push_frag_opts for tunneling now"

This reverts commit daa73b63d5dc5eb264341336c0d7cd64d750664d.
The fix has already been imported by
commit b7735d8113 ("kernel: import follow-up fix for previous backport").
The patch won't apply twice.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(backported from 2087df1c6d38333aa1d8f87eb7b29a85b5863bd5)

5 years agoramips: Fix a few other GnuBee DTS differences
Rosen Penev [Sun, 27 May 2018 22:50:50 +0000 (15:50 -0700)]
ramips: Fix a few other GnuBee DTS differences

I was carrying a local commit that added the sdhci stuff and missed it
as a result.

Also fix the rgmii3 thing in the PC2 DTS file as that's bogus and causes
a dmesg warning that it's bogus.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(backported from 976c27f2dd8508290568812d0eded3d18cc7c062)

5 years agoar71xx: add support for GL.iNet GL-AR750S
Luo chongjun [Fri, 25 May 2018 10:06:37 +0000 (18:06 +0800)]
ar71xx: add support for GL.iNet GL-AR750S

This patch adds supports for GL-AR750S.

Specification:
- SOC: QCA9563 (775MHz)
- Flash: 16 MiB (W25Q128FVSG)
- RAM: 128 MiB DDR2
- Ethernet: 2x 1Gbps LAN + 1x 1Gbps WAN
- Wireless: 2.4GHz (bgn) and 5GHz (ac)
- USB: 1x USB 2.0 port
- Button: 1x switch button, 1x reset button
- LED: 3x LEDS (green)

Flash instruction:
Apply factory image via web-gui.

Signed-off-by: Luo chongjun <luochongjun@gl-inet.com>
(backported from 312d7a4a5aaac8df714da5ad25d8b83a09c9e68c)

5 years agoar71xx: fix bad "proto" references in default network configuration
Jo-Philipp Wich [Fri, 25 May 2018 07:44:28 +0000 (09:44 +0200)]
ar71xx: fix bad "proto" references in default network configuration

This change was originally meant to go along with the ucidef_set_interface()
fixup.

Fixes: 7e664b7c2d ("base-files: fix ucidef_set_interface() protocol selection")
Fixes: 85048a9c1f ("base-files: rework _ucidef_set_interface to be more generic")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from 3b749d4acc72a776681d70ba01dffe1d5dc5401e)

5 years agobase-files: fix ucidef_set_interface() protocol selection
Jo-Philipp Wich [Fri, 25 May 2018 05:28:28 +0000 (07:28 +0200)]
base-files: fix ucidef_set_interface() protocol selection

The previous refactoring of ucidef_set_interface() removed the protocol
selection heuristic which breaks the networking defaults for the majority
of boards.

Re-add the protocol selection and rename two bad "proto" references to
the expected "protocol" value.

Fixes: 85048a9c1f ("base-files: rework _ucidef_set_interface to be more generic")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from 7e664b7c2dc00006ba29bf947cf177b5bccdc47d)

5 years agokernel: add reset control support to rtl8366 driver
John Crispin [Wed, 23 May 2018 22:23:16 +0000 (00:23 +0200)]
kernel: add reset control support to rtl8366 driver

Signed-off-by: John Crispin <john@phrozen.org>
(backported from f7aa08595db07f4c56484b3cef961553b8c09b02)

5 years agobase-files: rework _ucidef_set_interface to be more generic
Roman Yeryomin [Fri, 4 May 2018 15:42:36 +0000 (18:42 +0300)]
base-files: rework _ucidef_set_interface to be more generic

This is a rework of previously submitted patch reworking
ucidef_set_interface_raw [1]. Here, keep the idea but instead
make _ucidef_set_interface more generic and use it instead of
ucidef_set_interface_raw.
Also change the users like ucidef_set_interface_lan and others.

[1] https://patchwork.ozlabs.org/patch/844961/

Signed-off-by: Roman Yeryomin <roman@advem.lv>
(backported from 85048a9c1fa4d37b5896d9237d28bbadbbe09d19)