openwrt/openwrt.git
20 months agobcm4908: prepare for Asus GT-AX6000 support
Rafał Miłecki [Wed, 20 Jul 2022 18:03:56 +0000 (20:03 +0200)]
bcm4908: prepare for Asus GT-AX6000 support

It isn't tested & Linux DT will surely need more work.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 3f2b2fe084c0019221a17e3217a01c41d003f6fd)

20 months agobcm4908: backport bcmbca DT patches queued for 5.20
Rafał Miłecki [Wed, 20 Jul 2022 16:12:31 +0000 (18:12 +0200)]
bcm4908: backport bcmbca DT patches queued for 5.20

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit d63ef7c90f75393270ec4f5ff1b2563d6bd52066)

20 months agobcm53xx: backport DT changes from 5.17 & 5.18
Rafał Miłecki [Wed, 30 Mar 2022 14:05:55 +0000 (16:05 +0200)]
bcm53xx: backport DT changes from 5.17 & 5.18

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit a721fb9f839b3ca71da275a1c99620ef9342fb28)

20 months agobcm53xx: drop dead upgrade code
Rafał Miłecki [Tue, 29 Mar 2022 14:14:54 +0000 (16:14 +0200)]
bcm53xx: drop dead upgrade code

platform_nand_pre_upgrade() is gone since commit 790692dde2b9
("base-files: drop support for the platform_nand_pre_upgrade()").

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit a6dc0f680d3715322abd7a5dc1426f56274292ac)

20 months agofirewall4: update to latest Git HEAD
Jo-Philipp Wich [Thu, 1 Sep 2022 10:37:58 +0000 (12:37 +0200)]
firewall4: update to latest Git HEAD

f5fcdcf cli: introduce test mode and refuse firewall restart on errors
a540f6d fw4: fix cosmetic issue with per-ruleset and per-table include paths
695e821 doc: fix swapped include positions in nftables.d README

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit ab31ffc425b59afc102f8a3275791c153f39c8f4)

20 months agoucode: update to latest Git HEAD
Jo-Philipp Wich [Mon, 29 Aug 2022 14:02:16 +0000 (16:02 +0200)]
ucode: update to latest Git HEAD

344fa9e lib: extend render() to support function values
89452b2 lib: improve getenv() and split() implementations

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
[fix commit subject]
(cherry picked from commit c6d6306827e9296faad26981996825ce3e90259d)

20 months agomac80211: disable ft-over-ds by default
Felix Fietkau [Tue, 30 Aug 2022 08:57:26 +0000 (10:57 +0200)]
mac80211: disable ft-over-ds by default

Testing has shown it to be very unreliable in variety of configurations.
It is not mandatory, so let's disable it by default until we have a better
solution.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 2984a0420649733662ff95b0aff720b8c2c19f8a)

20 months agoramips: define Yuncore AX820 switch LEDs
Thibaut VARÈNE [Wed, 17 Aug 2022 17:36:41 +0000 (19:36 +0200)]
ramips: define Yuncore AX820 switch LEDs

This patch defines the two switch LED to bring them under user control.

Fixes: 158a5af80102d ("ramips: improve YunCore AX820 LEDs")
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
[rmilecki: leave "label"s in place]
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 7bee10a7d2d16251113147c28dd4548af5c14bab)

20 months agoath79: add support for Extreme Networks WS-AP3805i
Albin Hellström [Thu, 7 Jan 2021 21:51:06 +0000 (22:51 +0100)]
ath79: add support for Extreme Networks WS-AP3805i

Specifications:

 - SoC:    Qualcomm Atheros QCA9557-AT4A
 - RAM:    2x 128MB Nanya NT5TU64M16HG
 - FLASH:  64MB - SPANSION FL512SAIFG1
 - LAN:    Atheros AR8035-A (RGMII GbE with PoE+ IN)
 - WLAN2:  Qualcomm Atheros QCA9557 2x2 2T2R
 - WLAN5:  Qualcomm Atheros QCA9882-BR4A 2x2 2T2R
 - SERIAL: UART pins at J10 (115200 8n1)
           Pinout is 3.3V - GND - TX - RX (Arrow Pad is 3.3V)
 - LEDs: Power (Green/Amber)
   WiFi 5 (Green)
   WiFi 2 (Green)
 - BTN: Reset

Installation:

1. Download the OpenWrt initramfs-image.

Place it into a TFTP server root directory and rename it to 1D01A8C0.img
Configure the TFTP server to listen at 192.168.1.66/24.

2. Connect the TFTP server to the access point.

3. Connect to the serial console of the access point.

Attach power and interrupt the boot procedure when prompted.

Credentials are admin / new2day

4. Configure U-Boot for booting OpenWrt from ram and flash:

 $ setenv boot_openwrt 'setenv bootargs; bootm 0xa1280000'
 $ setenv ramboot_openwrt 'setenv serverip 192.168.1.66;
   tftpboot 0x89000000 1D01A8C0.img; bootm'
 $ setenv bootcmd 'run boot_openwrt'
 $ saveenv

5. Load OpenWrt into memory:

 $ run ramboot_openwrt

6. Transfer the OpenWrt sysupgrade image to the device.

Write the image to flash using sysupgrade:

 $ sysupgrade -n /path/to/openwrt-sysupgrade.bin

Signed-off-by: Albin Hellström <albin.hellstrom@gmail.com>
[rename vendor - minor style fixes - update commit message]
Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit f8c87aa2d27ab405f284dd4357377ab5c893a345)

20 months agokernel: Refresh on 5.10.138
Hauke Mehrtens [Sun, 28 Aug 2022 13:09:23 +0000 (15:09 +0200)]
kernel: Refresh on 5.10.138

Refresh all patches on top of kernel 5.10.138.

The following patches were applied upstream:
 bcm27xx/patches-5.10/950-0311-drm-vc4-Adopt-the-dma-configuration-from-the-HVS-or-.patch
 bcm27xx/patches-5.10/950-0317-vc4_hdmi-Remove-firmware-logic-for-MAI-threshold-set.patch
 bcm27xx/patches-5.10/950-0346-drm-vc4-A-present-but-empty-dmas-disables-audio.patch
 bcm27xx/patches-5.10/950-0354-drm-vc4-Add-the-2711-HVS-as-a-suitable-DMA-node.patch
 bcm27xx/patches-5.10/950-0413-drm-vc4-hdmi-Don-t-access-the-connector-state-in-res.patch
 bcm27xx/patches-5.10/950-0505-vc4-drm-Avoid-full-hdmi-audio-fifo-writes.patch
 bcm27xx/patches-5.10/950-0512-vc4-drm-vc4_plane-Remove-subpixel-positioning-check.patch
 bcm27xx/patches-5.10/950-0560-drm-vc4-drv-Remove-the-DSI-pointer-in-vc4_drv.patch
 bcm27xx/patches-5.10/950-0561-drm-vc4-dsi-Use-snprintf-for-the-PHY-clocks-instead-.patch
 bcm27xx/patches-5.10/950-0562-drm-vc4-dsi-Introduce-a-variant-structure.patch
 bcm27xx/patches-5.10/950-0565-drm-vc4-Correct-pixel-order-for-DSI0.patch
 bcm27xx/patches-5.10/950-0566-drm-vc4-Register-dsi0-as-the-correct-vc4-encoder-typ.patch
 bcm27xx/patches-5.10/950-0567-drm-vc4-Fix-dsi0-interrupt-support.patch
 bcm27xx/patches-5.10/950-0568-drm-vc4-Add-correct-stop-condition-to-vc4_dsi_encode.patch
 bcm27xx/patches-5.10/950-0647-drm-vc4-Fix-timings-for-interlaced-modes.patch
 bcm27xx/patches-5.10/950-0695-drm-vc4-Fix-margin-calculations-for-the-right-bottom.patch

Upstream sets the pixel clock to 340MHz now, do not set it to 600MHz any more.
 bcm27xx/patches-5.10/950-0576-drm-vc4-hdmi-Raise-the-maximum-clock-rate.patch

Fixes: 89956c653252 ("kernel: bump 5.10 to 5.10.138")
Fixes: 4209c33ae27d ("kernel: bump 5.10 to 5.10.137")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
20 months agombedtls: update to version 2.28.1
Hauke Mehrtens [Sat, 27 Aug 2022 21:11:30 +0000 (23:11 +0200)]
mbedtls: update to version 2.28.1

Changelog: https://github.com/Mbed-TLS/mbedtls/releases/tag/v2.28.1
This release of Mbed TLS provides bug fixes and minor enhancements. This
release includes fixes for security issues.

The build problem was reported upstream:
https://github.com/Mbed-TLS/mbedtls/issues/6243

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit f3870546a544c39c6fde2e7e014394aa085d8057)

20 months agoRevert "mediatek: mt7622: fix banana pi r64 wps button"
Petr Štetiar [Sun, 28 Aug 2022 06:46:46 +0000 (08:46 +0200)]
Revert "mediatek: mt7622: fix banana pi r64 wps button"

This reverts commit 5a81e0006380c301cdc691838f519275fc6c28d2 as it was
backported upstream in commit a1e238690916 ("arm64: dts: mt7622: fix
BPI-R64 WPS button").

Signed-off-by: Petr Štetiar <ynezz@true.cz>
20 months agokernel: bump 5.10 to 5.10.138
John Audia [Thu, 25 Aug 2022 14:52:50 +0000 (10:52 -0400)]
kernel: bump 5.10 to 5.10.138

All patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
(cherry picked from commit fc89ec06928469021010c2f5776450f739af07a5)

20 months agokernel: bump 5.10 to 5.10.137
Petr Štetiar [Mon, 22 Aug 2022 20:45:53 +0000 (22:45 +0200)]
kernel: bump 5.10 to 5.10.137

Removed following upstreamed patch:

 * bcm53xx: 081-next-ARM_dts_BCM53015-add-mr26.patch

All other patches automagically rebased.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit d1163fd13f6498826d202f0b58cedf32d7891d52)

20 months agoiptables: default to ip(6)tables-nft when using buildroot
Etienne Champetier [Sat, 20 Aug 2022 22:08:15 +0000 (18:08 -0400)]
iptables: default to ip(6)tables-nft when using buildroot

35fec487e30f05c81bd135326a993dad7f861812 fixed opkg usage,
but when using buildroot we were still defaulting to
ip(6)tables-legacy

Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
(cherry picked from commit 0c8d7e34ab35f6b41f034fd94fec740970e0125b)

20 months agoramips: fix GB-PC1 and GB-PC2 device support
Arınç ÜNAL [Tue, 5 Jul 2022 14:10:43 +0000 (17:10 +0300)]
ramips: fix GB-PC1 and GB-PC2 device support

Change switch port labels to ethblack & ethblue.
Change lan1 & lan2 LEDs to ethblack_act & ethblue_act and fix GPIO pins.
Add the external phy with ethyellow label on the GB-PC2 devicetree.
Do not claim rgmii2 as gpio, it's used for ethernet with rgmii2 function.
Enable ICPlus PHY driver for IP1001 which GB-PC2 has got.
Update interface name and change netdev function.
Enable lzma compression to make up for the increased size of the kernel.
Make spi flash bindings on par with mainline Linux to fix read errors.

Tested on GB-PC2 by Petr.

Tested-by: Petr Louda <petr.louda@outlook.cz>
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
(cherry picked from commit 4807bd6a00bcf44dd821047db76a2a799f403cd4)

20 months agohostapd: fix WPA3 enterprise keys and ciphers
Joerg Werner [Sun, 26 Jun 2022 15:18:39 +0000 (17:18 +0200)]
hostapd: fix WPA3 enterprise keys and ciphers

WPA3 enterprise requires group_mgmt_cipher=BIP-GMAC-256 and if 802.11r is
active also wpa_key_mgmt FT-EAP-SHA384. This commit also requires
corresponding changes in netifd.

Signed-off-by: Joerg Werner <schreibubi@gmail.com>
(cherry picked from commit 9fbb76c0470fd54f1f34909b1098d0f76078878f)

20 months agoiwinfo: update to latest HEAD
Hauke Mehrtens [Sat, 20 Aug 2022 20:51:29 +0000 (22:51 +0200)]
iwinfo: update to latest HEAD

0dad3e6 Add support for CCMP-256 and GCMP-256 ciphers

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit cc6a323e2328176b732b13f1f09745354270cd39)

20 months agoiproute2: Fix KERNEL_INCLUDE in SDK
Hauke Mehrtens [Tue, 16 Aug 2022 21:38:52 +0000 (23:38 +0200)]
iproute2: Fix KERNEL_INCLUDE in SDK

In the SDK the folder $(LINUX_DIR)/user_headers/include does not exist,
but it more or less contains the same content as
$(LINUX_DIR)/include/uapi which also exists in the SDK.

Since iproute2 commit 1d819dcc741e ("configure: fix parsing issue on
include_dir option") it checks if this folder exists and aborts the
build if it does not exists.
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=1d819dcc741e25958190e31f8186c940713fa0a8

With this commit the KERNEL_INCLUDE variable points to a valid folder
with the kernel include headers. I am not sure if they are actually
needed because the build worked before even with an invalid path.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 60738fedede1746922a8b227f24ad5c733661585)

20 months agoumbim: bump to git HEAD
Hauke Mehrtens [Sat, 13 Aug 2022 17:01:15 +0000 (19:01 +0200)]
umbim: bump to git HEAD

146bc77 umbim: fix invalid mbim message string encoding

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 90bedc411b1e98e9adf668dde09f8eafe4490344)

20 months agomt76: update to the latest version
Felix Fietkau [Fri, 26 Aug 2022 17:48:45 +0000 (19:48 +0200)]
mt76: update to the latest version

9485e3b47066 mt76: remove q->qid
e5674c4aa402 mt76: mt7921: enable HW beacon filter not depending on PM flag
7fd299e3c921 mt76: mt7921: enable HW beacon filter in the initialization stage
d5459efaaf14 mt76: mt7921: make mt7921_pci_driver static
b8304b456e23 mt76: connac: move tx initialization/cleanup in mt76_connac module
6e0d7077486c mt76: mt7921: reduce log severity levels for informative messages
cb80da974fe6 mt76: mt7921: reduce the mutex lock scope during reset
a2d61f4f4063 mt76: mt7915 add ht mpdu density
08ea730c1130 mt76: add len parameter to __mt76_mcu_msg_alloc signature
60ef85fa352c mt76: introduce MT_RXQ_BAND2 and MT_RXQ_BAND2_WA in mt76_rxq_id
8ccbb38ca6e6 mt76: add phy_idx in mt76_rx_status
eb19ac83c07e mt76: introduce phys array in mt76_dev structure
30887591e3ab mt76: add phy_idx to mt76_wcid
4bf8c20a9524 mt76: convert MT_TX_HW_QUEUE_EXT_PHY to MT_TX_HW_QUEUE_PHY
e6c6bf8cee09 mt76: get rid of mt76_wcid_hw routine
120f73ad992a mediatek: mt76: mac80211: Fix missing of_node_put() in mt76_led_init()
111e92cf8c22 mediatek: mt76: eeprom: fix missing of_node_put() in mt76_find_power_limits_node()
13bedd62ff4a mt76: connac: introduce mt76_connac_reg_map structure
5ec78e1ec43d wifi: mt76: fix reading current per-tid starting sequence number for aggregation

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit ec7d32f3769fbd815f72a7471e4bb7a07aee359d)

20 months agonetifd: update to the latest version
Felix Fietkau [Thu, 25 Aug 2022 19:16:00 +0000 (21:16 +0200)]
netifd: update to the latest version

76d2d41b7355 interface: fix use-after-free bug when rewriting resolv.conf

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 31648c4b59add5b1cb441073a46c80ab768b588c)

20 months agonetifd: update to git HEAD
Hauke Mehrtens [Sat, 20 Aug 2022 20:52:49 +0000 (22:52 +0200)]
netifd: update to git HEAD

87fbefd interface: support "zone" config option
bfa039c netifd: fix WPA3 enterprise ciphers

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry-picked from commit 8008816a2ceeb7e66d27d9882685933bb9df4c76)

20 months agorpcd: bump version to 2022-08-24
Petr Štetiar [Wed, 24 Aug 2022 11:10:37 +0000 (13:10 +0200)]
rpcd: bump version to 2022-08-24

gcc 10 with -O2 reports following:

 In function ‘strncpy’,
     inlined from ‘rpc_sys_packagelist’ at /opt/devel/openwrt/c-projects/rpcd/sys.c:244:4:
 /usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: error: ‘__builtin_strncpy’ specified bound 128 equals destination size [-Werror=stringop-truncation]
   106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 In function ‘strncpy’,
     inlined from ‘rpc_sys_packagelist’ at /opt/devel/openwrt/c-projects/rpcd/sys.c:227:4:
 /usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: error: ‘__builtin_strncpy’ specified bound 128 equals destination size [-Werror=stringop-truncation]
   106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Since it is not possible to avoid truncation by strncpy, it is necessary
to make sure the result of strncpy is properly NUL-terminated and the
NUL must be inserted explicitly, after strncpy has returned.

References: #10442
Reported-by: Alexey Smirnov <s.alexey@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 34ddd2e545f068e4684ecce98c1da3a6c7c9b04a)

20 months agorpcd: update to latest Git HEAD
Jo-Philipp Wich [Fri, 12 Aug 2022 19:37:05 +0000 (21:37 +0200)]
rpcd: update to latest Git HEAD

ae5afea ucode: parse ucode plugin scripts in raw mode, init search path

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit 66a360206e341abdd1e5560e9cb522d8e453b095)

20 months agouhttpd: update to latest Git HEAD
Jo-Philipp Wich [Fri, 12 Aug 2022 19:24:26 +0000 (21:24 +0200)]
uhttpd: update to latest Git HEAD

e3395cd ucode: initialize search path before VM init
8cb3f85 ucode: initialize default library search path
188dea2 utils: accept '?' as path terminator in uh_path_match()
c5eac5d file: support using dynamic script handlers as error pages
290ff88 relay: trigger close if in header read state with pending data
f9db538 ucode: ignore exit exceptions
8ba0b64 cmake: use variables and find_library for dependency

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit 4ee77cfcfadcd2b28678a1f3e8e78383b0b21963)

20 months agoucode: update to latest Git HEAD
Jo-Philipp Wich [Wed, 29 Jun 2022 18:19:35 +0000 (20:19 +0200)]
ucode: update to latest Git HEAD

bcdd2cb examples: add module search path initialization and freeing
ee1946f ubus: fix GCC strncpy() truncation warning
131d99c lib: introduce three new functions call(), loadstring() and loadfile()
8e8dae0 lib: introduce helper function for indenting error messages
476f02b lib: simplify include_path()
d84b53a source: avoid null pointer access in uc_source_runpath_set()
c43a54f types: gracefully handle unpatched upvalues in ucv_free()
e2fb11a README.md: document gc() function
b41cb2d main: introduce -g flag to allow enabling periodic gc from cli
85d7885 lib: implement gc()
47528f0 vm: support automatic periodic GC runs
381cc75 types: treat vm->exports as GC roots
fcc49e6 compiler: add import statement support for dynamic extensions
c9442f1 vm: introduce new I_DYNLOAD opcode
b6fd8a2 lib: internally expose new uc_require_library() helper
a486adc vm: don't treat offset 0 special for exceptions
41ccd19 compiler: don't treat offset 0 special at syntax errors
b4a3f68 compiler: improve formatting of nested syntax error messages
5d5dadc program: remove now unused uc_program_export_lookup()
304995b compiler: rework export index allocation
506cc37 compiler: fix deriving module path from source runpath
54b7fac compiler: enforce stricter module compilation rules
d62e372 vm: don't initialize upvalues for module functions
b856602 program: add serialization and deserialization for module function flag
d7d1bde compiler: add a flag denoting module functions
156d584 treewide: unexport libucode internal functions
10e056d compiler: add support for import/export statements
862e49d compiler: resolve predeclared upvalues
78dfb08 compiler: require a name in function declarations
afd78c1 compiler: fix reported source position in inc/dec operator error
e1c3db0 tests: run_tests.sh: substitute dynamic test directory path in output
3c168b5 vm, cli: move search path into global configuration structure
d85bc71 vm: introduce import and export opcodes
365782e vm: honor constant flag of objects and arrays
6becc64 vm: transparently resolve upvalue references
3418967 vm: gracefully handle unresolved upvalues
50cf572 program: add function to globally lookup exported name
c441f65 program: add infrastructure to handle multiple sources per program
2322468 program: fix reporting source position of first instruction
9c9a9ec program: fix en/decoding debuginfo upvalue slots in precompiled bytecode
41114a0 source: add tracking of exported symbols
70ae304 lib: honor constant flag of arrays
3c104f5 types: resolve upvalue references on stringification
3a6f9cb types: add ability to mark array and object values as constant
b738f3a lexer: recognize module related keywords
03c8e4b lexer: rewrite token scanner
fd433aa lexer: fix parsing with disabled block left stripping
557577a rtnl: fix parsing/creation of IFLA_AF_SPEC RTA for the AF_BRIDGE family
35c6b73 compiler: fix stack mismatch on continue statements nested in switches
f673096 uloop: end uloop on exceptions in managed code
2e5426c ubus: end uloop on exceptions in managed code
c024270 rtnl: expose IFLA_STATS64 contents
d3c58c0 rtnl: expose ifinfomsg.ifi_change member
c4dde50 rtnl: update NETLINK_GET_STRICT_CHK socket flag with every request
7ef0d02 nl80211: fix NL80211_SURVEY_INFO_NOISE datatype
9a2e592 compiler: fix stack mismatch on nonmatching switch statements with locals
03c8ca5 nl80211: recognize further NL80211_STA_INFO_* NLAs
a1ed566 struct: add optional offset argument to `unpack()`
230e595 rtnl: fix segmentation fault on parsing linkinfo RTA without data
523566d rtnl: zero request message headers
56be30d rtnl: fix premature netlink reply receive abort
1347440 rtnl: avoid stray "netlink: %d bytes leftover after parsing attributes."
44b0a3b struct: fix packing `*` format after other repeated formats

Also package uloop binding module which has been introduced by a previous
ucode update and introduce a host build with the basic set of modules.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 3446d32616efad335c4eeeafc2f542089839bf20)

20 months agonftables: fix parsing date expressions
Jo-Philipp Wich [Mon, 8 Aug 2022 22:05:02 +0000 (00:05 +0200)]
nftables: fix parsing date expressions

Musl libc does not support the non-POSIX "%F" format for strptime() so
replace all occurrences of it with an equivalent "%Y-%m-%d" format.

Fixes: #10419
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit e6e4f979999393825370e9db9fe04d75cb01acf2)

20 months agofirewall4: update to latest Git HEAD
Jo-Philipp Wich [Wed, 24 Aug 2022 21:04:45 +0000 (23:04 +0200)]
firewall4: update to latest Git HEAD

a4484d4 fw4: support automatic includes
ca7e3a1 fw4: honour enabled option of include sections
5a02f74 tests: add missing fs.stat) mock data for `nf_conntrack_dummy`
111a7f7 fw4: don't inherit zone family from ct helpers

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit fe86b2ffaaf6059250e3ba0a9e1436312415e23f)

20 months agoipq806x: add missing scaling_available_frequencies for dedicated cpufreq
Christian Marangi [Sun, 21 Aug 2022 16:52:52 +0000 (18:52 +0200)]
ipq806x: add missing scaling_available_frequencies for dedicated cpufreq

Add missing scaling_available_frequencies sysfs entry for dedicated
cpufreq driver.
This sysfs entry is not standard and each cpufreq driver needs to
provide it and declare it in the cpufreq driver struct attr.

Fixes: 5dbbefcbccc0 ("ipq806x: introduce dedicated krait cpufreq")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
[ fix conflict by dropping 5.15 patch not present in openwrt-22.03 ]
(cherry picked from commit d6994c53cd0e5334478d2aab424674da438804e2)

20 months agomac80211: parse the correct set of HE capabilities for AP mode
Sultan Alsawaf [Fri, 22 Jul 2022 06:36:31 +0000 (23:36 -0700)]
mac80211: parse the correct set of HE capabilities for AP mode

It is common for 802.11ax NICs to support more than just AP mode, which
results in there being a distinct set of HE capabilities for each mode. As
(bad) luck would have it, iw prints out info for each HE mode in sequential
order according to `enum nl80211_iftype`, and AP mode isn't always first.

As a result, the wrong set of HE capabilities can be parsed if an AP NIC
supports station (managed) mode or any other mode preceding AP mode, since
only the first set of HE capabilities printed by iw is parsed from awk's
output.

This has a noticeable impact on beamforming for example, since managed mode
usually doesn't have beamformer capabilities enabled, while AP mode does.
Hostapd won't be set up with the configs to enable beamformer capabilities
in this scenario, causing hostapd to disable beamforming to HE stations
even when it's supported by the AP.

Always parse the correct set of HE capabilities for AP mode to fix this.
This is achieved by trimming all of iw's output prior to the AP mode
capabilities, which ensures that the first set of HE capabilities are
always for AP mode.

Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
(cherry picked from commit f338f76a66a50d201ae57c98852aa9c74e9e278a)

20 months agoramips: get MAC addr from the encrypted partition (WG4хх223)
Mikhail Zhilkin [Sat, 9 Jul 2022 17:09:57 +0000 (17:09 +0000)]
ramips: get MAC addr from the encrypted partition (WG4хх223)

This commit resolves #10062. Adds decryption of the Arcadyan WG4xx223
configuration partition (board_data)to get base MAC address from it.
As a result, after this change the hack with saving MAC addressees to
u-boot-env before installation of OpenWrt is no longer necessary.

This is necessary for the following devices:
- Beeline Smartbox Flash (Arcadyan WG443223)
- MTS WG430223 (Arcadyan WG430223)

Example:
+----------------+-------------------+------------------------+
|                |    MTS WG430223   | Beeline Smartbox Flash |
+----------------+-------------------+------------------------+
| base mac (mtd) | A4:xx:xx:51:xx:F4 | 30:xx:xx:51:xx:06      |
| label          | A4:xx:xx:51:xx:F4 | 30:xx:xx:51:xx:09      |
| LAN            | A4:xx:xx:51:xx:F6 | 30:xx:xx:51:xx:09      |
| WAN            | A4:xx:xx:51:xx:F4 | 30:xx:xx:51:xx:06      |
| WLAN_2g        | A4:xx:xx:51:xx:F5 | 30:xx:xx:51:xx:07      |
| WLAN_5g        | A6:xx:xx:21:xx:F5 | 32:xx:xx:41:xx:07      |
+----------------+-------------------+------------------------+

Collected statistic shows that the 2-4th bits of the 7th byte of the
WLAN_5g MAC are the constant (see #10062 for more details):
- Beeline Smartbox Flash - 100
- MTS WG430223 - 010

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
(cherry picked from commit a6b0d0806055a53a2538df83f8322c38ee9f3441)

20 months agobase-files: add mtd_get_mac_encrypted_arcadyan function
Mikhail Zhilkin [Tue, 12 Jul 2022 14:52:04 +0000 (14:52 +0000)]
base-files: add mtd_get_mac_encrypted_arcadyan function

Some Arcadyan devices (e.g. MTS WG430223) keep their config in encrypted
mtd. This adds mtd_get_mac_encrypted_arcadyan() function to get the MAC
address from the encrypted partition. Function uses uencrypt utility for
decryption (and openssl if the uencrypt wasn't found).

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
(cherry picked from commit 12c971bc26ac0ff04257bc475fff6fa68068c6c0)

20 months agouencrypt: add package to decrypt WG4хх223 config
Eneas U de Queiroz [Fri, 8 Jul 2022 14:08:21 +0000 (11:08 -0300)]
uencrypt: add package to decrypt WG4хх223 config

This adds a simple AES-128-CBC encryption/decryption program using
either wolfSSL or OpenSSL as backend to decrypt Arcadyan WG4xx223
configuration partitions.  The ipk size is 3,355 bytes.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit bc43ad88ed18722c0621fd6dfef0ff68268f4e14)

20 months agoodhcp6c: update to git HEAD
Hans Dedecker [Fri, 5 Aug 2022 16:29:05 +0000 (18:29 +0200)]
odhcp6c: update to git HEAD

7d21e8d dhcpv6: add option to ignore stateless advertise

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
(cherry picked from commit a23d132cff541210b281ac60de619e7ce7ec3ba0)

20 months agoramips: allow custom trx magic for Arcadyan
Mikhail Zhilkin [Thu, 28 Apr 2022 18:24:07 +0000 (18:24 +0000)]
ramips: allow custom trx magic for Arcadyan

This commit:
1. Renames beeline-trx recipe in mt7621.mk to arcadyan-trx. The recipe
   is necessary for:
   - MTS WG430223 (Arcadyan WG430223)
   - Beeline Smartbox Flash (Arcadyan WG443223)
2. Allows specify custom trx magic which is different for the routers
   mentined above.

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
(cherry picked from commit 109c503bee9aed34ffb485a29af1e2ec6f3bb6b1)
[fix merging conflict in mt7621.mk]
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
20 months agoramips: create new dtsi for Arcadyan routers
Mikhail Zhilkin [Wed, 4 May 2022 15:07:28 +0000 (15:07 +0000)]
ramips: create new dtsi for Arcadyan routers

This commit moves common properties for the boards below to a new dtsi:
Beeline Smartbox Flash (Arcadyan WG443223)
MTS WG430223 (Arcadyan WG430223)

The boards are almost the same. Here is the differences:
+------+----------+----------+
|      | WG430223 | WG443223 |
+------+----------+----------+
| RAM  | 128      | 256      |
+------+----------+----------+
| USB  | -        | 1x3.0    |
+------+----------+----------+
| LEDS | RG       | RGB      |
+------+----------+----------+

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
(cherry picked from commit 5b59137a162c07738abbe9fd37125193b3107cb7)

20 months agoramips: add support for MTS WG430223
Mikhail Zhilkin [Wed, 4 May 2022 15:16:38 +0000 (15:16 +0000)]
ramips: add support for MTS WG430223

MTS WG430223 is a wireless AC1300 (WiFi 5) router manufactured by
Arcadyan company. It's very similar to Beeline Smartbox Flash (Arcadyan
WG443223).

Device specification
--------------------
SoC Type: MediaTek MT7621AT
RAM: 128 MiB
Flash: 128 MiB (Winbond W29N01HV)
Wireless 2.4 GHz (MT7615DN): b/g/n, 2x2
Wireless 5 GHz (MT7615DN): a/n/ac, 2x2
Ethernet: 3xGbE (WAN, LAN1, LAN2)
USB ports: No
Button: 1 (Reset/WPS)
LEDs: 2 (Red, Green)
Power: 12 VDC, 1 A
Connector type: Barrel
Bootloader: U-Boot (Ralink UBoot Version: 5.0.0.2)
OEM: Arcadyan WG430223

Installation
------------
1. Login to the router web interface (superadmin:serial number)
2. Navigate to Administration -> Miscellaneous -> Access control lists &
   enable telnet & enable "Remote control from any IP address"
3. Connect to the router using telnet (default admin:admin)
4. Place *factory.trx on any web server (192.168.1.2 in this example)
5. Connect to the router using telnet shell (no password required)
6. Save MAC adresses to U-Boot environment:
   uboot_env --set --name eth2macaddr --value $(ifconfig | grep eth2 | \
    awk '{print $5}')
   uboot_env --set --name eth3macaddr --value $(ifconfig | grep eth3 | \
    awk '{print $5}')
   uboot_env --set --name ra0macaddr --value $(ifconfig | grep ra0 | \
    awk '{print $5}')
   uboot_env --set --name rax0macaddr --value $(ifconfig | grep rax0 | \
    awk '{print $5}')
7. Ensure that MACs were saved correctly:
   uboot_env --get --name eth2macaddr
   uboot_env --get --name eth3macaddr
   uboot_env --get --name ra0macaddr
   uboot_env --get --name rax0macaddr
8. Download and write the OpenWrt images:
   cd /tmp
   wget http://192.168.1.2/factory.trx
   mtd_write erase /dev/mtd4
   mtd_write write factory.trx /dev/mtd4
9. Set 1st boot partition and reboot:
   uboot_env --set --name bootpartition --value 0

Back to Stock
-------------
1. Run in the OpenWrt shell:
   fw_setenv bootpartition 1
   reboot
2. Optional step. Upgrade the stock firmware with any version to
   overwrite the OpenWrt in Slot 1.

MAC addresses
-------------
+-----------+-------------------+----------------+
| Interface | MAC               | Source         |
+-----------+-------------------+----------------+
| label     | A4:xx:xx:51:xx:F4 | No MACs was    |
| LAN       | A4:xx:xx:51:xx:F6 | found on Flash |
| WAN       | A4:xx:xx:51:xx:F4 | [1]            |
| WLAN_2g   | A4:xx:xx:51:xx:F5 |                |
| WLAN_5g   | A6:xx:xx:21:xx:F5 |                |
+-----------+-------------------+----------------+
[1]:
a. Label wasb't found neither in factory nor in other places.
b. MAC addresses are stored in encrypted partition "glbcfg". Encryption
   key hasn't known yet. To ensure the correct MACs in OpenWrt, a hack
   with saving of the MACs to u-boot-env during the installation was
   applied.
c. Default Ralink ethernet MAC address (00:0C:43:28:80:A0) was found in
   "Factory" 0xfff0. It's the same for all MTS WG430223 devices. OEM
   firmware also uses this MAC when initialazes ethernet driver. In
   OpenWrt we use it only as internal GMAC (eth0), all other MACs are
   unique. Therefore, there is no any barriers to the operation of several
   MTS WG430223 devices even within the same broadcast domain.

Stock firmware image format
---------------------------
The same as Beeline Smartbox Flash but with another trx magic
+--------------+---------------+----------------------------------------+
| Offset       |               | Description                            |
+==============+===============+========================================+
| 0x0          | 31 52 48 53   | TRX magic "1RHS"                       |
+--------------+---------------+----------------------------------------+

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
(cherry picked from commit 498c15376bae109bfe130cc5581f83e4cc52c0f9)

20 months agoramips: add support for ASUS RT-AX53U
Chuncheng Chen [Tue, 14 Jun 2022 06:11:52 +0000 (14:11 +0800)]
ramips: add support for ASUS RT-AX53U

Specifications:
- Device: ASUS RT-AX53U
- SoC: MT7621AT
- Flash: 128MB
- RAM: 256MB
- Switch: 1 WAN, 3 LAN (10/100/1000 Mbps)
- WiFi: MT7905 2x2 2.4G + MT7975 2x2 5G
- Ports: USB 3.0
- LEDs: 1x POWER (blue, configurable)
        3x LAN (blue, configurable)
        1x WAN (blue, configurable)
        1x USB (blue, not configurable)
1x 2.4G (blue, not configurable)
1x 5G (blue, not configurable)

Flash by U-Boot TFTP method:
- Configure your PC with IP 192.168.1.2
- Set up TFTP server and put the factory.bin image on your PC
- Connect serial port(rate:115200) and turn on AP, then interrupt "U-Boot Boot Menu" by hitting any key
   Select "2. Upgrade firmware"
   Press enter when show "Run firmware after upgrading? (Y/n):"
   Select 0 for TFTP method
   Input U-Boot's IP address: 192.168.1.1
   Input TFTP server's IP address: 192.168.1.2
   Input IP netmask: 255.255.255.0
   Input file name: openwrt-ramips-mt7621-asus_rt-ax53u-squashfs-factory.bin
- Restart AP aftre see the log "Firmware upgrade completed!"

Signed-off-by: Chuncheng Chen <ccchen1984@gmail.com>
(replaced led label, added key-* prefix to buttons, added note about
BBT)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(cherry picked from commit 8c00fd9b4519bf0ef8fb3470a6df421b9f38c03c)

20 months agomvebu: backport pending Turris Omnia LEDs improvements
Josef Schlehofer [Tue, 26 Jul 2022 12:32:37 +0000 (14:32 +0200)]
mvebu: backport pending Turris Omnia LEDs improvements

It backports this patch series, which is currently on review:
https://lore.kernel.org/linux-leds/20220704105955.15474-1-kabel@kernel.org/T/#rb89a4ca5a836f17bdcc53d65549e0b1779bb6a18
It allows being able to configure LEDs in userspace.

This fixes issue described in Turris Build repository
https://gitlab.nic.cz/turris/os/build/-/issues/354
It happens in OpenWrt as well.

- Before
```
root@turris:/# ls /sys/class/leds/
ath10k-phy0  ath9k-phy1   mmc0::
```

 -After
```
root@turris:/# ls /sys/class/leds/
ath10k-phy0      rgb:indicator-2  rgb:lan-3        rgb:wlan-1
ath9k-phy1       rgb:lan-0        rgb:lan-4        rgb:wlan-2
mmc0::           rgb:lan-1        rgb:power        rgb:wlan-3
rgb:indicator-1  rgb:lan-2        rgb:wan
```

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
(cherry picked from commit 049368b936988ce2c7f82c07367d168600fdbaa6)

20 months agomvebu: backport DTS changes for Turris Omnia from mvebu/dt
Josef Schlehofer [Tue, 26 Jul 2022 12:31:26 +0000 (14:31 +0200)]
mvebu: backport DTS changes for Turris Omnia from mvebu/dt

My commit backported patches from the following links:
- https://lore.kernel.org/linux-arm-kernel/20220704113622.18887-1-kabel@kernel.org/
- https://lore.kernel.org/linux-arm-kernel/20220704113622.18887-2-kabel@kernel.org/

According to the links, they are applied in repository mvebu in branch dt,
so it should be included in upcoming Linux version soon.

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
(cherry picked from commit 2ae26f523e9bfcd3bdfa93604afe8de9addf5a90)

20 months agompc85xx: enable NAND support for all subtargets
Josef Schlehofer [Tue, 7 Jun 2022 11:13:11 +0000 (13:13 +0200)]
mpc85xx: enable NAND support for all subtargets

In subtarget p2020, there wasn't enabled nand support, and because of
that there weren't available tools from mtd-utils package, which has
utilities for NAND flash memory even though reference board, which
is the only currently supported device in p2020 subtarget has NAND [1].

All subtargets in mpc85xx has already enabled nand support, let's do it
globally.

[1] https://www.nxp.com/design/qoriq-developer-resources/p2020-reference-design-board:P2020RDB

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
(cherry picked from commit 6006f73383cc7626552175010de23530bdcc8718)

20 months agokernel: add kmod-leds-turris-omnia
Stefan Kalscheuer [Thu, 19 May 2022 19:10:34 +0000 (21:10 +0200)]
kernel: add kmod-leds-turris-omnia

Add support for LEDs of the CZ.NIC Turris Omnia using the upstream
driver.

There is no generic way to control the LEDs in UCI manner, however
the kernel module is the first step to actually use the RGB LEDs in
custom logic.

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
(removed DMARC notice, added driver to Turris Omnia, moved module
recipe to target/linux/mvebu/modules.mk)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(cherry picked from commit f8fa38c13fcc3b4ce9a4dfc56d98e5188353afac)
Reviewed-by: Robert Marko <robimarko@gmail.com>
20 months agotoolchain: Update glibc 2.34 to recent HEAD
Hauke Mehrtens [Sat, 6 Aug 2022 21:12:56 +0000 (23:12 +0200)]
toolchain: Update glibc 2.34 to recent HEAD

This adds the following changes:
71326f1f2f nptl: Fix pthread_cancel cancelhandling atomic operations
3e0a91b79b scripts: Add glibcelf.py module
f0c71b34f9 Default to --with-default-link=no (bug 25812)
ca0faa140f misc: Fix rare fortify crash on wchar funcs. [BZ 29030]
0d477e92c4 INSTALL: Rephrase -with-default-link documentation
bc56ab1f4a dlfcn: Do not use rtld_active () to determine ld.so state (bug 29078)
83cc145830 scripts/glibcelf.py: Mark as UNSUPPORTED on Python 3.5 and earlier
16245986fb x86-64: Optimize load of all bits set into ZMM register [BZ #28252]
b5a44a6a47 x86: Modify ENTRY in sysdep.h so that p2align can be specified
5ec3416853 x86: Optimize memcmp-evex-movbe.S for frontend behavior and size
6d18a93dbb x86: Optimize memset-vec-unaligned-erms.S
baf3ece634 x86: Replace sse2 instructions with avx in memcmp-evex-movbe.S
f35ad30da4 x86-64: Improve EVEX strcmp with masked load
a182bb7a39 x86-64: Remove Prefer_AVX2_STRCMP
2e64237a87 x86-64: Replace movzx with movzbl
a7392db2ff x86: Optimize memmove-vec-unaligned-erms.S
cecbac5212 x86: Double size of ERMS rep_movsb_threshold in dl-cacheinfo.h
7cb126e7e7 x86: Shrink memcmp-sse4.S code size
4bbd0f866a x86-64: Use notl in EVEX strcmp [BZ #28646]
f3a99b2216 x86: Don't set Prefer_No_AVX512 for processors with AVX512 and AVX-VNNI
c796418d00 x86: Optimize L(less_vec) case in memcmp-evex-movbe.S
9681691402 linux: Fix missing internal 64 bit time_t stat usage
55640ed3fd i386: Regenerate ulps
88a8637cb4 linux: Fix fchmodat with AT_SYMLINK_NOFOLLOW for 64 bit time_t (BZ#29097)
c66c92181d posix/glob.c: update from gnulib
bc6fba3c80 Add PF_MCTP, AF_MCTP from Linux 5.15 to bits/socket.h
fd5dbfd1cd Update kernel version to 5.15 in tst-mman-consts.py
5146b73d72 Add ARPHRD_CAN, ARPHRD_MCTP to net/if_arp.h
6af165658d Update syscall lists for Linux 5.17
81181ba5d9 Update kernel version to 5.16 in tst-mman-consts.py
0499c3a95f Update kernel version to 5.17 in tst-mman-consts.py
f858bc3093 Add SOL_MPTCP, SOL_MCTP from Linux 5.16 to bits/socket.h
c108e87026 aarch64: Add HWCAP2_ECV from Linux 5.16
97cb8227b8 Add HWCAP2_AFP, HWCAP2_RPRES from Linux 5.17 to AArch64 bits/hwcap.h
31af92b9c8 manual: Clarify that abbreviations of long options are allowed
0d5b36c8cc x86: Optimize strcmp-avx2.S
c41a66767d x86: Optimize strcmp-evex.S
d299032743 x86-64: Fix strcmp-avx2.S
53ddafe917 x86-64: Fix strcmp-evex.S
ea19c490a3 x86: Improve vec generation in memset-vec-unaligned-erms.S
190ea5f7e4 x86: Remove SSSE3 instruction for broadcast in memset.S (SSE2 Only)
5cb6329652 x86-64: Optimize bzero
70509f9b48 x86: Set .text section in memset-vec-unaligned-erms
5373c90f2e x86: Fix bug in strncmp-evex and strncmp-avx2 [BZ #28895]
e123f08ad5 x86: Fix fallback for wcsncmp_avx2 in strcmp-avx2.S [BZ #28896]
e4a2fb76ef manual: Document the dlinfo function
91c2e6c3db dlfcn: Implement the RTLD_DI_PHDR request type for dlinfo
b72bbba236 fortify: Ensure that __glibc_fortify condition is a constant [BZ #29141]
8de6e4a199 x86: Improve L to support L(XXX_SYMBOL (YYY, ZZZ))
6cba46c858 x86_64/multiarch: Sort sysdep_routines and put one entry per line
37f373e334 x86-64: Remove bzero weak alias in SS2 memset
dd457606ca x86_64: Remove bcopy optimizations
3c55c20756 x86: Code cleanup in strchr-avx2 and comment justifying branch
dd6d3a0bbc x86: Code cleanup in strchr-evex and comment justifying branch
0ae1006967 x86: Optimize strcspn and strpbrk in strcspn-c.c
0a2da01110 x86: Optimize strspn in strspn-c.c
0dafa75e3c x86: Remove strcspn-sse2.S and use the generic implementation
3811544655 x86: Remove strpbrk-sse2.S and use the generic implementation
a4b1cae068 x86: Remove strspn-sse2.S and use the generic implementation
5997011826 x86: Optimize str{n}casecmp TOLOWER logic in strcmp.S
3605c74407 x86: Optimize str{n}casecmp TOLOWER logic in strcmp-sse42.S
3051cf3e74 x86: Add AVX2 optimized str{n}casecmp
b13a2e68eb x86: Add EVEX optimized str{n}casecmp
80883f4354 x86: Remove AVX str{n}casecmp
4ff6ae069b x86: Small improvements for wcslen
ffe75982cc x86: Remove memcmp-sse4.S
df5de87260 x86: Cleanup page cross code in memcmp-avx2-movbe.S
0a11305416 x86: Optimize {str|wcs}rchr-sse2
00f09a14d2 x86: Optimize {str|wcs}rchr-avx2
596c9a32cc x86: Optimize {str|wcs}rchr-evex
1f83d40dfa elf: Remove unused NEED_DL_BASE_ADDR and _dl_base_addr
b0bd6a1323 elf: Merge dl-sysdep.c into the Linux version
2139b1848e Linux: Remove HAVE_AUX_SECURE, HAVE_AUX_XID, HAVE_AUX_PAGESIZE
458733fffe Linux: Remove DL_FIND_ARG_COMPONENTS
08728256fa Linux: Assume that NEED_DL_SYSINFO_DSO is always defined
4b9cd5465d Linux: Consolidate auxiliary vector parsing
1cc4ddfeeb Revert "Linux: Consolidate auxiliary vector parsing"
28bdb03b1b Linux: Include <dl-auxv.h> in dl-sysdep.c only for SHARED
ff900fad89 Linux: Consolidate auxiliary vector parsing (redo)
be9240c84c elf: Remove __libc_init_secure
1e7b011f87 i386: Remove OPTIMIZE_FOR_GCC_5 from Linux libc-do-syscall.S
1a5b9d1a23 i386: Honor I386_USE_SYSENTER for 6-argument Linux system calls
b38c9cdb58 Linux: Define MMAP_CALL_INTERNAL
b2387bea84 ia64: Always define IA64_USE_NEW_STUB as a flag macro
e7ca2a475c Linux: Implement a useful version of _startup_fatal
43d77ef9b8 Linux: Introduce __brk_call for invoking the brk system call
ede8d94d15 csu: Implement and use _dl_early_allocate during static startup
89b638f48a S390: Enable static PIE
c73c79af7d rtld: Use generic argv adjustment in ld.so [BZ #23293]
b2585cae28 linux: Add a getauxval test [BZ #23293]
14770f3e04 string.h: fix __fortified_attr_access macro call [BZ #29162]
83ae8287c1 x86: Fallback {str|wcs}cmp RTM in the ncmp overflow case [BZ #29127]
ff450cdbde Fix deadlock when pthread_atfork handler calls pthread_atfork or dlclose
b349fe0722 misc: Use 64 bit stat for daemon (BZ# 29203)
aa8a87f51d misc: Use 64 bit stat for getusershell (BZ# 29204)
9db6a597ef posix: Use 64 bit stat for posix_fallocate fallback (BZ# 29207)
f9c3e57ac2 posix: Use 64 bit stat for fpathconf (_PC_ASYNC_IO) (BZ# 29208)
61fd3e0e74 socket: Use 64 bit stat for isfdtype (BZ# 29209)
34422108f4 inet: Use 64 bit stat for ruserpass (BZ# 29210)
52431199b5 catgets: Use 64 bit stat for __open_catalog (BZ# 29211)
b3f935940e iconv: Use 64 bit stat for gconv_parseconfdir (BZ# 29213)
9947f2df19 socket: Fix mistyped define statement in socket/sys/socket.h (BZ #29225)
4c92a10412 powerpc: Fix VSX register number on __strncpy_power9 [BZ #29197]
a7ec6363a3 nptl: Fix __libc_cleanup_pop_restore asynchronous restore (BZ#29214)
96944f0f81 hppa: Remove _dl_skip_args usage (BZ# 29165)
bb4148283f nios2: Remove _dl_skip_args usage (BZ# 29187)
368c5c3e00 nss: add assert to DB_LOOKUP_FCT (BZ #28752)
94ab2088c3 nss: handle stat failure in check_reload_and_get (BZ #28752)
4b246b2bbd linux: Fix mq_timereceive check for 32 bit fallback code (BZ 29304)
7789a84923 nptl: Fix ___pthread_unregister_cancel_restore asynchronous restore
8d324019e6 x86_64: Remove end of line trailing spaces
eb9aa96fac x86_64: Remove bzero optimization
8ab861d295 x86_64: Implement evex512 version of strlen, strnlen, wcslen and wcsnlen
f6bc52f080 x86-64: Ignore r_addend for R_X86_64_GLOB_DAT/R_X86_64_JUMP_SLOT
82a707aeb7 x86_64: Add strstr function with 512-bit EVEX
70be93d1c5 x86: Create header for VEC classes in x86 strings library
e805606193 x86: Add COND_VZEROUPPER that can replace vzeroupper if no `ret`
4901009dad x86: Optimize memrchr-sse2.S
83a986e9fb x86: Optimize memrchr-evex.S
b05bd59823 x86: Optimize memrchr-avx2.S
a910d7e164 x86: Shrink code size of memchr-avx2.S
3c87383a20 x86: Shrink code size of memchr-evex.S
820504e3ed x86: ZERO_UPPER_VEC_REGISTERS_RETURN_XTEST expect no transactions
fc54e1fae8 x86: Align varshift table to 32-bytes
6e008c884d x86: Fix misordered logic for setting `rep_movsb_stop_threshold`
9d50e162ee x86: Add sse42 implementation to strcmp's ifunc
94b0dc9419 x86: Add bounds `x86_non_temporal_threshold`
ba1c3f23d9 x86: Cleanup bounds checking in large memcpy case
c51d8d383c x86: Add BMI1/BMI2 checks for ISA_V3 check
d201c59177 x86: Align entry for memrchr to 64-bytes.
aadd0a1c7c x86: Put wcs{n}len-sse4.1 in the sse4.1 text section
f4598f0351 x86: Add definition for __wmemset_chk AVX2 RTM in ifunc impl list
7079931c51 x86: Move and slightly improve memset_erms
35f9c72c8b x86: Move mem{p}{mov|cpy}_{chk_}erms to its own file
ccc54bd61c x86: Add missing IS_IN (libc) check to strncmp-sse4_2.S
b991af5063 Update syscall-names.list for Linux 5.18
b2f32e7464 malloc: Simplify implementation of __malloc_assert
875b2414cd dlfcn: Pass caller pointer to static dlopen implementation (bug 29446)
4ab59ce4e5 Update syscall lists for Linux 5.19

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit c97f918d37324db66c0ac4d12483baa93754f890)

20 months agobuild: add support for python3.11 and higher
Oscar Molnar [Sat, 6 Aug 2022 15:13:41 +0000 (16:13 +0100)]
build: add support for python3.11 and higher

python3.11 beta is out but fails to run the makefile currently
this supports python versions from 3.6 to 3.99 with the python3 binary
it also checks specifically for 3.11 as it is the latest version out

Signed-off-by: Oscar Molnar <oscar@tymscar.com>
(cherry picked from commit a9e8eec221874e5840d659aed3f68850ff1d9982)

20 months agoiwinfo: update to latest HEAD
Hauke Mehrtens [Sat, 13 Aug 2022 16:35:46 +0000 (18:35 +0200)]
iwinfo: update to latest HEAD

705d3b5 iwinfo: Add missing auth_suites mappings for WPA3

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit cc2dfc5e4dc2e480203b826749186c73021795df)

20 months agoath25: fix initramfs image generation
Lech Perczak [Tue, 9 Aug 2022 23:10:57 +0000 (01:10 +0200)]
ath25: fix initramfs image generation

Commit 21f460a5dbef ("ath25: fix duplicate LZMA compression") changed
the way kernel images are generated, affecting initramfs images instead.
Initramfs images were previously ELF images, and by mistake this change
caused the raw kernel image to be used as a source. This caused them to
be non-loadable by bootloaders.

Restore the previous KERNEL_INITRAMFS recipe and adjust
KERNEL_INITRAMFS_NAME to point at the correct source artifact.
While at that, adjust KERNEL_INITRAMFS_SUFFIX to -kernel.elf,
so it matches the suffix of non-initramfs kernel artifact.

Fixes: 21f460a5dbef ("ath25: fix duplicate LZMA compression")
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
(cherry picked from commit 9f5cbb6e8b9537942db405719bf7662d0e08b8c5)

20 months agoath25: fix ELF image generation
Lech Perczak [Tue, 9 Aug 2022 23:06:24 +0000 (01:06 +0200)]
ath25: fix ELF image generation

Commit 21f460a5dbef ("ath25: fix duplicate LZMA compression"), when
attempting to restore ELF artifact generation, copiedover the raw
kernel image twice. Because of that, the .elf artifact was actually a
duplicate of raw image.

Fix that by copying over .elf suffixed kernel image instead.

Fixes: 21f460a5dbef ("ath25: fix duplicate LZMA compression")
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
(cherry picked from commit 611291383a826827f240eddebca1949c2e1e7115)

20 months agokernel: bump 5.10 to 5.10.136
John Audia [Thu, 11 Aug 2022 12:37:14 +0000 (08:37 -0400)]
kernel: bump 5.10 to 5.10.136

All patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
(cherry picked from commit 2239ead6eb63933d80e0c26dd95ba684fdd74006)

20 months agokernel: bump 5.10 to 5.10.135
John Audia [Wed, 3 Aug 2022 18:32:51 +0000 (14:32 -0400)]
kernel: bump 5.10 to 5.10.135

All patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
(cherry picked from commit ccff2fbaea50ae983a25483a40ae2dbaeeca5581)

20 months agokernel: Backport upstream flowtable patches from 5.15
Hauke Mehrtens [Sat, 5 Mar 2022 18:08:27 +0000 (19:08 +0100)]
kernel: Backport upstream flowtable patches from 5.15

This backports some patches from kernel 5.15 to fix issues with
flowtable offloading in kernel 5.10. OpenWrt backports most of the
patches related to flowtable offloading from kernel 5.15 already, but we
are missing some of the extra fixes.

This fixes some connection tracking problems when a flow gets removed
from the offload and added to the normal SW path again.

The patch 614-v5.18-netfilter-flowtable-fix-TCP-flow-teardown.patch was
extended manually with the nf_conntrack_tcp_established() function.

All changes are already included in kernel 5.15.

Fixes: #8776
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 96ef2dabce1a5f102d53a15f33383193b47fd297)

20 months agopkg-config: always use correct path for pkg-config.real
Leonardo Mörlein [Tue, 9 Aug 2022 19:54:04 +0000 (21:54 +0200)]
pkg-config: always use correct path for pkg-config.real

Before this commit, it was assumed that pkg-config.real is in the PATH. While
this was fine for the normal build workflow, this led to some issues if

    make TOPDIR="$(pwd)" -C "$pkgdir" compile

was called manually. The command failed with

    Makefile:15: *** No libnl-tiny development libraries found!.  Stop.
    make[1]: Leaving directory

since pkg-config of the host system was used.

After the commit, the package is built sucessfully.

Signed-off-by: Leonardo Mörlein <me@irrelefant.net>
(cherry picked from commit 37c0d15a8e9eb30920091bff1bf466640bc64dad)

20 months agokernel: kmod-phy-smsc: Add new PHY
Hauke Mehrtens [Sun, 7 Aug 2022 14:00:32 +0000 (16:00 +0200)]
kernel: kmod-phy-smsc: Add new PHY

This adds the SMSC PHY which is needed by the kmod-usb-net-smsc95xx
driver.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 5b016a88f92f25dd7d32438bce3a469f343f4009)

20 months agokernel: kmod-phy-ax88796b: Add new PHY
Hauke Mehrtens [Sun, 7 Aug 2022 13:57:15 +0000 (15:57 +0200)]
kernel: kmod-phy-ax88796b: Add new PHY

This adds the AX88796B PHY which is needed by the kmod-usb-net-asix
driver.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 712ff388bcd0811256c07e8e1f4b92a007adaa7f)

20 months agokernel: kmod-ipt-ulog: Remove package
Hauke Mehrtens [Sun, 7 Aug 2022 12:31:59 +0000 (14:31 +0200)]
kernel: kmod-ipt-ulog: Remove package

The ulog iptables target was removed with kernel 3.17, remove the kernel
and also the iptables package in OpenWrt too.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 2a0284fb0325f07e79b9b4c58a7d280ba9999a39)

20 months agokernel: kmod-nft-nat6: Remove package
Hauke Mehrtens [Sun, 7 Aug 2022 12:06:14 +0000 (14:06 +0200)]
kernel: kmod-nft-nat6: Remove package

The nft NAT packages for IPv4 and IPv6 were merged into the common
packages with kernel 5.1. The kmod-nft-nat6 package was empty in our
build, remove it.

Multiple kernel configuration options were also removed, remove them
from our generic kernel configuration too.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit b75425370d8de747457c137463bc4d15f6f44d00)

20 months agokernel: ipt-ipset: Add ipset/ip_set_hash_ipmac.ko
Hauke Mehrtens [Fri, 29 Jul 2022 16:36:02 +0000 (18:36 +0200)]
kernel: ipt-ipset: Add ipset/ip_set_hash_ipmac.ko

Add the ipset/ip_set_hash_ipmac.ko file. The CONFIG_IP_SET_HASH_IPMAC
KConfig option is already set by the package.

Signed-off-by: Hauke Mehrtens <hmehrtens@maxlinear.com>
(cherry picked from commit 6a2e9f3da6d0f0f3ae382db1e77a65c2f0e67d24)

20 months agokernel: netsupport: kmod-sched: explicitly define included modules
Thomas Langer [Fri, 29 Jul 2022 16:35:57 +0000 (18:35 +0200)]
kernel: netsupport: kmod-sched: explicitly define included modules

Change SCHED_MODULES_EXTRA to an explicit list of modules
instead of taking everything that is not filtered out.
This removes the need of updating the filter each time an extra
sch_*, act_* or similar is added with an own kmod definition.

Signed-off-by: Thomas Langer <tlanger@maxlinear.com>
Signed-off-by: Hauke Mehrtens <hmehrtens@maxlinear.com>
(cherry picked from commit 1b956e66ccafc962033260567c2f1e845f71683f)

20 months agokernel: netsupport: kmod-sched: Add kmod-lib-textsearch dependency
Hauke Mehrtens [Fri, 29 Jul 2022 16:35:56 +0000 (18:35 +0200)]
kernel: netsupport: kmod-sched: Add kmod-lib-textsearch dependency

The CONFIG_NET_EMATCH_TEXT configuration option depends on the
kmod-lib-textsearch package.

Signed-off-by: Hauke Mehrtens <hmehrtens@maxlinear.com>
(cherry picked from commit 3cc878a8d3e4d2d445bf2ee34883e9326bfa0bb2)

20 months agokernel: netsupport: kmod-sched: Remove sch_fq_codel and sch_fifo
Hauke Mehrtens [Fri, 29 Jul 2022 16:35:55 +0000 (18:35 +0200)]
kernel: netsupport: kmod-sched: Remove sch_fq_codel and sch_fifo

The sch_fq_codel.ko and the sch_fifo.ko are always compiled into the
kernel, they are activated in the generic kernel configuration. There is
no need to activate the build of these kernel modules in the kmod-sched*
packages.

Signed-off-by: Hauke Mehrtens <hmehrtens@maxlinear.com>
(cherry picked from commit 606e357bf824a314a0c6a147539974e99e8aabe1)

20 months agoarm-trusted-firmware-mediatek: skip bad blocks on SPI-NAND (SNFI)
Daniel Golle [Fri, 12 Aug 2022 20:16:00 +0000 (22:16 +0200)]
arm-trusted-firmware-mediatek: skip bad blocks on SPI-NAND (SNFI)

Add patch to skip bad blocks when reading from SPI-NAND. This is needed
in case erase block(s) early in the flash inside the FIP area are bad
and hence need to be skipped in order to be able to boot on such damaged
chips.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit c0109537d13650e3cfd4d4840c571a0d557b303a)

20 months agofstools: add uci fstab section to conffiles for package block-mount
Florian Eckert [Wed, 3 Aug 2022 07:54:06 +0000 (09:54 +0200)]
fstools: add uci fstab section to conffiles for package block-mount

The command 'opkg search /etc/config/fstab' does not return a package
name for this config file. In order to know to which package this config
file belongs to, a 'conffiles' entry was made for this file to package
'block-mount'.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 885f04b30556edddb9378c5e9eb561334e44ac7a)
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
20 months agokernel: scale nf_conntrack_max more reasonably
Vincent Pelletier [Sat, 19 Feb 2022 02:06:23 +0000 (02:06 +0000)]
kernel: scale nf_conntrack_max more reasonably

Use the kernel's built-in formula for computing this value.
The value applied by OpenWRT's sysctl configuration file does not scale
with the available memory, under-using hardware capabilities.
Also, that formula also influences net.netfilter.nf_conntrack_buckets,
which should improve conntrack performance in average (fewer connections
per hashtable bucket).

Backport upstream commit for its effect on the number of connections per
hashtable bucket.

Apply a hack patch to set the RAM size divisor to a more reasonable value (2048,
down from 16384) for our use case, a typical router handling several thousands
of connections.

Signed-off-by: Vincent Pelletier <plr.vincent@gmail.com>
Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
(cherry picked from commit 15fbb916669dcdfcc706e9e75263ab63f9f27c00)

20 months agodnsmasq: fix jail_mount for serversfile
Bruno Victal [Fri, 15 Apr 2022 14:30:01 +0000 (15:30 +0100)]
dnsmasq: fix jail_mount for serversfile

Fix 'serversfile' option not being jail_mounted by the init script.

Signed-off-by: Bruno Victal <brunovictal@outlook.com>
(cherry picked from commit 0276fab64933dc42bad865974dc224e2672f99fe)
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
20 months agoramips: Add Xiaomi Mi Router 4A 100M International
Nita Vesa [Fri, 29 Apr 2022 10:57:24 +0000 (13:57 +0300)]
ramips: Add Xiaomi Mi Router 4A 100M International

The international version of Mi Router 4A 100M is physically
identical to the non-international one, but appears to be
using a different partitioning scheme with the "overlay"
partition being 2MiB in size instead of 1MiB. This means
the following "firmware" partition starts at a different
address and the DTS needs to be adjusted for the firmware
to work.

Signed-off-by: Nita Vesa <werecatf@outlook.com>
(cherry picked from commit 1a8c74da709190e5157af9f5c2502b600f6273bb)
Signed-off-by: Tom Herbers <freifunk@tomherbers.de>
20 months agozlib: backport null dereference fix
Petr Štetiar [Tue, 9 Aug 2022 05:50:19 +0000 (07:50 +0200)]
zlib: backport null dereference fix

The curl developers found test case that crashed in their testing when
using zlib patched against CVE-2022-37434, same patch we've backported
in commit 7df6795d4c25 ("zlib: backport fix for heap-based buffer
over-read (CVE-2022-37434)"). So we need to backport following patch in
order to fix issue introduced in that previous CVE-2022-37434 fix.

References: https://github.com/curl/curl/issues/9271
Fixes: 7df6795d4c25 ("zlib: backport fix for heap-based buffer over-read (CVE-2022-37434)")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit f443e9de7003c00a935b9ea12f168e09e83b48cd)

20 months agozlib: bump PKG_RELEASE after CVE fix
Petr Štetiar [Mon, 8 Aug 2022 07:55:33 +0000 (09:55 +0200)]
zlib: bump PKG_RELEASE after CVE fix

Fixing missed bump of PKG_RELEASE while backporting commit 7561eab8e86e
("zlib: backport fix for heap-based buffer over-read (CVE-2022-37434)")
as package in master is using AUTORELEASE.

Fixes: 7561eab8e86e ("zlib: backport fix for heap-based buffer over-read (CVE-2022-37434)")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
20 months agozlib: backport fix for heap-based buffer over-read (CVE-2022-37434)
Petr Štetiar [Sat, 6 Aug 2022 12:55:07 +0000 (14:55 +0200)]
zlib: backport fix for heap-based buffer over-read (CVE-2022-37434)

zlib through 1.2.12 has a heap-based buffer over-read or buffer overflow
in inflate in inflate.c via a large gzip header extra field. NOTE: only
applications that call inflateGetHeader are affected. Some common
applications bundle the affected zlib source code but may be unable to
call inflateGetHeader.

Fixes: CVE-2022-37434
References: https://github.com/ivd38/zlib_overflow
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 7df6795d4c25447683fd4b4a4813bebcddaea547)

20 months agoodhcpd: update to git HEAD
Hans Dedecker [Tue, 22 Mar 2022 21:00:24 +0000 (22:00 +0100)]
odhcpd: update to git HEAD

860ca90 odhcpd: Support for Option NTP and SNTP
83e14f4 router: advertise removed addresses as invalid in 3 consecutive RAs

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
(cherry picked from commit 73c6d8fd046298face0e8aea8e52cc0faca67324)

20 months agouboot-mvebu: update to v2022.07
Andre Heider [Mon, 11 Jul 2022 17:49:21 +0000 (19:49 +0200)]
uboot-mvebu: update to v2022.07

- Release announcement:
https://lore.kernel.org/u-boot/20220711134339.GV1146598@bill-the-cat/

- Changes between 2022.04 and 2022.07:
https://source.denx.de/u-boot/u-boot/-/compare/v2022.04...v2022.07?from_project_id=531

Remove one upstreamed patch and add patch to fix issue with sunxi tool
as it uses function from newer version libressl (3.5.0).

Signed-off-by: Andre Heider <a.heider@gmail.com>
Tested-by: Josef Schlehofer <pepe.schlehofer@gmail.com> [Turris Omnia]
(cherry picked from commit 24bf6813bad98a8eba5430ed5e4da89d54797274)
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
[Improve commit message]

20 months agorealtek: Fix typo in Kconfig prompt
Olliver Schinagl [Thu, 4 Aug 2022 14:09:00 +0000 (16:09 +0200)]
realtek: Fix typo in Kconfig prompt

As the symbol RTL930x shows, the bool enables the RTL930x platform, not
the RTL839x one.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
(slightly changed commit subject)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(cherry picked from commit 943905b0b6ee59fb7eaf3611960c0ec87ed61bbc)

20 months agoramips: support fw_printenv for Netgear WAX202
Wenli Looi [Mon, 1 Aug 2022 03:22:32 +0000 (03:22 +0000)]
ramips: support fw_printenv for Netgear WAX202

Config partition contains uboot env for the first 0x20000 bytes.
The rest of the partition contains other data including the device MAC
address and the password printed on the label.

Signed-off-by: Wenli Looi <wlooi@ucalgary.ca>
(cherry picked from commit 0bfe1cfbb13c58d909951cab9fac8910ccbe74f3)

20 months agoumdns: add missing syscall to seccomp filter
Chen Minqiang [Sat, 30 Jul 2022 21:04:58 +0000 (05:04 +0800)]
umdns: add missing syscall to seccomp filter

There is some syscall missing:
'getdents64'
'getrandom'
'statx'
'newfstatat'

Found with:
'mkdir /etc/umdns; ln -s /tmp/1.json /etc/umdns/; utrace /usr/sbin/umdns'

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
(cherry picked from commit 31cca8f8d3f6218965812c46de35ba30c4ba83ab)

20 months agoramips: Add support command fw_setsys for Xiaomi routers
Oleg S [Tue, 19 Jul 2022 12:06:50 +0000 (15:06 +0300)]
ramips: Add support command fw_setsys for Xiaomi routers

The system parameters are contained in the Bdata partition.
To use the fw_setsys command, you need to create a file
fw_sys.config.
This file is created after calling the functions
ubootenv_add_uci_sys_config and ubootenv_add_app_config.

Signed-off-by: Oleg S <remittor@gmail.com>
[ wrapped commit description to 72 char ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 6c7e337c80f92693c2ca628a4a56aeaec4cc3ca8)

20 months agoltq-vdsl-app: Fix counter overflow resulting in negative values
Roland Barenbrug [Wed, 29 Jun 2022 11:09:25 +0000 (13:09 +0200)]
ltq-vdsl-app: Fix counter overflow resulting in negative values

The re-transmit counters can overflow the 32 bit representation resulting
in negative values being displayed. Background being that the numbers are
treated at some point as signed INT rather than unsigned INT.
Change the counters from 32 bit to 64 bit, should provide sufficient room
to avoid any overflow. Not the nicest solution but it works

Fixes: #10077
Signed-off-by: Roland Barenbrug <roland@treslong.com>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
(cherry picked from commit 456b9029d764e69f390ee26bca24883b12eb83c2)

20 months agokernel: silence refresh warning
Christian Lamparter [Fri, 5 Aug 2022 10:42:09 +0000 (12:42 +0200)]
kernel: silence refresh warning

|Warning: trailing whitespace in line 66 of drivers/mtd/parsers/Kconfig

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(cherry picked from commit d6801e0d3f8b0e764fef3d698edf74b3758667ec)

20 months agox86: add missing Lex 3I380NX network detection
Paul Spooren [Tue, 19 Jul 2022 13:24:59 +0000 (15:24 +0200)]
x86: add missing Lex 3I380NX network detection

The Lex 3I380NX industrial PC has 4 ethernet controllers on board
which need pmc_plt_clk0 - 3 to function, add it to the critclk_systems
DMI table, so that drivers/clk/x86/clk-pmc-atom.c will mark the clocks
as CLK_CRITICAL and they will not get turned off.

This commit is nearly redundant to 3d0818f5eba8 ("platform/x86:
pmc_atom: Add Lex 3I380D industrial PC to critclk_systems DMI table")
but for the 3I380NX device.

The original vendor firmware is only available using the WaybackMachine:
http://www.lex.com.tw/products/3I380NX.html

Signed-off-by: Michael Schöne <michael.schoene@rhebo.com>
Signed-off-by: Paul Spooren <paul.spooren@rhebo.com>
(Hans broader version for more Lex Baytrail systems)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(cherry picked from commit 8019410f566377d958e2bd23673d168742ab2f44)

20 months agolantiq: fix lan port 3+4 phy-mode settings for Fritzbox 3390
Daniel Kestrel [Fri, 5 Aug 2022 08:35:07 +0000 (10:35 +0200)]
lantiq: fix lan port 3+4 phy-mode settings for Fritzbox 3390

There are forum reports that 2 LAN ports are still not working,
the phy-mode settings are adjusted to fix the problem.

Fixes: #10371
Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
(cherry picked from commit 8756a047874bf688138a81898b6973f196cd1d36)

20 months agoipq40xx: fix RUTX10 Wi-Fi woes
Kasparas Elzbutas [Mon, 18 Jul 2022 07:05:33 +0000 (10:05 +0300)]
ipq40xx: fix RUTX10 Wi-Fi woes

This partially reverts:
commit cfc13c44595d ("ipq40xx: utilize nvmem-cells for macs & (pre-)calibration data")

U-Boot on these devices mangles the device tree,
so nvmem-cell type calibration doesn't work.

Fixes: cfc13c44595d ("ipq40xx: utilize nvmem-cells for macs & (pre-)calibration data")
Signed-off-by: Kasparas Elzbutas <elzkas@gmail.com>
(added reference to commit, rewrote commit message)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
20 months agolibmnl: fix build when bash is not located at /bin/bash
Mark Mentovai [Sun, 10 Jul 2022 23:43:05 +0000 (19:43 -0400)]
libmnl: fix build when bash is not located at /bin/bash

This fixes the libmnl build on macOS, which ships with an outdated bash
at /bin/bash. During the OpenWrt build, a modern host bash is built and
made available at staging_dir/host/bin/bash, which is present before
/bin/bash in the build's PATH.

This is similar to 8f7ce3aa6dda, presently appearing at
package/kernel/mac80211/patches/build/001-fix_build.patch.

Signed-off-by: Mark Mentovai <mark@mentovai.com>
(cherry picked from commit beeb49740bb4f68aadf92095984a2d1f9a488956)

21 months agoOpenWrt v22.03.0-rc6: revert to branch defaults
Hauke Mehrtens [Sun, 31 Jul 2022 22:05:33 +0000 (00:05 +0200)]
OpenWrt v22.03.0-rc6: revert to branch defaults

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
21 months agoOpenWrt v22.03.0-rc6: adjust config defaults v22.03.0-rc6
Hauke Mehrtens [Sun, 31 Jul 2022 22:05:27 +0000 (00:05 +0200)]
OpenWrt v22.03.0-rc6: adjust config defaults

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
21 months agomac80211: Update to version 5.15.58-1
Hauke Mehrtens [Sat, 30 Jul 2022 23:24:00 +0000 (01:24 +0200)]
mac80211: Update to version 5.15.58-1

This updates mac80211 to version 5.15.58-1 which is based on kernel
5.15.58.
The removed patches were applied upstream.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 3aa18f71f9c8a5447bdd2deda4e681175338164f)

21 months agowolfssl: fix math library build
John Audia [Thu, 21 Jul 2022 19:59:30 +0000 (15:59 -0400)]
wolfssl: fix math library build

Apply upstream patch[1] to fix breakage around math libraries.
This can likely be removed when 5.5.0-stable is tagged and released.

Build system: x86_64
Build-tested: bcm2711/RPi4B
Run-tested: bcm2711/RPi4B

1. https://github.com/wolfSSL/wolfssl/pull/5390

Signed-off-by: John Audia <therealgraysky@proton.me>
(cherry picked from commit c2aa816f28e0fe2f6f77d0c6da4eba19ea8db4ea)

21 months agoodhcp6c: update to latest git HEAD
Dávid Benko [Fri, 29 Jul 2022 12:55:21 +0000 (14:55 +0200)]
odhcp6c: update to latest git HEAD

9212bfc odhcp6c: fix IA discard when T1 > 0 and T2 = 0

Signed-off-by: Dávid Benko <davidbenko@davidbenko.dev>
(cherry picked from commit f9209086264a5c5c55f1eb3cbd2399cf47e29f22)

21 months agofirewall3: update file hash
Michael Pratt [Tue, 12 Jul 2022 00:35:38 +0000 (20:35 -0400)]
firewall3: update file hash

the hash and timestamp of the remote copy of the archive
has changed since last bump
meaning the remote archive copy was recreated

Signed-off-by: Michael Pratt <mcpratt@pm.me>
(cherry picked from commit ba7da7368086d0721da7cd4d627209dffda5c1d6)

21 months agouboot-at91: fix build on buildbots
Claudiu Beznea [Wed, 13 Jul 2022 06:19:33 +0000 (09:19 +0300)]
uboot-at91: fix build on buildbots

Buidbots are throwing the following compile error:

In file included from tools/aisimage.c:9:
include/image.h:1133:12: fatal error: openssl/evp.h: No such file or directory
            ^~~~~~~~~~~~~~~
compilation terminated.

Fix it by passing `UBOOT_MAKE_FLAGS` variable to make.

Suggested-by: Petr Štetiar <ynezz@true.cz>
Fixes: 6d5611af2813 ("uboot-at91: update to linux4sam-2022.04")
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
(cherry picked from commit 95a24b54792ccf072c029edad495deb529383478)

21 months agouboot-at91: update to linux4sam-2022.04
Claudiu Beznea [Wed, 29 Jun 2022 11:17:17 +0000 (14:17 +0300)]
uboot-at91: update to linux4sam-2022.04

Update uboot-at91 to linux4sam-2022.04. As linux4sam-2022.04 is based on
U-Boot v2022.01 which contains commit
93b196532254 ("Makefile: Only build dtc if needed") removed also the DTC
variable passed to MAKE to force the compilation of DTC.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
(cherry picked from commit 6d5611af2813e5f06fbf9b400ef0fe642f16c566)

21 months agoat91bootstrap: update at91bootstrap v4 targets to v4.0.3
Claudiu Beznea [Wed, 29 Jun 2022 11:13:27 +0000 (14:13 +0300)]
at91bootstrap: update at91bootstrap v4 targets to v4.0.3

Update AT91Bootstrap v4 capable targets to v4.0.3.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
(cherry picked from commit 859f5f9aec23c96ec3151175c349ffdbe6b108ef)

21 months agowolfssl: make shared again
Jo-Philipp Wich [Sun, 24 Jul 2022 11:23:36 +0000 (13:23 +0200)]
wolfssl: make shared again

Disable the usage of target specific CPU crypto instructions by default
to allow the package being shared again. Since WolfSSL does not offer
a stable ABI or a long term support version suitable for OpenWrt release
timeframes, we're forced to frequently update it which is greatly
complicated by the package being nonshared.

People who want or need CPU crypto instruction support can enable it in
menuconfig while building custom images for the few platforms that support
them.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 0063e3421de4575e088bb428e758751931bbe6fd)

21 months agokernel: bump 5.10 to 5.10.134
John Audia [Fri, 29 Jul 2022 16:25:26 +0000 (12:25 -0400)]
kernel: bump 5.10 to 5.10.134

All patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
(cherry picked from commit 7be62b1187bb7e21bcdaadfc3d47713a91f05898)

21 months agox86: update defconfig for 5.10.133
John Audia [Mon, 25 Jul 2022 14:16:43 +0000 (10:16 -0400)]
x86: update defconfig for 5.10.133

Add some new/missing symbols relating to speculative execution mitigations[1].

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/arch/x86/Kconfig?id=v5.10.133&id2=v5.10.132

Signed-off-by: John Audia <therealgraysky@proton.me>
(cherry picked from commit 56760c0b1316a0e379ff141b895c2929f0dace8d)

21 months agokernel: bump 5.10 to 5.10.133
John Audia [Mon, 25 Jul 2022 13:21:12 +0000 (09:21 -0400)]
kernel: bump 5.10 to 5.10.133

All patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800

Signed-off-by: John Audia <therealgraysky@proton.me>
(cherry picked from commit 913f160ac6c4dcf69ec0eb805c8a1cee809ace45)

21 months agokernel: bump 5.10 to 5.10.132
John Audia [Thu, 21 Jul 2022 20:19:32 +0000 (16:19 -0400)]
kernel: bump 5.10 to 5.10.132

All patches automatically rebased.

The following patch was replaced by a similar version upstream:
 bcm27xx/patches-5.10/950-0036-tty-amba-pl011-Add-un-throttle-support.patch

Signed-off-by: John Audia <therealgraysky@proton.me>
(cherry picked from commit 7d3c0928de191b203dd5b27ddf208698d08639e3)

21 months agoocteon: add SUPPORTED_DEVICES to er/erlite
Paul Spooren [Tue, 7 Jun 2022 11:26:43 +0000 (13:26 +0200)]
octeon: add SUPPORTED_DEVICES to er/erlite

Using the BOARD_NAME variable results for both er and erlite devices to
identify themselfs as `er` and `erlite` (via `ubus call system board`).

This is problematic when devices search for firmware upgrades since the
OpenWrt profile is actually called `ubnt_edgerouter` and
`ubnt_edgerouter-lite`.

By adding the `SUPPORTED_DEVICE` a mapping is created to point devices
called `er` or `erlite` to the corresponding profile.

FIXES: https://github.com/openwrt/asu/issues/348

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit 2a07270180ed0e295d854d6e9e59c78c40549efc)

21 months agouboot-bcm4908: include SoC in output files
Rafał Miłecki [Wed, 20 Jul 2022 11:47:06 +0000 (13:47 +0200)]
uboot-bcm4908: include SoC in output files

This fixes problem of overwriting BCM4908 U-Boot and DTB files by
BCM4912 ones. That bug didn't allow booting BCM4908 devices.

Fixes: f4c2dab544ec2 ("uboot-bcm4908: add BCM4912 build")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit a8e1e30543239e85ff5dc220368164b66cf73fba)

21 months agobcm4908: build bootfs image per-SoC
Rafał Miłecki [Wed, 20 Jul 2022 11:47:05 +0000 (13:47 +0200)]
bcm4908: build bootfs image per-SoC

In theory we could have just 1 bootfs image for all devices as each
device has its own entry in the "configurations" node. It doesn't work
well with default configuration though.

If something goes wrong U-Boot SPL can be interrupted (by pressing A) to
enter its minimalistic menu. It allows ignoring boardid. In such case
bootfs default configuration is used.

For above reason each SoC family (BCM4908, BCM4912) should have its own
bootfs built. It allows each of them to have working default
configuration.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 6ae2f7ff4737ec8dbec026fc6c02f7d1850b521c)

21 months agolantiq: fix network port GPIO settings for Fritzbox 3390
Daniel Kestrel [Fri, 22 Jul 2022 19:01:49 +0000 (21:01 +0200)]
lantiq: fix network port GPIO settings for Fritzbox 3390

There are forum reports that 2 LAN ports are not working, the
GPIO settings are adjusted to fix the problem.

Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
(cherry picked from commit 0f301b0b1d7ca4b5fe290a72f0434525405f5a26)

21 months agoipq806x: Archer VR2600: fix switch ports numbering
Christian Lamparter [Tue, 19 Jul 2022 17:46:38 +0000 (19:46 +0200)]
ipq806x: Archer VR2600: fix switch ports numbering

The order of LAN ports shown in Luci is reversed compared to what is
written on the case of the device.  Fix the order so that they match.

Fixes: #10275
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(cherry picked from commit 69ea671320c936e72f554348475eeebcab383b42)

21 months agolayerscape: update PKG_HASH / PKG_MIRROR_HASH
Christian Lamparter [Fri, 15 Jul 2022 19:07:42 +0000 (21:07 +0200)]
layerscape: update PKG_HASH / PKG_MIRROR_HASH

The change of the PKG_VERSION caused the hash of the package to
change. This is because the PKG_VERSION is present in the
internal directory structure of the archive.

Fixes: 038d5bdab117 ("layerscape: use semantic versions for LSDK")
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(cherry picked from commit e879cccaa21563a7cdf47797b18fb86723720158)
(cherry picked from commit d4391ef073825f5817cdbcc3fc215311f1bbb461)