Commit Graph

54751 Commits

Author SHA1 Message Date
Hauke Mehrtens
caac7a6a81 toolchain: Update glibc 2.34 to recent HEAD
f95fe70608 elf: Fix TLS modid reuse generation assignment (BZ 29039)
ba52b325c4 x86-64: Fix the dtv field load for x32 [BZ #31184]
2143fcd540 x86-64: Fix the tcb field load for x32 [BZ #31185]
43ac0f94f1 NEWS: Mention bug fixes for 29039/30745/30843
a08677d389 x86_64: Optimize ffsll function code size.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-02-22 21:48:02 +01:00
Oto Šťáva
948730e121
build: add explicit --no-show-signature for git
When `log.showSignature` is set, it causes the `SOURCE_DATE_EPOCH` to
include a textual signature description on OpenPGP-signed commits,
because Git prints the description into stdout. This then causes some
scripts to fail because they cannot parse the date from the variable.

Adding an explicit `--no-show-signature` prevents the signatures from
being displayed even when one has Git configured to show them by
default, fixing the scripts.

Signed-off-by: Oto Šťáva <oto.stava@gmail.com>
(cherry picked from commit 1e93208bd2)
2024-02-20 20:59:23 +01:00
Hauke Mehrtens
2c67fff961 mac80211: Update to version 5.15.148-1
This update mac80211 to version 5.15.148-1. This includes multiple
bugfixes. Some of these bugfixes are fixing security relevant bugs.

The following patch was integrated into upstream Linux:
package/kernel/mac80211/patches/subsys/352-wifi-mac80211-fix-invalid-drv_sta_pre_rcu_remove-cal.patch

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-02-01 21:53:12 +01:00
Lech Perczak
228cf39d92 ath79: add Ubiquiti Rocket M XW as alternate name to Bullet M XW
Ubiquiti Rocket M XW is a single-band, 2x2:2 external Wi-Fi AP, with optional
GPS receiver, with two external RP-SMA antenna connections, based on
AR9342 SoC. Two band variants exists, for 2.4GHz and 5GHz band, usable
with the same image.

Specs:
- CPU: Atheros AR9342 MIPS SoC at 535MHz
- RAM: 64MB DDR400
- ROM: 8MB SPI-NOR in SO16W package, MX25L6408E
- Wi-Fi Atheros AR9342 built-in 2x2:2 radio
- Ethernet: Atheros AR8035 PHY, limited to 100Mbps speeds due to
  magnetics
- Power: 24V passive PoE input.

Installation: please refer to Ubiquiti Bullet M2HP for documentation.

The device runs with exactly same image as the Bullet, and after fixes
in preceding commit, is fully functional again. Add the alternative name
to the build system.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
(cherry picked from commit 54387fddea)
2024-01-30 15:44:36 +01:00
Lech Perczak
c1a3174c08 ath79: ubnt-bullet-m-xw: fix Ethernet PHY traffic
Since commit 6f2e1b7485 ("ath79: disable delays on AT803X config init")
Ubiquiti XW boards equipped with AR8035 PHY suffered from lack of
outbound traffic on the Ethernet port. This was caused by the fact, the
U-boot has set this during boot and it wasn't reset by the PHY driver,
and the corresponding setting in device tree was wrong.

Set the 'phy-mode = "rgmii-txid"' at the &eth0, and drop this property
from PHY node, as it is not parsed there. This causes the device to
connect using Ethernet once again.

Fixes: db4b6535f8 ("ath79: Add support for Ubiquity Bullet M (XW)")
Fixes: 6f2e1b7485 ("ath79: disable delays on AT803X config init")
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
(cherry picked from commit a9b2ba4d7b)
2024-01-30 15:44:36 +01:00
Lech Perczak
294301c087 ath79: ubnt,bullet-m-xw: set PHY max-speed to 100Mbps
Onboard AR8035 PHY supports 1000Base-T operation, but onboard
Ethernet magnetics do not. Reduce advertised link speeds to 100Mbps and
lower.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
(cherry picked from commit d406777fb1)
2024-01-30 15:44:36 +01:00
orangepizza
7f64f5b11a
mbedtls: security bump to version 2.28.7
This release of Mbed TLS provides bug fixes and minor enhancements. This
release includes fixes for following security issues:

* Timing side channel in private key RSA operations (CVE-2024-23170)

  Mbed TLS is vulnerable to a timing side channel in private key RSA
  operations. This side channel could be sufficient for an attacker to
  recover the plaintext. A local attacker or a remote attacker who is
  close to the victim on the network might have precise enough timing
  measurements to exploit this. It requires the attacker to send a large
  number of messages for decryption.

* Buffer overflow in mbedtls_x509_set_extension() (CVE-2024-23775)

  When writing x509 extensions we failed to validate inputs passed in to
  mbedtls_x509_set_extension(), which could result in an integer overflow,
  causing a zero-length buffer to be allocated to hold the extension. The
  extension would then be copied into the buffer, causing a heap buffer
  overflow.

Fixes: CVE-2024-23170, CVE-2024-23775
References: https://mbed-tls.readthedocs.io/en/latest/security-advisories/mbedtls-security-advisory-2024-01-1/
References: https://mbed-tls.readthedocs.io/en/latest/security-advisories/mbedtls-security-advisory-2024-01-2/
Signed-off-by: orangepizza <tjtncks@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz> [formal fixes]
(cherry picked from commit 920414ca88)
(cherry picked from commit b5c728948c)
2024-01-29 09:45:00 +00:00
Jo-Philipp Wich
78d9e4c56f jsonfilter: update to Git HEAD (2024-01-23)
013b75ab0598 jsonfilter: drop legacy json-c support
594cfa86469c main: fix spurious premature parse aborts in array mode

Fixes: https://bugs.openwrt.org/?task_id=3683
Fixes: https://github.com/openwrt/openwrt/issues/8703
Fixes: https://github.com/openwrt/openwrt/issues/11649
Fixes: https://github.com/openwrt/openwrt/issues/12344
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 33f15dd6d4)
2024-01-23 09:10:03 +01:00
Hauke Mehrtens
c4df9473ef kernel: bump 5.10 to 5.10.208
Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.10.207
Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.10.208

All patches automatically rebased.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-01-21 12:49:29 +01:00
Rafał Miłecki
9b7311d4f9 bcm53xx: add the latest fix version of brcm_nvram
It was just sent for upstream.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 943bd3c9f6)
2024-01-18 16:49:34 +01:00
Rafał Miłecki
41e961c6f0 bcm53xx: backport brcm_nvram changes needed for fix patch
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2024-01-18 16:49:13 +01:00
Rafał Miłecki
8b32252bc4 kernel: use upstream firmware patch for Broadcom's NVRAM
This replaces our 2 downstream patches.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit ecd9abc8c0)
2024-01-18 10:16:46 +01:00
David Bauer
a08553b3b3 ath79: read back reset register
Read back the reset register in order to flush the cache. This fixes
spurious reboot hangs on TP-Link TL-WDR3600 and TL-WDR4300 with Zentel
DRAM chips.

This issue was fixed in the past, but switching to the reset-driver
specific implementation removed the cache barrier which was previously
implicitly added by reading back the register in question.

Link: freifunk-gluon/gluon#2904
Link: openwrt#13043
Link: https://dev.archive.openwrt.org/ticket/17839
Link: f8a7bfe1cb2c ("MIPS: ath79: fix system restart")

Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 2fe8ecd880)
2024-01-11 15:36:45 +01:00
Hauke Mehrtens
debf4b56cd kernel: bump 5.10 to 5.10.206
Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.10.206

All patches automatically rebased.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-01-08 01:39:10 +01:00
Hauke Mehrtens
6121581765 kernel: bump 5.10 to 5.10.203
Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.10.203

Removed upstreamed:
	backport-5.10/610-v5.13-10-netfilter-nftables-update-table-flags-from-the-commi.patch

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.203&id=7d1d3f1134254f5fae926f79fc0d94e3d7e2e452

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-01-07 23:38:20 +01:00
Lech Perczak
17ee3e0b20 raimps: mtk_eth_soc: drop rst_esw from ESW driver
The ESW core needs to be reset together with FE core, so after the
relevant reset controller lines are moved under FE, drop rst_esw and all
related code, which would not execute anyway, because rst_esw would be
NULL. While at that, ensure that if reset line for EPHY cannot be
claimed, a proper error message is reported.

Fixes: 60fadae62b ("ramips: ethernet: ralink: move reset of the esw into the esw instead of fe")

Co-developed-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>

[Split out of the bigger commit, provide commit mesage, refactor error
handling]
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>

(cherry picked from commit f393ffcac1)
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2024-01-04 22:29:46 +01:00
Maxim Anisimov
5ef01117b7 ramips: dts: mt7628an: reset FE and ESW cores together
Failing to do so will cause the DMA engine to not initialize properly
and fail to forward packets between them, and in some cases will cause
spurious transmission with size exceeding allowed packet size, causing a
kernel panic.

Fixes: 60fadae62b ("ramips: ethernet: ralink: move reset of the esw into the esw instead of fe")
Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>

[Provide commit description, split into logical changes]
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>

(cherry picked from commit f87b66507e)
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2024-01-04 22:29:32 +01:00
Lech Perczak
b80c17b093 ramips: dts: rt5350: reset FE and ESW cores together
Failing to do so will cause the DMA engine to not initialize properly
and fail to forward packets between them, and in some cases will cause
spurious transmission with size exceeding allowed packet size, causing a
kernel panic.

This is behaviour of downstream driver as well, however I
haven't observed bug reports about this SoC in the wild, so this
commit's purpose is to align this chip with all other SoC's - MT7620
were already using this arrangement.

Fixes: #9284
Fixes: 60fadae62b ("ramips: ethernet: ralink: move reset of the esw into the esw instead of fe")
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>

(cherry picked from commit fc92fecfc7)
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2024-01-04 22:29:11 +01:00
Lech Perczak
0c84a15288 ramips: dts: rt3050: reset FE and ESW cores together
Failing to do so will cause the DMA engine to not initialize properly
and fail to forward packets between them, and in some cases will cause
spurious transmission with size exceeding allowed packet size, causing a
kernel panic.

This is behaviour of downstream driver as well, however I
haven't observed bug reports about this SoC in the wild, so this
commit's purpose is to align this chip with all other SoC's - MT7620
were already using this arrangement.

Fixes: 60fadae62b ("ramips: ethernet: ralink: move reset of the esw into the esw instead of fe")
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>

(cherry picked from commit c5a399f372)
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2024-01-04 22:28:41 +01:00
Maxim Anisimov
37ed4c0ec2 ramips: dts: rt3352: reset FE and ESW cores together
Failing to do so will cause the DMA engine to not initialize properly
and fail to forward packets between them, and in some cases will cause
spurious transmission with size exceeding allowed packet size, causing a
kernel panic.

Fixes: 60fadae62b ("ramips: ethernet: ralink: move reset of the esw into the esw instead of fe")
Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>

[Provide commit description, split into logical changes]
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>

(cherry picked from commit 8d75b1de0f)
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2024-01-04 22:28:27 +01:00
Maxim Anisimov
8b4b924b85 ramips: mtk_eth_soc: wait longer after FE core reset to settle
Enabling the FE core too early causes the system to hang during boot
uncondtionally, after the reset is released. Increate it to 1-1.2ms
range.

Fixes: 60fadae62b ("ramips: ethernet: ralink: move reset of the esw into the esw instead of fe")
Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>

[Split previous commit, provide rationale]
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>

(cherry picked from commit 7eb0458c1f)
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2024-01-04 22:28:00 +01:00
Lech Perczak
ca942a5910 ramips: mtk_eth_soc: allow multiple resets
Use devm_reset_control_array_get_exclusive to register multiple
reset lines in FE driver. This is required to reattach ESW reset to FE
driver again, based on device tree bindings.

While at that, remove unused fe_priv.rst_ppe field, and add error
message if getting the reset fails.

Fixes: 60fadae62b ("ramips: ethernet: ralink: move reset of the esw into the esw instead of fe")

Co-developed-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>

[Split out of the bigger commit, provide commit mesage, refactor error
handling]
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>

(cherry picked from commit 3f1be8edee)
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2024-01-04 22:25:29 +01:00
Christian Marangi
05f74354bd
lua5.3: fix typo calling lua53 instead of lua5.3 for Package Default
Fix typo calling lua53 instead of lua5.3 for Package Default definition.

This cause only missing description of the package and doesn't cause
any build regression.

Fixes: c52ca08d40 ("lua5.3: build shared library")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 25e215c14e)
[ fix conflict with changed URL value ]
2023-12-10 11:48:11 +01:00
Hauke Mehrtens
1f7ca927b7 OpenWrt v22.03.6: revert to branch defaults
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-12-03 20:02:26 +01:00
Hauke Mehrtens
f372b715d4 OpenWrt v22.03.6: adjust config defaults
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-12-03 20:02:20 +01:00
Hauke Mehrtens
f85a79bcb4 kernel: bump 5.10 to 5.10.201
Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.10.201

Removed upstreamed:
	x86/patches-5.10/120-hwrng-geode-fix-accessing-registers.patch[1]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.201&id=ffb3483c4b0bff1951e4020b9d73e4c13bf7fe93

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-11-25 19:18:57 +01:00
Alexey Bartenev
e7b3414fd5 ramips: add support for SNR-CPE-W4N-MT router
General specification:
- SoC Type: MediaTek MT7620N (580MHz)
- ROM: 8 MB SPI-NOR (W25Q64FV)
- RAM: 64 MB DDR (M13S5121632A)
- Switch: MediaTek MT7530
- Ethernet: 5 ports - 5×100MbE (WAN, LAN1-4)
- Wireless 2.4 GHz: b/g/n
- Buttons: 1 button (RESET)
- Bootloader: U-Boot 1.1.3, MediaTek U-Boot: 5.0.0.5
- Power: 12 VDC, 1.0 A

Flash by the native uploader in 2 stages:
1. Use the native uploader to flash an initramfs image. Choose
 openwrt-ramips-mt7620-snr_cpe-w4n-mt-initramfs-kernel.bin file by
 "Administration/Management/Firmware update/Choose File" in vendor's
 web interface (ip: 192.168.1.10, login: Admin, password: Admin).
 Wait ~160 seconds.
2. Flash a sysupgrade image via the initramfs image. Choose
 openwrt-ramips-mt7620-snr_cpe-w4n-mt-squashfs-sysupgrade.bin
 file by "System/Backup/Flash Firmware/Flash image..." in
 LuCI web interface (ip: 192.168.1.1, login: root, no password).
 Wait ~240 seconds.

Flash by U-Boot TFTP method:
1. Configure your PC with IP 192.168.1.131
2. Set up TFTP server and put the
 openwrt-ramips-mt7620-snr_cpe-w4n-mt-squashfs-sysupgrade.bin
 image on your PC
3. Connect serial port (57600 8N1) and turn on the router.
 Then interrupt "U-Boot Boot Menu" by hitting 2 key (select "2:
 Load system code then write to Flash via TFTP.").
Press Y key when show "Warning!! Erase Linux in Flash then burn
 new one. Are you sure? (Y/N)"
Input device IP (192.168.1.1) ==:192.168.1.1
Input server IP (192.168.1.131) ==:192.168.1.131
Input Linux Kernel filename () ==:
openwrt-ramips-mt7620-snr_cpe-w4n-mt-squashfs-sysupgrade.bin
3. Wait ~120 seconds to complete flashing

Signed-off-by: Alexey Bartenev <41exey@proton.me>
(cherry picked from commit 7796c2d7ef)
[Fix merging conflict]
Signed-off-by: Alexey Bartenev <41exey@proton.me>
2023-11-21 00:43:17 +01:00
Rosen Penev
e4a70c96d9 tools: fix firmware-utils depends
When firmware-utils was converted to use cmake, the dependency was not
updated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry picked from commit b71affaf8b)
2023-11-21 00:38:36 +01:00
Rosen Penev
d8aa8ae8e9 tools/cmake: Build without some included libs
Saves a little bit of time when compiling cmake.

Added patches to fix searching liblzma and zlib. The issue is that
because pkgconfig is not used, the system libraries get used.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry picked from commit 3848cf458e)
2023-11-21 00:38:36 +01:00
Rosen Penev
35fd7762b2 tools/expat: build with autotools again
Allows to set expat as a dependency to cmake and save on compilation
time.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry picked from commit 89df3589e6)
2023-11-21 00:38:36 +01:00
Rosen Penev
e453767535 tools/zlib: switch to configure script
A future commit will make tools/cmake use this.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry picked from commit d602e7a969)
2023-11-21 00:38:36 +01:00
Hauke Mehrtens
3e511a7a23 kernel: bump 5.10 to 5.10.200
All patches automatically rebased.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-11-21 00:34:05 +01:00
Nick Hainke
545807ddff wolfssl: update to 5.6.4
Releae Notes:
https://github.com/wolfSSL/wolfssl/releases/tag/v5.6.4-stable

Remove upstreamed patch:
- 001-fix-detection-of-cut-tool-in-configure.ac.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
(cherry picked from commit d83231603c)
2023-11-19 14:58:44 +01:00
Hauke Mehrtens
0c7c87a306 urngd: update to version 2023-11-01
Fix compilation with glibc

44365eb Deactivate _FORTIFY_SOURCE in jitterentropy-base.c

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit d62726b1e4)
2023-11-19 14:58:44 +01:00
Hauke Mehrtens
72d940d811 mbedtls: Update to version 2.28.5
This fixes some minor security problems.
Changelog: https://github.com/Mbed-TLS/mbedtls/releases/tag/mbedtls-2.28.5

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
[Removed 100-x509-crt-verify-SAN-iPAddress.patch for 22.03]
(cherry picked from commit 9e1c5ad4b0)
2023-11-19 14:58:44 +01:00
Hauke Mehrtens
3af93be5a1 bsdiff: Add patches for CVEs
Add two patches from Debian fixing CVEs in the bsdiff application.
CVE-2014-9862: Heap vulnerability in bspatch
CVE-2020-14315: Memory Corruption Vulnerability in bspatch

Copied the patches from this location:
https://salsa.debian.org/debian/bsdiff/-/blob/debian/latest/debian/patches/20-CVE-2014-9862.patch
https://salsa.debian.org/debian/bsdiff/-/blob/debian/latest/debian/patches/33-CVE-2020-14315.patch

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit cac723e8b8)
2023-11-19 14:58:44 +01:00
Yuu Toriyama
b87913e21d wireless-regdb: update to 2023.09.01
Changes:
    9dc0800 wireless-regdb: Update regulatory rules for Philippines (PH)
    111ba89 wireless-regdb: Update regulatory rules for Egypt (EG) from March 2022 guidelines
    ae1421f wireless-regdb: Update regulatory info for Türkiye (TR)
    20e5b73 wireless-regdb: Update regulatory rules for Australia (AU) for June 2023
    991b1ef wireless-regdb: update regulatory database based on preceding changes

Signed-off-by: Yuu Toriyama <PascalCoffeeLake@gmail.com>
(cherry picked from commit 0e13363de6)
2023-11-19 14:58:44 +01:00
Tomasz Maciej Nowak
7901fec6b8 ath79: image: allow changing kernel option in mkubntimage
Backport didn't include changes to mkubntimage invocation, which allowed
to pass arguments. This in result produces broken routerstation factory
images, which have kernel embedded as kernel partition instead of LZMA
loader.

Fixes: #13260
Fixes: 8e09f9ffc3 ("ath79: switch some RedBoot based devices to OKLI loader")
Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
2023-11-19 14:58:44 +01:00
Christian Marangi
7dabd7a206
scripts/dump-target-info.pl: add new function to DUMP devices
Add new function to dump-targer-info.pl to DUMP devices provided a
matching target/subtarget.

Example:

./scripts/dump-targer-info.pl devices ipq806x/generic

will produce the sorted list of devices defined in the following format:

device_id device_name

Devices may have alternative names, the script will dump each
alternative name in the same line of device_id.

Following the pattern:

device_id "PRIMARY DEVICE NAME" "ALT0 DEVICE NAME" "ALT1 DEVICE NAME" ...

Example:

tplink_ad7200 "TP-Link AD7200 v1/v2" "TP-Link Talon AD7200 v1/v2"

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 943c153cdd)
2023-11-15 11:00:42 +01:00
Petr Štetiar
3555a2930f
treewide: fix shell errors during dump stage
Fixes following issues:

 bash: -c: line 1: `echo 1686820180<LINUX_VERMAGIC> | /staging_dir/host/bin/mkhash md5 | cut -b1-8'
 bash: -c: line 1: `echo 1686820180<LINUX_VERMAGIC> | /staging_dir/host/bin/mkhash md5 | sed -E 's/(.{8})(.{4})(.{4})(.{4})(.{10})../\1-\2-\3-\4-\500/''
 bash: -c: line 1: syntax error near unexpected token `|'
 bash: line 1: *1024*1024: syntax error: operand expected (error token is "*1024*1024")
 bash: line 1: (64 + ): syntax error: operand expected (error token is ")")
 expr: syntax error: missing argument after '+'

Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 8fc496be86)
[ fix merge conflicts, adapt to 22.03 ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-11-13 14:10:56 +01:00
Petr Štetiar
9bac24e767
scan.mk: do not silence output of dump phase
Make it easier to spot currently hidden issues:

 $ make defconfig V=sc
 ...
 Collecting target info: target/linux/airohabash: -c: line 1: syntax error near unexpected token `|'
 bash: -c: line 1: `echo 1686815253<LINUX_VERMAGIC> | staging_dir/host/bin/mkhash md5 | cut -b1-8'
 bash: -c: line 1: syntax error near unexpected token `|'
 bash: -c: line 1: `echo 1686815253<LINUX_VERMAGIC> | staging_dir/host/bin/mkhash md5 | sed -E 's/(.{8})(.{4})(.{4})(.{4})(.{10})../\1-\2-\3-\4-\500/''
 ...

Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit b522da5b16)
2023-11-13 14:03:20 +01:00
Christian Marangi
86124a1b3a
scripts/getver.sh: prevent asking for negative rev-parse
With the case of asking an invalid version that is too big, getver.sh
might return an invalid output in the form of HEAD~-2260475641.

This is caused by BASE_REV - GET_REV using a negative number.

Prevent this by checking if BASE_REV - GET_REV actually return 0 or a
positive number and set REV variable accordingly. With the following
change, invalid revision number will result in unknown printed instead
of the invalid HEAD~-NUMBERS output.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 9e49e0a6c4)
2023-11-12 16:19:58 +01:00
Christian Marangi
fcdecb5ba4
hostapd: permit also channel 7 for 2.5GHz to be set to HT40PLUS
Also channel 7 for 2.4GHz can be set to HT40PLUS. Permit this and add it
to the list of the channels.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit b1c7b1bd67)
[ rework for openwrt-22.03 ]
2023-11-09 16:20:43 +01:00
Christian Marangi
64907f3c34
hostapd: fix broke noscan option for mesh
noscan option for mesh was broken and actually never applied.

This is caused by a typo where ssid->noscan value is check instead of
conf->noscan resulting in the logic swapped and broken.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 1b5ea2e199)
[ rework for openwrt-22.03 ]
2023-11-09 16:18:58 +01:00
Christian Marangi
6e77f51b3a
mac80211: fix not set noscan option for wpa_supplicant
noscan option was changed to hostapd_noscan but the entry in
wpa_supplicant was never updated resulting in the noscan option actually
never set.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 1070fbce6e)
[ rework for openwrt-22.03 ]
2023-11-09 16:15:51 +01:00
Jeffery To
bb2b55f376
build: export GIT_CEILING_DIRECTORIES for package builds
A package may run git as part of its build process, and if the package
source code is not from a git checkout, then git may traverse up the
directory tree to find buildroot's repository directory (.git).

For instance, Poetry Core, a Python build backend, will read the
contents of .gitignore for paths to exclude when creating a Python
package. If it finds buildroot's .gitignore file, then Poetry Core will
exclude all of the package's files[1].

This exports GIT_CEILING_DIRECTORIES for both package and host builds so
that git will not traverse beyond $(BUILD_DIR)/$(BUILD_DIR_HOST).

[1]: https://github.com/python-poetry/poetry/issues/5547

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
(cherry picked from commit f597f34f3a)
2023-11-08 17:18:15 +01:00
Rafał Miłecki
f71ab69b84 bcm53xx: refresh kernel config
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-11-06 13:28:56 +01:00
Hauke Mehrtens
85251576c4 kernel: bump 5.10 to 5.10.199
All patches automatically rebased.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-11-02 21:09:44 +01:00
Hauke Mehrtens
f3a78afe7f kernel: bump 5.10 to 5.10.198
All patches automatically rebased.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-11-02 21:09:44 +01:00
Andrey Erokhin
de2162d27d
toolchain: gcc: backport v11.3.0 fix for false positive VLA params warnings
If the vla parameter has a const specifier, the compiler will warn about
mismatched bounds:

 $ cat mwe.c
 extern void mwe(const int len, char buf[len]);
 void mwe(const int len, char buf[len]) {}

 $ make CFLAGS=-Wvla-parameter mwe.o
 cc -Wvla-parameter   -c -o mwe.o mwe.c
 mwe.c:2:30: warning: argument 2 of type ‘char[len]’ declared with mismatched bound ‘len’ [-Wvla-parameter]
     2 | void mwe(const int len, char buf[len]) {}
       |                         ~~~~~^~~~~~~~
 mwe.c:1:37: note: previously declared as ‘char[len]’ with bound ‘len’
     1 | extern void mwe(const int len, char buf[len]);
       |                                ~~~~~^~~~~~~~

On some code bases it might result in a lot of false positive warnings,
which can indeed be easily disabled, but on the other this workaround
might hide some real issues, so lets rather fix the compiler and make it
more reliable.

References: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101289
Signed-off-by: Andrey Erokhin <a.erokhin@inango-systems.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz> [commit message]
2023-11-02 18:45:50 +01:00