Commit Graph

50954 Commits

Author SHA1 Message Date
Rosen Penev b7af850bd2 tools/mtools: update to 4.0.35
Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry-picked from commit aae4bf7c62)
2022-02-16 20:38:47 +01:00
Felix Fietkau 5d553d8767 tools/fakeroot: fix unresolved symbols on arm64 macOS
The $INODE64 symbol variants are not present, since the base system
always uses 64-bit file offsets

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 53ebacacf9)
2022-02-16 20:38:47 +01:00
Sergey V. Lobanov c8d6a7c84e tools/fakeroot: fix build on MacOS arm64
Added patch for MacOS without 32 bit inodes support
(__DARWIN_ONLY_64_BIT_INO_T is true)

This patch based on discussion https://github.com/archmac/bootstrap/issues/4

Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
(cherry-picked from commit 8fedc17d01)
2022-02-16 20:38:47 +01:00
Felix Fietkau 83bf22ba2e tools/fakeroot: explicitly pass CPP variable
For some reason, the generated configure script fails to properly set up
the internal preprocessor command variable, causing the host OS check for
Darwin to fail after the last update.
Explicitly setting CPP fixes this issue

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 48e209e5c5)
2022-02-16 20:38:47 +01:00
Rafał Miłecki 230ec4c69c bcm4908: backport watchdog and I2C changes
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 923cc869a6)
2022-02-16 09:15:52 +01:00
Rafał Miłecki 87b9ba9ed9 bcm4908: backport first 5.18 DTS changes
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit da8b720b0e)
2022-02-16 09:15:52 +01:00
Rafał Miłecki e6a718239f bcm4908: backport bcm_sf2 patch for better LED registers support
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 840f07e532)
2022-02-16 09:15:52 +01:00
Rafał Miłecki e6aaa061d0 bcm4908: backport BCM4908 pinctrl driver
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit b014589167)
2022-02-16 09:15:48 +01:00
Hauke Mehrtens 59e7ae8d65 tcpdump: Fix CVE-2018-16301
This fixes the following security problem:
The command-line argument parser in tcpdump before 4.99.0 has a buffer
overflow in tcpdump.c:read_infile(). To trigger this vulnerability the
attacker needs to create a 4GB file on the local filesystem and to
specify the file name as the value of the -F command-line argument of
tcpdump.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 8f5875c4e2)
2022-02-13 00:23:30 +01:00
Hauke Mehrtens de948a0bce glibc: update to latest 2.33 HEAD
14f2867b57 Fix failing nss/tst-nss-files-hosts-long with local resolver
d27d1e4d13 posix: Fix attribute access mode on getcwd [BZ #27476]
4b95183785 S390: Add PCI_MIO and SIE HWCAPs
6090cf1330 elf: Replace nsid with args.nsid [BZ #27609]
9edf29fd72 s390: Use long branches across object boundaries (jgh instead of jh)
94c91ce231 support: Add xpthread_kill
f9592d65f2 nptl: Do not set signal mask on second setjmp return [BZ #28607]
1cc490adca powerpc64[le]: Fix CFI and LR save address for asm syscalls [BZ #28532]
c76a0ba878 gconv: Do not emit spurious NUL character in ISO-2022-JP-3 (bug 28524)
c493f6a0e4 powerpc64[le]: Allocate extra stack frame on syscall.S
55b99e9ed0 powerpc: Fix unrecognized instruction errors with recent GCC
a51b76b71e x86: use default cache size if it cannot be determined [BZ #28784]
f10e992e8d socket: Add the __sockaddr_un_set function
4653cd9e36 CVE-2022-23219: Buffer overflow in sunrpc clnt_create for "unix" (bug 22542)
dae9a8e7f6 sunrpc: Test case for clnt_create "unix" buffer overflow (bug 22542)
4f4452721d <shlib-compat.h>: Support compat_symbol_reference for _ISOMAC
0f70b829f8 CVE-2022-23218: Buffer overflow in sunrpc svcunix_create (bug 28768)
5cab4e3f3a powerpc: Fix unrecognized instruction errors with recent binutils
ac148bdd88 elf: Fix glibc-hwcaps priorities with cache flags mismatches [BZ #27046]
e081bafcb1 support: Add helpers to create paths longer than PATH_MAX
e41e5b97e3 realpath: Set errno to ENAMETOOLONG for result larger than PATH_MAX [BZ #28770]
f63cb3cf72 tst-realpath-toolong: Fix hurd build
46a70c49ba support: Add xclone
bcdde07537 getcwd: Set errno to ERANGE for size == 1 (CVE-2021-3999)
41980af2d7 realpath: Avoid overwriting preexisting error (CVE-2021-3998)
48d9161e02 Linux: Detect user namespace support in io/tst-getcwd-smallbuff
06ce5fbd6d support: Fix xclone build failures on ia64 and hppa
d251ad533e aarch64: align stack in clone [BZ #27939]
3d52239b30 x86: Fix __wcsncmp_avx2 in strcmp-avx2.S [BZ# 28755]
86c153d092 NEWS: Add a bug fix entry for BZ #28755
6b7b6c7514 test-strnlen.c: Initialize wchar_t string with wmemset [BZ #27655]
a744a0a3fe test-strnlen.c: Check that strnlen won't go beyond the maximum length
f0a2b67147 x86: Set Prefer_No_VZEROUPPER and add Prefer_AVX2_STRCMP
9cee072f8f x86-64: Add ifunc-avx2.h functions with 256-bit EVEX
06d1aed51b x86-64: Add strcpy family functions with 256-bit EVEX
1697e739ef x86-64: Add memmove family functions with 256-bit EVEX
47bf9f38bb x86-64: Add memset family functions with 256-bit EVEX
15bae38c8b x86-64: Add memcmp family functions with 256-bit EVEX
0598a25cbe x86-64: Add AVX optimized string/memory functions for RTM
82f1ba9af7 x86: Add string/memory function tests in RTM region
763cea698b x86-64: Use ZMM16-ZMM31 in AVX512 memset family functions
d49105cc7a x86-64: Use ZMM16-ZMM31 in AVX512 memmove family functions
31dd3e3cb3 x86-64: Fix ifdef indentation in strlen-evex.S
902af2f5ee NEWS: Add a bug fix entry for BZ #27457
e09c377806 x86: Optimize memchr-avx2.S
453ed0a0f2 x86: Fix overflow bug with wmemchr-sse2 and wmemchr-avx2 [BZ #27974]
b72b89705e x86: Optimize strlen-avx2.S
355afae940 x86: Optimize memchr-evex.S
3dea108f60 x86-64: Fix an unknown vector operation in memchr-evex.S
5697e2dda8 x86-64: Move strlen.S to multiarch/strlen-vec.S
3ac5a7fe8b x86-64: Add wcslen optimize for sse4.1
cef3bffade x86: Fix overflow bug in wcsnlen-sse4_1 and wcsnlen-avx2 [BZ #27974]
8a3a0177c7 x86: Optimize strlen-evex.S
2b00ee820a String: Add overflow tests for strnlen, memchr, and strncat [BZ #27974]
25941de34e NEWS: Add a bug fix entry for BZ #27974
3e2a15c666 x86-64: Require BMI2 for __strlen_evex and __strnlen_evex
5cb6edb6cd x86: Copy IBT and SHSTK usable only if CET is enabled
0a5f5e2dc1 x86: Check RTM_ALWAYS_ABORT for RTM [BZ #28033]
54fdfa2b33 x86: Black list more Intel CPUs for TSX [BZ #27398]
1b8f2456b9 x86: Use CHECK_FEATURE_PRESENT to check HLE [BZ #27398]
260360e89b x86: Remove wcsnlen-sse4_1 from wcslen ifunc-impl-list [BZ #28064]
1956ad4930 x86-64: Test strlen and wcslen with 0 in the RSI register [BZ #28064]
78d25827ae Linux: Simplify __opensock and fix race condition [BZ #28353]
9495d729f6 hurd if_index: Explicitly use AF_INET for if index discovery
55446dd8a2 socket: Do not use AF_NETLINK in __opensock

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-02-13 00:23:30 +01:00
Hauke Mehrtens 0c0db6e66b hostapd: Apply SAE/EAP-pwd side-channel attack update 2
This fixes some recent security problems in hostapd.
See here for details: https://w1.fi/security/2022-1
* CVE-2022-23303
* CVE-2022-23304

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-02-13 00:23:30 +01:00
Sergey V. Lobanov 5b13b0b02c wolfssl: update to 5.1.1-stable
Bump from 4.8.1-stable to 5.1.1-stable

Detailed release notes: https://github.com/wolfSSL/wolfssl/releases

Upstreamed patches:
001-Maths-x86-asm-change-asm-snippets-to-get-compiling.patch -
 fa8f23284d
002-Update-macro-guard-on-SHA256-transform-call.patch -
 f447e4c1fa

Refreshed patches:
100-disable-hardening-check.patch
200-ecc-rng.patch

CFLAG -DWOLFSSL_ALT_CERT_CHAINS replaced to --enable-altcertchains
configure option

The size of the ipk changed on aarch64 like this:
491341 libwolfssl4.8.1.31258522_4.8.1-stable-7_aarch64_cortex-a53.ipk
520322 libwolfssl5.1.1.31258522_5.1.1-stable-1_aarch64_cortex-a53.ipk

Tested-by: Alozxy <alozxy@users.noreply.github.com>
Acked-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
(cherry picked from commit 93d91197b9)
2022-02-13 00:23:08 +01:00
Sergey V. Lobanov 7d376e6e52 libs/wolfssl: add SAN (Subject Alternative Name) support
x509v3 SAN extension is required to generate a certificate compatible with
chromium-based web browsers (version >58)

It can be disabled via unsetting CONFIG_WOLFSSL_ALT_NAMES

Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
(cherry picked from commit dfd695f4b9)
2022-02-12 20:27:27 +01:00
Stan Grishin 5ea2e1d5ba wolfssl: enable ECC Curve 25519 by default
* fixes https://github.com/openwrt/packages/issues/16652
 see https://github.com/openwrt/packages/issues/16674#issuecomment-934983898

Signed-off-by: Stan Grishin <stangri@melmac.net>
(cherry picked from commit 05a7af9ca0)
2022-02-12 20:25:48 +01:00
Hauke Mehrtens 4108d02a29 ustream-ssl: update to Git version 2022-01-16
868fd88 ustream-openssl: wolfSSL: Add compatibility for wolfssl >= 5.0

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit e74529552c)
2022-02-12 20:02:21 +01:00
Hauke Mehrtens 32d50a1281 mbedtls: Update to version 2.16.12
This fixes the following security problems:
* Zeroize several intermediate variables used to calculate the expected
  value when verifying a MAC or AEAD tag. This hardens the library in
  case the value leaks through a memory disclosure vulnerability. For
  example, a memory disclosure vulnerability could have allowed a
  man-in-the-middle to inject fake ciphertext into a DTLS connection.
* Fix a double-free that happened after mbedtls_ssl_set_session() or
  mbedtls_ssl_get_session() failed with MBEDTLS_ERR_SSL_ALLOC_FAILED
  (out of memory). After that, calling mbedtls_ssl_session_free()
  and mbedtls_ssl_free() would cause an internal session buffer to
  be free()'d twice. CVE-2021-44732

The sizes of the ipk changed on MIPS 24Kc like this:
182454 libmbedtls12_2.16.11-2_mips_24kc.ipk
182742 libmbedtls12_2.16.12-1_mips_24kc.ipk

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 57f38e2c82)
2022-02-12 19:42:08 +01:00
Hauke Mehrtens c6ddf8d502 kernel: bump 5.4 to 5.4.179
Many changes were done in drivers/pinctrl/bcm/pinctrl-bcm2835.c between
5.4.171 and 5.4.179.
The following 3 patches do not apply any more:
* target/linux/bcm27xx/patches-5.4/950-0316-pinctrl-bcm2835-Add-support-for-BCM2711-pull-up-func.patch
  This was already integrated in kernel v5.4-rc1, it was never needed.

* target/linux/bcm27xx/patches-5.4/950-0328-Revert-pinctrl-bcm2835-Pass-irqchip-when-adding-gpio.patch
* target/linux/bcm27xx/patches-5.4/950-0362-pinctrl-bcm2835-Change-init-order-for-gpio-hogs.patch
I think these were done to fix the problem which was really fixed in
commit 75278f1aff5e ("pinctrl: bcm2835: Change init order for gpio
hogs") from v5.4.175

target/linux/generic/backport-5.4/716-v5.5-net-sfp-move-fwnode-parsing-into-sfp-bus-layer.patch
Move fwnode_device_is_available to the same position as in kernel 5.10.

target/linux/layerscape/patches-5.4/302-dts-0083-arm64-ls1028a-qds-correct-bus-of-rtc.patch
Applied in commit 65816c1034769e714edb70f59a33bc5472d9e55f ("arm64: dts:
ls1028a-qds: move rtc node to the correct i2c bus")

Compile-tested: lantiq/xrx200, bcm27xx/bcm2710
Run-tested: lantiq/xrx200

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-02-12 19:41:39 +01:00
Sven Eckelmann a4c0c031b8 ath79: Add support for OpenMesh OM5P-AC v2
Device specifications:
======================

* Qualcomm/Atheros QCA9558 ver 1 rev 0
* 720/600/200 MHz (CPU/DDR/AHB)
* 128 MB of RAM
* 16 MB of SPI NOR flash
  - 2x 7 MB available; but one of the 7 MB regions is the recovery image
* 2T2R 2.4 GHz Wi-Fi (11n)
* 2T2R 5 GHz Wi-Fi (11ac)
* 4x GPIO-LEDs (3x wifi, 1x power)
* 1x GPIO-button (reset)
* external h/w watchdog (enabled by default))
* TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX)
* TI tmp423 (package kmod-hwmon-tmp421) for temperature monitoring
* 2x ethernet
  - eth0
    + AR8035 ethernet PHY (RGMII)
    + 10/100/1000 Mbps Ethernet
    + 802.3af POE
    + used as LAN interface
  - eth1
    + AR8031 ethernet PHY (RGMII)
    + 10/100/1000 Mbps Ethernet
    + 18-24V passive POE (mode B)
    + used as WAN interface
* 12-24V 1A DC
* internal antennas

This device support is based on the partially working stub from commit
53c474abbd ("ath79: add new OF only target for QCA MIPS silicon").

Flashing instructions:
======================

Various methods can be used to install the actual image on the flash.
Two easy ones are:

ap51-flash
----------

The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be
used to transfer the image to the u-boot when the device boots up.

initramfs from TFTP
-------------------

The serial console must be used to access the u-boot shell during bootup.
It can then be used to first boot up the initramfs image from a TFTP server
(here with the IP 192.168.1.21):

   setenv serverip 192.168.1.21
   setenv ipaddr 192.168.1.1
   tftpboot 0c00000 <filename-of-initramfs-kernel>.bin && bootm $fileaddr

The actual sysupgrade image can then be transferred (on the LAN port) to the
device via

  scp <filename-of-squashfs-sysupgrade>.bin root@192.168.1.1:/tmp/

On the device, the sysupgrade must then be started using

  sysupgrade -n /tmp/<filename-of-squashfs-sysupgrade>.bin

Signed-off-by: Sven Eckelmann <sven@narfation.org>
(cherry picked from commit 1699c1dc7f)
2022-02-11 00:28:52 +01:00
Paul Spooren 6d266ef158 imagebuilder: fix local packages/ folder
This commit fixes commit "2999f810ff: build,IB: include kmods only in
local builds" which cause the local packages/ folder only to be added
for local builds but no longer for ImageBuilder created by the Buildbot.

The commits intention was to use remote kmods repositories rather than
storing them locally. Accidentally the entire handling of the local
`packages/` was removed.

Re-add the folder and include a README describing what it can be used
for.

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit 15e55a2190)
Fixes: #5068
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-02-10 20:06:04 +01:00
Rafał Miłecki 97b95ef8b9
uci: update to the latest master
4b3db11 cli: add option for changing save path

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 05a4273058)
2022-01-23 11:30:30 +01:00
Daniel Golle 1472a8fa42 procd: update to git HEAD
945d0d7 utils: fix C style in header file
 2cfc26f inittab: detect active console from kernel if no console= specified

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit ffeb37047e)
2022-01-18 15:09:15 +01:00
Daniel Golle 015f170fe6 procd: update to git HEAD
64e9f3a procd: fix compilation with newer musl

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 1cd4a02c8e)
2022-01-18 15:09:15 +01:00
Karel Kočí cd5ba0cfbb ustream-ssl: variants conflict with each other
This adds conflicts between variants of libustream pacakge.
They provide the same file and thus it should not be possible to install
them side by side.

Signed-off-by: Karel Kočí <karel.koci@nic.cz>
(cherry picked from commit 219e17a350)
2022-01-16 16:28:46 +01:00
David Bauer 6eced97ce4 lantiq: flag FritzBox 7360 family buttons active-low
All buttons of the FritzBox 7360 family are active-low, not active-high.
Corrent the GPIO flag. This fixes release triggers upon push of a button.

Reported-by: Jan-Niklas Burfeind <git@aiyionpri.me>
Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 3154537864)
2022-01-15 22:49:28 +01:00
Matthias Schiffer b59f3b08b4
firmware-utils: tplink-safeloader: fix Archer A7v5 factory flashing from vendor fw > v1.1.x
Apply the same fix that was previously done for the Archer C7v5 to the
A7v5 as well to make the web UI accept our images again.

This is a backport of firmware-utils
commit 84dbf8ee49f522d3a4528763c9473cf3dd7c8c52.

Tested-by: Luflosi <luflosi@luflosi.de>
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2022-01-14 23:15:05 +01:00
David Bauer 43d105ec2a kernel: bump 5.4 to 5.4.171
Compile-tested: ath79-generic ipq40xx-generic
Run-tested: ath79-generic

Signed-off-by: David Bauer <mail@david-bauer.net>
2022-01-13 20:30:59 +01:00
Koen Vandeputte 1db847488d ath79: rb912: fix pll init issues
It was reported that some rb912 boards (ar934x) have issues with some ethernet speeds.
Investigation shows that the board failed to adapt the ethernet pll values as shown here:

[    5.284359] ag71xx 19000000.eth: failed to read pll-handle property

added custom prints in code and triggering a link switch:

[   62.821446] Atheros AG71xx: fast reset
[   62.826442] Atheros AG71xx: update pll 2
[   62.830494] Atheros AG71xx: no pll regmap!

Comparison with another very similar board (rb922 - QCA955x) showed a missing
reference clock frequency in dts, which seems to cause a pll init issue.
Unfortunately, no errors are printed when this occurs.

Adding the frequency property fixes the pll init as it can be parsed now
by the ethernet driver.

[   55.861407] Atheros AG71xx: fast reset
[   55.866403] Atheros AG71xx: update pll 2
[   55.870462] Atheros AG71xx: ath79_set_pllval: regmap: 0x81548000, pll_reg: 0x2c, pll_val: 0x02000000

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
(cherry picked from commit 2a00054618)
2022-01-13 10:04:06 +01:00
Vladimir Markovets 6ced8cad8e kernel: backport workaround for Realtek RTL8672 and RTL9601C chips
Adds support for GPON SFP modules based on the Realtek RTL8672 and
RTL9601C chips, including but not limited to:
* V-SOL V2801F
* C-Data FD511GX-RM0
* OPTON GP801R
* BAUDCOM BD-1234-SFM
* CPGOS03-0490 v2.0
* Ubiquiti U-Fiber Instant
* EXOT EGS1

Signed-off-by: Vladimir Markovets <abam_a@yahoo.com>
(cherry picked from commit f032601ed7)
2022-01-08 21:31:15 +01:00
Karel Kočí 77ee281a3e kernel: add kmod-ledtrig-pattern
This allows LEDs to be triggered by custom pattern and not just
predefined ones.

Signed-off-by: Karel Kočí <karel.koci@nic.cz>
(cherry picked from commit 507911f477)
2022-01-08 21:31:15 +01:00
Evgeny Kolesnikov aa2de44cdd kernel: fix AutoLoad parameter for uleds module
The name of the module is 'uleds', not 'leds-uleds'.

Signed-off-by: Evgeny Kolesnikov <evgenyz@gmail.com>
[improve commit title]
Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 3e9318f3c0)
2022-01-08 21:31:15 +01:00
Keith T. Garner bc37a699e5 kernel: add kmod-leds-uleds
The allows userspace LEDs to be created and controlled. This can be useful
for testing triggers and can also be used to implement virtual LEDs.

Signed-off-by: Keith T. Garner <kgarner@kgarner.com>
[squash fixup commit and improve option wording]
Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit 6a37286c2a)
2022-01-08 21:31:15 +01:00
Marek Behún 96b5962704 mvebu: remove patch that was applied into linux stable
The patch
  PCI: aardvark: Don't touch PCIe registers if no card connected
was applied into Linux stable version 5.4.163.

Remove it from patches-5.4.

(It applied even though it was applied already, resulting in repeated
 code.)

Fixes: 14940aee45 ("kernel: bump 5.4 to 5.4.163")
Signed-off-by: Marek Behún <marek.behun@nic.cz>
2022-01-08 21:31:15 +01:00
Eneas U de Queiroz 5beaa75d94 openssl: bump to 1.1.1m
This is a bugfix release.  Changelog:

  *) Avoid loading of a dynamic engine twice.
  *) Fixed building on Debian with kfreebsd kernels
  *) Prioritise DANE TLSA issuer certs over peer certs
  *) Fixed random API for MacOS prior to 10.12

Patches were refreshed.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit def9565be6)
2022-01-03 22:09:45 +01:00
Rafał Miłecki 93842b20dc bcm4908: include ATF in bootfs images
It's required for proper booting.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 65974aa18b)
2022-01-03 14:28:13 +01:00
Rafał Miłecki 18b10db2f1 arm-trusted-firmware-bcm63xx: add ATF for Broadcom devices
Right now it includes bcm4908 variant only that is required by BCM4908
family devices with U-Boot.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit f18288e267)
2022-01-03 14:28:13 +01:00
Rafał Miłecki 739e359241 kernel: backport support for multicolor & RGB LEDs to 5.4
This is a requirement for backporting DT files defining such LEDs.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 85ad48c957)
2022-01-03 14:28:13 +01:00
Rafał Miłecki 608c7dccf2 bcm4908: sysupgrade: add pkgtb format support
BCM4908 devices with U-Boot use pkgtb firmware format. It's based on
U-Boot's FIT: DTB with configurations, images & embedded data.

This format contains bootfs, rootfs and optionally a first stage U-Boot
loader. Contained images need to be extracted & flashed.

Broadcom used two sets of firmwares: main & backup. It uses UBI volumes
"metadata1" & "metadata2" for storing U-Boot env variables with info
about flashed images.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 5f05795aa7)
2022-01-03 14:28:13 +01:00
Rafał Miłecki b6ed2641df busybox: backport dd support for iflag=count_bytes
It's very useful flag for handling various formats in sysupgrade. This
commit comes from the 1.34.0 release.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-01-03 14:28:13 +01:00
Rafał Miłecki 7e4485fd5b bcm4908: add uboot-envtools to default packages
It's required by sysupgrade to access UBI metadata partitions.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 444b4ea4a4)
2022-01-03 14:28:13 +01:00
Rafał Miłecki 4cd5d11fa3 bcm4908: add fdt-utils to default packages
It's required by sysupgrade.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 30b93672ec)
2022-01-03 14:28:13 +01:00
Rafał Miłecki 1d4a28d5e1 dtc: support printing binary data with fdtget
It's needed for extracting binary images.

Cc: Yousong Zhou <yszhou4tech@gmail.com>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit a2cf659ad8)
2022-01-03 14:28:13 +01:00
Rafał Miłecki ce5d0378bf dtc: import package for dtc & fdt from packages feed
fdt* utils are needed by targets that use U-Boot FIT images for
sysupgrade. It includes all recent BCM4908 SoC routers as Broadcom
switched from CFE to U-Boot.

fdtget is required for extracting images (bootfs & rootfs) from
Broadcom's ITB. Extracted images can be then flashed to UBI volumes.

sysupgrade is core functionality so it needs dtc as part of base code
base.

Cc: Yousong Zhou <yszhou4tech@gmail.com>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-01-03 14:28:06 +01:00
Rafał Miłecki 6292d1e354 bcm4908: sysupgrade: refactor handling different firmware formats
This results in setting format specific data (format info, extract
commands) in a single function. It should help maintaining sysupgrade
code.

This change has been tested on Asus GT-AC5300 and Netgear R8000P.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 30b168b9b8)
2022-01-03 14:00:34 +01:00
Rafał Miłecki a00854040d ipq40xx: specify FritzBox 7530 LAN port label numbers
This helps managing LAN ports.

Ref: https://forum.openwrt.org/t/openwrt-21-02-0-second-release-candidate/98026/121
Fixes: 95b0c07a61 ("ipq40xx: add support for FritzBox 7530")
Cc: David Bauer <mail@david-bauer.net>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 3342d574be)
2022-01-03 14:00:34 +01:00
Nick Hainke 27225e3538 kernel: ath10k: provide a build variant for small RAM devices
Based on: 1ac627024d ("kernel: ath10k-ct: provide a build variant for
small RAM devices")

Like described in the ath10k-ct-smallbuffers version, oom-killer gets
triggered frequently by devices with small RAM.

That change is necessary for many community mesh networks which use
ath10k based devices with too little RAM. The -ct driver has been
proven unstable if used with 11s meshing and only wave2 chipsets are
supporting 11s. Freifunk Berlin is nowadays assembling its
firmware-based completely of vanilla OpenWRT with some package additions
which are made through the imagebuilder. Therefore we cannot take the
approach other freifunk communities have taken to maintain that patch
downstream [1]. Other communities consider these devices as broken and
that change would pretty much give those devices a second life [2].
[1] - 450b306e54
[2] - https://github.com/freifunk-gluon/gluon/issues/1988#issuecomment-619532909

Signed-off-by: Simon Polack <spolack+git@mailbox.org>
Signed-off-by: Nick Hainke <vincent@systemli.org>
(cherry picked from commit 694757a08f)
2022-01-02 12:35:21 +01:00
Daniel Golle 104774c3b0
mvebu: puzzle: wan LED and fix default network
Fix default network configuration of the Puzzle-M902 so all LAN ports
are included in the LAN bridge.
Setup network LED to indicate WAN port link status, like vendor
firmware does as well.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit f9782f5bcd)
2022-01-01 22:30:15 +00:00
Daniel Golle 47d82f0710
mvebu: enable Aquantia phy driver for Puzzle devices
While on Linux 5.10 this fixes Ethernet link status on all ports and
makes 2.5G ports usable in 2.5G and 1G full-duplex mode, when using
Linux 5.4 and backported Aquantia phy patches, only 1G mode works on
the 2.5G ports and link speed and duplex are not reported correctly
from the phy in case of 2.5G.
The reasons are probably trivial, but hard to find. As having all
ports work at least in 1G speed instead of having them not work at
all is still better, push this anyway for now.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit f81a06408e)
2022-01-01 22:30:09 +00:00
Daniel Golle 164ed6069c
mvebu: add id for AQR112 Ethernet phy variants
Add ids for AQR112R and AQR112C 2.5G Ethernet PHYs.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-01-01 22:30:03 +00:00
Daniel Golle daf4301071
mvebu: import patch enabling AQR113 PHY
Add PHY ID for the Aquantia AQR113 PHY.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-01-01 22:29:58 +00:00
Daniel Golle ee5750043c
mvebu: import patch enabling AQR112 and AQR412 PHY
Copy and refresh patch enabling AQR112 and AQR412 Ethernet PHY from
layerscape (5.4) target to mvebu (5.4) as AQR112 can also be found
in IEI Puzzle devices.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-01-01 22:29:53 +00:00