oweals/openwrt.git
5 years agokernel: bump 4.9 to 4.9.191
Koen Vandeputte [Mon, 9 Sep 2019 11:21:20 +0000 (13:21 +0200)]
kernel: bump 4.9 to 4.9.191

Refreshed all patches.

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agotreewide: sysupgrade: use $UPGRADE_BACKUP to check for backup
Rafał Miłecki [Fri, 6 Sep 2019 05:10:54 +0000 (07:10 +0200)]
treewide: sysupgrade: use $UPGRADE_BACKUP to check for backup

Now that $UPGRADE_BACKUP is set conditionally there is no need to check
the $UPGRADE_OPT_SAVE_CONFIG anymore. All conditions can be simplified.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years agoprocd: update to the latest git HEAD
Rafał Miłecki [Wed, 11 Sep 2019 07:03:36 +0000 (09:03 +0200)]
procd: update to the latest git HEAD

b8238df sysupgrade: support "backup" attribute

This update requires "sysupgrade" method callers to pass "backup"
attribute if $UPGRADE_BACKUP is used in the project.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years agobase-files: sysupgrade: pass "backup" ubus attribute
Rafał Miłecki [Fri, 6 Sep 2019 05:10:52 +0000 (07:10 +0200)]
base-files: sysupgrade: pass "backup" ubus attribute

This explicitly tells procd what backup file should be used during
sysupgrade (if any). It's much more generic this way compared to the
magic /tmp/sysupgrade.tgz file that had to be created before a call.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years agogemini: image: fix race condition when building copy-kernel.bin
Yousong Zhou [Tue, 10 Sep 2019 02:19:05 +0000 (02:19 +0000)]
gemini: image: fix race condition when building copy-kernel.bin

Make treat copy-kernel.o as intermediate and delete it when it's no
longer needed.  This can fail when the same submake was triggered
multiple times for different devices.

arm-openwrt-linux-muslgnueabi-as  -k -o copy-kernel.o copy-kernel.S
export MAKEFLAGS= ;make -w -C copy-kernel CROSS_COMPILE=arm-openwrt-linux-muslgnueabi-
arm-openwrt-linux-muslgnueabi-objcopy -O binary -S copy-kernel.o copy-kernel.bin
make[5]: Entering directory '/builder/shared-workdir/build/target/linux/gemini/image/copy-kernel'
arm-openwrt-linux-muslgnueabi-objcopy -O binary -S copy-kernel.o copy-kernel.bin
rm copy-kernel.o
make[5]: Leaving directory '/builder/shared-workdir/build/target/linux/gemini/image/copy-kernel'
# "App" partition is the rootfs
arm-openwrt-linux-muslgnueabi-objcopy: 'copy-kernel.o': No such file
Makefile:27: recipe for target 'copy-kernel.bin' failed
make[5]: Leaving directory '/builder/shared-workdir/build/target/linux/gemini/image/copy-kernel'
make[5]: *** [copy-kernel.bin] Error 1
Makefile:244: recipe for target '/builder/shared-workdir/build/build_dir/target-arm_fa526_musl_eabi/linux-gemini/tmp/openwrt-gemini-storlink_sl93512r-ext4-factory.bin' failed
make[4]: *** [/builder/shared-workdir/build/build_dir/target-arm_fa526_musl_eabi/linux-gemini/tmp/openwrt-gemini-storlink_sl93512r-ext4-factory.bin] Error 2

With this change, output files are directed to $(KDIR)

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
5 years agohostapd: SAE/EAP-pwd side-channel attack update
Hauke Mehrtens [Sun, 8 Sep 2019 21:53:18 +0000 (23:53 +0200)]
hostapd: SAE/EAP-pwd side-channel attack update

Fixes this security problem:
* SAE/EAP-pwd side-channel attack update
https://w1.fi/security/2019-6/sae-eap-pwd-side-channel-attack-update.txt

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years agohostapd: Fix security problem
Hauke Mehrtens [Sun, 8 Sep 2019 21:27:04 +0000 (23:27 +0200)]
hostapd: Fix security problem

This fixes:
CVE-2019-11555 "EAP-pwd message reassembly issue with unexpected fragment"
https://w1.fi/security/2019-5/eap-pwd-message-reassembly-issue-with-unexpected-fragment.txt

This shouöld not affect OpenWrt in the default settings as we do not use
EAP-pwd.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years agoramips: enable external amplifier for D-Link DIR-810L
Roger Pueyo Centelles [Wed, 4 Sep 2019 09:29:12 +0000 (11:29 +0200)]
ramips: enable external amplifier for D-Link DIR-810L

The 2.4 GHz radio had very poor signal reception (-89 dBm for an AP
sitting 5 m away). By enabling the external amplifier, received signal
has improved to -50 dBm for the same AP.

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
5 years agorpcd: update to latest Git HEAD
Jo-Philipp Wich [Tue, 10 Sep 2019 13:25:12 +0000 (15:25 +0200)]
rpcd: update to latest Git HEAD

e2a7bc4 iwinfo: add WPA3 support

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agomac80211: brcmfmac: backport more kernel 5.4 changes
Rafał Miłecki [Mon, 9 Sep 2019 07:37:53 +0000 (09:37 +0200)]
mac80211: brcmfmac: backport more kernel 5.4 changes

Patch getting RAM info got upstreamed. A debugging fs entry for testing
reset feature was added.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years agoglibc: update to latest 2.27 commit (BZ #24228, BZ #24744, BZ #24699)
Hans Dedecker [Sun, 8 Sep 2019 19:13:59 +0000 (21:13 +0200)]
glibc: update to latest 2.27 commit (BZ #24228, BZ #24744, BZ #24699)

5f0d2e0491 [AArch64] Add ifunc support for Ares
e6b7252040 aarch64,falkor: Use vector registers for memcpy
c74b884f70 aarch64,falkor: Ignore prefetcher tagging for smaller copies
0fc5934ebd aarch64/strncmp: Use lsr instead of mov+lsr
e0a0bd3acc aarch64/strncmp: Unbreak builds with old binutils
638caf3000 aarch64: Improve strncmp for mutually misaligned inputs
d5f45a29ff aarch64/strcmp: fix misaligned loop jump target
7f690fafad aarch64: Improve strcmp unaligned performance
40df047b3b aarch64: Fix branch target to loop16
062139f233 aarch64: Optimized memcmp for medium to large sizes
f3e2add213 aarch64: Use the L() macro for labels in memcmp
22bd3ab40e posix: Fix large mmap64 offset for mips64n32 (BZ#24699)
bdd16894aa aarch64: handle STO_AARCH64_VARIANT_PCS
0b48caab9a aarch64: add STO_AARCH64_VARIANT_PCS and DT_AARCH64_VARIANT_PCS
949da7f2fd io: Remove copy_file_range emulation [BZ #24744]
f056ac8363 libio: do not attempt to free wide buffers of legacy streams [BZ #24228]
5f90e009b1 NEWS: add entries for bugs 22964, 24180, and 24531

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
5 years agorpcd: update to latest Git HEAD
Jo-Philipp Wich [Sun, 8 Sep 2019 16:48:15 +0000 (18:48 +0200)]
rpcd: update to latest Git HEAD

69eeb1b file: refactor message parsing and permission checking
f65527a iwinfo: expose all rate info fields in assoclist reply
7fec636 sys: fix symbol redeclaration
27c24c7 rpcd: sys: actually move timespec declaration
345363b file: add remove operation
604db20 rpcd: Switch to nanosleep

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agofirewall: update to latest git HEAD
Hauke Mehrtens [Sun, 8 Sep 2019 16:37:59 +0000 (18:37 +0200)]
firewall: update to latest git HEAD

487bd0d utils: Fix string format message

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years agobase-files: validate firmware for compatibility with backup
Rafał Miłecki [Thu, 5 Sep 2019 11:08:13 +0000 (13:08 +0200)]
base-files: validate firmware for compatibility with backup

This allows platform code to check if firmware image can be used with
preserving a backup. It may be used e.g. when installing vendor
firmwares that won't restore appended backup archive.

Suggested-by: Luis Araneda <luaraneda@gmail.com>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years agofirewal: update to latest git HEAD
Hans Dedecker [Sat, 7 Sep 2019 11:17:55 +0000 (13:17 +0200)]
firewal: update to latest git HEAD

4d0c703 firewall3: Fix some format string problems
8c404ef iptables.c: lock the xtables.lock
c1d3a4d utils: implement fw3_lock_path() & fw3_unlock_path()

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
5 years agoramips: fix MAC address setup for Newifi Y1 and Y1S
Adrian Schmutzler [Fri, 16 Aug 2019 13:39:43 +0000 (15:39 +0200)]
ramips: fix MAC address setup for Newifi Y1 and Y1S

So far, MAC address setup for those devices has been using local
addresses although additional MAC addresses are available on flash.

On device, we found the following situation:
position   Y1     Y1S
0x4        *:d4   *:e4
0x8004     *:d6   *:e8
0x28       *:d4   *:e4
0x2e       *:d7   *:eb

Since 0x4 and 0x28 yield the same address, the former was set for
&ethernet in DTS. However, the typical location on this
architecture is 0x28, so this patch changes that.

For further setup in 02_network, the local bit for lan_mac is
removed, so the address from &ethernet is used at all. For wan_mac,
instead of calculating an address with local bit set, this patch
exploits the previously unused address in 0x2e.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoramips: initialize MAC addresses from flash where possible
Adrian Schmutzler [Fri, 16 Aug 2019 10:59:09 +0000 (12:59 +0200)]
ramips: initialize MAC addresses from flash where possible

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

Changes are limited to cases where on-device check was possible.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[fix mac for newifi-d1; drop adslr,g7 because it's unlikely for
vendor to specifically use 2.4g mac as wan_mac]
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
5 years agoramips: fix duplicate network setup for dlink,dir-615-h1
Adrian Schmutzler [Mon, 12 Aug 2019 11:35:39 +0000 (13:35 +0200)]
ramips: fix duplicate network setup for dlink,dir-615-h1

In 555ca422d1cb ("ramips: fix D-Link DIR-615 H1 switch port
mapping"), port setup for dir-615-h1 was changed without removing
the old one. This was working as the new one was triggered earlier
than the old one.

(In the meantine, changed sorting during ramips rename patches
actually inversed that order.)

Anyway, just remove the wrong case now.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoramips: remove duplicate case for MAC setup of freestation5
Adrian Schmutzler [Mon, 12 Aug 2019 11:31:23 +0000 (13:31 +0200)]
ramips: remove duplicate case for MAC setup of freestation5

ARC FreeStation5 is present twice in MAC address setup.

From older commits/changes, it is not possible to reconstruct
the correct choice only by reading the annotations.

Thus, remove the second case and keep the first one, so behavior
stays the same (as nobody seems to have complained about it).

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoramips: clean and improve MAC address setup in 02_network
Adrian Schmutzler [Mon, 12 Aug 2019 11:21:05 +0000 (13:21 +0200)]
ramips: clean and improve MAC address setup in 02_network

This patch removes unnecessary MAC address setup statements in
ramips' 02_network by doing several optimizations:

1. For the following devices, lan_mac was set up with
   mtd_get_mac_binary although the same address was set in DTS.
   The lan_mac statement is removed in 02_network, but
   wan_mac is kept:
   - mercury,mac1200r-v2
   - phicomm,k2g
   - skylab,skw92a
   - wiznet,wizfi630a

2. For the following devices, wan_mac was set up with
   mtd_get_mac_binary although the same address was set in DTS.
   The wan_mac statement is removed in 02_network, no
   lan_mac is present:
   - buffalo,whr-g300n
   - glinet,gl-mt300n-v2
   - zyxel,keenetic-start

3. For the following device, lan_mac and wan_mac were set up
   with mtd_get_mac_binary to the same address as set in DTS.
   Both statements are removed in 02_network:
   - buffalo,whr-600d

4. For some devices, it was possible to move setup from 02_network
   to DTS by introducing previously missing mtd_mac_address:
   - buffalo,whr-1166d
   - buffalo,whr-300hp2
   - buffalo,wsr-600dhp
   - ohyeah,oy-0001
   - planex,vr500

5. For one device, mtd_mac_address was just wrong and overwritten
   by 02_network. Put the correct value in DTS and remove redundant
   statement in 02_network:
   - asus,rt-ac57u

6. For one device, MAC address defined in DTS is exchanged together
   with lan_mac/wan_mac setup in 02_network, so that cases in
   02_network can be merged:
   - phicomm,k2p

For some devices, an empty case has to be used to prevent them
from falling into the default case and have
WAN address = eth0 address + 1 set to them.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoRevert "build: remove harmful -nopad option from mksquashfs"
Jonas Gorski [Fri, 6 Sep 2019 12:55:36 +0000 (14:55 +0200)]
Revert "build: remove harmful -nopad option from mksquashfs"

This reverts commit 1c0290c5cc6258c48b8ba46b4f9c85a21de4f875.

Dropping the nopad can make the padding overflow into the next erase
block on devices using a non-aligned rootfs start. This breaks the jffs2
overlay partition with the following messages:

[   30.343877] jffs2_scan_eraseblock(): End of filesystem marker found at 0x10000
[   30.376512] jffs2: Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
[   30.385253] jffs2: empty_blocks 196, bad_blocks 0, c->nr_blocks 197

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
5 years agoodhcp6c: update to latest git HEAD
Hans Dedecker [Sat, 7 Sep 2019 11:08:27 +0000 (13:08 +0200)]
odhcp6c: update to latest git HEAD

e199804 dhcpv6: sanitize oro options

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
5 years agobcm53xx: extend firmware validation
Rafał Miłecki [Fri, 6 Sep 2019 10:44:49 +0000 (12:44 +0200)]
bcm53xx: extend firmware validation

This provides TRX validation result to the validation JSON. It also
prevents users from installing broken firmware files.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years agouboot-fritz4040: build with ipq40xx "generic" subtarget
Yousong Zhou [Fri, 6 Sep 2019 08:29:50 +0000 (08:29 +0000)]
uboot-fritz4040: build with ipq40xx "generic" subtarget

Fixes: 853e4dd3 ("ipqx0xx: add Generic subtarget")
Ref: https://forum.openwrt.org/t/ipq40xx-snapshot-not-updated-since-22nd-august/44126
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
5 years agotreewide: use new procd sysupgrade $UPGRADE_BACKUP variable
Rafał Miłecki [Thu, 5 Sep 2019 21:33:19 +0000 (23:33 +0200)]
treewide: use new procd sysupgrade $UPGRADE_BACKUP variable

It's a variable set by procd that should replace hardcoded
/tmp/sysupgrade.tgz.

This change requires the most recent procd with the commit 0f3c136
("sysupgrade: set UPGRADE_BACKUP env variable").

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years agoprocd: update to the latest git HEAD
Rafał Miłecki [Thu, 5 Sep 2019 21:16:17 +0000 (23:16 +0200)]
procd: update to the latest git HEAD

0f3c136 sysupgrade: set UPGRADE_BACKUP env variable
0bcbbbf system: fix uninitialized variables in firmware validation code

This update includes a fix for uninitialized variable usage.

Fixes: 7290963d0992 ("procd: update to the latest git HEAD")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years agobase-files: use get_mac_binary() in mtd_get_mac_binary_ubi()
Adrian Schmutzler [Thu, 5 Sep 2019 11:29:37 +0000 (13:29 +0200)]
base-files: use get_mac_binary() in mtd_get_mac_binary_ubi()

The actual retrieval of the MAC address in mtd_get_mac_binary_ubi()
is the same as in get_mac_binary(). Thus, use the latter function
in the former to reduce duplicate code.

This will also allow to benefit from the enhanced path check there
and bring mtd_get_mac_binary_ubi() more in line with the similar
mtd_get_mac_binary().

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agobase-files: fix mtd_get_mac_text not accepting hex offsets
David Bauer [Wed, 4 Sep 2019 18:46:10 +0000 (20:46 +0200)]
base-files: fix mtd_get_mac_text not accepting hex offsets

The mtd_get_mac_text helper method did not support hexadecimal offset
values, resulting them to break after 75bfc393ba6c ("treewide:
convert MAC address location offsets to hexadecimal")

This commit fixes this by evaluating the hexadecimal input,
converting them to decimal.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agotreewide: when copying a backup file always specify dest name
Rafał Miłecki [Wed, 4 Sep 2019 14:57:40 +0000 (16:57 +0200)]
treewide: when copying a backup file always specify dest name

$CONF_TAR shouldn't be assumed to always point to the sysupgrade.tgz.
This change makes code more generic and allows refactoring $CONF_TAR.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years agotreewide: don't hardcode "sysupgrade.tgz" file name
Rafał Miłecki [Wed, 4 Sep 2019 14:57:39 +0000 (16:57 +0200)]
treewide: don't hardcode "sysupgrade.tgz" file name

1) Add BACKUP_FILE and use it when copying an archive to be restored
   after sysupgrade (on the next preinit).
2) Use CONF_TAR for copying backup prepared by the /sbin/sysupgrade

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years agotreewide: fix invalid UPGRADE_OPT_SAVE_CONFIG spellings
Rafał Miłecki [Thu, 5 Sep 2019 06:53:44 +0000 (08:53 +0200)]
treewide: fix invalid UPGRADE_OPT_SAVE_CONFIG spellings

That was a result of accidentally running "sed" twice on some files.

Fixes: 5797fe84a3b5 ("treewide: replace remaining (not working now) $SAVE_CONFIG uses")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years agotreewide: replace remaining (not working now) $SAVE_CONFIG uses
Rafał Miłecki [Thu, 5 Sep 2019 06:40:29 +0000 (08:40 +0200)]
treewide: replace remaining (not working now) $SAVE_CONFIG uses

This var has been replaced by the $UPGRADE_OPT_UPGRADE_OPT_SAVE_CONFIG

Fixes: b534ba961100 ("base-files: pass "save_config" option to the "sysupgrade" method")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years agouboot-envtools: Update to U-Boot version 2019.07
Hauke Mehrtens [Sat, 11 May 2019 15:09:07 +0000 (17:09 +0200)]
uboot-envtools: Update to U-Boot version 2019.07

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years agotools/mkimage: Update U-Boot to version 2019.07
Hauke Mehrtens [Sat, 11 May 2019 14:57:15 +0000 (16:57 +0200)]
tools/mkimage: Update U-Boot to version 2019.07

This updates the U-Boot which provides the host tools like mkimage to
version 2019.07.
The patches were cleaned up and it was checked if this still compiles
on Linux and FreeBSD.

CONFIG_FIT_SIGNATURE_MAX_SIZE is set to the default value.

The patch for libressl was merged upstream.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years agobrcm2708: update to latest patches from RPi foundation
Álvaro Fernández Rojas [Wed, 4 Sep 2019 17:01:23 +0000 (19:01 +0200)]
brcm2708: update to latest patches from RPi foundation

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agobrcm2708: bcm2711: remove custom config file
Álvaro Fernández Rojas [Wed, 4 Sep 2019 16:11:25 +0000 (18:11 +0200)]
brcm2708: bcm2711: remove custom config file

Forcing arm_64bit is no longer required with latest firmware.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agobrcm2708-gpu-fw: update to latest firmware
Álvaro Fernández Rojas [Wed, 4 Sep 2019 16:09:34 +0000 (18:09 +0200)]
brcm2708-gpu-fw: update to latest firmware

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agoramips: improve support for Xiaomi Miwifi Nano
Chuanhong Guo [Tue, 3 Sep 2019 15:58:07 +0000 (23:58 +0800)]
ramips: improve support for Xiaomi Miwifi Nano

This patch does the following things:
1. mark u-boot-env writable
2. add bootcount support
   Currently, u-boot has a flag_boot_success env variable to reset.
   Also reset it in our firmware to follow the behavior in vendor's
   firmware.
3. disable usb support
   This router doesn't have usb port at all.
4. increase spi clock to 40MHz
5. fix pinmux groups

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
5 years agoprocd: update to the latest git HEAD
Rafał Miłecki [Wed, 4 Sep 2019 09:12:44 +0000 (11:12 +0200)]
procd: update to the latest git HEAD

34ac88c system: reject sysupgrade of invalid firmware images by default
f55c235 system: reject sysupgrade of broken firmware images
e990e21 system: add "validate_firmware_image" ubus method

This update changes "sysupgrade" ubus method API. It's now required to
pass "force" attribute whenever invalid firmware is meant to be
installed.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years agobase-files: pass "force" parameter to the "sysupgrade" call
Rafał Miłecki [Tue, 3 Sep 2019 12:44:40 +0000 (14:44 +0200)]
base-files: pass "force" parameter to the "sysupgrade" call

This makes sysupgrade work with the most recent procd that validates
firmware before proceeding.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years agobrcm47xx: extend firmware validation
Rafał Miłecki [Wed, 4 Sep 2019 04:35:31 +0000 (06:35 +0200)]
brcm47xx: extend firmware validation

This provides TRX validation result, so final JSON may look like:
{
"tests": {
"fwtool_signature": true,
"fwtool_device_match": true,
"trx_valid": true
},
"valid": true,
"forceable": true
}

It also prevents users from installing broken firmware files, e.g.:

root@OpenWrt:/# sysupgrade -F -n /tmp/TZ
Image metadata not found
Invalid image type. Please use firmware specific for this device.
Image check failed but --force given - will update anyway!
Commencing upgrade. Closing all shell sessions.
Firmware image is broken and cannot be installed

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years agobrcm2708: restore UART on RPi 0W, 3B, 3B+ and 4B
Álvaro Fernández Rojas [Tue, 3 Sep 2019 11:01:50 +0000 (13:01 +0200)]
brcm2708: restore UART on RPi 0W, 3B, 3B+ and 4B

Disable Bluetooth and restore UART to GPIOs 14 & 15.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agoath79: add support for TP-Link WDR3500 v1
Adrian Schmutzler [Sun, 28 Jul 2019 10:20:26 +0000 (12:20 +0200)]
ath79: add support for TP-Link WDR3500 v1

Hardware:
SoC:      AR9344
CPU:      560 MHz
Flash:    8 MiB
RAM:      128 MiB
WiFi:     Atheros AR9340 2.4GHz 802.11bgn
          Atheros AR9300 5GHz 802.11an
Ethernet: AR934X built-in switch, WAN on separate physical interface
USB:      1x 2.0

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
   wdr3500v1_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>
[removed stray newline]
Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agoupslug2: Update to git repository
Rosen Penev [Thu, 8 Aug 2019 22:57:56 +0000 (15:57 -0700)]
upslug2: Update to git repository

This has two improvements over the current version. An autotools fix and
application of the wrt350v2 patch.

Cleaned up Makefile as a result of makefiles being fixed.

Note that this package is not really used as it depends on orion, which is
classified as broken.

This is the last package that uses svn in the tree.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
5 years agosdk: use bundle-libraries.sh to ship kernel objtool tools
Jo-Philipp Wich [Fri, 30 Aug 2019 13:45:06 +0000 (15:45 +0200)]
sdk: use bundle-libraries.sh to ship kernel objtool tools

Ensure that the kernel objtool utilities are processed by the library
bundler in order to ensure that they're usable on foreign systems with
different libc versions.

Fixes: a9f6fceb42 ("sdk: fix building external modules when CONFIG_STACK_VALIDATION=y")
Acked-by: Yousong Zhou <yszhou4tech@gmail.com>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agoinclude: kernel-build: pass pkg-config overrides to kernel build
Jo-Philipp Wich [Fri, 30 Aug 2019 13:24:45 +0000 (15:24 +0200)]
include: kernel-build: pass pkg-config overrides to kernel build

Pass suitable pkg-config overrides to the kernel build process in
order to let our pkg-config wrapper discover libraries provided
by tools/.

This mainly affects the use of libelf which is required for the
CONFIG_STACK_VALIDATION features. So far, the build system either
silently used host system libraries or kbuild simply disabled the
feature due to the lack of a suitable libelf.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agotools: libelf: fix headers to trigger -Wundef warnings
Jo-Philipp Wich [Fri, 30 Aug 2019 13:22:01 +0000 (15:22 +0200)]
tools: libelf: fix headers to trigger -Wundef warnings

When libelf from tools/ is used for building the kernel, compilation
aborts due to access to undefined defines since Kbuild adds -Wundef
to the compiler flags.

Patch the header files to use `#if defined(...)` instead of `#if ...`
to prevent such issues.

Ref: https://github.com/NixOS/nixpkgs/issues/59929
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agotools: libelf: install pkg-config file
Jo-Philipp Wich [Fri, 30 Aug 2019 13:28:27 +0000 (15:28 +0200)]
tools: libelf: install pkg-config file

Install the pkg-config definition for libelf in order to allow the
kernel build process discover it later on.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agobcm53xx: add generic subtarget
Paul Spooren [Fri, 23 Aug 2019 08:30:10 +0000 (22:30 -1000)]
bcm53xx: add generic subtarget

Same game as for 853e4dd3062df7cb5704b15d6af6730e3194b571. Add generic
to the filenames.

CC: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Paul Spooren <mail@aparcar.org>
Acked-by: Rafał Miłecki <rafal@milecki.pl>
5 years agoscripts/feeds: fix 'src-include' directive
Bjørn Mork [Mon, 2 Sep 2019 11:49:21 +0000 (13:49 +0200)]
scripts/feeds: fix 'src-include' directive

Commit 775b70f8d5df renamed parse_file() parameters without
updating the recursive call. This broke parsing of any feeds.conf
using 'src-include'.

 $ scripts/feeds update -a
 Can't use string ("defaults") as a HASH ref while "strict refs" in use at scripts/feeds line 63, <$fh> line 1.

Fixes: 775b70f8d5df ("scripts/feeds: allow adding parameters to feeds")
Signed-off-by: Bjørn Mork <bjorn@mork.no>
5 years agouci: update to latest Git HEAD
Hauke Mehrtens [Sun, 1 Sep 2019 17:52:41 +0000 (19:52 +0200)]
uci: update to latest Git HEAD

415f9e4 uci/file: replace mktemp() with mkstemp()

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years agoiwinfo: update to latest Git HEAD
Hauke Mehrtens [Sun, 1 Sep 2019 17:47:50 +0000 (19:47 +0200)]
iwinfo: update to latest Git HEAD

f599a8d iwinfo: Fix rate buffer size
71ec9be iwinfo: Fix buffer size
f8ef450 iwinfo: Add support for WPA3

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years agogrub2: bump to 2.04
Tomasz Maciej Nowak [Thu, 18 Jul 2019 13:32:39 +0000 (15:32 +0200)]
grub2: bump to 2.04

* GCC 8 and 9 support.
* Gnulib integration overhaul.
* RISC-V support.
* Xen PVH support.
* Native UEFI secure boot support.
* UEFI TPM driver.
* New IEEE 1275 obdisk driver.
* Btrfs RAID 5 and RIAD 6 support.
* bootin from F2FS support.
* PARTUUID support.
* VLAN support.
* Native DHCP support.
* Many ARM and ARM64 fixes.
* Many SPARC fixes.
* Many IEEE 1275 fixes.
* ...and tons of other fixes and cleanups...

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
5 years agouboot-zynq: update to 2019.07
Luis Araneda [Sun, 18 Aug 2019 16:00:29 +0000 (12:00 -0400)]
uboot-zynq: update to 2019.07

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
5 years agoFix handling of BUILD_SUFFIX in remote-gdb script
Thomas Langer [Thu, 22 Aug 2019 12:21:14 +0000 (12:21 +0000)]
Fix handling of BUILD_SUFFIX in remote-gdb script

When CONFIG_BUILD_SUFFIX is enabled, the target-* folders in build_dir
and staging_dir have this suffix in the name, but not the
toolchain directories. When detecting the names for "arch" and "libc",
also accept the suffix and do not use it for the toolchain path.

Signed-off-by: Thomas Langer <thomas.langer@intel.com>
5 years agotools/cmake: Update to 3.15.1
Daniel Engberg [Sat, 16 Mar 2019 21:09:22 +0000 (21:09 +0000)]
tools/cmake: Update to 3.15.1

Update CMake to 3.15.1
Refresh patches
Remove inofficial fossies.org and replace with GitHub (link on official site)
Remove 150-C-feature-checks-Match-warnings-more-strictly.patch as it's
a no longer needed backport from upstream.
Disable ccache if GCC is 4.8, 4.9 or 5.X to avoid build failures.
Reference: https://github.com/openwrt/openwrt/pull/1929

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
5 years agonftables: bump to version 0.9.2
Konstantin Demin [Wed, 21 Aug 2019 06:25:06 +0000 (09:25 +0300)]
nftables: bump to version 0.9.2

- exclude Python-related stuff from build
- drop patches:
  * 010-uclibc-ng.patch, applied upstream

ipkg size decrease by 2.8%:
old:
194.851 nftables_0.9.0-2_arm_cortex-a7_neon-vfpv4.ipk
new:
189.581 nftables_0.9.2-1_arm_cortex-a7_neon-vfpv4.ipk

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
5 years agolibnftnl: bump to version 1.1.4
Konstantin Demin [Wed, 21 Aug 2019 06:41:07 +0000 (09:41 +0300)]
libnftnl: bump to version 1.1.4

ABI version is same.

The ipkg size increase by about 2.2%:
old:
47.909 libnftnl11_1.1.3-1_arm_cortex-a7_neon-vfpv4.ipk
new:
48.985 libnftnl11_1.1.4-1_arm_cortex-a7_neon-vfpv4.ipk

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
5 years agomvebu: fix Linksys WRT LAN/WAN MAC addresses
DENG Qingfang [Wed, 21 Aug 2019 14:40:48 +0000 (22:40 +0800)]
mvebu: fix Linksys WRT LAN/WAN MAC addresses

According to 02_network, eth0.1 is LAN and eth1.2 is WAN,
but $mac_wan was assigned incorrectly to eth0 in preinit.

Swap eth0 and eth1 to fix this.

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
5 years agokernel: net_sched: fix a NULL pointer deref in ipt action
Cong Wang [Sun, 25 Aug 2019 12:35:06 +0000 (05:35 -0700)]
kernel: net_sched: fix a NULL pointer deref in ipt action

The net pointer in struct xt_tgdtor_param is not explicitly
initialized therefore is still NULL when dereferencing it.
So we have to find a way to pass the correct net pointer to
ipt_destroy_target().

The best way I find is just saving the net pointer inside the per
netns struct tcf_idrinfo, which could make this patch smaller.

Fixes: 0c66dc1ea3f0 ("netfilter: conntrack: register hooks in netns when needed by ruleset")
Reported-and-tested-by: Tony Ambardar <itugrok@xxxxxxxxx>
Cc: Jamal Hadi Salim <jhs@xxxxxxxxxxxx>
Cc: Jiri Pirko <jiri@xxxxxxxxxxx>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
[Backport for kernel v4.19 and v4.14]
Link: https://bugzilla.kernel.org/show_bug.cgi?id=204681]
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
5 years agorpcd: update to latest Git HEAD
Jo-Philipp Wich [Sun, 1 Sep 2019 16:33:03 +0000 (18:33 +0200)]
rpcd: update to latest Git HEAD

821045f file: add path based read/write/exec ACL checks
fb337e5 file: add stat() information to directory listings

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agouhttpd: add support to generate EC keys
Eneas U de Queiroz [Mon, 5 Aug 2019 18:34:39 +0000 (15:34 -0300)]
uhttpd: add support to generate EC keys

This adds the key_type and ec_curve options to enable the generation of
EC keys during initialization, using openssl or the new options added to
px5g.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
5 years agopx5g: support EC keys
Eneas U de Queiroz [Mon, 5 Aug 2019 18:34:38 +0000 (15:34 -0300)]
px5g: support EC keys

This adds an 'eckey' command to generate an EC key, with an optional
curve name argument, with P-256 as default.

For the 'selfsigned' command, it adds an 'ec' algorithm argument to the
'-newkey' option, and a '-pkeyopt ec_paramgen_curve:<curvename>' option,
mirroring the way openssl specifies the curve name.

Notice that curve names are not necessarily the same in mbedtls and
openssl.  In particular, secp256r1 works for mbedtls, but openssl uses
prime256v1 instead. px5g uses mbedtls, but short NIST curve names P-256
and P-384 are specifically supported.

Package size increased by about 900 bytes (arm).

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
5 years agoopenssl: always build with EC support
Eneas U de Queiroz [Mon, 5 Aug 2019 18:34:37 +0000 (15:34 -0300)]
openssl: always build with EC support

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
5 years agoath79: image: disable sysupgrade images for routerstations and ja76pf2
Tomasz Maciej Nowak [Fri, 23 Aug 2019 13:50:52 +0000 (15:50 +0200)]
ath79: image: disable sysupgrade images for routerstations and ja76pf2

Because a bug in handling partial erase blocks in 4.19 kernel, using
sysupgrade images will hard brick devices that use RedBoot bootloader
and have "FIS directory" with "RedBoot config" on the same erase block.
Since flashing the devices from bootloader is safe, and to not cause a
situation where external chip programmer or JTAG is needed, disable
sysupgrade images for affected boards while creating kernel.bin and
rootfs.bin for jjPlus JA76PF2 board, which doesn't have factory image.

To set up the JA76PF2 board follow "Installation" instructions in b3a0c97
("ath79: add support for jjPlus JA76PF2") except the part of loading
initramfs image and using sysupgrade image for flashing (point 6 and 7).
Enter following commands to flash the board from bootloader:
  fis init
  load -r -b 0x80060000 <openwrt_kernel_image_name>
  fis create linux
  load -r -b %{FREEMEMLO} <openwrt_rootfs_image_name>
  fis create rootfs
  fis load -l linux
  exec -c ""

For RouterStations use TFTP recovery procedure.

Ref: FS#2428
Cc: Matt Merhar <mattmerhar@protonmail.com>
Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
5 years agoath79: fix FIS partition detection for 4.19 kernel
Tomasz Maciej Nowak [Fri, 23 Aug 2019 13:50:51 +0000 (15:50 +0200)]
ath79: fix FIS partition detection for 4.19 kernel

When bumping to 4.19 the patch responsible for scaning flash for FIS
partition got left out. Without it devices with RedBoot bootloader using
automatic partitions detection in dts won't boot with the new kernel.

Fixes: 3771176 ("ath79: add support for linux 4.19")
Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
5 years agoath79: image: add supported string for routerstations and ja76pf2
Tomasz Maciej Nowak [Fri, 23 Aug 2019 13:50:50 +0000 (15:50 +0200)]
ath79: image: add supported string for routerstations and ja76pf2

Now that the md5 check is fixed and metadata present, sysupgrade on
ar71xx will complain about device not being supported by the image.
Since the cause is not matching strings for supported devices add them
accordingly.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
5 years agoath79: image: append metadata to routerstations and ja76pf2 images
Tomasz Maciej Nowak [Fri, 23 Aug 2019 13:50:49 +0000 (15:50 +0200)]
ath79: image: append metadata to routerstations and ja76pf2 images

This target enforces metadata check so add the necessary information. It
was previously removed because md5 sum check. When using these sysupgrade
images on ar71xx target the check would complain about them not matching.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
5 years agoar71xx: sysupgrade: accept ath79 combined-image
Tomasz Maciej Nowak [Fri, 23 Aug 2019 13:50:48 +0000 (15:50 +0200)]
ar71xx: sysupgrade: accept ath79 combined-image

There is md5 sum of whole image embedded in combined-image header which
is checked on sysupgrade. The check will fail for ath79 images which
may have embedded metadata. This is because metadata are appended after
the combined image is created. To allow smooth transition from ar71xx to
ath79, strip metadata before calculating md5 sum for whole image.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
5 years agoath79: image: retire combined-image for Adtran/Bluesocket devices
Tomasz Maciej Nowak [Fri, 23 Aug 2019 13:50:47 +0000 (15:50 +0200)]
ath79: image: retire combined-image for Adtran/Bluesocket devices

During review it slipped by that these devices use combined-image which
should never be used for newly added ones. Therefore switch to
sysupgrade-tar generated images introduced in 8f6f260 ("ath79:
routerstation: prepare to use sysupgrade-tar format image"). The
sysupgrade accepts both images for now so no reression should occur.

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: dts: fix ja76pf2 spi frequency
Tomasz Maciej Nowak [Fri, 23 Aug 2019 13:50:46 +0000 (15:50 +0200)]
ath79: dts: fix ja76pf2 spi frequency

The frequency was filled acording the information from datasheet for
particular chip (Winbond 25Q128BVFG). Unfortunately this led to
coruption and introduced bad blocks on the chip. Reducing the frequency
to commonly used in ath79, made the board more stable and no new bad
blocks were spoted.

Fixes: b3a0c97 ("ath79: add support for jjPlus JA76PF2")
Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
5 years agoath79: correct OCEDO Ursus phy-mode property
David Bauer [Sat, 31 Aug 2019 14:47:31 +0000 (16:47 +0200)]
ath79: correct OCEDO Ursus phy-mode property

This fixes the previously incorrect phy-mode for the OCEDO Ursus GMAC0.

See 62abbd587dc9 ("ath79: correct various phy-mode properties")
for more details.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agoipq806x: Replace backticks by $(...)
Adrian Schmutzler [Wed, 24 Jul 2019 22:43:00 +0000 (00:43 +0200)]
ipq806x: Replace backticks by $(...)

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

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoar71xx: WNR2200: remove redundant GPIO for WLAN LED
Michal Cieslakiewicz [Fri, 2 Aug 2019 15:12:34 +0000 (17:12 +0200)]
ar71xx: WNR2200: remove redundant GPIO for WLAN LED

Without this patch, an extra entry appears for AR9287 GPIO
that duplicates WLAN LED but in fact drives nothing:

gpiochip1: GPIOs 502-511, ath9k-phy0:
 gpio-502 (                    |netgear:blue:wlan   ) out hi
 gpio-503 (                    |netgear:amber:test  ) out hi
 gpio-504 (                    |netgear:green:power ) out lo
 gpio-505 (                    |rfkill              ) in  hi
 gpio-507 (                    |wps                 ) in  hi
 gpio-508 (                    |reset               ) in  hi
 gpio-510 (                    |ath9k-phy0          ) out hi <===!

The pin pointed above is default LED GPIO (8) for AR9287.
For WNR2200 it is not connected anywhere - pin 0 drives blue WLAN
LED instead - but initialization code is missing that information.

This fix calls ap9x_pci_setup_wmac_led_pin() function at device
setup, forcing WLAN LED pin to be 0 and removing redundant entry.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
5 years agolibnfnetlink: Avoid passing both -fPIC and -fpic
Rosen Penev [Tue, 27 Aug 2019 22:49:22 +0000 (15:49 -0700)]
libnfnetlink: Avoid passing both -fPIC and -fpic

Instead, instruct the configure script to use $(FPIC) only.

Mixing -fPIC and -fpic can cause issues on some platforms like PPC.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
5 years agoncurses: Do not pass both -fPIC and -fpic
Rosen Penev [Tue, 27 Aug 2019 22:49:21 +0000 (15:49 -0700)]
ncurses: Do not pass both -fPIC and -fpic

The configure scripts matches Linux with -fPIC, which is not exactly what
is desired. Since we are already passing $(FPIC), added a CONFIGURE_VAR to
avoid passing -fPIC.

Removed PKG_BUILD_DIR as it is already the default value.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
5 years agoath79: etactica-eg200: fix restore button
Karl Pálsson [Mon, 12 Aug 2019 16:37:34 +0000 (16:37 +0000)]
ath79: etactica-eg200: fix restore button

The button is labelled reboot/restore in documentation, and has always
been used for that.  Naming it WPS has always been wrong.

Signed-off-by: Karl Pálsson <karlp@etactica.com>
[matched author to SoB]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years agoramips: add support for Netgear R6260 and R6850
Christoph Krapp [Thu, 29 Aug 2019 08:08:38 +0000 (10:08 +0200)]
ramips: add support for Netgear R6260 and R6850

As Netgear uses the same image for R6260, R6350 & R6850
we can merge device tree files and generate separate
images for each device.

Signed-off-by: Christoph Krapp <achterin@googlemail.com>
[add missing WiFi compatible string, fix network
configuration]
Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agoramips: add factory image for Netgear R6350
Christoph Krapp [Thu, 29 Aug 2019 18:12:30 +0000 (20:12 +0200)]
ramips: add factory image for Netgear R6350

This adds factory image generation for all three
devices. These images can be flashed via WebUI
for easy installation.

Thanks to David Bauer for the inspiration.

Signed-off-by: Christoph Krapp <achterin@googlemail.com>
[altered commit to only include the R6350]
Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agoramips: add mt7615e support to Netgear R6350
Christoph Krapp [Thu, 29 Aug 2019 08:06:12 +0000 (10:06 +0200)]
ramips: add mt7615e support to Netgear R6350

Signed-off-by: Christoph Krapp <achterin@googlemail.com>
5 years agoramips: fix network setup for various NETGEAR boards
David Bauer [Fri, 30 Aug 2019 20:41:18 +0000 (22:41 +0200)]
ramips: fix network setup for various NETGEAR boards

There are currently the following issues present for the Netgear R6220,
R6350 and WNDR3700 v5:

 - LAN and WAN MAC-addresses are inverted
 - WAN MAC-address is off. It are +2 compared to the LAN MAC-address
   (R6350 only)
 - Switchport order is inverted in LuCi

This commit fixes both these issues by assigning correct MAC-addresses
to LAN and WAN interfaces and defining the switchports with the correct
labels.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agoramips: use phy trigger for various Netgear boards
David Bauer [Fri, 30 Aug 2019 18:11:45 +0000 (20:11 +0200)]
ramips: use phy trigger for various Netgear boards

This commit switches the default trigger for the WiFi LED from a netdev
trigger on "wlan0" to a wireless-phy based trigger. THis allows the LED
to work, even when the wireless interface is not named "wlan0" without
modifiying the LED settings.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agoramips: add factory image for NETGEAR R6220
David Bauer [Tue, 27 Aug 2019 21:55:12 +0000 (23:55 +0200)]
ramips: add factory image for NETGEAR R6220

This adds an easy-installation factory image for the NETGEAR R6220
router. The factory image can either be flashed via the vendor Web-UI or
the bootloader using nmrpflash.

Tested with NETGEAR V1.1.0.86 firmware.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agoramips: disable badblock shifting for MT7621 NAND
David Bauer [Wed, 28 Aug 2019 21:40:51 +0000 (23:40 +0200)]
ramips: disable badblock shifting for MT7621 NAND

The MediaTek MT7621 NAND driver currently intransparently shifts NAND
pages when a block is marked as bad. Because of this, offsets for e.g.
caldata and MAC-addresses seem to be off.

This is, howeer, not a task for the mtd NAND driver, as the flash
translation layer is tasked with this.

This patch disables this badblock shifting. This fix was originally
proposed by Jo-Philipp Wich at
https://bugs.openwrt.org/index.php?do=details&task_id=1926

Fixes FS#1926 ("MTD partition offset not correctly mapped when bad
eraseblocks present")
Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agolua: create lua symlink for host installation
David Bauer [Wed, 28 Aug 2019 18:47:02 +0000 (20:47 +0200)]
lua: create lua symlink for host installation

Since the binaries for both lua as well as lua5.3 contain the version
number, invocations of the "lua" binary are failing, as it's not created
anymore for the host package.

Fixes: fe59b46 ("lua: include version number in installed files")
Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agobuild: remove harmful -nopad option from mksquashfs
Christian Lamparter [Fri, 30 Aug 2019 14:52:25 +0000 (16:52 +0200)]
build: remove harmful -nopad option from mksquashfs

While the -nopad option prevents mksquashfs from padding the
image to an arbitrary 4k. It does not take into consideration
that squashfs is programmed to have this 4k padding when it's
being used on on a block device... which is its main "use-case".

Now, after a week long discussion on the ML that included a
back-and-forth between some of the possible options.
But this is likely the best KISS patch to deal with the issue
right away given the limited resources.

From squashfs code point of view, be warned. The 4k padding is
not enough when dealing with devices that have a PAGE_SIZE
bigger than 4k.

if it turns out to be affecting you, then please look-up either:
"FS#2460 - kernel panic reading squashfs from ubi volume" bug
Or the discussion on the OpenWrt-Devel ML in
"amp821xx: use newly added pad-squashfs for Meraki MR24" and
"Squashfs breakage lottery with UBI..."
before making an educated guess.

Note: This will not affect the "tiny"/small flash devices as
much as it seems at first. This is because the the rootfs_data
partition that follows uses jffs2. And it requires to be aligned
to the flash block-size in order to work at all.

So either the involved FSes will meet in the middle as before,
or not at all. But in that latter case the image was already
hoping for the "undefined behaviour" gamble to turn out in its
favour and this is probably why this was unnoticed for so long.

Fixes: FS#2460
Reported-by: Russell Senior <russell@personaltelco.net>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years agokernel: bump 4.19 to 4.19.69
Koen Vandeputte [Thu, 29 Aug 2019 10:30:46 +0000 (12:30 +0200)]
kernel: bump 4.19 to 4.19.69

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.141
Koen Vandeputte [Thu, 29 Aug 2019 10:29:06 +0000 (12:29 +0200)]
kernel: bump 4.14 to 4.14.141

Refreshed all patches.

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agobase-files: use JSON for storing firmware validation info
Rafał Miłecki [Fri, 23 Aug 2019 06:15:23 +0000 (08:15 +0200)]
base-files: use JSON for storing firmware validation info

So far firmware validation result was binary limited: it was either
successful or not. That meant various limitations, e.g.:
1) Lack of proper feedback on validation problems
2) No way of marking firmware as totally broken (impossible to install)

This change introduces JSON for storing detailed validation info. It
provides a list of performed validation tests and their results. It
allows marking firmware as non-forceable (broken image that can't be
even forced to install).
Example:
{
        "tests": {
                "fwtool_signature": true,
                "fwtool_device_match": true
        },
        "valid": true,
        "forceable": true
}

Implementation is based on *internal* check_image bash script that:
1) Uses existing validation functions
2) Provides helpers for setting extra validation info

This allows e.g. platform_check_image() to call notify_check_broken()
when needed & prevent user from bricking a device.

Right now the new JSON info is used by /sbin/sysupgrade only. It still
doesn't make use of "forceable" as that is planned for later
development.

Further plans for this feature are:
1) Expose firmware validation using some new ubus method
2) Move validation step from /sbin/sysupgrade into "sysupgrade" ubus
   method so:
   a) It's possible to safely sysupgrade using ubus only
   b) /sbin/sysupgrade can be more like just a CLI

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years agomediatek: backport a pcie fix
John Crispin [Fri, 30 Aug 2019 05:28:47 +0000 (07:28 +0200)]
mediatek: backport a pcie fix

PCI/e probe was failing under certain situations.

Signed-off-by: John Crispin <john@phrozen.org>
5 years agolinux-firmware: add mediatek BT firmware
John Crispin [Fri, 30 Aug 2019 05:27:51 +0000 (07:27 +0200)]
linux-firmware: add mediatek BT firmware

Signed-off-by: John Crispin <john@phrozen.org>
5 years agomac80211: rt2x00: revert commit causing regression in 5GHz band
Daniel Golle [Thu, 29 Aug 2019 20:26:42 +0000 (22:26 +0200)]
mac80211: rt2x00: revert commit causing regression in 5GHz band

From: Stanislaw Gruszka <sgruszka@redhat.com>
This reverts commit 9ad3b55654455258a9463384edb40077439d879f.

As reported by Sergey:

"I got some problem after upgrade kernel to 5.2 version (debian testing
linux-image-5.2.0-2-amd64). 5Ghz client  stopped to see AP.
Some tests with 1metre distance between client-AP: 2.4Ghz  -22dBm, for
5Ghz - 53dBm !, for longer distance (8m + walls) 2.4 - 61dBm, 5Ghz not
visible."

It was identified that rx signal level degradation was caused by
9ad3b5565445 ("rt2800: enable TX_PIN_CFG_LNA_PE_ bits per band").
So revert this commit.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years agomvebu: sysupgrade: fix uDPU eMMC check regression
Vladimir Vid [Thu, 29 Aug 2019 15:26:12 +0000 (17:26 +0200)]
mvebu: sysupgrade: fix uDPU eMMC check regression

Add udpu_ prefix in all other function names

Signed-off-by: Vladimir Vid <vladimir.vid@sartura.hr>
5 years agobrcm2708: remove duplicated patch
Álvaro Fernández Rojas [Thu, 29 Aug 2019 14:19:00 +0000 (16:19 +0200)]
brcm2708: remove duplicated patch

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agokernel: add disable_eap_hack sysfs attribute
Etienne Champetier [Tue, 13 Aug 2019 03:06:13 +0000 (20:06 -0700)]
kernel: add disable_eap_hack sysfs attribute

We are not sure if 640-bridge-only-accept-EAP-locally.patch is still needed
as a first step, add disable_eap_hack sysfs config to allow to disable it

Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
5 years agoscripts/feeds: allow adding parameters to feeds
Jo-Philipp Wich [Wed, 28 Aug 2019 13:21:35 +0000 (15:21 +0200)]
scripts/feeds: allow adding parameters to feeds

this allows adding "--" prefixed parameters inside feeds.conf between the
target and name. The first parameter is --force which has the same effect
as using -f when installing any of the packages. This allows creating
feeds that will override base packages by default.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agoprocd: fix compile issue with glibc (FS#2469)
Hans Dedecker [Wed, 28 Aug 2019 13:28:57 +0000 (15:28 +0200)]
procd: fix compile issue with glibc (FS#2469)

0430252 sysupgrade: add missing _GNU_SOURCE define (FS#2469)

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
5 years agomediatek: update v4.19 switch support to latest vendor version
John Crispin [Wed, 28 Aug 2019 13:20:22 +0000 (15:20 +0200)]
mediatek: update v4.19 switch support to latest vendor version

Signed-off-by: John Crispin <john@phrozen.org>
5 years agoath9k: backport dynack improvements
Koen Vandeputte [Wed, 28 Aug 2019 10:12:41 +0000 (12:12 +0200)]
ath9k: backport dynack improvements

Close cooperation with Lorenzo Bianconi resulted
in these patches which fix all remaining seen issues
when using dynack.

Fix link losses when:
- Late Ack's are not seen or not present
- switching from too low static coverage class to dynack on a live link

These are fixed by setting the Ack Timeout/Slottime to
the max possible value for the currently used channel width when
a new station has been discovered.

When traffic flows, dynack is able to adjust to optimal values
within a few packets received (typically < 1 second)

These changes have been thoroughly tested on ~60 offshore devices
all interconnected using mesh over IBSS and dynack enabled on all.

Distances between devices varied from <100m up to ~35km

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
5 years agokernel: bump 4.19 to 4.19.68
Koen Vandeputte [Wed, 28 Aug 2019 09:41:37 +0000 (11:41 +0200)]
kernel: bump 4.19 to 4.19.68

Refreshed all patches.

Remove upstreamed:
- 950-0307-Revert-pwm-Set-class-for-exported-channels-in-sysfs.patch

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

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