openwrt/staging/jogo.git
5 years agoramips: merge cases in 02_network
Adrian Schmutzler [Sat, 31 Aug 2019 14:41:27 +0000 (16:41 +0200)]
ramips: merge cases in 02_network

This merges three cases with a single switch port.

6t@eth0 and 6@eth0 should be equivalent.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agouboot-fritz4040: update to 2019-09-07
David Bauer [Tue, 24 Sep 2019 23:52:14 +0000 (01:52 +0200)]
uboot-fritz4040: update to 2019-09-07

572ff7f fritzcreator: actually add checksum spacer
6edce1a fritzcreator: replace obscure padding generation with something more portable
2ff189f add ASUS RT-AC58U "easy install" factory u-boot shim
b91f9c2 readd spi-nand support
486ae53 improve cmd_sysupgrade
b0933f1 replace sstrip with strip
882e48a do not include generated files into git
0c5aa5f fix bugs in ipq40xx_cdp.c

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agoipq40xx: abort ar40xx probe on missing PHYs
David Bauer [Sun, 22 Sep 2019 17:15:56 +0000 (19:15 +0200)]
ipq40xx: abort ar40xx probe on missing PHYs

The ar40xx driver currently panics in case no QCA807x PHY has been
successfully probed. This happens when the external PHY is still
in reset when probing the ar40xx switch driver.

Note that this patch does not fix the root cause, ar40xx_probe now
simply fails instead of causing a kernel panic due to a nullpointer
dereference.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agokernel: fix issues with output routing in flow offload
Felix Fietkau [Wed, 25 Sep 2019 17:39:51 +0000 (19:39 +0200)]
kernel: fix issues with output routing in flow offload

Replace an old cleanup patch that never made it upstream with the proper
upstream fix. This patch was incompatible with the recent changes that
affected the way that the flow tuple dst entry was used.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agokernel: port 4.19 xt_FLOWOFFLOAD changes to 4.14
Felix Fietkau [Wed, 25 Sep 2019 14:45:05 +0000 (16:45 +0200)]
kernel: port 4.19 xt_FLOWOFFLOAD changes to 4.14

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agokernel: port another missing upstream change to xt_FLOWOFFLOAD on 4.19
Felix Fietkau [Wed, 25 Sep 2019 12:09:45 +0000 (14:09 +0200)]
kernel: port another missing upstream change to xt_FLOWOFFLOAD on 4.19

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agobuild: fix xconfig target
leo chung [Fri, 20 Sep 2019 05:33:58 +0000 (13:33 +0800)]
build: fix xconfig target

`make xconfig` fails with following linking error of qconf binary:

 g++ -lQt5Widgets -lQt5Gui -lQt5Core -o qconf qconf.o zconf.tab.o
 /usr/bin/ld: qconf.o: in function ConfigList::metaObject() const': qconf.cc:(.text+0x3eb): undefined reference to QObjectData::dynamicMetaObject() const'
 /usr/bin/ld: qconf.o: in function `ConfigList::qt_metacast(char const*)': link error.

which is caused by the wrong order of the linked objects/libraries so
this patch reorders the linker's arguments which makes the qconf compile
again.

Signed-off-by: leo chung <gewalalb@gmail.com>
[commit subject and message tweaks, whitespace fix]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agobuild: fix host menu config targets using ncurses
Petr Štetiar [Fri, 20 Sep 2019 12:54:56 +0000 (14:54 +0200)]
build: fix host menu config targets using ncurses

On a recent Gentoo Linux installation, invoking `make menuconfig`, `make
kernel_menuconfig` or `make kernel_nconfig` in the build system fails,
whereas for example `make menuconfig` in the kernel tree alone works as
expected.

This is happening because STAGING_PREFIX is not defined when kernel's
{menu,n}config target calls pkg-config from the toolchain/host and thus
pkg-config returns an empty value, and the fallback values in the kernel
config script are applied but those are off and the linking fails.

Solution is to use system's pkg-config for all ncurses based menu config
targets in order to provide proper compiler/linker flags.

Ref: FS#2423
Cc: Thomas Albers <thomas.gameiro@gmail.com>
Tested-by: Stijn Tintel <stijn@linux-ipv6.be>
Tested-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agolayerscape: split up DEVICE_TITLE definitions
Moritz Warning [Fri, 13 Sep 2019 15:52:34 +0000 (17:52 +0200)]
layerscape: split up DEVICE_TITLE definitions

DEVICE_TITLE is split up into DEVICE_VENDOR, DEVICE_MODEL and DEVICE_VARIANT

Signed-off-by: Moritz Warning <moritzwarning@web.de>
5 years agogemini: dir685: Restore graphics
Linus Walleij [Sun, 15 Sep 2019 19:54:05 +0000 (21:54 +0200)]
gemini: dir685: Restore graphics

One of the v4.19 patches had a bug, this is fixed upstream,
but in OpenWrt we can fix it by just fixing the bug in the
patch.

We also need to augment the config file to select the
CONFIG_DRM_FBDEV_EMULATION symbol.

This restores the display controller on the DIR-685 to
working state: penguin and graphics on the little screen
with default OpenWrt install.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agokernel: update and fix xt_FLOWOFFLOAD target on 4.19
Felix Fietkau [Wed, 25 Sep 2019 09:10:32 +0000 (11:10 +0200)]
kernel: update and fix xt_FLOWOFFLOAD target on 4.19

Merge upstream changes to nft_flow_offload.
Fixes offloading

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agotools/coreutils: install "touch"
Felix Fietkau [Wed, 25 Sep 2019 08:19:21 +0000 (10:19 +0200)]
tools/coreutils: install "touch"

Fixes error in setting SOURCE_DATE_EPOCH timestamp on files on rootfs prepare
on non-Linux systems

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agoramips: initialize youhua, wr1200js WAN MAC addresses from flash
Adrian Schmutzler [Sun, 22 Sep 2019 10:01:35 +0000 (12:01 +0200)]
ramips: initialize youhua, wr1200js WAN MAC addresses from flash

This patch changes wan MAC address setup for youhua,wr1200js
from retrieving it by calculation to reading it from flash.

This has been checked on-device.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoramips: add support for I-O DATA WNPR2600G
INAGAKI Hiroshi [Thu, 11 Jul 2019 05:41:08 +0000 (14:41 +0900)]
ramips: add support for I-O DATA WNPR2600G

I-O DATA WNPR2600G is a 2.4/5 GHz band 11ac router, based on MediaTek
MT7621A.

Specification:

- SoC           : MediaTek MT7621A
- RAM           : DDR3 128 MiB
- Flash         : SPI-NOR 16 MiB
- WLAN          : 2.4/5 GHz 4T4R
  - 2.4 GHz     : MediaTek MT7615
  - 5 GHz       : MediaTek MT7615
- Ethernet      : 10/100/1000 Mbps
  - Switch      : MT7530 (SoC)
- LED/keys      : 4x/3x (2x buttons, 1x slide-switch)
- UART          : through-hole on PCB
  - J1: Vcc, RX, GND, TX from SoC side
  - 57600n8

Flash instruction using factory image:

1. Boot WNPR2600G normaly
2. Access to "http://192.168.0.1/" and open firmware update page
("ファームウェア")
3. Select the OpenWrt factory image and click update ("更新") button
to perform firmware update
4. Wait ~150 seconds to complete flashing

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
5 years agoramips: move "elx-header" to Makefile from mt7620.mk and mt7621.mk
INAGAKI Hiroshi [Mon, 19 Aug 2019 12:38:24 +0000 (21:38 +0900)]
ramips: move "elx-header" to Makefile from mt7620.mk and mt7621.mk

I-O DATA WNPR2600G has an "elx-header", so move this definition to
generic makefile to use it from mt7621 subtarget.
This definition is also added to mt7621.mk in
f285e8634c57d28aa970b80c5c59e85485f35c7d, so remove it from mt7621.mk.

And added a line to cleanup used header file.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
5 years agoramips: replace MAC address configuration for I-O DATA WN-AC-GR devices
INAGAKI Hiroshi [Mon, 19 Aug 2019 04:45:25 +0000 (13:45 +0900)]
ramips: replace MAC address configuration for I-O DATA WN-AC-GR devices

following I-O DATA devices have a MAC address as "wanaddr" for WAN
interface in u-boot-env:

- WN-AC1167GR
- WN-AC733GR3

I replaced MAC address configuration in these devices to omit
address calculation in 02_network.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
5 years agoramips: add support for ipTIME A3
Sungbo Eo [Sun, 18 Aug 2019 05:50:20 +0000 (14:50 +0900)]
ramips: add support for ipTIME A3

ipTIME A3 is a 2.4/5GHz band AC1200 router, based on MediaTek
MT7628AN.

Specifications:
- SoC: MT7628AN
- RAM: DDR2 64MB
- Flash: SPI NOR 8MB
- WiFi:
  - 2.4GHz: SoC internal
  - 5GHz: MT7612EN
- Ethernet: 3x 10/100Mbps
  - Switch: SoC internal
- UART:
  - J1: 3.3V, TX, RX, GND (3.3V is the square pad) / 57600 8N1

Installation via web interface:
1.  Flash **initramfs** image through the stock web interface.
2.  Boot into OpenWrt and perform sysupgrade with sysupgrade image.

Revert to stock firmware:
1.  Perform sysupgrade with stock image.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
5 years agoramips: add support for XiaoYu XY-C5
Qi Jiang [Sun, 8 Sep 2019 01:52:07 +0000 (09:52 +0800)]
ramips: add support for XiaoYu XY-C5

Hardware:
SoC:      MT7621A
Flash:    32 MiB
RAM:      512 MiB
Ethernet: built-in switch
USB:      1x USB3.0
SATA:     ASM1060, 1 SATA port

Flash instruction (TFTP):
1. Set PC to fixed ip address 192.168.173.22
2. Download *-sysupgrade.bin image and rename it to firmware.img
3. Start a tftp server with the image file in its root directory
4. Turn off the router
5. Turn on router,press the reset button and wait ~15 seconds
6. Release the reset button and after a short time
   the firmware should be transferred from the tftp server
7. Wait ~3 minutes to complete recovery.

Signed-off-by: Qi Jiang <rushx@live.cn>
[squash commits, add label-mac-device, fix sign-off style]
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
5 years agokernel: bump 4.19 to 4.19.75
Koen Vandeputte [Tue, 24 Sep 2019 09:05:57 +0000 (11:05 +0200)]
kernel: bump 4.19 to 4.19.75

Refreshed all patches.

Fixes:
- CVE-2019-14814
- CVE-2019-14815
- CVE-2019-14816
- CVE-2019-14821

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.146
Koen Vandeputte [Tue, 24 Sep 2019 09:05:28 +0000 (11:05 +0200)]
kernel: bump 4.14 to 4.14.146

Refreshed all patches.

Fixes:
- CVE-2019-14814
- CVE-2019-14815
- CVE-2019-14816
- CVE-2019-14821

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.194
Koen Vandeputte [Tue, 24 Sep 2019 09:00:47 +0000 (11:00 +0200)]
kernel: bump 4.9 to 4.9.194

Refreshed all patches.

Fixes:
- CVE-2019-14814
- CVE-2019-14815
- CVE-2019-14816
- CVE-2019-14821

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agoiwinfo: update to latest Git HEAD
Jo-Philipp Wich [Sun, 22 Sep 2019 16:57:58 +0000 (18:57 +0200)]
iwinfo: update to latest Git HEAD

313e827 nl80211: keep awaiting wpa_supplicant scan results on busy response
a766751 nl80211: fix parsing of mixed wpa encryption in wpa_supp scan results
f096bfd utils: support parsing SAE and OWE key management suites from IEs

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agoath79: convert devices to interrupt-driven gpio-keys
Adrian Schmutzler [Sat, 10 Aug 2019 17:22:40 +0000 (19:22 +0200)]
ath79: convert devices to interrupt-driven gpio-keys

This converts all remaining devices to use interrupt-driven
gpio-keys compatible instead of gpio-keys-polled.
The poll-interval is removed.

Only ar7240_netgear_wnr612-v2 is kept at gpio-keys-polled, as
this one is using ath9k keys.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Karl Palsson <karlp@etactica.com>
Tested-by: Dmitry Tunin <hanipouspilot@gmail.com>
5 years agohostapd: Add mesh support for wpad full
Hauke Mehrtens [Sat, 7 Sep 2019 14:17:14 +0000 (16:17 +0200)]
hostapd: Add mesh support for wpad full

This increases the size of the binary slightly:

old:
427722 wpad-wolfssl_2019-08-08-ca8c2bd2-1_mipsel_24kc.ipk
431696 wpad-openssl_2019-08-08-ca8c2bd2-1_mipsel_24kc.ipk

new:
442109 wpad-wolfssl_2019-08-08-ca8c2bd2-1_mipsel_24kc.ipk
445997 wpad-openssl_2019-08-08-ca8c2bd2-1_mipsel_24kc.ipk

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years agohostapd: use getrandom syscall
Hauke Mehrtens [Sat, 4 May 2019 12:02:07 +0000 (14:02 +0200)]
hostapd: use getrandom syscall

hostapd will not use the getrandom() syscall and as a fallback use
/dev/random, the syscall is supported since Linux 3.17 and in the musl,
glibc and uclibc version used by OpenWrt.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years agohostapd: Remove unneeded patch
Hauke Mehrtens [Sat, 4 May 2019 00:01:15 +0000 (02:01 +0200)]
hostapd: Remove unneeded patch

All the content of this function is proceeded by IEEE8021X_EAPOL no code
accesses the ssid variable outside of this ifdef.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years agohostapd: use config option CONFIG_NO_LINUX_PACKET_SOCKET_WAR
Hauke Mehrtens [Fri, 3 May 2019 23:58:53 +0000 (01:58 +0200)]
hostapd: use config option CONFIG_NO_LINUX_PACKET_SOCKET_WAR

Instead of patching the workaround away, just use the config option.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years agohostapd: Update to version 2.9 (2019-08-08)
Hauke Mehrtens [Sat, 10 Aug 2019 14:49:34 +0000 (16:49 +0200)]
hostapd: Update to version 2.9 (2019-08-08)

The size of the ipkgs increase a bit (between 0.7% and 1.1%):

old 2019-04-21 (2.8):
288264 wpad-basic_2019-04-21-63962824-1_mipsel_24kc.ipk
256188 wpad-mini_2019-04-21-63962824-1_mipsel_24kc.ipk
427475 wpad-openssl_2019-04-21-63962824-1_mipsel_24kc.ipk
423071 wpad-wolfssl_2019-04-21-63962824-1_mipsel_24kc.ipk

new 2019-08-08 (2.9):
290217 wpad-basic_2019-08-08-ca8c2bd2-1_mipsel_24kc.ipk
258745 wpad-mini_2019-08-08-ca8c2bd2-1_mipsel_24kc.ipk
431732 wpad-openssl_2019-08-08-ca8c2bd2-1_mipsel_24kc.ipk
427641 wpad-wolfssl_2019-08-08-ca8c2bd2-1_mipsel_24kc.ipk

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years agohostapd: Update to version 2.8 (2019-04-21)
Hauke Mehrtens [Fri, 3 May 2019 23:52:25 +0000 (01:52 +0200)]
hostapd: Update to version 2.8 (2019-04-21)

This also syncs the configuration files with the default configuration
files, but no extra options are activated or deactivated.

The mesh patches were partially merged into hostapd 2.8, the remaining
patches were extracted from patchwork and are now applied by OpenWrt.
The patches still have open questions which are not fixed by the author.
They were taken from this page:
https://patchwork.ozlabs.org/project/hostap/list/?series=62725&state=*

The changes in 007-mesh-apply-channel-attributes-before-running-Mesh.patch
where first applied to hostapd, but later reverted in hostapd commit
3e949655ccc5 because they caused memory leaks.

The size of the ipkgs increase a bit (between 1.3% and 2.3%):

old 2018-12-02 (2.7):
283337 wpad-basic_2018-12-02-c2c6c01b-11_mipsel_24kc.ipk
252857 wpad-mini_2018-12-02-c2c6c01b-11_mipsel_24kc.ipk
417473 wpad-openssl_2018-12-02-c2c6c01b-11_mipsel_24kc.ipk
415105 wpad-wolfssl_2018-12-02-c2c6c01b-11_mipsel_24kc.ipk

new 2019-04-21 (2.8):
288264 wpad-basic_2019-04-21-63962824-1_mipsel_24kc.ipk
256188 wpad-mini_2019-04-21-63962824-1_mipsel_24kc.ipk
427475 wpad-openssl_2019-04-21-63962824-1_mipsel_24kc.ipk
423071 wpad-wolfssl_2019-04-21-63962824-1_mipsel_24kc.ipk

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
5 years agoapm821xx: remove unnecessary kernel padding
Russell Senior [Sat, 21 Sep 2019 08:58:07 +0000 (01:58 -0700)]
apm821xx: remove unnecessary kernel padding

The allocation of LEBs to ubi volumes is handled by the sysupgrade script:

  package/base-files/files/lib/upgrade/nand.sh

and the ubimkvol and or ubirsvol command. Therefore, padding of the
kernel blob is not needed at all, so use cat instead of dd. The
BLOCKSIZE variable was only used in the dd command.  In any case, 63k
made no sense for the way BLOCKSIZE was being used.

63k (64512) does make sense for DTB_SIZE because of the offsets expected
by u-boot given extant u-boot-env variables.

Tested on Meraki MR24.

Signed-off-by: Russell Senior <russell@personaltelco.net>
5 years agoath79: add support of Netgear WNDR3800CH
Dmitry Tunin [Wed, 7 Aug 2019 20:07:33 +0000 (23:07 +0300)]
ath79: add support of Netgear WNDR3800CH

Add support for the ar71xx supported Netgear WNDR3800CH to ath79.
The device is identical to WNDR3800 except NETGEAR_BOARD_ID.

Signed-off-by: Dmitry Tunin <hanipouspilot@gmail.com>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoath79: DIR825B1 switch to gpio-keys
Dmitry Tunin [Fri, 30 Aug 2019 19:17:24 +0000 (22:17 +0300)]
ath79: DIR825B1 switch to gpio-keys

Signed-off-by: Dmitry Tunin <hanipouspilot@gmail.com>
5 years agoipq40xx: fix hw-crypto detection of qce driver
Eneas U de Queiroz [Fri, 20 Sep 2019 20:48:04 +0000 (17:48 -0300)]
ipq40xx: fix hw-crypto detection of qce driver

This adds the CRYPTO_ALG_KERN_DRIVER_ONLY flag to Qualcomm crypto engine
driver algorithms, so that openssl devcrypto can recognize them as
hardware-accelerated.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
[refresh, move to ipq40xx as its the only target right now]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years agoath79: remove invalid uses of ath9k_patch_fw_mac_crc
Adrian Schmutzler [Wed, 18 Sep 2019 15:11:06 +0000 (17:11 +0200)]
ath79: remove invalid uses of ath9k_patch_fw_mac_crc

Some ar9344-based devices are using ath9k_patch_fw_mac_crc, which
is meant to generate a checksum, for fixing their ath9k MAC
addresses.
However, those do not have a checksum field, and the calculated
checksum offset would be negative.

This patch will use ath9k_patch_fw_mac function for those devices.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoramips: replace backticks by $(...)
Adrian Schmutzler [Fri, 20 Sep 2019 12:07:56 +0000 (14:07 +0200)]
ramips: replace backticks by $(...)

This replaces deprecated backticks by more versatile $(...) syntax.

While at it, remove some useless cat commands and deprecated
egrep commands.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoath79: image: pad kernel for Adtran/Bluesocket devices
Tomasz Maciej Nowak [Tue, 17 Sep 2019 14:21:51 +0000 (16:21 +0200)]
ath79: image: pad kernel for Adtran/Bluesocket devices

It has been reported that using the sysupgrade-tar image will trigger
"lzma_decode failed error". The RedBoot bootloader always loads data
from flash till block size boundary, so if there's no padding it'll also
load the beginning of rootfs, and it seems that lzma_decoder can't handle
that garbage data. Previously the script creating combined-image
silently padded the kernel and rootfs, but since sysupgrade-tar doesn't,
pad the default kernel image.

Fixes: 900330f ("ath79: image: retire combined-image for Adtran/Bluesocket
devices")
Cc: Brian Gonyer <bgonyer@gmail.com>
Cc: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
5 years agoath79: sort device definitions in image/*
Adrian Schmutzler [Thu, 22 Aug 2019 12:34:45 +0000 (14:34 +0200)]
ath79: sort device definitions in image/*

This applies alphabetic sorting to devices in image/* files.

For certain cases, this patch deviates from strict sorting, e.g.
to ensure that v10 comes after v9.

While at it, fix an indent and remove some useless empty lines.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoltq-vdsl-fw: update firmware filename and download URL
Daniel Golle [Sat, 21 Sep 2019 13:09:55 +0000 (15:09 +0200)]
ltq-vdsl-fw: update firmware filename and download URL

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years agorpcd: update to latest Git HEAD
Jo-Philipp Wich [Sat, 21 Sep 2019 13:03:48 +0000 (15:03 +0200)]
rpcd: update to latest Git HEAD

95f0973 file: increase minimum read buffer size to 4096 bytes

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agobuild: set TARGET_ROOTFS_PARTSIZE to make combined image fit in 128MB
Matthias Schiffer [Sat, 21 Sep 2019 11:21:36 +0000 (13:21 +0200)]
build: set TARGET_ROOTFS_PARTSIZE to make combined image fit in 128MB

Change TARGET_ROOTFS_PARTSIZE from 128 to 104 MiB, so the whole image
(bootloader + boot + root) will fit on a 128MB CF card by default.

With these settings, the generated images (tested on x86-generic and
x86-64) have 126,353,408 bytes; the smallest CF card marketed as "128MB"
that I found a datasheet for (a Transcend TS128MCF80) has 126,959,616
bytes.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
5 years agorootfs.mk: ensure all timestamp are set to SOURCE_DATE_EPOCH
Alexander Couzens [Fri, 20 Sep 2019 03:36:13 +0000 (05:36 +0200)]
rootfs.mk: ensure all timestamp are set to SOURCE_DATE_EPOCH

Some tools doesn't support SOURCE_DATE_EPOCH (e.g. initramfs images).
Ensure all files of a root filesystem are set to SOURCE_DATE_EPOCH.
Make initramfs builds reproducible (for ramips).

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
5 years agousign: update to latest Git HEAD
Hauke Mehrtens [Fri, 20 Sep 2019 23:05:42 +0000 (01:05 +0200)]
usign: update to latest Git HEAD

f34a383 main: fix some resource leaks

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years agofstools: update to latest Git HEAD
Hauke Mehrtens [Fri, 20 Sep 2019 23:02:11 +0000 (01:02 +0200)]
fstools: update to latest Git HEAD

4327ed4 mkdev: Avoid out of bounds read
9b3eb63 libblkid-tiny: use blkid_probe_set_utf8label for label set
c9d0462 libblkid-tiny: adds blkid_probe_set_utf8label support

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years agoprocd: update to the latest git HEAD
Hauke Mehrtens [Fri, 20 Sep 2019 22:57:55 +0000 (00:57 +0200)]
procd: update to the latest git HEAD

8e9fb51 procd: Switch to nanosleep
c844ace system: Fix possible integer overflows

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years agohostapd: Fix AP mode PMF disconnection protection bypass
Hauke Mehrtens [Fri, 20 Sep 2019 20:20:16 +0000 (22:20 +0200)]
hostapd: Fix AP mode PMF disconnection protection bypass

This fixes
* CVE-2019-16275 AP mode PMF disconnection protection bypass
https://w1.fi/security/2019-7/ap-mode-pmf-disconnection-protection-bypass.txt

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years agosunxi: Add support for Banana Pi M2 Ultra
Hal Martin [Sat, 7 Sep 2019 16:28:18 +0000 (16:28 +0000)]
sunxi: Add support for Banana Pi M2 Ultra

CPU: Allwinner R40 Quad-Core Cortex-A7 @ 1.2GHz
GPU: Mali 400 MP2
Memory: 2GB DDR3 onboard (shared with GPU)
Onboard: Storage microSD card slot
Onboard: Storage 8GB eMMC
Onboard: Network 10/100/1000M Ethernet RJ45
Onboard: Network WiFi 802.11b/g/n 1x1 (AMPAK AP6212; brcmfmac)
Onboard header: SPI, I2C, GPIO, UART
USB: Two USB 2.0 Host, One USB 2.0 OTG

Known issues:
- WiFi doesn't work
- eMMC not supported

Signed-off-by: Hal Martin <hal.martin@gmail.com>
5 years agoelfutils: Add host build
Rosen Penev [Thu, 5 Sep 2019 23:57:39 +0000 (16:57 -0700)]
elfutils: Add host build

Needed for glib2 host build:

gresource-tool.c:32:20: fatal error: libelf.h: No such file or directory
 #include <libelf.h>

Changed PKG_LICENSE to the SPDX version.

Switched build dependency for argp-standalone to !USE_GLIBC. argp is a
glibc extension. Treat it as such.

Adjusted patch to use strerror_l, which works properly with both glibc
and musl. The patch errors under glibc with:

dwfl_error.c:158:7: error: ignoring return value of 'strerror_r', declared
with attribute warn_unused_result [-Werror=unused-result]
       strerror_r (error & 0xffff, s, sizeof(s));

void casting does not fix the error.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
5 years agoat91:sam9x: create sdcard images
Sandeep Sheriker M [Wed, 11 Sep 2019 18:35:56 +0000 (18:35 +0000)]
at91:sam9x: create sdcard images

create sdcard images for sam9x25 & sam9x35 ek targets.

Signed-off-by: Sandeep Sheriker M <sandeep.sheriker@microchip.com>
5 years agoat91:sama5: create fit image
Sandeep Sheriker M [Wed, 11 Sep 2019 18:35:55 +0000 (18:35 +0000)]
at91:sama5: create fit image

create fit image & add it to sdcard image for sama5 target
device.

Signed-off-by: Sandeep Sheriker M <sandeep.sheriker@microchip.com>
5 years agowolfssl: allow building with hw-crytpo and AES-CCM
Eneas U de Queiroz [Thu, 12 Sep 2019 20:00:00 +0000 (17:00 -0300)]
wolfssl: allow building with hw-crytpo and AES-CCM

Hardware acceleration was disabled when AES-CCM was selected as a
workaround for a build failure.  This applies a couple of upstream
patches fixing this.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
5 years agombedtls: update to 2.16.3
Magnus Kroken [Wed, 18 Sep 2019 19:14:18 +0000 (21:14 +0200)]
mbedtls: update to 2.16.3

Remove 300-bn_mul.h-Use-optimized-MULADDC-code-only-on-ARM-6.patch,
the issue has been fixed upstream.

Signed-off-by: Magnus Kroken <mkroken@gmail.com>
5 years agouClibc++: Remove faulty patch
Rosen Penev [Fri, 20 Sep 2019 00:39:15 +0000 (17:39 -0700)]
uClibc++: Remove faulty patch

This patch was originally added to fix compilation with v4l2rtspserver.
Turns out it was v4l2rtspserver that was broken, not uClibc++. This now
causes issues with a different package where the arguments are being
split.

Note that with this patch, shellcheck throws an error:

SC2068: Double quote array expansions to avoid re-splitting elements.

More: https://github.com/openwrt/packages/pull/9972#discussion_r324878373

Signed-off-by: Rosen Penev <rosenp@gmail.com>
5 years agogcc: Fix ICE in GCC 9.2.0
Hauke Mehrtens [Wed, 18 Sep 2019 16:12:29 +0000 (18:12 +0200)]
gcc: Fix ICE in GCC 9.2.0

This backports a fix from GCC master to fix a internal compiler
exception seen when compiling libjson-c with mips16 activated.

Fixes: FS#2455
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years agokernel: bump 4.19 to 4.19.74
Koen Vandeputte [Fri, 20 Sep 2019 13:11:19 +0000 (15:11 +0200)]
kernel: bump 4.19 to 4.19.74

Refreshed all patches.

Fixes:
- CVE-2019-15504

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.145
Koen Vandeputte [Fri, 20 Sep 2019 13:08:16 +0000 (15:08 +0200)]
kernel: bump 4.14 to 4.14.145

Refreshed all patches.

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agoiwinfo: update to latest Git HEAD
Jo-Philipp Wich [Fri, 20 Sep 2019 11:32:49 +0000 (13:32 +0200)]
iwinfo: update to latest Git HEAD

02112f9 cli: fix reporting of mixed WPA2/WPA3 versions
7faeaea nl80211: properly detect WEP encryption in wpa_supp scan results
629b5ff nl80211: do not confuse open connections with WEP ones
3d47ddd nl80211: rework hostapd and wpa_supplicant wpa suite parsing

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agohostapd: mirror ieee80211w ap mode defaults in station mode
Jo-Philipp Wich [Fri, 20 Sep 2019 11:20:21 +0000 (13:20 +0200)]
hostapd: mirror ieee80211w ap mode defaults in station mode

For AP mode, OpenWrt automatically sets ieee80211w to either 1 or 2, depending
on whether the encryption is set to sae-mixed, or sae/owe/eap suite-b.

Mirror the same defaults for client mode connections, in order to allow an
OpenWrt station to associate to an OpenWrt ap with SAE, OWE or Suite-B encryption
without the need to manually specify "option ieee80211w" on the station.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agohostapd: fix OWE settings in client mode
Jo-Philipp Wich [Fri, 20 Sep 2019 09:40:52 +0000 (11:40 +0200)]
hostapd: fix OWE settings in client mode

This changes fixes the generation of the wpa_supplicant client configuration
in WPA3 OWE client mode. Instead of incorrectly emitting key_mgmt=NONE, use
the proper key_mgmt=OWE setting instead.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agokernel: bump 4.19 to 4.19.73
Koen Vandeputte [Wed, 18 Sep 2019 10:50:22 +0000 (12:50 +0200)]
kernel: bump 4.19 to 4.19.73

Refreshed all patches.

Remove upstreamed:
- 840-media-i2c-tda1997x-select-V4L2_FWNODE.patch
- 079-v4.20-ARM-dts-qcom-ipq4019-fix-PCI-range.patch
- 083-ARM-dts-qcom-ipq4019-enlarge-PCIe-BAR-range.patch
- 084-ARM-dts-qcom-ipq4019-Fix-MSI-IRQ-type.patch

Fixes:
- CVE-2019-15030

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.144
Koen Vandeputte [Wed, 18 Sep 2019 10:49:31 +0000 (12:49 +0200)]
kernel: bump 4.14 to 4.14.144

Refreshed all patches.

Altered patches:
- 816-pcie-support-layerscape.patch

Fixes:
-CVE-2019-15030

Compile-tested on: cns3xxx, layerscape
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agokernel: bump 4.9 to 4.9.193
Koen Vandeputte [Wed, 18 Sep 2019 10:45:40 +0000 (12:45 +0200)]
kernel: bump 4.9 to 4.9.193

Refreshed all patches.

Fixes:
- CVE-2019-15030

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agoramips: add support for EnGenius ESR600
Nick Briggs [Sat, 20 Jul 2019 03:01:29 +0000 (20:01 -0700)]
ramips: add support for EnGenius ESR600

The EnGenius ESR600 is a dual band wireless router with a 4-port gigabit
Ethernet switch, a gigabit Ethernet WAN port and a USB port.

Specification:

- Bootloader: U-Boot
- SoC: MediaTek MT7620A (600 MHz)
- Flash: 16MB, Macronix MX25L12845E
- RAM: 64MB, Nanya NT5TU32M16DG-AC
- Serial: 115200 baud, no header, 3.3V
   J2: Vcc (arrow), Gnd, Tx, Rx
- USB: USB 2, 5V
- Ethernet: 5 x 1 Gb/s 4 LAN 1 WAN, Atheros AR8327
- WiFi0: 5 GHz 802.11 b/g/n Ralink RT5592N
   300 Mb/s, 2T2R
- WiFi1: 2.4 GHz 802.11 b/g/n integrated
   300 Mb/s, 2T2R
- Antennas: 2 per radio, internal
- LEDs: 1 programmable power (amber)
   2 programable radio (blue)
1 programable WPS-5G (blue)
1 non-programable WAN activity (blue)
1 unconfigured WPS-2.4G (amber)
- Buttons: GPIO: Reset, WPS

Installation:

Use the OEM web interface to install the ...-factory.dlf image.
Use the OpenWRT ...-sysupgrade.bin image for future upgrades.

The J2 serial port can be accessed either by soldering in a header,
standard 0.1" spacing, or by using pogo-pins against the back side.

As configured by the OEM, the U-Boot boot delay is short, however quickly
typing "1" leads to the U-Boot "System load Linux to SDRAM via TFTP"
prompt.  The TFTP client is configured by default with
     client:   192.168.99.9
     server:   192.168.99.8
     filename: uImageESR600
It will load an OpenWRT initramfs kernel with this method.

Known issues:

1) Only the ports externally labeled WAN, LAN3 and LAN4 are operational.
LAN1 and LAN2 do not appear to power up. This issue is also present
in the Lava LR25G001.

2) The amber WPS-2.4G LED, in the same lightguide as the blue WPS-5G LED,
is not configured in the Device Tree specification.

3) The blue WAN activity LED is not configured in the Device Tree
specification as this causes the AR8327 switch to fail to initialize.

Signed-off-by: Nick Briggs <nicholas.h.briggs@gmail.com>
[merge conflict in 02_network]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agoramips: mt7621: Add new device AsiaRF AP7621-NV1
Daniel Danzberger [Mon, 22 Jul 2019 10:54:06 +0000 (12:54 +0200)]
ramips: mt7621: Add new device AsiaRF AP7621-NV1

SoC:    Mediatek MT7621A
CPU:    4x 880Mhz
Cache:  32 KB I-Cache and 32 KB D-Cach
        256 KB L2 Cache (shared by Dual-Core)
RAM:    DDR3 512MB 16bits BUS
FLASH:  16MB
Switch: Mediatek Gigabit Switch (2 x LAN, 1 x WAN)
POE:    (1x PD, 2x PSE)
USB:    1x 3.0
PCI:    3x Mini PCIe (3 USB2.0 + 2 x UIM interface)
GPS:    Quectel L70B
SIM:    2 Slots
BTN:    Reset
LED:    - Power
        - Ethernet
        - Wifi
        - USB
UART:  UART is present as Pads with throughholes on the PCB.
       They are located on left side.
       3.3V - RX - GND - TX / 57600-8N1
       3.3V is the square pad

Installation
------------
The stock image is a modified openwrt and can be overflashed via sysupgrade -F

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
[merge conflict in mt7621.mk]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agoramips: add support for Asus RT-AC85P
Birger Koblitz [Sun, 15 Sep 2019 14:20:11 +0000 (16:20 +0200)]
ramips: add support for Asus RT-AC85P

SoC: MediaTek MT7621AT dual-core @ 880MHz
RAM: 256M (Winbond W632GG6KB-1)
FLASH: 128MB (Macronix MX30LF1G18AC-TI)
WiFi: - 2.4GHz MediaTek MT7615N bgn
- 5GHz MediaTek MT7615N nac
Switch: SoC integrated Gigabit Switch (4 x LAN, 1 x WAN)
USB: 1 x USB 3.1 (Gen 1)
BTN: Reset, WPS
LED: - Power (blue)
- 5Ghz (blue)
- 2.4GHz (blue)
- Internet (blue)
- 4x LAN (blue)
(LAN/WAN leds are not controllable by GPIOs)
UART:  UART is present as Pads marked J4 on the PCB.
3.3V - TX - RX - GND / 57600-8N1
3.3V is the square pad
MAC: The MAC address on the router-label matches the MAC of
the 2.4 GHz WiFi.
LAN and WAN MAC are identical: MAC_LABEL+4
5 GHz WiFi MAC: also MAC_LABEL+4

Installation
------------
Via U-Boot tftpd:
Switch on device, within 2s press reset button and keep pressed
until power LED starts blinking slowly.
Upload factory image via tftp put, the router's ip is 192.168.1.1
and expects the client on 192.168.1.75.

The images also work on the Asus RT-AC65P models as tested by Gabor.

Signed-off-by: Birger Koblitz <mail@birger-koblitz.de>
Tested-by: Gabor Varga <vargagab@gmail.com>
[fixed Asus -> ASUS in DTS]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agoramips: add support for Edimax RG21S
Birger Koblitz [Thu, 19 Sep 2019 19:33:59 +0000 (21:33 +0200)]
ramips: add support for Edimax RG21S

SoC: MediaTek MT7621AT dual-core @ 880MHz
RAM: 256M (Nanya NT5CC128M)
FLASH: 16MB (Macronix MX25L12835F)
WiFi: - 2.4GHz MediaTek MT7615N bgn
- 5GHz MediaTek MT7615N nac
Switch: SoC integrated Gigabit Switch (4 x LAN, 1 x WAN)
USB: No
BTN: Reset, WPS
LED: 4 red LEDs, indistinguishable when casing closed
UART:  UART is present as Pads marked J1 on the PCB.
3.3V - RX - GND - TX / 57600-8N1
3.3V is the square pad

Installation
------------
Update the factory image via the OEM web-interface
(by default:http://192.168.1.1)
The sysupgrade image can be installed via TFTP from
the U-Boot bootloader. Connect ethernet port 2.

Signed-off-by: Birger Koblitz <mail@birger-koblitz.de>
[flash node rename, EDIMAX -> Edimax, complete device model name]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agobrcm2708: fix Hifiberry DAC+DSP package definition
Álvaro Fernández Rojas [Fri, 20 Sep 2019 05:50:47 +0000 (07:50 +0200)]
brcm2708: fix Hifiberry DAC+DSP package definition

Fixes: ce536ae ("brcm2708: add support for Hifiberry DAC+DSP")
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agokernel: Correctly search for the FIT image in mtd partition.
Fredrik Olofsson [Wed, 4 Sep 2019 08:41:22 +0000 (10:41 +0200)]
kernel: Correctly search for the FIT image in mtd partition.

Previously all iterations of the loop checked offset=0 in the partition.

Signed-off-by: Fredrik Olofsson <fredrik.olofsson@anyfinetworks.com>
5 years agobuild: make device tree arg really optional in mkits.sh
Johann Neuhauser [Mon, 16 Sep 2019 09:42:49 +0000 (11:42 +0200)]
build: make device tree arg really optional in mkits.sh

If no device tree is given there is no node generated, but
the configuration does still include the name of the missing node.
This will result in a successful build fit image, but bootm does
throw a error message if we want to boot the bad configuration.

Signed-off-by: Johann Neuhauser <jneuhauser@dh-electronics.com>
5 years agolantiq-dsl: fix value of FECS counter
Martin Schiller [Mon, 26 Aug 2019 05:37:14 +0000 (07:37 +0200)]
lantiq-dsl: fix value of FECS counter

Instead of the nFECS value, the nFEC value (the number of corrected code words)
was mistakenly used.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
5 years agokernel: add module for Emulex OneConnect 10Gbit
Alberto Bursi [Sun, 15 Sep 2019 22:54:20 +0000 (00:54 +0200)]
kernel: add module for Emulex OneConnect 10Gbit

add module to support Emulex OneConnect
common in 10Gbit SFP+ cards by Dell/HP/IBM
supports OneConnect OCe10xxx OCe11xxx OCe14xxx,
LightPulse LPe12xxx

Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
5 years agohostapd: declare struct wpa_bss early
Leon M. George [Wed, 11 Sep 2019 13:22:55 +0000 (15:22 +0200)]
hostapd: declare struct wpa_bss early

wps_supplicant.h assumes that 'struct wpa_bss' is forward declared if
CONFIG_WPS is not defined.  With the later inclusion of
600-ubus_support, the issue manifests in warnings like these:

wps_supplicant.h:113:15: warning: 'struct wpa_bss' declared inside parameter list will not be visible outside of this definition or declaration
        struct wpa_bss *bss)
               ^~~~~~~

This patch forward declares 'struct wpa_bss' regardless.

Signed-off-by: Leon M. George <leon@georgemail.eu>
[commit message facelift]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agohostapd: revert signature change in patch
Leon M. George [Wed, 11 Sep 2019 12:10:18 +0000 (14:10 +0200)]
hostapd: revert signature change in patch

The original wpa_hexdump uses a 'void *' for the payload.  With patch
410-limit_debug_messages, the signature changes and compiler warnings
occur at various places.  One such warning is:

 wpa_debug.h:106:20: note: expected 'const u8 * {aka const unsigned char *}' but argument is of type 'struct wpa_eapol_key *'

Signed-off-by: Leon M. George <leon@georgemail.eu>
[commit message facelift]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agoath79: add SUPPORTED_DEVICES to ubnt_nanostation-m-xw
Roger Pueyo Centelles [Tue, 17 Sep 2019 17:31:06 +0000 (19:31 +0200)]
ath79: add SUPPORTED_DEVICES to ubnt_nanostation-m-xw

The ar71xx images for the Ubiquiti NanoStation M (XW) devices use
"nanostation-m-xw" as the board name, but the ath79 images are only
compatible with the "nano-m-xw" board name, so sysupgrade complains.

By adding this additional supported device, sysuspgrade smoothly
upgrades from ar71xx to ath79.

Tested on a NanoStation M (XW) running OpenWrt ar71xx r10250-016d1eb.

Ref: https://github.com/openwrt/openwrt/pull/2418
Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
[removed duplicate DEVICE_VARIANT, removed uneeded nano-m-xw support]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agoath79: add XM device variant for Ubiquiti devices
Adrian Schmutzler [Wed, 18 Sep 2019 19:36:46 +0000 (21:36 +0200)]
ath79: add XM device variant for Ubiquiti devices

So far, XW devices have DEVICE_VARIANT defined and XM devices have
no DEVICE_VARIANT set.

This adds DEVICE_VARIANT for XM devices, and moves definitions for
both XM and XW to the common definitions.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoramips: provide label MAC address
Adrian Schmutzler [Mon, 24 Jun 2019 15:57:15 +0000 (17:57 +0200)]
ramips: provide label MAC address

This patch adds the label MAC address for several devices in
ramips.

Some devices require setting the MAC address in 02_network:

For the following devices, the netif device can be linked in
device tree, but the MAC address cannot be read:
- cudy,wr1000
- dlink,dir-615-d
- dlink,dir-615-h1
- dlink,dir-860l-b1
- glinet,gl-mt300a
- glinet,gl-mt300n
- glinet,gl-mt750
- vocore,vocore2
- vocore,vocore2-lite
- zbtlink,zbt-we1326
- zbtlink,zbt-wg3526

For the following devices, label MAC address is tied to lan or
wan, so no node to link to exists in device tree:
- dlink,dir-510l
- dlink,dwr-116-a1
- dlink,dwr-118-a1
- dlink,dwr-118-a2
- dlink,dwr-921-c1
- dlink,dwr-922-e2
- all hiwifi devices
- lava,lr-25g001
- xiaomi,mir3p

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoipq806x: provide label MAC address
Adrian Schmutzler [Thu, 15 Aug 2019 13:13:44 +0000 (15:13 +0200)]
ipq806x: provide label MAC address

This patch adds the label MAC address for several devices in
ipq806x.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agompc85xx: provide label MAC address
Adrian Schmutzler [Thu, 15 Aug 2019 13:13:38 +0000 (15:13 +0200)]
mpc85xx: provide label MAC address

This patch adds the label MAC address for some devices in
mpc85xx.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoath79: provide label MAC address
Adrian Schmutzler [Thu, 15 Aug 2019 13:13:33 +0000 (15:13 +0200)]
ath79: provide label MAC address

This patch adds the label MAC address for several devices in
ath79.

Some devices require setting the MAC address in 02_network:

For the following devices, the netif device can be linked in
device tree, but the MAC address cannot be read:
- alfa-network,ap121f
- avm,fritz300e
- ubnt-xm devices

For the following devices, label MAC address is tied to lan or
wan, so no node to link to exists in device tree:
- adtran,bsap1800-v2
- adtran,bsap1840
- dlink,dir-842-c1/-c2/-c3
- engenius,ecb1750
- iodata,etg3-r
- iodata,wn-ac1167dgr
- iodata,wn-ac1600dgr
- iodata,wn-ac1600dgr2
- iodata,wn-ag300dgr
- nec,wg800hp
- nec,wg1200cr
- trendnet,tew-823dru

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agobase-files: provide option to specify label MAC address in board.d
Adrian Schmutzler [Thu, 15 Aug 2019 13:13:27 +0000 (15:13 +0200)]
base-files: provide option to specify label MAC address in board.d

For many devices, MAC addresses cannot be retrieved via the
device tree alias.

To still provide the label MAC address for those, this implements
a second mechanism that will put the address into uci config.
Note that this stores the actual MAC address, whereas in DTS
we reference the bearing device.

This is based on the work of Rosy Song <rosysong@rosinson.com>

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agobase-files: add function to retrieve label MAC address
Adrian Schmutzler [Thu, 15 Aug 2019 13:13:21 +0000 (15:13 +0200)]
base-files: add function to retrieve label MAC address

To refer to the MAC address on a device's label, one can
specify the alias label-mac-device in the DTS which should
point to the bearer of the corresponding MAC address.

With the function get_mac_label, the user can retrieve then
retrieve this address and use it as a value that uniquely
identifies his device.

This is severely helpful for several downstream functionalities,
e.g. define MAC addresses of custom netifs or change the SSID to
be easily recognizable.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agocurl: bump to 7.66.0
Hans Dedecker [Tue, 17 Sep 2019 20:45:41 +0000 (22:45 +0200)]
curl: bump to 7.66.0

Refresh patches, for changes in version 7.66.0 see https://curl.haxx.se/changes.html#7_66_0

Fixes CVEs:
    CVE-2019-5481
    CVE-2019-5482

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
5 years agoopenssl: bump to 1.1.1d
Eneas U de Queiroz [Tue, 17 Sep 2019 13:52:11 +0000 (10:52 -0300)]
openssl: bump to 1.1.1d

This version fixes 3 low-severity vulnerabilities:

- CVE-2019-1547: ECDSA remote timing attack
- CVE-2019-1549: Fork Protection
- CVE-2019-1563: Padding Oracle in PKCS7_dataDecode and
 CMS_decrypt_set1_pkey

Patches were refreshed.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
5 years agobrcm2708: add support for Hifiberry DAC+DSP
Álvaro Fernández Rojas [Thu, 19 Sep 2019 16:06:50 +0000 (18:06 +0200)]
brcm2708: add support for Hifiberry DAC+DSP

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agobrcm2708: add support for Raspberry Pi 2B 1.2
Álvaro Fernández Rojas [Thu, 19 Sep 2019 15:32:44 +0000 (17:32 +0200)]
brcm2708: add support for Raspberry Pi 2B 1.2

RPi 2B 1.2 has a BCM2710/BCM2837 like RPi 3 devices.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agobrcm2708: update to latest patches from RPi foundation
Álvaro Fernández Rojas [Thu, 19 Sep 2019 14:43:19 +0000 (16:43 +0200)]
brcm2708: update to latest patches from RPi foundation

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agobrcm2708-gpu-fw: update to latest firmware
Álvaro Fernández Rojas [Thu, 19 Sep 2019 15:37:43 +0000 (17:37 +0200)]
brcm2708-gpu-fw: update to latest firmware

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agokernel: 4.19: fix crash when setting up spi-gpio
DENG Qingfang [Thu, 19 Sep 2019 09:44:48 +0000 (11:44 +0200)]
kernel: 4.19: fix crash when setting up spi-gpio

If an spi-gpio was specified with num-chipselects = <0> in dts, kernel
will crash:

 Unable to handle kernel paging request at virtual address 32697073
 pgd = (ptrval)
 [32697073] *pgd=00000000
 Internal error: Oops: 5 [# 1] SMP ARM
 Modules linked in:
 CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.19.72 #0
 Hardware name: Generic DT based system
 PC is at validate_desc+0x28/0x80
 LR is at gpiod_direction_output+0x14/0x128
 ...
 [<c0544db4>] (validate_desc) from [<c0545228>] (gpiod_direction_output+0x14/0x128)
 [<c0545228>] (gpiod_direction_output) from [<c05fa714>] (spi_gpio_setup+0x58/0x64)
 [<c05fa714>] (spi_gpio_setup) from [<c05f7258>] (spi_setup+0x12c/0x148)
 [<c05f7258>] (spi_setup) from [<c05f7330>] (spi_add_device+0xbc/0x12c)
 [<c05f7330>] (spi_add_device) from [<c05f7f74>] (spi_register_controller+0x838/0x924)
 [<c05f7f74>] (spi_register_controller) from [<c05fa494>] (spi_bitbang_start+0x108/0x120)
 [<c05fa494>] (spi_bitbang_start) from [<c05faa34>] (spi_gpio_probe+0x314/0x338)
 [<c05faa34>] (spi_gpio_probe) from [<c05a844c>] (platform_drv_probe+0x34/0x70)

The cause is spi_gpio_setup() did not check if the spi-gpio has
chipselect pins before setting their direction and results in derefing
an invalid pointer.

The bug is spotted in kernel 4.19.72 and does not occur in 4.14.

There is a similar fix upstream in kernel 5.2 in commit 249e2632dcd0
("spi: gpio: Don't request CS GPIO in DT use-case").

Ref: https://patchwork.kernel.org/patch/11150619/
Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
[use upstream patch, moved from hack to pending dir, commit facelift]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agoprocd: fix invalid JSON filter expression in procd_running()
Jo-Philipp Wich [Thu, 19 Sep 2019 05:16:49 +0000 (07:16 +0200)]
procd: fix invalid JSON filter expression in procd_running()

Since service and instance names may contain characters which are not allowed
in JSON path labels, such as dashes or spaces, change the filter expression
to array square bracket notation to properly match these cases as well.

Fixes: 2c3dd70741 ("procd: add procd_running() helper for checking running state")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agofirewall: update to latest Git HEAD
Jo-Philipp Wich [Wed, 18 Sep 2019 08:51:24 +0000 (10:51 +0200)]
firewall: update to latest Git HEAD

383eb58 ubus: do not overwrite ipset name attribute

Ref: https://forum.openwrt.org/t/fw3-ipset-procd-objects/44044
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agoprocd: update to the latest git HEAD
Rafał Miłecki [Wed, 18 Sep 2019 05:33:01 +0000 (07:33 +0200)]
procd: update to the latest git HEAD

62dc8c0 system: sysupgrade: send reply on error
2710c65 system: refuse sysupgrade with backup if it's unsupported

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years agoglibc: update to latest 2.27 commit (BZ#23637)
Hans Dedecker [Tue, 17 Sep 2019 20:11:26 +0000 (22:11 +0200)]
glibc: update to latest 2.27 commit (BZ#23637)

5b4f7382af Add undef to fix test failure.
9456483fb2 Improve performance of memmem
373f8b06a3 Improve performance of strstr
4ec1b9e913 Fix strstr bug with huge needles (bug 23637)
ecd6271ed8 Speedup first memmem match
bba6b9288f Simplify and speedup strstr/strcasestr first match
7a4da6ef7a Improve strstr performance

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
5 years agoath79: add support for TP-Link Archer C59v2
Keith Maika [Mon, 16 Sep 2019 16:45:02 +0000 (12:45 -0400)]
ath79: add support for TP-Link Archer C59v2

Add ath79 support for Archer C59v2, previously supported by ar71xx.

TP-Link Archer C59v2 is a dual-band AC1350 router based on
Qualcomm/Atheros QCA9561+QCA9886 chips.

Specification:

- 775/650/258 MHz (CPU/DDR/AHB)
- 128 MB of RAM (DDR2)
- 16 MB of FLASH (SPI NOR)
- 3T3R 2.4 GHz
- 2T2R 5 GHz
- 5x 10/100 Mbps Ethernet
- USB 2.0 port
- UART header on PCB

Flash instruction:
  - via web UI:
    1. Download openwrt-ath79-generic-tplink_archer-c59-v2-squashfs-factory.bin
    2. Login to router and open the Advanced tab
    3. Navigate to System Tools -> Firmware Upgrade
    4. Upload firmware using the Manual Upgrade form
  - via TFTP:
    1. Set PC to fixed ip address 192.168.0.66
    2. Download openwrt-ath79-generic-tplink_archer-c59-v2-squashfs-factory.bin
       and rename it to tp_recovery.bin
    3. Start a tftp server with the file tp_recovery.bin in its root directory
    4. Turn off the router
    5. Press and hold Reset button
    6. Turn on router with the reset button pressed and wait ~15 seconds
    7. Release the reset button and after a short time
       the firmware should be transferred from the tftp server
    8. Wait ~30 second to complete recovery.

Signed-off-by: Keith Maika <keithm@aoeex.com>
5 years agoath79: move common definitions from Archer C58/C59 to common DTSI
Adrian Schmutzler [Sun, 1 Sep 2019 08:59:31 +0000 (10:59 +0200)]
ath79: move common definitions from Archer C58/C59 to common DTSI

The Archer C58/C59 have redundant LED and MAC address definitions
in their DTS files. This moves them to the parent DTSI file.

The patch already accounts for the upcoming Archer C59 v2.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agobrcm47xx: sysupgrade: support Luxul firmware format
Dan Haab [Mon, 16 Sep 2019 15:18:37 +0000 (09:18 -0600)]
brcm47xx: sysupgrade: support Luxul firmware format

Allow flashing Luxul devices using vendor firmware format.

Signed-off-by: Dan Haab <dan.haab@legrand.com>
5 years agobcm53xx: sysupgrade: support Luxul firmware format
Dan Haab [Thu, 12 Sep 2019 17:14:19 +0000 (11:14 -0600)]
bcm53xx: sysupgrade: support Luxul firmware format

Allow flashing Luxul devices using vendor firmware format. The next step
will be building proper images once they are conirmed to work.

Signed-off-by: Dan Haab <dan.haab@legrand.com>
5 years agodownload.dl: fix @KERNEL mirror urls
Yousong Zhou [Mon, 16 Sep 2019 08:02:16 +0000 (08:02 +0000)]
download.dl: fix @KERNEL mirror urls

 - Prepend "/pub" for mirror.rackspace.com
 - Use https for download.xs4all.nl and mirrors.mit.edu

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
5 years agomac80211: brcmfmac: backport the last 5.4 changes
Rafał Miłecki [Mon, 16 Sep 2019 06:04:27 +0000 (08:04 +0200)]
mac80211: brcmfmac: backport the last 5.4 changes

This makes brcmfmac use the same wiphy after PCIe reset to help user
space handle corner cases (e.g. firmware crash).

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years agoar71xx: fix typo in platform_do_upgrade_compex()
Rafał Miłecki [Mon, 16 Sep 2019 04:59:09 +0000 (06:59 +0200)]
ar71xx: fix typo in platform_do_upgrade_compex()

Fixes: 641f6b6c26cb ("treewide: use new procd sysupgrade $UPGRADE_BACKUP variable")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years agomediatek: enable mtk_efuse by default
Lorenzo Bianconi [Fri, 6 Sep 2019 11:14:39 +0000 (13:14 +0200)]
mediatek: enable mtk_efuse by default

Enable by default mtk_efuse driver since it needed by mtk_thermal driver
to read sensor calibration data

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
5 years agoath79: eg200: enable status led usage
Karl Palsson [Thu, 5 Sep 2019 09:36:53 +0000 (09:36 +0000)]
ath79: eg200: enable status led usage

This enables using the "eTactica" LED during boot, to indicate failsafe,
and during upgrade, while still leaving the LED alone for normal
operation.  This brings the device more in line with how other devices
work, and makes the failsafe functionality easier to use and understand.

Signed-off-by: Karl Palsson <karlp@etactica.com>