openwrt/staging/thess.git
5 years agolantiq: enable second VPE on Fritz!Box 7412
David Bauer [Fri, 9 Aug 2019 21:45:56 +0000 (23:45 +0200)]
lantiq: enable second VPE on Fritz!Box 7412

The AVM Fritz!Box 7412 does not use the VMMC part of the Lantiq chip but
rather a proprietary solution based on the DECT chip for the FXS ports.

Therefore, the second VPE can be enabled for use with OpenWrt.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agolantiq: correct Fritz!Box 7412 button logic level
David Bauer [Fri, 9 Aug 2019 22:45:49 +0000 (00:45 +0200)]
lantiq: correct Fritz!Box 7412 button logic level

The AVM FRITZ!Box 7412 buttons are both active low, which is currently
incorrectly defined in the device-tree.

This leads to the device booting directly into failsafe.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agoramips: fix LED labels not updated during device name changes
Adrian Schmutzler [Tue, 6 Aug 2019 12:30:42 +0000 (14:30 +0200)]
ramips: fix LED labels not updated during device name changes

In commit d93969a13a5b ("ramips: Improve compatible for TP-Link
Archer devices") and subsequent ones, names of several devices
in ramips have been changed.
Since LED names are frequently invoked by $boardname, this has
broken LED setup in 01_leds, as $boardname and prefix in DTS
do not match anymore.

This patch updates device name prefixes for LEDs in DTS files,
and provides a migration script.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoramips: add kmod-mt7615e to Xiaomi Mi Router 3 Pro images
Ozgur Can Leonard [Fri, 2 Aug 2019 18:55:41 +0000 (21:55 +0300)]
ramips: add kmod-mt7615e to Xiaomi Mi Router 3 Pro images

Now that the mt76/mt7615e driver is in Openwrt, might as well use it.

Signed-off-by: Ozgur Can Leonard <ozgurcan@gmail.com>
5 years agodnsmasq: use nettle ecc_curve access functions
Hans Dedecker [Fri, 9 Aug 2019 19:25:37 +0000 (21:25 +0200)]
dnsmasq: use nettle ecc_curve access functions

Fixes compile issues with nettle 3.5.1

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
5 years agonettle: Update to 3.5.1
Daniel Engberg [Sat, 3 Aug 2019 20:27:36 +0000 (22:27 +0200)]
nettle: Update to 3.5.1

Update (lib)nettle to 3.5.1
Bump ABI_VERSION

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
5 years agoath79: add missing IMAGE_SIZE for Comfast WR650AC v1/v2
Adrian Schmutzler [Fri, 9 Aug 2019 15:40:42 +0000 (17:40 +0200)]
ath79: add missing IMAGE_SIZE for Comfast WR650AC v1/v2

When adding support in 9ed272fe9500 ("ath79: add support for
Comfast WR650AC v1/v2"), IMAGE_SIZE has not been added to device
definition.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoar71xx: ag71xx: init rings with GFP_KERNEL
Koen Vandeputte [Fri, 9 Aug 2019 16:51:07 +0000 (18:51 +0200)]
ar71xx: ag71xx: init rings with GFP_KERNEL

ar71xx got lost during final rebase ..

Fixes: b417a0c48d63 ("ar71xx/ath79: ag71xx: init rings with GFP_KERNEL")
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agoar71xx/ath79: ag71xx: init rings with GFP_KERNEL
Koen Vandeputte [Fri, 9 Aug 2019 07:51:29 +0000 (09:51 +0200)]
ar71xx/ath79: ag71xx: init rings with GFP_KERNEL

Upstream commit 246902bdf562d45ea3475fac64c93048a7a39f01

Which contains following explanation:

--
There is no need to use GFP_ATOMIC here, GFP_KERNEL should be enough.
The 'kcalloc()' just a few lines above, already uses GFP_KERNEL.
--

Looking at the code, all other descriptors also use plain GFP_KERNEL

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agoar71xx/ath79: ag71xx: fix sleep in atomic
Koen Vandeputte [Mon, 5 Aug 2019 13:20:22 +0000 (15:20 +0200)]
ar71xx/ath79: ag71xx: fix sleep in atomic

When enabling atomic-sleep-debugging options in the kernel,
following splat is seen when disabling the interface (which happens on boot):

[   10.892878] eth0: link down
[   10.896788] BUG: sleeping function called from invalid context at net/core/dev.c:5563
[   10.904730] in_atomic(): 1, irqs_disabled(): 1, pid: 425, name: ip
[   10.911004] 2 locks held by ip/425:
[   10.914539]  #0:  (rtnl_mutex){....}, at: [<80377474>] rtnetlink_rcv_msg+0x2d8/0x380
[   10.922441]  #1:  (&(&ag->lock)->rlock){....}, at: [<80330158>] ag71xx_hw_disable+0x24/0x94
[   10.930976] CPU: 0 PID: 425 Comm: ip Not tainted 4.14.136 #0
[   10.936716] Stack : 805e0000 80589228 80557404 876998ec 80610000 80610000 87cdcafc 805b5327
[   10.945233]         80551534 000001a9 8061386c 87699ccc 87cfb180 00000001 876998a0 84f70903
[   10.953751]         00000000 00000000 80b00000 8769979c 6a7407fa 00000000 00000007 00000000
[   10.962270]         000000b7 16d0954a 000000b6 00000000 80000000 87cb658c 87cb65b0 00000001
[   10.970787]         8046f97c 87699ccc 87cfb180 87ff2810 00000003 802ce724 0806e098 80610000
[   10.979306]         ...
[   10.981797] Call Trace:
[   10.984287] [<8006cb0c>] show_stack+0x58/0x100
[   10.988814] [<800aab34>] ___might_sleep+0x100/0x120
[   10.993774] [<8035c434>] napi_disable+0x30/0xd8
[   10.998377] [<80330198>] ag71xx_hw_disable+0x64/0x94
[   11.003418] [<8033069c>] ag71xx_stop+0x24/0x38
[   11.007959] [<80359e30>] __dev_close_many+0xcc/0x104
[   11.013009] [<80362eac>] __dev_change_flags+0xc8/0x1ac
[   11.018227] [<80362fb8>] dev_change_flags+0x28/0x70
[   11.023182] [<80376890>] do_setlink+0x31c/0x91c
[   11.027786] [<80379360>] rtnl_newlink+0x3ec/0x7f8
[   11.032563] [<80377498>] rtnetlink_rcv_msg+0x2fc/0x380
[   11.037799] [<8039a734>] netlink_rcv_skb+0xd4/0x178
[   11.042754] [<80399d10>] netlink_unicast+0x168/0x250
[   11.047796] [<8039a2d4>] netlink_sendmsg+0x3d8/0x434
[   11.052841] [<8033f0e4>] ___sys_sendmsg+0x1dc/0x290
[   11.057794] [<80340140>] __sys_sendmsg+0x54/0x84
[   11.062495] [<8007212c>] syscall_common+0x34/0x58

This is caused by calling napi_disable() while holding the spinlock.

Fix it by omitting the spinlock, which is not required here
Extensively tested on GL-MiFi, RB-912 and RB-922 hardware

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agokernel: bump 4.19 to 4.19.65
Koen Vandeputte [Wed, 7 Aug 2019 12:21:39 +0000 (14:21 +0200)]
kernel: bump 4.19 to 4.19.65

Refreshed all patches.

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agokernel: bump 4.14 to 4.14.137
Koen Vandeputte [Wed, 7 Aug 2019 11:53:45 +0000 (13:53 +0200)]
kernel: bump 4.14 to 4.14.137

Refreshed all patches.

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agokernel: bump 4.9 to 4.9.188
Koen Vandeputte [Wed, 7 Aug 2019 10:51:24 +0000 (12:51 +0200)]
kernel: bump 4.9 to 4.9.188

Refreshed all patches.

Compile-tested on: none
Runtime-tested on: none

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agoath79: fix identation errors in 01_leds
David Bauer [Fri, 9 Aug 2019 15:13:20 +0000 (17:13 +0200)]
ath79: fix identation errors in 01_leds

Fix the identation of 01_leds to keep the style of the file consistent.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agoath79: add missing IMAGE_SIZE for Comfast E314N-v2
Adrian Schmutzler [Fri, 9 Aug 2019 11:53:49 +0000 (13:53 +0200)]
ath79: add missing IMAGE_SIZE for Comfast E314N-v2

When adding support in abbbecaa73dc ("ath79: add support for
Comfast E314N-v2"), IMAGE_SIZE has not been added to device
definition.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoath79: fix whitespace errors from adding D-Link DIR-842 C3
Adrian Schmutzler [Fri, 9 Aug 2019 12:19:51 +0000 (14:19 +0200)]
ath79: fix whitespace errors from adding D-Link DIR-842 C3

We completely overlooked whitespace errors when reviewing
796ad2f7ef6f ("ath79: add support for D-Link DIR-842 C3").

Fix them and and also fix Makefile indent for C1/C2.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoath79: add support for Comfast WR650AC v1/v2
Joan Moreau [Sun, 31 Mar 2019 04:26:22 +0000 (04:26 +0000)]
ath79: add support for Comfast WR650AC v1/v2

This is a dual band 11a/11n router with 1x wan and 4x gig lan ports.

There are two versions of this router which can be identified through
the factory web interface, v1 has 128mb ram and a uboot size of 128k,
v2 has 256mb ram and a uboot size of 256k, the remaining hardware and
PCB markings are the same.

Short specification:

    SoC: Qualcomm Atheros QCA9558 - 720 MHz
    Switch: Atheros AR8327
    Second radio : Qualcomm Atheros QCA9880 802.11ac
    4 LAN/1 WAN 1000Mps Ethernet
    256 MB of RAM (DDR2)
    16 MB of FLASH
    3x2.4 GHz, 3x5GHz antennas

Steps to install :

Option A : Use vendor UI

Option B (if A is not working) :
(a) Download 'backup' from vendor UI and rename it backup.tar.gz
(b) Open the archive, and update the root password in /etc/shadow by
    '$1$9wX3HGfB$X5Sb3kqzzBLdKRUR2kfFd0'
(c) 'Restore' from the archive using the vendor UI. Root password is now
    'aaa'
(d) Scp the firwmware to the device:
    $ scp <openwrt-sysupgrade>.bin root@192.168.1.1:/
(d) ssh to the device and flash the firmware:
    $ cd /
    $ mtd -e firmware -r write <openwrt-sysupgrade>.bin firmware

Signed-off-by: Gareth Parker <gareth41@orcon.net.nz>
Signed-off-by: Ding Tengfei <dtf@comfast.cn>
Signed-off-by: Joan Moreau <jom@grosjo.net>
[reformatted commit message]
Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agobrcm2708: bcm2711: remove unneeded boot file
Álvaro Fernández Rojas [Fri, 9 Aug 2019 05:37:51 +0000 (07:37 +0200)]
brcm2708: bcm2711: remove unneeded boot file

bootcode.bin isn't needed for RPi 4B since it's stored on a SPI-attached EEPROM.
More info: https://www.raspberrypi.org/documentation/hardware/raspberrypi/booteeprom.md

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agoath79: add support for Comfast E314N-v2
Joan Moreau [Sat, 30 Mar 2019 13:27:17 +0000 (13:27 +0000)]
ath79: add support for Comfast E314N-v2

Taken code from https://patchwork.ozlabs.org/patch/884850/ that was never
pushed by the author, and adapted to ath79.

The Comfast E314N-V2 is a 2.4 GHz 2x2 radio with a built-in directional
antenna and a second Ethernet port - very similar to the Ubiquiti
NanoStation M2. The Ethernet port features a pass-through PoE capability,
enabled or disabled with a slide switch.

Specifications :
- System-On-Chip: Qualcomm/Atheros QCA9531
- CPU/Speed: 650 MHz
- Flash size: 8 MiB
- RAM: 64 MiB
- 2 Ethernet 1Gbp
- 1 reset button
- 1 switch to choose PoE from LAN or Wan. 48Vdc
- Wifi 2.4 Ghz (b/g/n)
- UART inside the box (3.3V, pins marked on the PCB)

Firmware can be flashed on these units by the following method:
1.) Apply power to the unit
2.) Immediately AFTER applying power, hold down the reset button
3.) The WAN, LAN, and wireless lights will flash - wait three seconds
    (three flashes) and then release the button.
4.) After a second, the lights will flutter quickly and the unit will be
    visible at 192.168.1.1. A web page will be available to enable quick
    and simple uploading and flashing of firmware.

During the boot process, these units also look for a tftp server at
192.168.1.10. If one is present, the firmware can be uploaded as a file
called firmware-auto.bin

Signed-off-by: Joan Moreau <jom@grosjo.net>
[wrapped commit message - fix commit title capitalization]
Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agocomgt-ncm: add driver dependencies again
Vincent Wiemann [Sun, 4 Aug 2019 23:42:45 +0000 (01:42 +0200)]
comgt-ncm: add driver dependencies again

In the commit 623716dd4318 ("comgt-ncm: Fix NCM protocol")
the dependencies to vendor NCM drivers were removed, because:

> comgt-ncm should not depend on the USB-serial-related kernel modules,
> as the cdc-wdm control device works without them. There is also no need
> to depend on kmod-huawei-cdc-ncm, since other manufacturers (like
> Ericsson and Samsung) which use other kernel modules should also be
> supported.

From a user-perspective this does not make sense, as installing comgt-ncm
(or luci-proto-ncm) should install all needed dependencies for using such
a device.

Furthermore depending on kmod-huawei-cdc-ncm does not mean that Ericsson
and Samsung devices can't be supported. By the way it seems that Ericsson
and Samsung devices never used NCM, but act as serial modems.

Thus this commit adds the dependencies again.

Signed-off-by: Vincent Wiemann <vincent.wiemann@ironai.com>
[fixed title capitalization, formatted commit message,
renamed Sony-Ericsson to Ericsson]
Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agoramips: add support for HiWiFi HC5761A
DENG Qingfang [Tue, 23 Jul 2019 12:12:48 +0000 (20:12 +0800)]
ramips: add support for HiWiFi HC5761A

HiWiFi HC5761A is an "MT7628AN variant" of HC5761

Specifications:
- MediaTek MT7628AN 580MHz
- 128 MB DDR2 RAM
- 16 MB SPI Flash
- 2.4G MT7628AN 802.11bgn 2T2R 300Mbps
- 5G MT7610EN 802.11ac 433Mbps
- 3x 10/100 Mbps Ethernet

Flash instruction:
1. Get SSH access to the router
2. SSH to router with `ssh -p 1022 root@192.168.199.1`, The SSH password is the same as the webconfig one
3. Upload OpenWrt sysupgrade firmware into the router's `/tmp` folder with SCP
4. Run `mtd write /tmp/<filename> firmware`
5. reboot

Known bug:
- SD slot does not work (See PR 1500)

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
5 years agoramips: improve support for HiWiFi HC5661A and HC5861B
DENG Qingfang [Tue, 23 Jul 2019 12:12:37 +0000 (20:12 +0800)]
ramips: improve support for HiWiFi HC5661A and HC5861B

HC5661A:
- Fix pinctrl
- Fix image size (15808k)
- Use switch trigger for WAN LED

Both:
- Use tpt LED trigger for wireless
- Explicitly disable USB nodes

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
5 years agoramips: add HC5X61A.dtsi for HiWiFi MT7628AN boards
DENG Qingfang [Tue, 23 Jul 2019 12:12:29 +0000 (20:12 +0800)]
ramips: add HC5X61A.dtsi for HiWiFi MT7628AN boards

HiWiFi has several MT7628AN routers which have similar specs
Add HC5X61A.dtsi to include them, like HC5X61.dtsi (for MT7620A)

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
5 years agoath79: add support for PISEN WMB001N
Chuanhong Guo [Sun, 4 Aug 2019 14:13:45 +0000 (22:13 +0800)]
ath79: add support for PISEN WMB001N

Specifications:
- SoC: AR9341
- RAM: 64M
- Flash: 16M
- Ethernet: 1 * FE port
- WiFi: ar934x-wmac
- Sound: WM8918 DAC
         1 * 3.5mm headphone jack
         2 * RCA connectors for speakers
         1 * SPDIF out
- USB: 1 * USB2.0 port

Flash instruction:
 Upload generated factory image via vendor's web interface.

Notes:
A. Audio stuff:
 1. Since AR934x, all pins for peripheral blocks can be mapped to
    any available GPIOs. We currently don't have a PCM/I2S driver
    for AR934x so pinmux for i2s and SPDIF are bound to i2c gpio
    node. This should be moved into I2S node when a PCM/I2S driver
    is available.
 2. The i2c-gpio node is for WM8918. DT binding for it can't be added
    currently due to a missing clock from I2S PLL.

B. Factory image:
 Image contains a image header and a tar.gz archive.
 1. Header: A 288 byte header that has nothing to do with appended
    tarball. Format:
     0x0-0x7 and 0x18-0x1F: magic values
     0x20: Model number string
     0xFC: Action string. It's either "update" or "backup"
     0x11C: A 1 byte checksum. It's XOR result of 0x8-0x11B
    Firmware doesn't care about the rest of the header as long as
    checksum result is correct.
    The same header is used for backup and update routines so the
    magic values and model number can be obtained by generating a
    backup bin and grab values from it.
 2. Tarball: It contains two files named uImage and rootfs, which
    will be flashed into corresponding mtd partition.
 Writing a special utility that can only output a fixed binary
 blob is overkill so factory image header is placed under
 image/bin instead.

C. LED
 The wifi led has "Wi-Fi" marked on the case but vendor's firmware
 used it as system status indicator. I did the same in this device
 support patch.

D. Firmware
 Factory u-boot is built without 'savenv' support so it's impossible
 to change kernel offset. A 2MB kernel partition won't be enough in
 the future. OKLI loader is used here to migrate this problem:
  1. add OKLI image magic support into uImage parser.
  2. build an OKLI loader, compress it with lzma and add a normal
     uImage header.
  3. flash the loader to where the original kernel supposed to be.
  4. create a uImage firmware using OKLI loader.
  5. flash the created firmware to where rootfs supposed to be.
 By doing so, u-boot will start OKLI loader, which will then load
 the actual kernel at 0x20000.

 The kernel partition is 2MB, which is too much for our loader.
 To save this space, "mtd-concat" is used here:
  1. create a 64K (1 erase block) partition for OKLI loader and
     create another partition with the left space.
  2. concatenate rootfs and this partition into a virtual flash.
  3. use the virtual flash for firmware partition.

 Currently OKLI loader is flashed with factory image only.
 sysupgrade won't replace it. Since it only has one function
 and it works for several years, its unlikely to have some bugs
 that requires a replacement.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
5 years agokernel: mtdsplit_uimage: add support for okli image
Chuanhong Guo [Sun, 4 Aug 2019 12:41:56 +0000 (20:41 +0800)]
kernel: mtdsplit_uimage: add support for okli image

This adds support for uImage used by OpenWrt kernel loader.
The parser searches for uImage header at flash eraseblock boundary
and it might attempt to split any firmware with loader, therefore
this entry doesn't have MTD_PARSER_TYPE_FIRMWARE so that this parser
is only used when explicitly defined in dts.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
5 years agogpio-button-hotplug: add volume button handling
Chuanhong Guo [Sun, 4 Aug 2019 08:29:39 +0000 (16:29 +0800)]
gpio-button-hotplug: add volume button handling

This is used by PISEN WMB001N.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
5 years agoath79: add support for D-Link DIR-842 C3
Perry Melange [Wed, 7 Aug 2019 17:25:13 +0000 (19:25 +0200)]
ath79: add support for D-Link DIR-842 C3

Hardware spec of DIR-842 C3:
SoC: QCA9563
DRAM: 128MB DDR2
Flash: 16MB SPI-NOR
Switch: QCA8337N
WiFi 5.8GHz: QCA9888
WiFi 2.4Ghz: QCA9563
USB: circuit onboard, but components are not soldered

Flash instructions:

1. Upgrade the factory.bin through the factory web interface or
   the u-boot failsafe interface.
   The firmware will boot up correctly for the first time.
   Do not power off the device after OpenWrt has booted.
   Otherwise the u-boot will enter failsafe mode as the checksum
   of the firmware has been changed.
2. Upgrade the sysupgrade.bin in OpenWrt.
   After upgrading completes the u-boot won't complain about the
   firmware checksum and it's OK to use now.
3. If you powered off the device before upgrading the sysupgrade.bin,
   just upgrade the factory.bin through the u-boot failsafe interface
   and then goto step 2.

Signed-off-by: Perry Melange <isprotejesvalkata@gmail.com>
5 years agoath79: fix vendor capitalization of TP-Link
Adrian Schmutzler [Sat, 20 Jul 2019 20:51:11 +0000 (22:51 +0200)]
ath79: fix vendor capitalization of TP-Link

According to detective grep, with this patch all devices should
be labelled "TP-Link" consistently.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoath79: add support for TP-Link CPE220 v2
Adrian Schmutzler [Sat, 20 Jul 2019 11:03:43 +0000 (13:03 +0200)]
ath79: add support for TP-Link CPE220 v2

This seems to be identical to CPE210 v1 despite having removable
antennas.

Specifications:

    * SoC: Qualcomm Atheros AR9344 (560 MHz)
    * RAM: 64MB
    * Storage: 8 MB
    * Wireless: 2.4GHz N based built into SoC 2x2
    * Ethernet: 2x 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 address:192.168.0.254

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoath79: add support for TP-Link CPE510 v1
Adrian Schmutzler [Sat, 20 Jul 2019 10:49:20 +0000 (12:49 +0200)]
ath79: add support for TP-Link CPE510 v1

TP-Link CPE510-v1 is an outdoor wireless CPE for 5 GHz with
two Ethernet ports based on Atheros AR9334

Specifications:
 - 560/450/225 MHz (CPU/DDR/AHB)
 - 2x 10/100 Mbps Ethernet, 1x PoE-in, 1x PoE-out
 - 64 MB of DDR2 RAM
 - 8 MB of SPI-NOR Flash
 - 2T2R 5 GHz
 - 13 dBi built-in antenna
 - Power, LAN0, LAN1 green LEDs
 - 4x green RSSI LEDs

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 address:192.168.0.254

Based on the work of Paul Wassi <p.wassi@gmx.at>

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoath79: add support for TP-Link CPE210 v1
Adrian Schmutzler [Sat, 20 Jul 2019 10:01:14 +0000 (12:01 +0200)]
ath79: add support for TP-Link CPE210 v1

Specifications:

    * SoC: Qualcomm Atheros AR9344 (560 MHz)
    * RAM: 64MB
    * Storage: 8 MB
    * Wireless: 2.4GHz N based built into SoC 2x2
    * Ethernet: 2x 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 address:192.168.0.254

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoath79: create common definition tplink-loader-okli
Adrian Schmutzler [Sat, 20 Jul 2019 09:59:07 +0000 (11:59 +0200)]
ath79: create common definition tplink-loader-okli

The loader-okli is shared by several TP-Link CPExxx devices, so
give it its own definition to prevent too much code duplication.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoath79: provide common DTSI for CPE510 v2/v3 and CPE610
Adrian Schmutzler [Fri, 19 Jul 2019 12:58:51 +0000 (14:58 +0200)]
ath79: provide common DTSI for CPE510 v2/v3 and CPE610

This puts some common code into a new shared DTSI. Common nodes
are chosen so that the new DTSI can be used for CPE210 v1, too.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agotplink-safeloader: increase kernel partition for CPE/WBSx10v1
Adrian Schmutzler [Fri, 19 Jul 2019 12:58:44 +0000 (14:58 +0200)]
tplink-safeloader: increase kernel partition for CPE/WBSx10v1

This is a preparation for ath79 support of the CPE210/CPE510 v1.
Kernel size is chosen equal to the latest update for CPE610 v1.

This also updates the partition size in ar71xx target, so code
remains consistent if someone looks up the device. Since CPE210,
CPE510, WBS210 and WBS510 (all v1) share the same partition
layout definition, and are on deprecated target anyway, this
changes them all at once.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoprocd: update to latest git HEAD (FS#2425)
Hans Dedecker [Wed, 7 Aug 2019 11:52:00 +0000 (13:52 +0200)]
procd: update to latest git HEAD (FS#2425)

8323690 state: fix shutdown when running in a container (FS#2425)

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
5 years agonetifd: update to latest git HEAD
Hans Dedecker [Wed, 7 Aug 2019 11:37:00 +0000 (13:37 +0200)]
netifd: update to latest git HEAD

5e02f94 system-linux: fix resource leak

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
5 years agopackages: apply usign padding workarounds to package indexes if needed
Jo-Philipp Wich [Wed, 7 Aug 2019 05:15:07 +0000 (07:15 +0200)]
packages: apply usign padding workarounds to package indexes if needed

Since usign miscalculates SHA-512 digests for input sizes of exactly
64 + N * 128 + 110 or 64 + N * 128 + 111 bytes, we need to apply some
white space padding to avoid triggering the hashing edge case.

While usign itself has been fixed already, there is still many firmwares
in the wild which use broken usign versions to verify current package
indexes so we'll need to carry this workaround in the forseeable future.

Ref: https://forum.openwrt.org/t/signature-check-failed/41945
Ref: https://git.openwrt.org/5a52b379902471cef495687547c7b568142f66d2
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agoconfig: introduce separate CONFIG_SIGNATURE_CHECK option
Jo-Philipp Wich [Tue, 6 Aug 2019 19:22:27 +0000 (21:22 +0200)]
config: introduce separate CONFIG_SIGNATURE_CHECK option

Introduce a new option CONFIG_SIGNATURE_CHECK which defaults to the value
of CONFIG_SIGNED_PACKAGES and thus is enabled by default.

This option is needed to support building target opkg with enabled
signature verification while having the signed package lists disabled.

Our buildbots currently disable package signing globally in the
buildroot and SDK to avoid the need to ship private signing keys to
the build workers and to prevent the triggering of random key generation
on the worker nodes since package signing happens off-line on the master
nodes.

As unintended side-effect, updated opkg packages will get built with
disabled signature verification, hence the need for a new override option.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agousign: update to latest Git HEAD
Jo-Philipp Wich [Tue, 6 Aug 2019 18:55:39 +0000 (20:55 +0200)]
usign: update to latest Git HEAD

This update fixes usign signature verification on files with certain
file sizes triggering a bug in the shipped SHA-512 implementation.

5a52b37 sha512: fix bad hardcoded constant in sha512_final()
3e6648b README: replace unicode character
716c3f2 README: add reference to OpenBSD signify
86d3668 README: provide reference for ed25519 algorithm
939ec35 usign: main.c: describe necessary arguments for -G

Ref: https://forum.openwrt.org/t/signature-check-failed/41945
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agokernel: drop Fon(Foxconn) parser matching for the "firmware" partition
Rafał Miłecki [Tue, 6 Aug 2019 08:01:15 +0000 (10:01 +0200)]
kernel: drop Fon(Foxconn) parser matching for the "firmware" partition

This parser's matching function appears to be too generic as it matches
e.g. Buffalo WZR-HP-G300NH. That results in incorrect parts parsing.

Luckily this parser is needed by Fon FON2601 only which uses DT-based
ramips target. It means we can depend on mtd subsystem matching of
"fonfxc,uimage" string.

That said triggering this parser based on the "firmware" (or whatever
MTD_SPLIT_FIRMWARE_NAME is) partiiton name is not needed. It can be
dropped which will automatically fix the Buffalo WZR-HP-G300NH case.

Fixes: a1c6a316d299 ("ramips: add support for Fon FON2601")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years agoexpat: Update to 2.2.7
Daniel Engberg [Sat, 3 Aug 2019 20:30:36 +0000 (22:30 +0200)]
expat: Update to 2.2.7

Update (lib)expat to 2.2.7

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
5 years agokernel: bump 4.19 to 4.19.64
Koen Vandeputte [Mon, 5 Aug 2019 10:55:32 +0000 (12:55 +0200)]
kernel: bump 4.19 to 4.19.64

Refreshed all patches.

Remove upstreamed:
- 100-powerpc-4xx-uic-clear-pending-interrupt-after-irq-ty.patch
- 950-0309-usb-dwc2-Disable-all-EP-s-on-disconnect.patch
- 950-0310-usb-dwc2-Fix-disable-all-EP-s-on-disconnect.patch

Fixes:
- CVE-2019-13648
- CVE-2019-3900
- CVE-2019-10207

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agokernel: bump 4.14 to 4.14.136
Koen Vandeputte [Mon, 5 Aug 2019 10:15:19 +0000 (12:15 +0200)]
kernel: bump 4.14 to 4.14.136

Refreshed all patches.

Altered patches:
- 306-v4.16-netfilter-remove-saveroute-indirection-in-struct-nf_.patch

Remove upstreamed:
- 100-powerpc-4xx-uic-clear-pending-interrupt-after-irq-ty.patch
- 088-0002-i2c-qup-fixed-releasing-dma-without-flush-operation.patch
- 500-arm64-dts-marvell-Fix-A37xx-UART0-register-size.patch

Fixes:
- CVE-2019-13648
- CVE-2019-10207

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agokernel: bump 4.9 to 4.9.187
Koen Vandeputte [Mon, 5 Aug 2019 07:58:05 +0000 (09:58 +0200)]
kernel: bump 4.9 to 4.9.187

Refreshed all patches.

Altered patches:
- 021-bridge-multicast-to-unicast.patch

Compile-tested on: none
Runtime-tested on: none

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agomediatek: add new dts files for mt7622 to v4.14
John Crispin [Tue, 6 Aug 2019 05:05:30 +0000 (07:05 +0200)]
mediatek: add new dts files for mt7622 to v4.14

Signed-off-by: John Crispin <john@phrozen.org>
5 years agoRevert "kernel: generic: fix fonfxc uimage parser"
Rafał Miłecki [Tue, 6 Aug 2019 04:35:23 +0000 (06:35 +0200)]
Revert "kernel: generic: fix fonfxc uimage parser"

This reverts commit e92a14709d37f64dcba8c81fa51e61e5f10f439a.

mtdsplit_uimage_parse_fonfxc() gets called in two situations:
1) It was /requested/ from DT using "fonfxc,uimage" compatible string
2) It was called by parsing code after finding "firmware"
   (MTD_SPLIT_FIRMWARE_NAME) due to the parser's type

Code added in the /fix/ commit basically just disabled the second case.
If that's the real goal it could be achieved by simply dropping type
MTD_PARSER_TYPE_FIRMWARE. It may however require another solution as
it's possible that some non-DT target actually needs fonfxc uImage
parsing.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years agomediatek: update the mt7531 switch driver
John Crispin [Tue, 6 Aug 2019 04:19:33 +0000 (06:19 +0200)]
mediatek: update the mt7531 switch driver

Signed-off-by: John Crispin <john@phrozen.org>
5 years agoadb: fix build breakage on recent musl
Petr Štetiar [Mon, 5 Aug 2019 09:48:47 +0000 (11:48 +0200)]
adb: fix build breakage on recent musl

Fix build breakage as upstream has removed implicit include of
sys/sysmacros.h from sys/types.h:

 remove implicit include of sys/sysmacros.h from sys/types.h

 this reverts commit f552c792c7ce5a560f214e1104d93ee5b0833967, which
 exposed the sysmacros.h macros (device major/minor calculations) for
 BSD and GNU profiles to mimic an unintentional glibc behavior some
 code depended on. glibc has deprecated and since removed them as the
 resolution to bug #19239, so it makes no sense for us to keep this
 behavior. affected code should all have been fixed by now, and if it's
 not yet fixed it needs to be for use with modern glibc anyway.

Ref: https://git.musl-libc.org/cgit/musl/commit/include/sys/types.h?id=a31a30a0076c284133c0f4dfa32b8b37883ac930
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agolinux-atm: Add missing headers
Rosen Penev [Thu, 18 Jul 2019 01:37:17 +0000 (18:37 -0700)]
linux-atm: Add missing headers

This fixes compilation with -Werror=implicit-function-declaration.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
5 years agotoolchain: Remove powerpc64 libc restriction
Rosen Penev [Thu, 18 Jul 2019 01:57:40 +0000 (18:57 -0700)]
toolchain: Remove powerpc64 libc restriction

Starting with version 1.1.15, musl supports powerpc64.

There are no known users of powerpc64 yet.

This is effectively a revert of 0de93311e1575ab6f8e9e90b5023b6fb2cedcf1f

Signed-off-by: Rosen Penev <rosenp@gmail.com>
5 years agomvebu: remove support for deprecated DSA bindings
Tomasz Maciej Nowak [Thu, 18 Jul 2019 13:35:16 +0000 (15:35 +0200)]
mvebu: remove support for deprecated DSA bindings

These legacy bindings were removed long time ago from dts, so there's no
need to keep support for them.

Spotted-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
5 years agotoolchain: fix gcc depends on kernel headers
Hauke Mehrtens [Tue, 23 Jul 2019 14:53:51 +0000 (16:53 +0200)]
toolchain: fix gcc depends on kernel headers

GCC needs the kernel headers to compile.
Some GCC file includes asm/unistd.h which is provided by the kernel headers.
Normally the kernel headers build is very fast and ready before the gcc uses
it, but if it clones the kernel from a slow git repository it takes longer
and then it could be that the gcc already wants to use the kernel headers
before they are available. This patch fixes this problem by adding the
missing dependency.

Signed-off-by: Hauke Mehrtens <hauke.mehrtens@intel.com>
5 years agomvebu: enable xHCI USB controller connected to PCIe
Tomasz Maciej Nowak [Thu, 25 Jul 2019 13:51:30 +0000 (15:51 +0200)]
mvebu: enable xHCI USB controller connected to PCIe

This commit fixes regression on Linksys WRT1900 (Mamba) where this device
doesn't have USB 3.0 controller integrated in SoC, instead it has Etron
EJ168 connected to PCIe lane. Previously enabled in kernel 4.4 and 4.9,
was lost in transition to 4.14.

Fixes: 4ccad92 ("mvebu: Add support for kernel 4.14")
Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
5 years agokernel: drop mvebu support in kmod-usb3
Tomasz Maciej Nowak [Thu, 25 Jul 2019 13:53:49 +0000 (15:53 +0200)]
kernel: drop mvebu support in kmod-usb3

This is already enabled as kernel built-in feature in mvebu target and
none other target will use it.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
5 years agobuild: include BUILD_VARIANT in PKG_BUILD_DIR
Jeffery To [Sat, 3 Aug 2019 20:45:06 +0000 (04:45 +0800)]
build: include BUILD_VARIANT in PKG_BUILD_DIR

This changes the default PKG_BUILD_DIR to take BUILD_VARIANT into
account (if set), so that packages do not need to manually override
PKG_BUILD_DIR just to handle variants.

This also updates most base packages with variants to use the updated
default PKG_BUILD_DIR.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
5 years agompc85xx: correct OCEDO Panda LED definition
David Bauer [Mon, 5 Aug 2019 20:37:46 +0000 (22:37 +0200)]
mpc85xx: correct OCEDO Panda LED definition

WLAN0 and the unused LED are currently swapped. Fix this, so the LED
behavior matches the other OCEDo devices.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agoath79: add support for TP9343-based TP-Link TL-WR94x devices
Adrian Schmutzler [Wed, 24 Jul 2019 14:49:08 +0000 (16:49 +0200)]
ath79: add support for TP9343-based TP-Link TL-WR94x devices

This adds support for several TP-Link devices based on TP9343
("a QCA9561 without PCIe and USB"):
- TL-WR940N v3
- TL-WR940N v4
- TL-WR941ND v6

The devices are only different concerning LEDs and MAC address
assignment.

All TL-WR940 are with non-detachable antennas (N), all
TL-WR941 devices are with detachable antennas (ND).

Specification:
- 750 MHz CPU
- 32 MB of RAM
- 4 MB of FLASH
- 2.4 GHz WiFi
- 4x 10/100 Mbps Ethernet

Flash instruction (WebUI):
Download *-factory.bin image and upload it via the firmwary upgrade
function of the stock firmware WebUI.

Flash instruction (TFTP):
1. Set PC to fixed ip address 192.168.0.66
2. Download *-factory.bin image and rename it to * (see below)
3. Start a tftp server with the image file 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.

* TFTP image names:
940 v3: wr941ndv6_tp_recovery.bin
940 v4: wr940nv4_tp_recovery.bin
941 v6: wr941ndv6_tp_recovery.bin

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoethtool: bump to 5.2
Hans Dedecker [Mon, 5 Aug 2019 18:59:38 +0000 (20:59 +0200)]
ethtool: bump to 5.2

379c096 Release version 5.2.
2bce6d9 ethtool: Add 100BaseT1 and 1000BaseT1 link modes
67ffbf5 ethtool: sync ethtool-copy.h with linux-next from 30/05/2019
687152b ethtool.spec: Use standard file location macros

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
5 years agofirewall: update to latest git HEAD
Hans Dedecker [Mon, 5 Aug 2019 12:16:14 +0000 (14:16 +0200)]
firewall: update to latest git HEAD

de94097 utils: coverity resource leak warning

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
5 years agoath79: add support for D-Link DIR-842 C1
Jackson Lim [Thu, 25 Jul 2019 14:44:11 +0000 (22:44 +0800)]
ath79: add support for D-Link DIR-842 C1

Hardware spec of DIR-842 C1:
SoC: QCA9563
DRAM: 128MB DDR2
Flash: 16MB SPI-NOR
Switch: QCA8337N
WiFi 5.8GHz: QCA9888
WiFi 2.4Ghz: QCA9563
USB: circuit onboard, but components are not soldered

Flash instructions:

1. Upgrade the factory.bin through the factory web interface or
   the u-boot failsafe interface.
   The firmware will boot up correctly for the first time.
   Do not power off the device after OpenWrt has booted.
   Otherwise the u-boot will enter failsafe mode as the checksum
   of the firmware has been changed.
2. Upgrade the sysupgrade.bin in OpenWrt.
   After upgrading completes the u-boot won't complain about the
   firmware checksum and it's OK to use now.
3. If you powered off the device before upgrading the sysupgrade.bin,
   just upgrade the factory.bin through the u-boot failsafe interface
   and then goto step 2.

Signed-off-by: Jackson Lim <jackcolentern@gmail.com>
[fix whitespace issues]
Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agoath79: add SUPPORTED_DEVICES for TP-Link TL-WR841N/ND v9 to v12
Adrian Schmutzler [Mon, 22 Jul 2019 15:42:39 +0000 (17:42 +0200)]
ath79: add SUPPORTED_DEVICES for TP-Link TL-WR841N/ND v9 to v12

In ar71xx, v10 and v12 did not have separate board_name.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoath79: add support for TP-Link TL-WR841N/ND v12
Adrian Schmutzler [Mon, 22 Jul 2019 15:36:48 +0000 (17:36 +0200)]
ath79: add support for TP-Link TL-WR841N/ND v12

This router has the same hardware as TP-LINK TL-WR841N/ND v11 (same
FCC ID, same TFTP image name...).

Flash instruction (WebUI):
Download *-factory.bin image and upload it via the firmwary upgrade
function of the stock firmware WebUI.

Flash instruction (TFTP):
1. Set PC to fixed ip address 192.168.0.66
2. Download *-factory.bin image and rename it to wr841nv11_tp_recovery.bin
   (it's really v11, not v12)
3. Start a tftp server with the image file 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: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoath79: add support for TP-Link TL-WR841N/ND v10
Adrian Schmutzler [Mon, 22 Jul 2019 15:34:08 +0000 (17:34 +0200)]
ath79: add support for TP-Link TL-WR841N/ND v10

The TL-WR841N/ND v10 is mostly identical to the v9. Apart from some minor
changes, it contains a newer revision of the QCA9533 SoC and the CPU clock
is significantly higher.

Flash instruction (WebUI):
Download *-factory.bin image and upload it via the firmwary upgrade
function of the stock firmware WebUI.

Flash instruction (TFTP):
1. Set PC to fixed ip address 192.168.0.66
2. Download *-factory.bin image and rename it to wr841nv10_tp_recovery.bin
3. Start a tftp server with the image file 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: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoipset: update to 7.3
DENG Qingfang [Wed, 31 Jul 2019 00:26:57 +0000 (08:26 +0800)]
ipset: update to 7.3

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
5 years agoar71xx: wpj531: fix SIG1/RSS1 LED GPIO
Leon M. George [Fri, 26 Jul 2019 18:21:26 +0000 (20:21 +0200)]
ar71xx: wpj531: fix SIG1/RSS1 LED GPIO

In commit 6c937df749c7 ("ar71xx: wpj531: fix GPIOs for LED") wrong GPIO
13 for SIG1/RSS1 LED was commited, the correct GPIO number for this LED
is 12.

It's listed in "Hardware Guide - wpj531 7A06 (02/07/2019)" as GPIO12/RSS1
on the LED header and same GPIO 12 is used in the vendor's SDK as well.

Fixes: 6c937df749c7 ("ar71xx: wpj531: fix GPIOs for LED")
Signed-off-by: Leon M. George <leon@georgemail.eu>
[commit subject/message facelift]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agokernel: generic: fix fonfxc uimage parser
NOGUCHI Hiroshi [Sat, 3 Aug 2019 10:46:10 +0000 (19:46 +0900)]
kernel: generic: fix fonfxc uimage parser

We cannot distinguish between fonfxc uImage and generic uImage because
fonfxc uImage header is almost same as generic uImage, except padding
length after image name.

The fonfxc uImage parser is available when specifying directly with DT
compatible property.  So this patch adds check if the partition DT node
is compatible with the parser.

Ref: https://bugs.openwrt.org/index.php?do=details&task_id=2413
Fixes: a1c6a316d299 ("ramips: add support for Fon FON2601")
Signed-off-by: NOGUCHI Hiroshi <drvlabo@gmail.com>
[commit light touches and removed C code comment]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agofirmware-utils: uimage_padhdr: fix Coverity issue
Petr Štetiar [Wed, 31 Jul 2019 12:07:11 +0000 (14:07 +0200)]
firmware-utils: uimage_padhdr: fix Coverity issue

Fixes following issue reported by Coverity scan:

 *** CID 1452085:  Security best practices violations  (TOCTOU)
 /tools/firmware-utils/src/uimage_padhdr.c: 100 in main()
 94
 95      if (!infname || !outfname) {
 96      usage(argv[0]);
 97      exit(1);
 98      }
 99
 >>>     CID 1452085:  Security best practices violations  (TOCTOU)
 >>>     Calling function "stat" to perform check on "infname".
 100      if (stat(infname, &statbuf) < 0) {

Fixes: a1c6a316d299 ("ramips: add support for Fon FON2601")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agosdk: Fix cryptodev-linux build when CONFIG_ARM64_MODULE_PLTS=y
Jeffery To [Fri, 2 Aug 2019 19:03:14 +0000 (03:03 +0800)]
sdk: Fix cryptodev-linux build when CONFIG_ARM64_MODULE_PLTS=y

When CONFIG_ARM64_MODULE_PLTS=y, arch/arm64/kernel/module.lds is
required to build cryptodev-linux. This updates the sdk to include this
file.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
5 years agowireless-regdb: fix build when python2 from package feeds exists
Petr Štetiar [Wed, 31 Jul 2019 16:11:01 +0000 (18:11 +0200)]
wireless-regdb: fix build when python2 from package feeds exists

wireless-regdb fails to build if there is python2 installed from package
feeds, as staging_dir/hostpkg/bin/python is python2 and
staging_dir/hostpkg/bin takes precedence over staging_dir/host/bin
(proper place with python -> python3 symlink) which leads to the build
failure of wireless-regdb, so this patch makes it explicit which python
should be used.

Reported-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Tested-by: Russell Senior <russell@personaltelco.net>
Tested-by: Lucian Cristian <lucian.cristian@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agobrcm2708: split up DEVICE_TITLE
Moritz Warning [Sun, 14 Jul 2019 21:37:10 +0000 (23:37 +0200)]
brcm2708: split up DEVICE_TITLE

Splits up DEVICE_TITLE into DEVICE_VENDOR, DEVICE_MODEL and DEVICE_VARIANT.

Fixes https://github.com/openwrt/openwrt/pull/2245

Signed-off-by: Moritz Warning <moritzwarning@web.de>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agoccache: update to 3.7.2
DENG Qingfang [Wed, 31 Jul 2019 00:23:12 +0000 (08:23 +0800)]
ccache: update to 3.7.2

Update ccache to 3.7.2

Release notes:
https://ccache.dev/releasenotes.html#_ccache_3_7_2

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
5 years agobrcm2708: fix warnings due to non-breaking space
Álvaro Fernández Rojas [Sun, 4 Aug 2019 09:10:31 +0000 (11:10 +0200)]
brcm2708: fix warnings due to non-breaking space

Reported by ZWx4 on Github:
https://github.com/openwrt/openwrt/commit/19226502bf6393706defe7f049c587b32c9b4f33#r34555799

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agomediatek: fix typo in Banana Pi R64 device title
Adrian Schmutzler [Sat, 3 Aug 2019 23:42:56 +0000 (01:42 +0200)]
mediatek: fix typo in Banana Pi R64 device title

The DEVICE_TITLE introduced in 66458c49aa14 ("mediatek: add
v4.19 support") is mistyped. Fix it.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoRevert "dnsmasq: backport latest patches"
Kevin Darbyshire-Bryant [Sat, 3 Aug 2019 19:55:52 +0000 (20:55 +0100)]
Revert "dnsmasq: backport latest patches"

This reverts commit e9eec39aacde450ba87598d85987b374ce6aed95.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
5 years agoRevert "dnsmasq: improve insecure DS warning"
Kevin Darbyshire-Bryant [Sat, 3 Aug 2019 19:55:45 +0000 (20:55 +0100)]
Revert "dnsmasq: improve insecure DS warning"

This reverts commit cd91f2327ffb06a41129a35ae7be1e7923a78d74.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
5 years agomdadm: Fix compile with musl 1.1.23
Hauke Mehrtens [Sat, 3 Aug 2019 09:27:55 +0000 (11:27 +0200)]
mdadm: Fix compile with musl 1.1.23

This adds missing includes for sys/sysmacros.h which are needed with
musl libc 1.1.23.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years agobrcm27xx-armstub: remove package
Álvaro Fernández Rojas [Sat, 3 Aug 2019 06:18:31 +0000 (08:18 +0200)]
brcm27xx-armstub: remove package

Apparently, latest RPi firmware doesn't need this to boot RPi 4
64 bit kernels.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agobrcm2708: arm8stub is no longer needed
Álvaro Fernández Rojas [Sat, 3 Aug 2019 06:17:29 +0000 (08:17 +0200)]
brcm2708: arm8stub is no longer needed

It's already embedded on latest RPi firmware.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agolinux-firmware: fix RPi 4 NVRAM
Álvaro Fernández Rojas [Sat, 3 Aug 2019 06:16:10 +0000 (08:16 +0200)]
linux-firmware: fix RPi 4 NVRAM

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agobrcm2708: clean up target configs
Álvaro Fernández Rojas [Fri, 2 Aug 2019 19:18:27 +0000 (21:18 +0200)]
brcm2708: clean up target configs

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agoipq40xx: remove redundant PHY_POLL set code
Christian Lamparter [Wed, 13 Mar 2019 16:22:27 +0000 (17:22 +0100)]
ipq40xx: remove redundant PHY_POLL set code

The [devm_]mdiobus_alloc[_size()] functions are creating
the array of interrupt numbers as well as initializing
them to POLLING.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years agoipq40xx: decouple mdio-ipq40xx and ar40xx
Christian Lamparter [Sat, 9 Mar 2019 15:19:26 +0000 (16:19 +0100)]
ipq40xx: decouple mdio-ipq40xx and ar40xx

This makes it possible to delete the ar40xx driver in the
future by just removing the file.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years agoipq40xx: extend DT mdio node to be more accessible
Christian Lamparter [Fri, 8 Mar 2019 18:11:28 +0000 (19:11 +0100)]
ipq40xx: extend DT mdio node to be more accessible

The MDIO node will become more important in the future.
Hence, this patch adds DT labels to make the properties
inside the various subnodes more accessible.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years agoat91: split up DEVICE_TITLE
Moritz Warning [Wed, 10 Jul 2019 21:31:42 +0000 (23:31 +0200)]
at91: split up DEVICE_TITLE

DEVICE_TITLE is split up into DEVICE_VENDOR, DEVICE_MODEL and DEVICE_VARIANT

Signed-off-by: Moritz Warning <moritzwarning@web.de>
5 years agoapm821xx: split up DEVICE_TITLE
Moritz Warning [Sun, 14 Jul 2019 08:32:55 +0000 (10:32 +0200)]
apm821xx: split up DEVICE_TITLE

Splits up DEVICE_TITLE into DEVICE_VENDOR, DEVICE_MODEL and DEVICE_VARIANT.

Signed-off-by: Moritz Warning <moritzwarning@web.de>
5 years agoipq806x: split up DEVICE_TITLE
Moritz Warning [Wed, 10 Jul 2019 21:51:27 +0000 (23:51 +0200)]
ipq806x: split up DEVICE_TITLE

DEVICE_TITLE is split up into DEVICE_VENDOR, DEVICE_MODEL and DEVICE_VARIANT

Signed-off-by: Moritz Warning <moritzwarning@web.de>
5 years agobcm53xx: split up DEVICE_TITLE
Moritz Warning [Wed, 10 Jul 2019 22:01:32 +0000 (00:01 +0200)]
bcm53xx: split up DEVICE_TITLE

DEVICE_TITLE is split up into DEVICE_VENDOR, DEVICE_MODEL and DEVICE_VARIANT

Signed-off-by: Moritz Warning <moritzwarning@web.de>
5 years agogemini: split up DEVICE_TITLE
Moritz Warning [Wed, 10 Jul 2019 22:10:56 +0000 (00:10 +0200)]
gemini: split up DEVICE_TITLE

DEVICE_TITLE is split up into DEVICE_VENDOR, DEVICE_MODEL and DEVICE_VARIANT

Signed-off-by: Moritz Warning <moritzwarning@web.de>
5 years agoocteon: split up DEVICE_TITLE
Moritz Warning [Sun, 14 Jul 2019 08:34:19 +0000 (10:34 +0200)]
octeon: split up DEVICE_TITLE

Splits up DEVICE_TITLE into DEVICE_VENDOR, DEVICE_MODEL and DEVICE_VARIANT.

Signed-off-by: Moritz Warning <moritzwarning@web.de>
5 years agobrcm2708: add bcm2711 subtarget (RPi 4B aarch64)
Álvaro Fernández Rojas [Fri, 2 Aug 2019 18:35:59 +0000 (20:35 +0200)]
brcm2708: add bcm2711 subtarget (RPi 4B aarch64)

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agobrcm27xx-armstub: add new package
Álvaro Fernández Rojas [Fri, 2 Aug 2019 18:35:08 +0000 (20:35 +0200)]
brcm27xx-armstub: add new package

This package is needed for RPi 4B AARCH64 support

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agobrcm2708-gpu-fw: update to latest firmware
Álvaro Fernández Rojas [Fri, 2 Aug 2019 17:02:01 +0000 (19:02 +0200)]
brcm2708-gpu-fw: update to latest firmware

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agobrcm2708: remove linux 4.14 support
Álvaro Fernández Rojas [Fri, 2 Aug 2019 16:55:55 +0000 (18:55 +0200)]
brcm2708: remove linux 4.14 support

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agobrcm2708: update to latest patches from the RPi foundation
Álvaro Fernández Rojas [Wed, 31 Jul 2019 16:23:26 +0000 (18:23 +0200)]
brcm2708: update to latest patches from the RPi foundation

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agomediatek: add v4.19 support
John Crispin [Fri, 2 Aug 2019 08:33:28 +0000 (10:33 +0200)]
mediatek: add v4.19 support

Bump the target to v4.19. Add a patch with additional eth driver
fixes/features that MTK provided aswell as the driver for the new mt7530
switch.

Signed-off-by: John Crispin <john@phrozen.org>
5 years agoar71xx: fix HiveAP 121 PLL for 1000M
David Bauer [Tue, 30 Jul 2019 17:16:21 +0000 (19:16 +0200)]
ar71xx: fix HiveAP 121 PLL for 1000M

The Aerohive HiveAP 121 has the wrong PLL value set for Gigabit speeds,
leading to packet-loss. 10M and 100M work fine.

This commit sets the Gigabit Ethernet PLL value to the correct value,
fixing packet loss.

Confirmed with iperf and floodping.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agoar71xx: really fix Mikrotik board detection
Koen Vandeputte [Thu, 1 Aug 2019 10:08:12 +0000 (12:08 +0200)]
ar71xx: really fix Mikrotik board detection

commit e09da0169a08 ("ar71xx: fix Mikrotik board detection")
was generated based on testing a rb-912 board, on which detection failed.

Testing on more hardware shows something fun:

machine : MikroTik RouterBOARD 922UAGS-5HPacD
machine : Mikrotik RouterBOARD 912UAG-5HPnD

Both lowercase and uppercase are used.
So ensure we support both now ..

Fixes: e09da0169a08 ("ar71xx: fix Mikrotik board detection")
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agokernel: fix typo in replaced symbol
Koen Vandeputte [Thu, 1 Aug 2019 08:22:33 +0000 (10:22 +0200)]
kernel: fix typo in replaced symbol

Looks like a copy/paste error ..

Fixes: a89b49bca4ec ("kernel: bump 4.19 to 4.19.62")
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agoar71xx: fix nand init issues on some rb2011 devices
Koen Vandeputte [Wed, 27 Mar 2019 09:36:41 +0000 (10:36 +0100)]
ar71xx: fix nand init issues on some rb2011 devices

While flashing lots of RB2011 devices, I noticed that
some of them refused to boot properly, failing over the NAND parameters.

Checking in detail shows that some device seem to use another NAND flash
which only support standard 2048-byte pages, without 512-byte subpage support.

This commit disables usage of these small subpage completely.

Advantages:
- Both NAND's with(out) subpage support are working now
- The nand speed increases a bit (measured roughly 1%) in typical usecases

Disadvantages:
- The maximum storage capacity decreases by ~0.2%
as small changes can consume a full page (2048 bytes) now.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agotoolchain/musl: bump to version 1.1.23
Koen Vandeputte [Mon, 29 Jul 2019 10:08:37 +0000 (12:08 +0200)]
toolchain/musl: bump to version 1.1.23

new features:
- riscv64 port
- configure now allows customizing AR and RANLIB vars
- header-level support for new linux features in 5.1

major internal changes:
- removed extern __syscall; syscall header code is now fully self-contained

performance:
- new math library implementation for log/exp/pow
- aarch64 dynamic tlsdesc function is streamlined

compatibility & conformance:
- O_TTY_INIT is now defined
- sys/types.h no longer pollutes namespace with sys/sysmacros.h in any profile
- powerpc asm is now compatible with clang internal assembler

changes for new POSIX interpretations:
- fgetwc now sets stream error indicator on encoding errors
- fmemopen no longer rejects 0 size

bugs fixed:
- static TLS for shared libraries was allocated wrong on "Variant I" archs
- crash in dladdr reading through uninitialized pointer on non-match
- sigaltstack wrongly errored out on invalid ss_size when doing SS_DISABLE
- getdents function misbehaved with buffer length larger than INT_MAX
- set*id could deadlock after fork from multithreaded process

arch-specfic bugs fixed:
- s390x SO_PEERSEC definition was wrong
- passing of 64-bit syscall arguments was broken on microblaze
- posix_fadvise was broken on mips due to missing 7-arg syscall support
- vrregset_t layout and member naming was wrong on powerpc64

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>