openwrt/openwrt.git
3 years agobuild, imagebuilder: Do not require libncurses-dev
Paul Spooren [Tue, 14 Apr 2020 21:14:47 +0000 (11:14 -1000)]
build, imagebuilder: Do not require libncurses-dev

The buildroot and SDK both require `libncurses-dev` to be installed on
the system, however the ImageBuilder uses precompiled binaries.

This patch changes the prerequirements checks to skip the
`libncurses-dev` part if running as ImageBuilder.

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agoramips: add kmod-usb-dwc2 to ZyXEL Keenetic image
Alexey Dobrovolsky [Sat, 9 May 2020 18:10:44 +0000 (21:10 +0300)]
ramips: add kmod-usb-dwc2 to ZyXEL Keenetic image

ZyXEL Keenetic has a USB port. Thus, DWC2 USB controller driver should
be in the default image for this device.

Fixes: a7cbf59e0e04 ("ramips: add new device ZyXEL Keenetic as kn")
Signed-off-by: Alexey Dobrovolsky <dobrovolskiy.alexey@gmail.com>
[fixed whitespace issue]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agoramips: remove patches for USB-dwc2
Alexey Dobrovolsky [Fri, 10 Apr 2020 22:37:09 +0000 (01:37 +0300)]
ramips: remove patches for USB-dwc2

In FS#2738 we can see that patch first introduced in
e8ebcff ("ramips: add a explicit reset to dwc2")
breaks USB functionality since 18.06. Thus, this patch should be removed.

Removed:
- 0032-USB-dwc2-add-device_reset.patch

Fixes: FS#2738
Fixes: FS#2964
Signed-off-by: Alexey Dobrovolsky <dobrovolskiy.alexey@gmail.com>
3 years agoprereq-build: test for perl's Data::Dumper
Rosen Penev [Mon, 30 Mar 2020 01:13:56 +0000 (18:13 -0700)]
prereq-build: test for perl's Data::Dumper

Required for installation of autoconf:

make[5]: Entering directory `/openwrt/build_dir/host/autoconf-2.69'
Making all in bin
make[6]: Entering directory `/openwrt/build_dir/host/autoconf-2.69/bin'
autom4te_perllibdir='..'/lib AUTOM4TE_CFG='../lib/autom4te.cfg'
../bin/autom4te -B '..'/lib -B '..'/lib         --language M4sh --cache
 '' --melt ./autoconf.as -o autoconf.in

Can't locate Data/Dumper.pm in @INC (@INC contains: ../lib
/usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl
/usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at
../lib/Autom4te/C4che.pm line 33.
BEGIN failed--compilation aborted at ../lib/Autom4te/C4che.pm line 33.
Compilation failed in require at ../bin/autom4te line 40.
BEGIN failed--compilation aborted at ../bin/autom4te line 40.
make[6]: *** [autoconf.in] Error 2

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agoapm821xx: set DEVICE_TYPE to "nas" for sata subtarget
Adrian Schmutzler [Sat, 30 May 2020 09:21:08 +0000 (11:21 +0200)]
apm821xx: set DEVICE_TYPE to "nas" for sata subtarget

Since DEVICE_TYPE cannot be set per device, just set DEVICE_TYPE
to "nas" for the entire subtarget, which only contains this single
device.

Note that while this looks like a cosmetic change in combination
with the previous patches, this particular patch actually changes
the packages for the device.

Suggested-by: Christian Lamparter <chunkeey@gmail.com>
Cc: Christian Lamparter <chunkeey@gmail.com>
Cc: Sungbo Eo <mans0n@gorani.run>
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agotreewide: provide consistent basic DEVICE_TYPE
Adrian Schmutzler [Fri, 29 May 2020 16:40:03 +0000 (18:40 +0200)]
treewide: provide consistent basic DEVICE_TYPE

While the effective "default" based on frequent use is "router", the
DEVICE_TYPE variable actually provides a "basic" configuration without
selecting any additional packages.

This is currently set up with the identifier "bootloader", which seems
to be not used at all. However, the only targets not using "router" or
"nas" are actually archs38 and arc770, which use their own value
"developerboard" for DEVICE_TYPE which seems to have been invented when
these targets where added. The latter is not implemented in target.mk,
though, and will fall back to the "basic" set of packages then.

So, to clean this up and make it more readable, let's just define a
DEVICE_TYPE "basic" and use it for the aforementioned cases.

Cc: Christian Lamparter <chunkeey@gmail.com>
Cc: Sungbo Eo <mans0n@gorani.run>
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agotreewide: drop DEVICE_TYPE when used as device variable
Adrian Schmutzler [Fri, 29 May 2020 15:58:20 +0000 (17:58 +0200)]
treewide: drop DEVICE_TYPE when used as device variable

DEVICE_TYPE is a target/subtarget variable, and it does not have
any effect when set in a device definition. It can only be set
in a target's or subtarget's Makefile.

Consequently, having it set anyway is misleading, so this drops
all cases.

This effectively reverts the following commits:
7a1497fd601d ("apm821xx: MBL: set DEVICE_TYPE to NAS")
5b4765c93a1b ("gemini: Classify Raidsonic NAS IB-4220-B as a NAS")
cdc6de460bb4 ("gemini: D-Link DNS-313 is a NAS")

For the following commit, the variable was set when adding device
support:
27b2f0fc0fc5 ("kirkwood: add support for Iomega Storcenter ix2-200")

Cc: Christian Lamparter <chunkeey@gmail.com>
Cc: Sungbo Eo <mans0n@gorani.run>
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agobcm63xx: lzma-loader: allow bigger ramdisks
Álvaro Fernández Rojas [Wed, 3 Jun 2020 11:39:50 +0000 (13:39 +0200)]
bcm63xx: lzma-loader: allow bigger ramdisks

Some (older) CFEs are loaded at 0x80401000 and ramdisks are loaded at
0x80010000, which means that ramdisk size limit is 0x3F1000 (almost 4M).
Therefore, current ramdisks (~4MB) are overwritting CFE in these devices,
which results in a crash.

This commit changes the address where ramdisks are loaded to 0x80a00000,
which is the same address where kernel is loaded when booting from the flash.
Therefore, lzma-loader will now be loaded at 0x80a00000, but it will still
decompress the kernel at 0x80010000.

Tested with huawei,hg556a-b, which has its CFE loaded at 0x80401000.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agouhttpd: fix script timeout
Daniel Golle [Wed, 3 Jun 2020 09:48:35 +0000 (10:48 +0100)]
uhttpd: fix script timeout

 939c281 proc: do not cancel script killing after writing headers

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agomalta: add missing symbols for kernel 5.4
Daniel Golle [Thu, 14 May 2020 13:16:14 +0000 (14:16 +0100)]
malta: add missing symbols for kernel 5.4

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agobcm63xx: ad1018: remove cfe.bin image support
Álvaro Fernández Rojas [Wed, 3 Jun 2020 09:20:58 +0000 (11:20 +0200)]
bcm63xx: ad1018: remove cfe.bin image support

Apparently, Sercomm allows loading a BCM WFI image via CFE, but this image
destroys "serial" and "protect" nand partitions, which is wrong.
It will also set both bootflags to the same value, which causes booting
issues with cferam (cferom will alternatively boot from cferam1 or cferam2
each time the device is rebooted).
Now that OEM Sercomm images are supported it's time to remove this hacky
cfe.bin image support.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agobcm63xx: ad1018: add missing partitions
Álvaro Fernández Rojas [Wed, 3 Jun 2020 09:18:11 +0000 (11:18 +0200)]
bcm63xx: ad1018: add missing partitions

This partitions were missing when support for this device was added.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agobcm63xx: stop using legacy lzma for all devices
Álvaro Fernández Rojas [Wed, 3 Jun 2020 07:00:09 +0000 (09:00 +0200)]
bcm63xx: stop using legacy lzma for all devices

BCM6368 and newer devices are compatible with any lzma compression parameters.
Add a new legacy device definition and use it on BCM6358 and older devices.

Compressed kernel size is reduced by ~1.35%.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agobcm63xx: vg-8050: switch to bcm-wfi-split
Álvaro Fernández Rojas [Tue, 2 Jun 2020 16:04:45 +0000 (18:04 +0200)]
bcm63xx: vg-8050: switch to bcm-wfi-split

Allows to keep a backup firmware in case active firmware is corrupted.
Also fix hsspi address warning.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agobcm63xx: vr-3032u: switch to bcm-wfi-split
Álvaro Fernández Rojas [Tue, 2 Jun 2020 16:00:10 +0000 (18:00 +0200)]
bcm63xx: vr-3032u: switch to bcm-wfi-split

Allows to keep a backup firmware in case active firmware is corrupted.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agobcm63xx: nand: order devices alphabetically
Álvaro Fernández Rojas [Tue, 2 Jun 2020 15:59:24 +0000 (17:59 +0200)]
bcm63xx: nand: order devices alphabetically

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agobcm63xx: nand: add CFE_WFI_VERSION values for each device
Álvaro Fernández Rojas [Tue, 2 Jun 2020 15:56:31 +0000 (17:56 +0200)]
bcm63xx: nand: add CFE_WFI_VERSION values for each device

CFE_WFI_VERSION should be defined per device instead of using a generic value.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agokernel: mtdsplit: support Broadcom WFI bootflags
Álvaro Fernández Rojas [Tue, 2 Jun 2020 15:52:12 +0000 (17:52 +0200)]
kernel: mtdsplit: support Broadcom WFI bootflags

When firmware is flashed, cferam.000 extension is renamed to the next number.
When booting, CFE scans the NAND and picks the partition with the highest
cferam extension and ignores the other one.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agokernel: mtdsplit: improve JFFS2 scan
Álvaro Fernández Rojas [Tue, 2 Jun 2020 15:47:57 +0000 (17:47 +0200)]
kernel: mtdsplit: improve JFFS2 scan

Allow retrieving full file name and length by parameters.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agokernel: mtdsplit: bcm_wfi: refactor code
Álvaro Fernández Rojas [Tue, 2 Jun 2020 15:37:12 +0000 (17:37 +0200)]
kernel: mtdsplit: bcm_wfi: refactor code

Create new parse_bcm_wfi function with common code from current parsers.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agoscripts: config: remove accidentally added file
Álvaro Fernández Rojas [Tue, 2 Jun 2020 16:17:31 +0000 (18:17 +0200)]
scripts: config: remove accidentally added file

Also ignore the file.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agokernel: bump 5.4 to 5.4.43
Petr Štetiar [Tue, 2 Jun 2020 08:51:02 +0000 (10:51 +0200)]
kernel: bump 5.4 to 5.4.43

Refreshed patches, removed upstreamed patch:

 bcm27xx: 950-0642-component-Silence-bind-error-on-EPROBE_DEFER.patch

Run tested: qemu-x86-64
Build tested: x86/64, imx6, sunxi/a53

Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agobcm63xx: nand: sercomm: switch to sercomm-load script
Álvaro Fernández Rojas [Tue, 2 Jun 2020 11:01:35 +0000 (13:01 +0200)]
bcm63xx: nand: sercomm: switch to sercomm-load script

xxd is not a valid dependency and shouldn't be used.
Fixes buildbot failure.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agoscripts: support Sercomm load tags
Álvaro Fernández Rojas [Tue, 2 Jun 2020 10:50:37 +0000 (12:50 +0200)]
scripts: support Sercomm load tags

Header consists in Sercomm PID bytes, followed by a SHA256 hash of the
input binary.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agobcm63xx: ad1018: support Sercomm factory images
Álvaro Fernández Rojas [Tue, 2 Jun 2020 07:16:49 +0000 (09:16 +0200)]
bcm63xx: ad1018: support Sercomm factory images

This images can be flashed from the official firmware, as opposed to CFE
images, which can only be flashed from CFE and require opening the case.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agobcm63xx: nand: support Sercomm firmwares
Álvaro Fernández Rojas [Tue, 2 Jun 2020 07:12:05 +0000 (09:12 +0200)]
bcm63xx: nand: support Sercomm firmwares

Add support for Sercomm factory firmwares (AES 256 CBC encrypted).

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agokernel: mtdsplit: bcm_wfi: remove brcm,wfi-sercomm compatibility
Álvaro Fernández Rojas [Tue, 2 Jun 2020 07:02:23 +0000 (09:02 +0200)]
kernel: mtdsplit: bcm_wfi: remove brcm,wfi-sercomm compatibility

The only Sercomm WFI user has been migrated to a dedicated firmware parser.
Keep support for no cferam partition based on a boolean DT property.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agobcm63xx: ad1018: switch to Sercomm WFI
Álvaro Fernández Rojas [Tue, 2 Jun 2020 06:59:58 +0000 (08:59 +0200)]
bcm63xx: ad1018: switch to Sercomm WFI

Support Sercomm firmware partition split.
WFI partition must be defined after bootflag partitions in order for the
parser to properly find bootflag1 and bootflag2 partitions.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agokernel: mtdsplit: bcm_wfi: support Sercomm bootflags
Álvaro Fernández Rojas [Tue, 2 Jun 2020 06:57:38 +0000 (08:57 +0200)]
kernel: mtdsplit: bcm_wfi: support Sercomm bootflags

Sercomm uses 2 bootflag partitions and boots the firmware with the highest
bootflag. Support splitting the firmware partition while keeping support for
unsplitted layout.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agokernel: mtdsplit: bcm_wfi: code refactoring
Álvaro Fernández Rojas [Tue, 2 Jun 2020 06:50:15 +0000 (08:50 +0200)]
kernel: mtdsplit: bcm_wfi: code refactoring

- Rename master to mtd.
- Pass mtd size as an argument.
- Rename of_match_table.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agoscripts: support Sercomm crypto
Álvaro Fernández Rojas [Tue, 2 Jun 2020 06:37:54 +0000 (08:37 +0200)]
scripts: support Sercomm crypto

Sercomm firmwares are encrypted with AES 256 CBC.
The key is generated with a custom algorithm from the firmware tag:
char key[32];
char version[32];
char iv[32];
char random[32];
char size[32];
Key must be generated with Sercomm's algorithm. However, the rest of the
header can be empty. IV and random are set to 0 on purpose.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agoscripts: support Sercomm partition tags
Álvaro Fernández Rojas [Tue, 2 Jun 2020 06:30:44 +0000 (08:30 +0200)]
scripts: support Sercomm partition tags

Sercomm uses a custom layout for partition tags:
char part_name[32];
char size[32];
char part_version[32];
char reserved[32];
char rootfs_version[32];

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agoppp: update to version 2.4.8.git-2020-05-25
Hans Dedecker [Sun, 31 May 2020 18:28:06 +0000 (20:28 +0200)]
ppp: update to version 2.4.8.git-2020-05-25

ddd57c2 pppd: Add lcp-echo-adaptive option
c319558 pppd: Handle SIGINT and SIGTERM during interrupted syscalls (#148)
0bc11fb Added missing options to manual pages. (#149)
b1fcf16 Merge branch 'monotonic-time' of https://github.com/themiron/ppp
c78e312 pppd: linux: use monotonic time if possible

Remove patch 121-debian_adaptive_lcp_echo as patch is upstream accepted
Remove patch 206-compensate_time_change.patch as timewrap issues are
solved by a patch making use of monotonic time

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
3 years agoar71xx: correct button type for TL-MR3020 mode slider
David Bauer [Sat, 30 May 2020 14:24:03 +0000 (16:24 +0200)]
ar71xx: correct button type for TL-MR3020 mode slider

The TP-Link TL-MR3020 has a three-state mode slider which was previously
integrated as a button (EV_KEY). This led to spurious activations of
failsafe mode.

Set the type for the button to switch (EV_SW), to avoid unintended
activations of failsafe mode.

Related: commit 27f3f493de06 ("gpio-button-hotplug: unify polled and
interrupt code")

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agoath79: add label MAC address for TP-Link RE450 v2/v3
Adrian Schmutzler [Sun, 31 May 2020 11:41:55 +0000 (13:41 +0200)]
ath79: add label MAC address for TP-Link RE450 v2/v3

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoath79: add support for TP-Link RE450 v3
Andreas Wiese [Wed, 27 May 2020 13:31:30 +0000 (15:31 +0200)]
ath79: add support for TP-Link RE450 v3

TP-Link RE450 v3 is a dual band router/range-extender based on
Qualcomm/Atheros QCA9563 + QCA9880.

This device is nearly identical to RE450 v2 besides a modified flash
layout (hence I think force-flashing a RE450v2 image will lead to at
least loss of MAC address).

Specification:

- 775 MHz CPU
- 64 MB of RAM (DDR2)
- 8 MB of FLASH (SPI NOR)
- 3T3R 2.4 GHz
- 3T3R 5 GHz
- 1x 10/100/1000 Mbps Ethernet (AR8033 PHY)
- 7x LED, 4x button-
- possible UART header on PCB¹

Flash instruction:
Apply factory image in OEM firmware web-gui.

¹ Didn't check to connect as I didn't even manage to connect on
  RE450v2 (AFAIU it requires disconnecting some resistors, which I was
  too much of a coward to do).  But given the similarities to v2 I
  think it's the same or very similar procedure (and most likely also
  the only way to debrick).

Signed-off-by: Andreas Wiese <aw-openwrt@meterriblecrew.net>
[remove dts-v1 and compatible in DTSI]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoath79: add support for TP-Link TL-WR802N V1 and V2
Lech Perczak [Fri, 29 May 2020 18:50:05 +0000 (20:50 +0200)]
ath79: add support for TP-Link TL-WR802N V1 and V2

Specification:
- SoC: Qualcomm Atheros QCA9533 (560 MHz, MIPS 24Kc)
- RAM: 32 MiB
- Storage: 4 MiB of Flash on board
- Wireless: Built into QCA9533 (Honey Bee), PHY modes b/g/n
- Ethernet: 1x100M (port0)

Installation through OEM Web Interface:
- Connect to TL-WR802N by Ethernet or Wi-Fi
- Go to web interface:
  [V1] http://192.168.0.1
  [V2] http://192.168.0.254
  Default user is "admin" & password is "admin".
  On V2, there is no DHCP server running by default, so remember to set
  IP manually.
- Go to "System Tools -> Firmware Upgrade"
- Browse for firmware:
  [V1] "*.factory.bin"
  [V2] "*.factory-us.bin" or  "*.factory-eu.bin" for eu model
  Web interface may complain if filename is too long. In such case,
  rename .bin to something shorter.
- Click upgrade

Installation through tftp:
Note: T_OUT, T_IN and GND on the board must be connected to USB TTL
      Serial Configuration 115200 8n1

- Boot the TL-WR802N
- When "Autobooting in 1 seconds" appears type "tpl" followed by enter
- Connect to the board Ethernet port
    (IPADDR: 192.168.1.1, ServerIP: 192.168.1.10)
- tftpboot 0x80000000 <Firmware Image Name>
- Record the result of "printenv bootcmd"
- Enter "erase <Result of 'printenv bootcmd'> +0x3c0000"
    (e.g erase 0x9f020000 +0x3c0000)
- Enter "cp.b 0x80000000 <Result of 'printenv bootcmd'> 0x3c0000"
    (e.g cp.b 0x80000000 0x9f020000 0x3c0000)
- Enter "bootm <Result of 'printenv bootcmd'>"
    (e.g bootm 0x9f020000)

Notes:

When porting from ar71xx target to ath79, I found out that on V2,
reset button is on GPIO12 and active low, instead of GPIO11 and
active high. By cross-flashing V1 firmware to V2, I confirmed
the same is true for V1.
Also according to manual of V1, this one also has green
LED instead of blue - both of those issues were fixed accordingly.

The MAC address assignment has been checked with OEM firmware.

Installation manual based on ar71xx support by Thomas Roberts

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
[slightly adjust commit message, add MAC address comment]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoar71xx: fix reset key for TP-Link TL-WR802N V1/V2
Lech Perczak [Fri, 29 May 2020 19:56:18 +0000 (21:56 +0200)]
ar71xx: fix reset key for TP-Link TL-WR802N V1/V2

During porting support for this router to ath79 target
it was discovered that GPIO mapping was incorrect (GPIO11 active high).
Correct mapping for both V1 and V2 is GPIO12 active low.

Default configuration from GPL source for V2 explicitly states this, and
this was confirmed experimentally on ath79 by looking on
/sys/kernel/debug/gpio. Correctness of this was also validated for V1 by
cross-flashing vendor firmware for V1 on V2 hardware, in which reset
button also worked.

Fix it.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
[slightly adjust commit title]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoath79: update WA/XC devices UBNT_VERSION to 8.5.3
Roger Pueyo Centelles [Thu, 28 May 2020 09:44:54 +0000 (11:44 +0200)]
ath79: update WA/XC devices UBNT_VERSION to 8.5.3

Ubiquiti WA devices with newer hw version 2011K require UBNT_VERSION
to be at least 8.5.3, otherwise the image is rejected:

   New ver: WA.ar934x.v8.5.0-42.OpenWrt-r10947-65030d81f3
   Versions: New(525568) 8.5.0, Required(525571) 8.5.3
   Invalid version 'WA.ar934x.v8.5.0-42.OpenWrt-r10947-65030d81f3'

For consistency, also increase version number for XC devices.

Tested-by: Pedro <pedrowrt@cas.cat>
Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
3 years agoipq806x: EA8500 fix boot partition detection
Samantha Collard [Sat, 30 May 2020 23:49:51 +0000 (09:49 +1000)]
ipq806x: EA8500 fix boot partition detection

Remove extraneous code that disabled boot partition detection.

Fixes: b3770eaca39f ("mtd: base-files: Unify dual-firmware devices (Linksys)")
Signed-off-by: Samantha Collard <sammyrc34@gmail.com>
3 years agoath79: fix LEDs for GL.inet GL-AR150
Adrian Schmutzler [Sun, 31 May 2020 10:46:26 +0000 (12:46 +0200)]
ath79: fix LEDs for GL.inet GL-AR150

Since the wireless LED was used for boot and set up with a DT
trigger, the WiFi indication hasn't worked on ath79 at all.

In addition, a look into the manual revealed that the OEM
configuration is as follows:

LED 1 (green): power
LED 2 (green): configurable
LED 3 (red): wireless

So, let's just keep the WiFi trigger and convert the rest to its
"intended" use.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agomt76: update to the latest version (adds 7663e, 7663u, 7915 drivers)
Felix Fietkau [Tue, 12 May 2020 17:44:41 +0000 (19:44 +0200)]
mt76: update to the latest version (adds 7663e, 7663u, 7915 drivers)

7aabfd0c9282 mt7615: add CONFIG_MT76_LEDS to cflags
10a5b7630a37 mt76: mt7615: fix getting maximum tx power from eeprom
8688ed70c987 mt76: mt7615: use module parameter option for offload firmware preference
04798aab1257 net: mt7603: remove duplicate error message
9636177117d8 mt76: mt7615: fix ssid configuration in mt7615_mcu_hw_scan
d4ba139d8b8b mt76: mt7615: introduce mt7615_check_offload_capability routine
2cc0d54b65a1 mt76: mt7615: do not mark sched_scan disabled in mt7615_scan_work
5b73be962388 mt76: mt7615: add passive mode for hw scan
96e429e18174 mt76: mt7615: free pci_vector if mt7615_pci_probe fails
8fddbf6390ac mt76: mt7615: introduce support for hardware beacon filter
f2c760177bdd mt76: mt7615: introduce mt7615_mcu_set_hif_suspend mcu command
db454605106f mt76: mt7615: add WoW support
20b87321c39f mt76: mt7663u: introduce suspend/resume to mt7663u
20db7e73c586 mt76: mt7615: introduce PM support
523716bba561 mt76: mt7615: add gtk rekey offload support
50d377a825cc mt76: mt7615: introduce beacon_loss mcu event
4ef1957cea35 mt76: mt7663: read tx streams from eeprom
f25a43cc53e7 mt76: mt7615: check return value of mt7615_eeprom_get_power_index
0a9f71652927 mt76: mt7615: fix ibss mode for mt7663
83f2ba3101b4 mt76: mt7663: fix target power parsing
3e6968593b61 mt76: mt7615: fix delta tx power for mt7663
c1d3ad194ae4 mt76: mt7663: introduce WoW with net detect support
891136ab99da mt76: mt7663: add support to sched scan with randomise addr
82e4d3ebe967 mt76: mt7615: scan all channels if not specified
690b84821cd3 mt76: avoid rx reorder buffer overflow
f0117d3107b4 mt76: add support for HE RX rate reporting
cc68782bab1a mt76: add Rx stats support for radiotap
3ec47f2fba61 mt76: adjust wcid size to support new 802.11ax generation
0a9f4173dd07 mt76: add HE phy modes and hardware queue
c6b002bcdfa6 mt76: add mac80211 driver for MT7915 PCIe-based chipsets
b96af5039581 mt76: mt7915: enable Rx HE rate reporting
230054096155 mt76: mt7915: implement HE per-rate tx power support
c8f4b6cf1add mt76: mt7915: register per-phy HE capabilities for each interface
de1e8af96e19 mt76: mt7915: add HE bss_conf support for interfaces
135a5085932b mt76: mt7915: add HE capabilities support for peers
3b5d908dae2f mt76: mt7915: add Rx radiotap header support
158253e2c11e mt76: mt7915: add .sta_add_debugfs support
7f40e8c2b98d mt76: mt7915: add .sta_statistics support
a5368e5cad11 mt76: mt7915: set peer Tx fixed rate through debugfs
4f79c516be5c mt76: mt7915: add tsf related callbacks
509fceb43235 mt76: mt7915: enable firmware module debug support
56405976fc7b mt76: set runtime stream caps by mt76_phy
6bbf1a35c0da linux-firmware: add rebb firmware for mt7663
d7a10094c4e5 mt7663: add client offload firmware
9200732e8534 mt76: mt7663u: copy key pointer in mt7663u_mac_write_txwi
3aa810bde810 mt76: mt7663u: add missing register definitions
e236ea5be344 mt76: mt7615: usb: cancel ps work stopping the vif
1d0903de2131 mt76: mt7915: introduce mt7915_get_he_phy_cap
095c72c81c74 mt76: mt7915: add Tx beamformer support
5f9e7664cd26 mt76: mt7915: add Tx beamformee support
ac505404c385 mt76: mt7915: add TxBF capabilities
6656bebd39cd mt76: mt7915: add debugfs to track TxBF status
9590db025475 mt76: mt7915: allocate proper size for tlv tags
26eb1ed65987 mt76: mt7915: fix possible deadlock in mt7915_stop
f85c1f3fc189 firmware: add mt7915 firmware
9b07251b00b0 mt76: mt7615: fix typo defining ps work
060e375a9244 mt76: fix per-driver wcid range checks after wcid array size bump
7270b56389a9 mt76: mt7615: do not report scan_complete twice to mac80211
8c9e4847d01e mt76: mt7615: reduce hw scan timeout
8bd88a1b1880 mt76: enable p2p support
1ea444d0e8e5 mt76: mt7615: configure bss info adding the interface
fa81da5bb4e9 mt76: mt7615: introduce remain_on_channel support
44f2262c0289 mt76: mt76x02: remove check in mt76x02_mcu_msg_send
7005aa891440 mt76: mt7915: add spatial reuse support
1e3dc5b76649 mt76: mt7915: fix some sparse warnings
01b784174cd5 mt76: mt7915: fix sparse warnings: incorrect type initializer
40b7b5354a16 mt76: mt7615: fix NULL pointer deref in mt7615_register_ext_phy
6d731d188d31 mt76: mt7915: fix decoded radiotap HE flags
b74d5b1c14cf mt76: mt7915: fix some sparse warnings
6679d35be5cc mt76: mt7615: switch to per-vif power_save support
01e870b44769 mt76: mt7915: fix a handful of spelling mistakes
7b2d16655904 mt76: mt7663: fix the usage WoW with net detect support
ed3a244fb647 mt76: mt7915: Fix build error
5396a61cec99 mt76: mt7615: fix hw_scan with ssid_type for specified SSID only
466a5b4d041d mt76: mt7915: fix possible NULL pointer dereference in mt7915_register_ext_phy
984a172609c0 mt76: fix wcid allocation issues
6e02acddcb1a mt76: mt7615: add support for MT7611N
4e6f4e432d0d mt76: only iterate over initialized rx queues
9ad940fee593 mt76: mt7615: Use kmemdup in mt7615_queue_key_update()
85c516081338 mt76: mt7915: remove set but not used variable 'msta'

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agobuild: compress kernel debuginfo using zstd
Matthias Schiffer [Wed, 13 May 2020 18:33:46 +0000 (20:33 +0200)]
build: compress kernel debuginfo using zstd

zstd with its default settings (compression level -3) compresses better
than bzip2 -9 (which is the default setting), and is an order of magnitude
faster.

I made the following measurements for the most common compression tools
(all standard Debian Buster versions, default flags unless noted
otherwise), using the debug information of a large x86-64 kernel with
ALL_KMODS:

* kernel-debug.tar: 376M
* kernel-debug.tar.gz: 101M, compressed in ~12s
* kernel-debug.tar.bz2: 91M, compressed in ~15s
* kernel-debug.tar.xz: 57M, compressed in ~101s
* kernel-debug.tar.zst: 86M, compressed in ~1s

With zstd, there is still some room for improvement by increasing the
compression, but the slight increase in compression ratio
(22.83% -> 19.46%) does not justify the significant increase in
compression time (about 5 times on my machine) in my opinion.

Note that multithreaded compression (-T argument) does not affect
reproducibility with zstd.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
3 years agobuild: add zstd support to pack/unpack functions
Matthias Schiffer [Sun, 17 May 2020 11:18:10 +0000 (13:18 +0200)]
build: add zstd support to pack/unpack functions

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
3 years agotools: add zstd
Matthias Schiffer [Wed, 13 May 2020 18:22:12 +0000 (20:22 +0200)]
tools: add zstd

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
3 years agodropbear: add ed25519 and chacha20-poly1305
Vladislav Grishenko [Sun, 12 Apr 2020 22:24:28 +0000 (03:24 +0500)]
dropbear: add ed25519 and chacha20-poly1305

- add Ed25519 support (backport):
  * DROPBEAR_ED25519 option for ssh-ed25519,
  * disabled by default
- add Chacha20-Poly1305 support (backport):
  * DROPBEAR_CHACHA20POLY1305 for chacha20-poly1305@openssh.com,
  * enabled by default
- update feature costs in binary size

Signed-off-by: Vladislav Grishenko <themiron@mail.ru>
3 years agomac80211: fix wifi teardown
John Crispin [Sat, 30 May 2020 10:01:08 +0000 (12:01 +0200)]
mac80211: fix wifi teardown

reverts part of the recent wifi reconf patch.

Signed-off-by: John Crispin <john@phrozen.org>
3 years agobcm53xx: remove support for kernel 4.14
Adrian Schmutzler [Mon, 25 May 2020 10:19:52 +0000 (12:19 +0200)]
bcm53xx: remove support for kernel 4.14

We currently support three kernel versions on this target, let's
just get rid of the oldest one.

Cc: Rafał Miłecki <rafal@milecki.pl>
Cc: John Crispin <john@phrozen.org>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agobcm47xx: remove support for kernel 4.14
Adrian Schmutzler [Mon, 25 May 2020 10:19:51 +0000 (12:19 +0200)]
bcm47xx: remove support for kernel 4.14

We currently support three kernel versions on this target, let's
just get rid of the oldest one.

Cc: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agomac80211: rt2x00: backport patch enabling MFP
Daniel Golle [Sat, 30 May 2020 08:36:17 +0000 (09:36 +0100)]
mac80211: rt2x00: backport patch enabling MFP

From: Rui Salvaterra <rsalvaterra@gmail.com>
Date: Mon, 25 May 2020 14:49:07 +0100
Subject: [PATCH] rt2800: enable MFP support unconditionally

This gives us WPA3 support out of the box without having to manually disable
hardware crypto. The driver will fall back to software crypto if the connection
requires management frame protection.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agougps: nmea: make sure date is valid
Daniel Golle [Fri, 29 May 2020 22:58:20 +0000 (23:58 +0100)]
ugps: nmea: make sure date is valid

GPS time without date was previously used to set system date:
Tue Oct 10 11:48:21 2000 user.info kernel: [  108.786639] ugps: system time differs from GPS time by more than 5 seconds. Using 2000-10-10T10:48:21 UTC as the new time
Tue Oct 10 11:49:27 2000 user.info kernel: [  174.794699] ugps: system time differs from GPS time by more than 5 seconds. Using 2020-05-26T10:49:27 UTC as the new time

Fix this by ignoring incomplete dates and wait for complete time
information before adjusting system date/time.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agoar71xx: fix splitting firmware partition for TL-WR902AC v1
Adrian Schmutzler [Thu, 28 May 2020 16:30:17 +0000 (18:30 +0200)]
ar71xx: fix splitting firmware partition for TL-WR902AC v1

The -O option for the tplink-v1-header was missing for the TP-Link
TL-WR902AC v1, while safeloader and MTDPARTS where set up with a
single firmware partition.

This led to bootloops after using sysupgrade.

Fixes: FS#3118
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoqos-scripts: fix interface resolving
Jo-Philipp Wich [Fri, 29 May 2020 08:34:58 +0000 (10:34 +0200)]
qos-scripts: fix interface resolving

Also ensure that the error message is actually printed to stderr and that
the rule generation is aborted if an interface cannot be resolved.

Ref: https://github.com/openwrt/luci/issues/3975
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
3 years agoccache: update to 3.7.9
DENG Qingfang [Thu, 28 May 2020 07:25:07 +0000 (15:25 +0800)]
ccache: update to 3.7.9

Update ccache to 3.7.9

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

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
3 years agobcm27xx: update to latest patches from RPi foundation
Álvaro Fernández Rojas [Thu, 28 May 2020 17:08:55 +0000 (19:08 +0200)]
bcm27xx: update to latest patches from RPi foundation

Also removes random module and switches to new bcm2711 thermal driver.
Boot tested on RPi 4B v1.1 4G.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agobcm27xx-userland: update to latest version
Álvaro Fernández Rojas [Thu, 28 May 2020 13:27:17 +0000 (15:27 +0200)]
bcm27xx-userland: update to latest version

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agoprocd: update to git HEAD
Daniel Golle [Thu, 28 May 2020 13:27:51 +0000 (14:27 +0100)]
procd: update to git HEAD

 b84a329 jail: use sane termios settings for console pts
 b9b39e2 jail: handle containers seperately

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agohostapd: Add disable_vht when using NOHT/HT* modes
Enrique Rodríguez Valencia [Tue, 12 May 2020 17:37:28 +0000 (19:37 +0200)]
hostapd: Add disable_vht when using NOHT/HT* modes

disable_vht parameter needs to be set when using wpa_supplicant NOHT/HT* modes.

Signed-off-by: Enrique Rodríguez Valencia <enrique.rodriguez@galgus.net>
3 years agomac80211: Fix setting radio htmode when using mesh mode
Enrique Rodríguez Valencia [Tue, 12 May 2020 17:35:43 +0000 (19:35 +0200)]
mac80211: Fix setting radio htmode when using mesh mode

When configuring the radio in legacy mode from luci, the htmode is not set
correctly to NOHT, causing the radio in mesh mode to be set to HT40.

Signed-off-by: Enrique Rodríguez Valencia <enrique.rodriguez@galgus.net>
3 years agobroadcom-wl: don't inherit lock descriptor in nas process
Jo-Philipp Wich [Thu, 28 May 2020 11:03:02 +0000 (13:03 +0200)]
broadcom-wl: don't inherit lock descriptor in nas process

Add a local hack to prevent the Broadcom WPA authenticator process from
inheriting the lock descriptor 1000 used to prevent concurrent executions
of the init script.

Without this fix, repeated invocations of /etc/init.d/network, e.g. for
obtaining the enabled state, would hang forever.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
3 years agobcm27xx-userland: update to latest version with 64 bit support
Álvaro Fernández Rojas [Thu, 28 May 2020 08:46:17 +0000 (10:46 +0200)]
bcm27xx-userland: update to latest version with 64 bit support

Support for 64 bits has been remove on latest master of raspberry/firmware.
Update to latest commit with 64 bit support since we don't support
installing 32 bit packages on 64 bit targets.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agolinux: mvebu: backport mvneta XDP support fixes
Jakov Petrina [Mon, 25 May 2020 12:14:40 +0000 (14:14 +0200)]
linux: mvebu: backport mvneta XDP support fixes

This patch backports additional fixes for XDP support in the mvneta driver. These
changes are found upstream as commits:

b37fa92e20ef2 net: mvneta: fix build skb for bm capable devices
f383b2950070c net: mvneta: rely on page_pool_recycle_direct in mvneta_run_xdp
79572c98c554d mvneta driver disallow XDP program on hardware buffer management
44efc78d0e464 net: mvneta: fix XDP support if sw bm is used as fallback

Signed-off-by: Jakov Petrina <jakov.petrina@sartura.hr>
3 years agolinux: mvebu: backport mvneta XDP support
Jakov Petrina [Fri, 15 May 2020 10:52:35 +0000 (12:52 +0200)]
linux: mvebu: backport mvneta XDP support

This patch backports XDP support in the mvneta driver used by Marvell ARMADA 37x,
38x and 37xx series SoCs. Supported actions are:

- XDP_DROP
- XDP_PASS
- XDP_REDIRECT
- XDP_TX

Patches are present upstream as following commits:

b0a43db9087a net: mvneta: add XDP_TX support
9e58c8b41065 net: mvneta: make tx buffer array agnostic
fa383f6b77a2 net: mvneta: move header prefetch in mvneta_swbm_rx_frame
0db51da7a8e9 net: mvneta: add basic XDP support
8dc9a0888f4c net: mvneta: rely on build_skb in mvneta_rx_swbm poll routine
568a3fa24a95 net: mvneta: introduce page pool API for sw buffer manager
ff519e2acd46 net: mvneta: introduce mvneta_update_stats routine

Signed-off-by: Jakov Petrina <jakov.petrina@sartura.hr>
3 years agopackages/utils: fbtest fix Makefile
Thibaut VARÈNE [Thu, 21 May 2020 15:40:54 +0000 (17:40 +0200)]
packages/utils: fbtest fix Makefile

The clean target tries to remove what looks like a bogus 'rbcfg',
probably carried over copy-pasta. Remove the name of the generated
executable ('fbtest') instead.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
Fixes: 8099f4e0d3af ("fbtest utility ")
3 years agopackage/base-files: caldata: work around dd's limitation
Thibaut VARÈNE [Sat, 16 May 2020 20:18:15 +0000 (22:18 +0200)]
package/base-files: caldata: work around dd's limitation

tl;dr: dd will silently truncate the output if reading from special
files (e.g. sysfs attributes) with a too large bs parameter.

This problem was exposed on some RouterBOARD ipq40xx devices which use a
caldata payload which is larger than PAGE_SIZE, contrary to all other
currently supported RouterBOARD devices: the caldata would fail to
properly load with the current scripts.

Background: dd doesn't seem to correctly handle read() results that
return less than requested data. sysfs attributes have a kernel exchange
buffer which is at most PAGE_SIZE big, so only 1 page can be read() at a
time. In this case, if bs is larger than PAGE_SIZE, dd will silently
truncate blocks to PAGE_SIZE. With the current scripts using bs=<size>
count=1, the data is truncated to PAGE_SIZE as soon as the requested
<size> exceeds this value.

This commit works around this problem by using `cat` in the caldata
routines that can read from a file (routines that read from mtd devices
are untouched). cat correctly handles partial read requests. The output
is then piped to dd with the same parameters as before, to ensure that
the resulting file remains exactly the same.

This is a simple workaround, the downside is that it uses a pipe and one
more executable, and therefore has a larger memory footprint and is
slower. This is deemed acceptable considering these routines are only
used at boot time.

Tested-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
3 years agopackages/boot: remove rbcfg
Thibaut VARÈNE [Thu, 21 May 2020 15:20:55 +0000 (17:20 +0200)]
packages/boot: remove rbcfg

The new sysfs soft_config driver makes buggy rbcfg obsolete and
entirely replaces it.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
3 years agogeneric: routerboot sysfs: soft_config support for ath79 cpufreq
Thibaut VARÈNE [Fri, 15 May 2020 16:02:02 +0000 (18:02 +0200)]
generic: routerboot sysfs: soft_config support for ath79 cpufreq

This commit introduces support for R/W access to the CPU frequency
setting of routerboot on ath79 hardware.

On unsupported hardware, the sysfs attribute will expose the raw tag
value (read-only) to help with reverse engineering its meaning.

Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Tested-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
3 years agogeneric: routerboot sysfs: move tag_show_u32()
Thibaut VARÈNE [Fri, 15 May 2020 16:00:08 +0000 (18:00 +0200)]
generic: routerboot sysfs: move tag_show_u32()

This routine will be shared between hard and soft config drivers.

Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Tested-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
3 years agogeneric: routerboot sysfs: add support for soft_config
Thibaut VARÈNE [Wed, 13 May 2020 20:12:41 +0000 (22:12 +0200)]
generic: routerboot sysfs: add support for soft_config

This driver exposes the data encoded in the "soft_config" flash segment
of MikroTik RouterBOARDs devices. It presents the data in a sysfs folder
named "soft_config" through a set of human-and-machine-parseable
attributes. Changes can be discarded by writing 0 to the 'commit'
attribute, or they can be committed to flash storage by writing 1.

This driver does not reuse any of the existing code previously found in
the "rbcfg" utility and makes this utility obsolete by providing a clean
sysfs interface.

Like "rbcfg", this driver requires 4K_SECTORS support since the flash
partition in which these parameters are stored is typically 4KB in size.

Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Tested-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
3 years agogeneric: routerboot sysfs: move tag_show_string()
Thibaut VARÈNE [Wed, 13 May 2020 16:43:30 +0000 (18:43 +0200)]
generic: routerboot sysfs: move tag_show_string()

This routine will be shared between hard and soft config drivers.
Also use scnprintf() instead of snprintf().

Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Tested-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
3 years agogeneric: platform/mikrotik: rb_hardconfig.c minor fixes
Thibaut VARÈNE [Wed, 13 May 2020 16:42:45 +0000 (18:42 +0200)]
generic: platform/mikrotik: rb_hardconfig.c minor fixes

For the sake of strictly typed code, add a missing const qualifier.
Add a missing return value in error path.
Check the return value of mtd_read(), for good measure.
Also demote the error printks of failed sysfs file creation to warn
level since they are not fatal in the init() sequence.
Finally, add a note regarding PAGE_SIZE and clarify a comment.

Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Tested-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
3 years agogeneric: platform/mikrotik: reorder Kconfig
Thibaut VARÈNE [Sat, 16 May 2020 06:14:48 +0000 (08:14 +0200)]
generic: platform/mikrotik: reorder Kconfig

The depends and select should apply to the sysfs driver, not the meta
config.

Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Tested-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
3 years agocypress-firmware: add PROVIDES sections
Álvaro Fernández Rojas [Thu, 28 May 2020 08:26:52 +0000 (10:26 +0200)]
cypress-firmware: add PROVIDES sections

Some firmwares are already provided by linux-firmware.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agobcm27xx: update patches from RPi foundation
Álvaro Fernández Rojas [Wed, 27 May 2020 13:12:04 +0000 (15:12 +0200)]
bcm27xx: update patches from RPi foundation

bcm2708: boot tested on RPi B+ v1.2
bcm2709: boot tested on RPi 3B v1.2
bcm2710: boot tested on RPi 3B v1.2
bcm2711: boot tested on RPi 4B v1.1 4G

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agobcm27xx-gpu-fw: update to latest version
Álvaro Fernández Rojas [Thu, 28 May 2020 07:43:02 +0000 (09:43 +0200)]
bcm27xx-gpu-fw: update to latest version

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agobcm27xx: remove linux 4.19 support
Álvaro Fernández Rojas [Wed, 27 May 2020 15:29:45 +0000 (17:29 +0200)]
bcm27xx: remove linux 4.19 support

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agoath79: add support for COMFAST CF-E130N v2
Pavel Balan [Fri, 27 Mar 2020 03:32:55 +0000 (03:32 +0000)]
ath79: add support for COMFAST CF-E130N v2

This patch adds support for the COMFAST CF-E130N v2, an outdoor wireless
CPE with a single Ethernet port and a 802.11bgn radio.

Specifications:

 - QCA9531 SoC
 - 1x 10/100 Mbps Ethernet with PoE-in support
 - 64 MB of RAM (DDR2)
 - 16 MB of FLASH
 - 5 dBi built-in antenna
 - POWER/LAN/WLAN green LEDs
 - 4x RSSI LEDs (2x red, 2x green)
 - UART (115200 8N1) and GPIO (J9) headers on PCB

Flashing instructions:

 The original firmware is based on OpenWrt so a sysupgrade image can be
 installed via the stock web GUI.

 The U-boot bootloader also contains a backup TFTP client to upload the
 firmware from. Upon boot, it checks its ethernet network for the IP
 192.168.1.10. Host a TFTP server and provide the image to be flashed as
 file firmware_auto.bin.

MAC address setup:

The art partition contains four consecutive MAC addresses:

0x0    aa:bb:cc:xx:xx:c4
0x6    aa:bb:cc:xx:xx:c6
0x1002 aa:bb:cc:xx:xx:c5
0x5006 aa:bb:cc:xx:xx:c7

However, the manufacturer in its infinite wisdom decided that one address
is enough and both eth0 and WiFi get the MAC address from 0x0 (yes, that's
overwriting the existing and valid address in 0x1002). This is obviously
also the address on the device's label.

Signed-off-by: Pavel Balan <admin@kryma.net>
[fix configs partition, fix IMAGE_SIZE, add MAC address comment, rename
ATH_SOC to SOC]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoath79: replace tab after DT label by space
Adrian Schmutzler [Wed, 27 May 2020 22:48:39 +0000 (00:48 +0200)]
ath79: replace tab after DT label by space

The common separator in this case is a single space.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoramips: fix LED DT label for Zyxel Keenetic Start
Adrian Schmutzler [Wed, 27 May 2020 16:30:56 +0000 (18:30 +0200)]
ramips: fix LED DT label for Zyxel Keenetic Start

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agomusl: restore lock skipping for mostly-singlethreaded programs, and related patches
Matthias Schiffer [Sat, 23 May 2020 19:17:15 +0000 (21:17 +0200)]
musl: restore lock skipping for mostly-singlethreaded programs, and related patches

The remainder of the patch series proposed by upstream [2] for the locking
synchronization issue [1].

[1] https://www.openwall.com/lists/musl/2020/05/22/3
[2] https://www.openwall.com/lists/musl/2020/05/22/10

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
3 years agomusl: fix locking synchronization bug
Matthias Schiffer [Sat, 23 May 2020 19:16:44 +0000 (21:16 +0200)]
musl: fix locking synchronization bug

Import proposed upstream fix [2] for the critical locking
synchronization bug recently found in musl [1].

This affects all programs that are temporarily multithreaded, but then
return to single-threaded operation.

[1] https://www.openwall.com/lists/musl/2020/05/22/3
[2] https://www.openwall.com/lists/musl/2020/05/22/10

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
3 years agoath79: increase spi clock for D-Link DIR-842
Sebastian Schaper [Tue, 19 May 2020 10:40:17 +0000 (12:40 +0200)]
ath79: increase spi clock for D-Link DIR-842

AHB is 258 MHz for this device (CPU_PLL / 3), but there is no difference
between 64 MHz and 50 MHz for spi-max-frequency, thus increase to 50 MHz.

Tested on revisions C1 and C3.

Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
3 years agoath79: define switch reset-gpios for D-Link DIR-842
Sebastian Schaper [Tue, 19 May 2020 10:38:21 +0000 (12:38 +0200)]
ath79: define switch reset-gpios for D-Link DIR-842

GPIO 11 needs to be pulled high for the external gigabit switch to work,
this is currently solved via gpio-hog. Replace with phy0 reset-gpios.

Tested on revisions C1 and C3. Reset button is still working for reboot,
to enter failsafe, and to enter bootloader http recovery.

Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
3 years agoath79: fix LEDs for D-Link DIR-842
Sebastian Schaper [Tue, 19 May 2020 10:34:53 +0000 (12:34 +0200)]
ath79: fix LEDs for D-Link DIR-842

The device has a total of 8 LEDs, 5 of which are controlled by the switch
(LAN 1-4, WAN). Only power, wifi and wps are controlled by the SoC.

 * led_power is on GPIO 5 (not 15), boot flashing sequence is now visible
 * remove led 'internet', since it is only connected to the switch
 * remove ucidef_set_led_switch for WAN from 01_leds, as it has no effect

Tested on revisions C1 and C3.

Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
[adjust commit title]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoglibc: update to latest 2.31 commit (BZ #25976, BZ #25824)
Hans Dedecker [Tue, 26 May 2020 20:21:46 +0000 (22:21 +0200)]
glibc: update to latest 2.31 commit (BZ #25976, BZ #25824)

3a44844c97 nss_compat: internal_end*ent may clobber errno, hiding ERANGE [BZ #25976]
c839175267 aarch64: fix strcpy and strnlen for big-endian [BZ #25824]

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
3 years agoramips: create shared DTSI for DIR-810L and TEW-810DR
Adrian Schmutzler [Tue, 26 May 2020 19:44:54 +0000 (21:44 +0200)]
ramips: create shared DTSI for DIR-810L and TEW-810DR

These devices seem to have the same board, so let's have a common
file.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoramips: add support for TRENDnet TEW-810DR
J. Scott Heppler [Tue, 26 May 2020 01:24:40 +0000 (18:24 -0700)]
ramips: add support for TRENDnet TEW-810DR

Specifications:

* MediaTek MT7620A (580 Mhz)
* 8 MB of FLASH
* 64 MB of RAM
* 2.4Ghz and 5.0Ghz radios
* 5x 10/100 Mbps Ethernet (1 WAN and 4 LAN)
* UART header on PCB (57600 8n1)
* Green/Orange Power LEDs illuminating a Power-Button Lens
* Green/Orange Internet LEDs GPIO controlled illuminating a Globe/Internet Lens
* 3x button - wps, power and reset
* U-boot bootloader

Installation:

The sysupgrade.bin image is reported to be OEM web flashed with an ncc_att_hwid
appended.  ncc_att_hwid is a 32bit binary in the GPL Source download for either
the TEW-810DR or DIR-810L and is located at
source/user/wolf/cameo/ncc/hostTools.

The invocation is: ncc_att_hwid -f tew-810dr-squashfs-factory.bin -a -m "TEW-810DR" -H "1.0R" -r "WW" -c "1.0"

This may need to be altered if your hardware version is "1.1R".

The image can also be directly flashed via serial tftp:
1.  Load *.sysupgrade.bin to your tftp server directory and rename for
    convenience.
2.  Set a static ip 192.168.10.100.
3.  NIC cable to a lan port.
4.  Serial connection parameters 57600,8N1
5.  Power on the TEW-810 and press 4 for a u-boot command line prompt.
6.  Verify IP's with U-Boot command "printenv".
7.  Adjust tftp settings if needed per the tftp documentation
8.  Boot the tftp image to test the build.
9.  If the image loads, reset your server ip to 192.168.1.10 and restart network.
10. Log in to Luci, 192.168.1.1, and flash the *sysupgrade.bin image.

Notes:

The only valid MAC address is found in 0x28 of the factory partition.
Other typical offsets/caldata only contain example data: 00:11:22:00:0f:xx

Signed-off-by: J. Scott Heppler <shep971@centurylink.net>
[remove "link rx tx" in 01_leds, format and extend commit message,
fix DTS led node names]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agorpcd: update to latest Git HEAD
Jo-Philipp Wich [Tue, 26 May 2020 14:08:15 +0000 (16:08 +0200)]
rpcd: update to latest Git HEAD

078bb57 uci: reset uci_ptr flags when merging options during section add
3df62bc session: deny access if password login is disabled

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
3 years agouboot-envtools: ath79: add Netgear WNDR4300SW
Stijn Segers [Tue, 26 May 2020 11:28:18 +0000 (13:28 +0200)]
uboot-envtools: ath79: add Netgear WNDR4300SW

Add Netgear WNDR4300SW to the list of supported boards.

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
3 years agoath79/mikrotik: add missing kernel config symbol for 5.4
Roger Pueyo Centelles [Tue, 26 May 2020 08:51:24 +0000 (10:51 +0200)]
ath79/mikrotik: add missing kernel config symbol for 5.4

The UBIFS_FS_ZSTD is exposed when UBIFS is enabled.

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
[adjust commit title]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agolibubox: update to the latest version
Felix Fietkau [Tue, 26 May 2020 08:45:06 +0000 (10:45 +0200)]
libubox: update to the latest version

86818eaa976b blob: make blob_parse_untrusted more permissive
cf2e8eb485ab tests: add fuzzer seed file for crash in blob_len
c2fc622b771f blobmsg: fix length in blobmsg_check_array
639c29d19717 blobmsg: simplify and fix name length checks in blobmsg_check_name
66195aee5042 blobmsg: fix missing length checks

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agokernel: properly insert local mtd partition parsers
Adrian Schmutzler [Mon, 25 May 2020 16:08:25 +0000 (18:08 +0200)]
kernel: properly insert local mtd partition parsers

Between 4.19 and 5.4, the kernel moved the partition parsers into
the parsers subdirectory. This led to some necessary rebasing of
our local patches for parsers, which partially has been performed
without caring about where the code was inserted.

This commit tries to adjust our local patches so that parsers are
inserted at the "proper" positions with respect to alphabetic sorting
(if possible). Thus, the commit is cosmetic.

While this might look useless now, it will make life easier when
adding other parsers in the future or for rebasing on kernel changes.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agokernel: remove a bunch of trailing whitespaces
Adrian Schmutzler [Mon, 25 May 2020 16:53:23 +0000 (18:53 +0200)]
kernel: remove a bunch of trailing whitespaces

These trailing whitespaces were reported during kernel patch refresh.

While at it, harmonize a few indents as well.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agokernel: drop backported gpio emulated open drain output fix
Adrian Schmutzler [Mon, 25 May 2020 16:24:54 +0000 (18:24 +0200)]
kernel: drop backported gpio emulated open drain output fix

This patch has been backported to stable kernel 5.4 already.

Remove our local patch explicitly now, as by applying the patch
(or refreshing) the relevant code is actually added a second time.

Refresh remaining patches as well.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoocteon: set 5.4 as default kernel
Adrian Schmutzler [Mon, 25 May 2020 10:04:55 +0000 (12:04 +0200)]
octeon: set 5.4 as default kernel

octeon has provided 5.4 as testing kernel for some time now, let's
switch to 5.4 to have a bigger audience for testing.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoocteontx: remove support for kernel 4.14
Adrian Schmutzler [Mon, 25 May 2020 10:02:08 +0000 (12:02 +0200)]
octeontx: remove support for kernel 4.14

Kernel 5.4 is stable for about two months now and there is only a few
patches anyway, so this is mostly upstream stuff. Therefore, it does
not look like we need to keep old 4.14 around any longer.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoarchs38: remove support for kernel 4.14
Adrian Schmutzler [Mon, 25 May 2020 09:53:34 +0000 (11:53 +0200)]
archs38: remove support for kernel 4.14

Kernel 5.4 is stable for about two months now and there is only one
patch anyway, so this is mostly upstream stuff. Therefore, it does
not look like we need to keep old 4.14 around any longer.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agolayerscape: remove support for kernel 4.14
Yangbo Lu [Fri, 22 May 2020 07:08:54 +0000 (15:08 +0800)]
layerscape: remove support for kernel 4.14

Remove support for kernel 4.14, and NXP Layerscape SDK
had not supported kernel 4.14 since LSDK-20.04 either.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
3 years agobcm63xx: ar-5315u: expose LEDs through controller
Álvaro Fernández Rojas [Sun, 24 May 2020 18:19:21 +0000 (20:19 +0200)]
bcm63xx: ar-5315u: expose LEDs through controller

Exposing LEDs through LED controller instead of gpio-leds takes
advantage of HW blinking.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agobcm63xx: ar-5387un: expose LEDs through controller
Álvaro Fernández Rojas [Sun, 24 May 2020 18:17:34 +0000 (20:17 +0200)]
bcm63xx: ar-5387un: expose LEDs through controller

Exposing LEDs through LED controller instead of gpio-leds takes
advantage of HW blinking.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>