Sergey V. Lobanov [Mon, 29 Nov 2021 16:09:10 +0000 (19:09 +0300)]
toolchain/gcc: fix build on MacOS arm64
Added patch for GCC to fix compilation issues on MacOS arm64
The original commit message from Przemysław Buczkowski:
GCC: Patch for Apple Silicon compatibility
This patch fixes a linker error occuring when compiling
the cross-compiler on macOS and ARM64 architecture.
Adapted from:
https://github.com/richfelker/musl-cross-make/issues/116#issuecomment-
823612404
Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
Sergey V. Lobanov [Mon, 29 Nov 2021 16:07:34 +0000 (19:07 +0300)]
tools/fakeroot: fix build on MacOS arm64
Added patch for MacOS without 32 bit inodes support
(__DARWIN_ONLY_64_BIT_INO_T is true)
This patch based on discussion https://github.com/archmac/bootstrap/issues/4
Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
Felix Fietkau [Thu, 2 Dec 2021 13:11:21 +0000 (14:11 +0100)]
mac80211: fix tx aggregation locking issue
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Felix Fietkau [Thu, 2 Dec 2021 12:52:18 +0000 (13:52 +0100)]
mac80211: fix queue assignment of aggregation start requests
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Felix Fietkau [Thu, 2 Dec 2021 10:26:36 +0000 (11:26 +0100)]
mt76: update to the latest version
a6451fea5a3d mt76: mt7615: improve wmm index allocation
1911486414dc mt76: mt7915: improve wmm index allocation
7998a41d1321 mt76: clear sta powersave flag after notifying driver
664475574438 mt76: mt7603: introduce SAR support
5c0da39c940b mt76: mt7915: introduce SAR support
77fc6c439a32 mt76: mt7603: improve reliability of tx powersave filtering
094b3d800835 firmware: update mt7663 rebb firmware to
20200904171623
25237b19bcc1 mt76: eeprom: tolerate corrected bit-flips
1463cb4c6ac2 mt76: mt7921: fix boolreturn.cocci warning
586bad6020f7 mt76: mt7921: use correct iftype data on 6GHz cap init
8ec95c910425 mt76: mt7921s: fix bus hang with wrong privilege
688e30c7d854 firmware: update mt7921 firmware to version
20211014
6fad970893dd mt76: fix key pointer overwrite in mt7921s_write_txwi/mt7663_usb_sdio_write_txwi
95acf972750c mt76: fix 802.3 RX fail by hdr_trans
3f402b0cf6c0 mt76: mt7921s: fix possible kernel crash due to invalid Rx count
929a03a8d65d mt76: connac: fix last_chan configuration in mt76_connac_mcu_rate_txpower_band
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Michel Promonet [Sat, 13 Nov 2021 15:15:53 +0000 (16:15 +0100)]
sunxi: update nanopi neo air that use brcmfmac43430a0
Update wifi firmware used for nanopi neo air, with
cypress-firmware-43430-sdio there is no wifi detected, as
brcmfmac-firmware-
43430a0-sdio allow to acces to wifi.
Signed-off-by: Michel Promonet <michel.promonet@free.fr>
Rafał Miłecki [Mon, 29 Nov 2021 09:25:30 +0000 (10:25 +0100)]
bcm4908: sysupgrade: refactor handling different firmware formats
This results in setting format specific data (format info, extract
commands) in a single function. It should help maintaining sysupgrade
code.
This change has been tested on Asus GT-AC5300 and Netgear R8000P.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Rafał Miłecki [Sun, 28 Nov 2021 10:54:19 +0000 (11:54 +0100)]
bcm53xx: sysupgrade: refactor handling different firmware formats
List of supported formats grew over time and implementation got a bit
messy. There are multiple functions with format-specific parameters and
commands.
Refactor it by making platform_identify() setup all required info right
after detecting firmware format. This simplifies formats handling in
platform_other_check_image() and platform_do_upgrade() a lot.
This has been tested on:
1. SmartRG SR400ac (TRX): non-NAND sysupgrade
2. Netgear R8000 (CHK): NAND aware and standard sysupgrade-s
3. D-Link DIR-885L (Seama): NAND aware and standard sysupgrade-s
4. Luxul XWR-3150 (LXL): NAND aware and standard sysupgrade-s
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Rafał Miłecki [Fri, 26 Nov 2021 17:01:50 +0000 (18:01 +0100)]
bcm53xx: sysupgrade: simplify extracting image from Seama seal
Use "oseama extract" which supports now writing to stdout.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Rafał Miłecki [Thu, 2 Dec 2021 08:14:09 +0000 (09:14 +0100)]
firmware-utils: bump to the latest master
56e8e19 otrx: support TRX from stdin when extracting
a37ccaf otrx: support unsorted partitions offsets
1fa145e otrx: extract shared code opening & parsing TRX format
0fbc135 oseama: support extracting entity to stdout
58c9d5d oseama: allow reading from stdin
4ecefda otrx: allow validating TRX from stdin
cf01e69 otrx: avoid unneeded fseek() when calculating CRC32
fa35379 tplink-safeloader: add EAP225 v1 support
f4d1263 build, cmake: switch OPENSSL_CRYPTO_LIBRARY -> OPENSSL_CRYPTO_LIBRARIES
cd3f6ee build, cmake: add quotes for FW_UTIL variable arguments
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Christian Lamparter [Wed, 1 Dec 2021 14:01:23 +0000 (15:01 +0100)]
ca-certificates: fix python3-cryptography woes in certdata2pem.py
This patch is a revert of the upstream patch to Debian's ca-certificate
commit
033d52259172 ("mozilla/certdata2pem.py: print a warning for expired certificates.")
The reason is, that this change broke builds with the popular
Ubuntu 20.04 LTS (focal) releases which are shipping with an
older version of the python3-cryptography package that is not
compatible.
|Traceback (most recent call last):
| File "certdata2pem.py", line 125, in <module>
| cert = x509.load_der_x509_certificate(obj['CKA_VALUE'])
|TypeError: load_der_x509_certificate() missing 1 required positional argument: 'backend'
|make[5]: *** [Makefile:6: all] Error 1
...or if the python3-cryptography was missing all together:
|Traceback (most recent call last):
| File "/certdata2pem.py", line 31, in <module>
| from cryptography import x509
|ModuleNotFoundError: No module named 'cryptography'
More concerns were raised by Jo-Philipp Wich:
"We don't want the build to depend on the local system time anyway.
Right now it seems to be just a warning but I could imagine that
eventually certs are simply omitted of found to be expired at
build time which would break reproducibility."
Link: <https://github.com/openwrt/openwrt/commit/
7c99085bd697>
Reported-by: Chen Minqiang <ptpt52@gmail.com>
Reported-by: Shane Synan <digitalcircuit36939@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Felix Fietkau [Wed, 1 Dec 2021 15:38:35 +0000 (16:38 +0100)]
hostapd: make hostapd/supplicant/wpad packages depend on a specific version of hostapd-commoon
This avoids potential version mismatch between packages when upgraded
individually
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Felix Fietkau [Sun, 28 Nov 2021 10:46:11 +0000 (11:46 +0100)]
qosify: remove bulk flow detection from default ports
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Felix Fietkau [Sun, 28 Nov 2021 10:45:25 +0000 (11:45 +0100)]
qosify: add besteffort class and switch all default classifications to class names
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Stijn Tintel [Thu, 25 Nov 2021 04:33:26 +0000 (06:33 +0200)]
nftables: bump to 1.0.1
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Stijn Tintel [Thu, 25 Nov 2021 04:32:18 +0000 (06:32 +0200)]
libnftnl: bump to 1.2.1
This version is required by nftables 1.0.1.
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Aleksander Jan Bajkowski [Fri, 5 Nov 2021 19:28:07 +0000 (20:28 +0100)]
lantiq: xway_legacy: disable unused switches
The xway_legacy subtarget only supports 5 devices. Most compiled
switch drivers are unused by any of these devices. The same drivers
are compiled into the xway subtarget. They were probably copied
from there when creating this subtarget.
Switches used by devices:
Arcadyan ARV4518PWR01 Realtek RTL8306SD
Arcadyan ARV4518PWR01A Realtek RTL8306SD
Arcadyan ARV4520PW Infineon ADM6996I
Arcadyan ARV4525PW only PHY(IC+ IP101A)
Arcadyan ARV452CQW Realtek RTL8306
The CONFIG_ETHERNET_PACKET_MANGLE symbol has also been disabled,
as it is only needed by the driver for AR8216.
Reduces kernel size by 19.9 kB.
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Martin Kennedy [Wed, 24 Nov 2021 00:07:14 +0000 (19:07 -0500)]
mpc85xx: Fix HiveAP-330 nvmem mac loader
We actually need to enclose the whole section of partitions in a
`partitions { ... }` to assign it a `compatible = "fixed-partitions";
otherwise the partition referred to by `hwinfo` won't be registered
when bringing up MTD partitions, for example as per:
- <https://forum.openwrt.org/t/tp-link-c2600-missing-default-mac-mtd-partition-in-snapshot/103945/6>
- commit
e2b03c16eb44 ("ipq806x: add missing enclosing partitions block for TP-Link C2600")'
Fixes: 8ec21d6bb210 ("mpc85xx: convert mtd-mac-address to nvmem implementation")
Signed-off-by: Martin Kennedy <hurricos@gmail.com>
[minor beautification]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Christian Lamparter [Sun, 28 Nov 2021 01:31:54 +0000 (02:31 +0100)]
ca-certicficates: Update to version
20211016
Update the ca-certificates and ca-bundle package from version
20210119 to
version
20211016.
Debian change-log entry [1]:
|[...]
|[ Julien Cristau ]
|* mozilla/{certdata.txt,nssckbi.h}: Update Mozilla certificate authority
| bundle to version 2.50
| The following certificate authorities were added (+):
| + "AC RAIZ FNMT-RCM SERVIDORES SEGUROS"
| + "GlobalSign Root R46"
| + "GlobalSign Root E46"
| + "GLOBALTRUST 2020"
| + "ANF Secure Server Root CA"
| + "Certum EC-384 CA"
| + "Certum Trusted Root CA"
| The following certificate authorities were removed (-):
| - "QuoVadis Root CA"
| - "Sonera Class 2 Root CA"
| - "GeoTrust Primary Certification Authority - G2"
| - "VeriSign Universal Root Certification Authority"
| - "Chambers of Commerce Root - 2008"
| - "Global Chambersign Root - 2008"
| - "Trustis FPS Root CA"
| - "Staat der Nederlanden Root CA - G3"
| * Blacklist expired root certificate "DST Root CA X3" (closes: #995432)
|[...]
[1] <https://metadata.ftp-master.debian.org/changelogs//main/c/ca-certificates/ca-certificates_20211016_changelog>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Kevin Darbyshire-Bryant [Mon, 29 Nov 2021 20:30:42 +0000 (20:30 +0000)]
nftables: install package file
Install pc file so dnsmasq can find libnftables
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Hauke Mehrtens [Sun, 14 Nov 2021 22:52:17 +0000 (23:52 +0100)]
bcm4908: Deactivate pci feature
This target does not activate CONFIG_PCI kernel configuration option, do
not activate the PCI feature. This will deactivate some PCI drivers
which are not building without PCI support in the kernel.
If PCI_SUPPORT or PCIE_SUPPORT are activated in the kernel configuration
the feature flag will be automatically set by the build system again.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Hauke Mehrtens [Sun, 14 Nov 2021 22:52:16 +0000 (23:52 +0100)]
kernel: Deactivate B53 symbols in generic configuration
Deactivate all the symbols of the B53 DSA driver in the generic kernel
configuration. Multiple targets are now using this drivers and they
only need some of the options.
This fixes the bcm4908 build which didn't deactivate all of the options.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Chukun Pan [Sat, 6 Nov 2021 04:01:36 +0000 (12:01 +0800)]
sunxi: remove kmod-rtc-sunxi for unsupported devices
From driver source:
{ .compatible = "allwinner,sun4i-a10-rtc", .data =
&data_year_param[0] },
{ .compatible = "allwinner,sun7i-a20-rtc", .data =
&data_year_param[1] },
The rtc-sunxi module only supports allwinner a10 and a20 SoCs,
other SoCs in the cortexa7 and cortexa53 subtarget using the
CONFIG_RTC_DRV_SUN6I driver which is compiled into the kernel
binary, so remove this package for these unsupported devices.
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Oldřich Jedlička [Sun, 7 Nov 2021 19:30:25 +0000 (20:30 +0100)]
mac80211: fixed missing cfg80211 dependency on kmod-rfkill
When compiling with CONFIG_USE_RFKILL=y, the build fails and mentions that
dependency on kmod-rfkill is missing, which is correct [1]. Add this
dependency to the Makefile.
Depend on +USE_RFKILL and not PACKAGE_kmod-rfkill, because it forces
selection of kmod-rfkill package. Other combinations in DEPENDS like
USE_RFKILL:kmod-rfkill or (+)PACKAGE_kmod-rfkill:kmod-rfkill do not force
selection of kmod-rfkill package.
The kmod-rfkill package itself depends on USE_RFKILL, so with +USE_RFKILL
in kmod-cfg80211 package it is not possible to select wrong combination of
packages.
[1] https://linux-wireless.vger.kernel.narkive.com/m8JY9Iks/cfg80211-depends-on-rfkill-or-not
Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
Robert Marko [Mon, 29 Nov 2021 11:46:54 +0000 (12:46 +0100)]
ath10k-ct: Fix spectral scan NULL pointer
If spectral scan support is enabled then ath10k-ct will cause a NULL
pointer due to relay_open() being called with a const callback struct
which is only supported in kernel 5.11 and later.
So, simply check the kernel version and if 5.11 and newer use the const
callback struct, otherwise use the regular struct.
Fixes: 553a3ac ("ath10k-ct: use 5.15 version")
Signed-off-by: Robert Marko <robimarko@gmail.com>
Sander Vanheule [Thu, 25 Nov 2021 05:41:59 +0000 (06:41 +0100)]
realtek: netgear-gigabit: Add gpio-restart node
The Netgear GS110TPP v1 switch cannot reliably perform cold reboots
using the system's internal reset controller.
On this device, and the other supported Netgear switches, internal GPIO
line 13 is connected to the system's hard reset logic. Expose this GPIO
on all systems to ensure restarts work properly.
Cc: Raylynn Knight <rayknight@me.com>
Cc: Michael Mohr <akihana@gmail.com>
Cc: Stijn Segers <foss@volatilesystems.org>
Cc: Stijn Tintel <stijn@linux-ipv6.be>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
Tested-by: Bjørn Mork <bjorn@mork.no>
Sander Vanheule [Thu, 25 Nov 2021 05:41:58 +0000 (06:41 +0100)]
realtek: Enable gpio-restart driver
Add the gpio-restart driver to the realtek build. This way devices,
which cannot reliably perform resets using the SoC's internal reset
logic, can use a GPIO line to drive the SoC's hard reset input.
Signed-off-by: Sander Vanheule <sander@svanheule.net>
Sander Vanheule [Thu, 25 Nov 2021 05:40:07 +0000 (06:40 +0100)]
realtek: add missing GPIO irq properties
The internal GPIO controller on RTL838x is also an IRQ controller, which
requires the 'interrupt-controller' and '#interrupts-cells' properties
to be present in the device tree.
Reported-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
Bjørn Mork [Mon, 12 Apr 2021 12:27:25 +0000 (14:27 +0200)]
realtek: use full range of assigned MAC addresses
Some devices are assigned globally unique MAC addresses for all
ports. These are stored by U-Boot in the second U-Boot enviroment
("sysinfo") as a range of start and end address.
Use the full range if provided.
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Bjørn Mork [Mon, 12 Apr 2021 12:27:23 +0000 (14:27 +0200)]
realtek: revert to "standard" management configuration
The default management interface should be easy to find for users
doing "blind" installations without console access. There are
already multiple examples in the forum of advanced early adopters
having problems locating the management interface after installing
OpenWrt.
Requiring tagged VLAN configration to access the initial management
interface creates unnecessary hassle at best. Errors on the other
end are close to impossible to debug without console access, even
for advanced users. Less advanced users might have problems with
the concept of VLAN tagging.
Limiting management access to a single arbitrary port among up to
52 possible LAN ports makes this even more difficult, for no
reason at all. Users might have reasons to use a different port
for management. And they might even have difficulties using the
OpenWrt selected one. The port might be the wrong type for their
management link (e.g copper instead of fibre). Or they might
depend on PoE power from a device which they can't reconfigure.
User expectations will be based on
- OpenWrt defaults for other devices
- stock firmware default for the device in question
- common default behaviour of similar devices
All 3 cases point to a static IP address accessible on the native
VLAN of any LAN port. A switch does not have any WAN port. All
ports are LAN ports.
This changes the default network configuration in line with these
expectations.
Cc: John Crispin <john@phrozen.org>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Hauke Mehrtens [Sun, 28 Nov 2021 21:23:47 +0000 (22:23 +0100)]
uboot-omap: Remove omap3_overo configuration
The configs/omap3_overo_defconfig file was removed from upstream U-Boot
in commit
ed3294d6d1f9 ("arm: Remove overo board"). Remove it in OpenWrt
too. If someone needs this please add it also to upstream U-Boot.
This fixes the compile of the omap target.
Fixes: ffb807ec90d3 ("omap: update u-boot to 2021.07")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Daniel Golle [Sat, 27 Nov 2021 12:02:05 +0000 (12:02 +0000)]
image: fix CONFIG_EXTERNAL_CPIO handling
CONFIG_EXTERNAL_CPIO is a string variable, hence testing for 'y'
doesn't make much sense here.
Fixes: 330bd380e8 ("image: allow building FIT and uImage with ramdisk")
Reported-by: Huangbin Zhan <zhanhb88@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Hauke Mehrtens [Sun, 28 Nov 2021 18:12:53 +0000 (19:12 +0100)]
kernel: Add extra kernel configuration options for omap
This fixes the build on omap.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Felix Matouschek [Thu, 15 Jul 2021 19:48:11 +0000 (21:48 +0200)]
ipq40xx: Add support for Teltonika RUTX10
This patch adds support for the Teltonika RUTX10.
This device is an industrial DIN-rail router with 4 ethernet ports,
2.4G/5G dualband WiFi, Bluetooth, a USB 2.0 port and two GPIOs.
The RUTX series devices are very similiar so common parts of the DTS
are kept in a DTSI file. They are based on the QCA AP-DK01.1-C1 dev
board.
See https://teltonika-networks.com/product/rutx10 for more info.
Hardware:
SoC: Qualcomm IPQ4018
RAM: 256MB DDR3
SPI Flash 1: XTX XT25F128B (16MB, NOR)
SPI Flash 2: XTX XT26G02AWS (256MB, NAND)
Ethernet: Built-in IPQ4018 (SoC, QCA8075), 4x 10/100/1000 ports
WiFi 1: Qualcomm QCA4019 IEEE 802.11b/g/n
Wifi 2: Qualcomm QCA4019 IEEE 802.11a/n/ac
USB Hub: Genesys Logic GL852GT
Bluetooth: Qualcomm CSR8510 (A10U)
LED/GPIO controller: STM32F030 with custom firmware
Buttons: Reset button
Leds: Power (green, cannot be controlled)
WiFi 2.4G activity (green)
WiFi 5G activity (green)
MACs Details verified with the stock firmware:
eth0: Partition 0:CONFIG Offset: 0x0
eth1: = eth0 + 1
radio0 (2.4 GHz): = eth0 + 2
radio1 (5.0 GHz): = eth0 + 3
Label MAC address is from eth0.
The LED/GPIO controller needs a separate kernel driver to function.
The driver was extracted from the Teltonika GPL sources and can be
found at following feed: https://github.com/0xFelix/teltonika-rutx-openwrt
USB detection of the bluetooth interface is sometimes a bit flaky. When
not detected power cycle the device. When the bluetooth interface was
detected properly it can be used with bluez / bluetoothctl.
Flash instructions via stock web interface (sysupgrade based):
1. Set PC to fixed ip address 192.168.1.100
2. Push reset button and power on the device
3. Open u-boot HTTP recovery at http://192.168.1.1
4. Upload latest stock firmware and wait until the device is rebooted
5. Open stock web interface at http://192.168.1.1
6. Set some password so the web interface is happy
7. Go to firmware upgrade settings
8. Choose
openwrt-ipq40xx-generic-teltonika_rutx10-squashfs-nand-factory.ubi
9. Set 'Keep settings' to off
10. Click update, when warned that it is not a signed image proceed
Return to stock firmware:
1. Set PC to fixed ip address 192.168.1.100
2. Push reset button and power on the device
3. Open u-boot HTTP recovery at http://192.168.1.1
4. Upload latest stock firmware and wait until the device is rebooted
Note: The DTS expects OpenWrt to be running from the second rootfs
partition. u-boot on these devices hot-patches the DTS so running from the
first rootfs partition should also be possible. If you want to be save follow
the instructions above. u-boot HTTP recovery restores the device so that when
flashing OpenWrt from stock firmware it is flashed to the second rootfs
partition and the DTS matches.
Signed-off-by: Felix Matouschek <felix@matouschek.org>
Matthew Hagan [Sun, 9 May 2021 22:28:04 +0000 (23:28 +0100)]
ipq806x: add support for Cisco Meraki MR42/MR52
The MR42 and MR52 are two similar IPQ806x based devices from the Cisco
Meraki "Cryptid" series.
MR42 main features:
- IPQ8068 1.4GHz
- 512MB RAM
- 128MB NAND
- 2x QCA9992 (2.4 & 5GHz)
- 1x QCA9889 (2.4 & 5GHz)
- 1x AR8033 PHY
- PoE/AC power
MR52 main features:
- IPQ8068 1.4GHz
- 512MB RAM
- 128MB NAND
- 2x QCA9994 (2.4 & 5GHz)
- 1x QCA9889 (2.4 & 5GHz)
- 2x AR8033 PHYs
- PoE/AC power
(MR42 Only) Installation via diagnostic mode:
If you can successfully complete step 1 then you can continue to install
via this method without having to open the device. Otherwise please use
the standard UART method. Please note that when booting via TFTP, some
Ethernet devices, in particular those on laptops, will not connect in
time, resulting in TFTP boot not succeeding. In this instance it is
advised to connect via a switch.
1. Hold down reset at power on and keep holding, after around 10 seconds
if the orange LED changes behaviour to begin flashing, proceed to
release reset, then press reset two times. Ensure that the LED has
turned blue. Note that flashing will occur on some devices, but it
will not be possible to change the LED colour using the reset button.
In this case it will still be possible to continue with this install
method.
2. Set your IP to 192.168.1.250. Set up a TFTP server serving
mr42_u-boot.mbn and
openwrt-ipq806x-generic-meraki_mr42-initramfs-fit-uImage.itb, obtained
from [1].
3. Use telnet and connect to 192.168.1.1. Run the following commands to
install u-boot. Note that all these commands are critical, an error
will likely render the device unusable.
Option 3.1:
If you are sure you have set up the TFTP server correctly you can
run this script on the device. This will download and flash the
u-boot image immediately:
`/etc/update_uboot.sh 192.168.1.250 mr42_u-boot.mbn`
Once completed successfully, power off the device.
Option 3.2:
If you are unsure the TFTP server is correctly set up you can
obtain the image and flash manually:
3.2.1. `cd /tmp`
3.2.2. `tftp-hpa 192.168.1.250 -m binary -c get mr42_u-boot.mbn`
3.2.3. Confirm file has downloaded correctly by comparing the
md5sum:
`md5sum mr42_u-boot.mbn`
3.2.4. The following are the required commands to write the image.
`echo 1 > /sys/devices/platform/msm_nand/boot_layout
mtd erase /dev/mtd1
nandwrite -pam /dev/mtd1 mr42_u-boot.mbn
echo 0 > /sys/devices/platform/msm_nand/boot_layout`
Important: You must observe the output of the `nandwrite`
command. Look for the following to verify writing is occurring:
`Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000`
If you do not see this then do not power off the device. Check
your previous commands and that mr42_u-boot.mbn was downloaded
correctly. Once you are sure the image has been written you
can proceed to power off the device.
4. Hold the reset button and power on the device. This will immediately
begin downloading the appropriate initramfs image and boot into it.
Note: If the device does not download the initramfs, this is likely
due to the interface not being brought up in time. Changing Ethernet
source to a router or switch will likely resolve this. You can also
try manually setting the link speed to 10Mb/s Half-Duplex.
5. Once a solid white LED is displayed on the device, continue to the
UART installation method, step 6.
Standard installation via UART - MR42 & MR52
1. Disassemble the device and connect a UART header. The header pinout
is as follows:
1 - 3.3v
2 - TXD
3 - RXD
4 - GND
Important: You should only connect TXD, RXD and GND. Connecting
3.3v may damage the device.
2. Set your IP to 192.168.1.250. Set up a TFTP server serving
openwrt-ipq806x-generic-meraki_(mr42|mr52)-initramfs-fit-uImage.itb.
Separately obtain the respective sysupgrade image.
3. Run the following commands, preferably from a Linux host. The
mentioned files, including ubootwrite.py and u-boot images, can be
obtained from [1].
`python ubootwrite.py --write=(mr42|mr52)_u-boot.bin`
The default for "--serial" option is /dev/ttyUSB0.
4. Power on the device. The ubootwrite script will upload the image to
the device and launch it. The second stage u-boot will in turn load
the initramfs image by TFTP, provided the TFTP server is running
correctly. This process will take about 13 minutes. Once a solid
white LED is displayed, the image has successfully finished
loading. Note: If the image does not load via TFTP, try again with
the Ethernet link to 10Mb/s Half-Duplex.
5. (MR42 only) Do not connect over the network. Instead connect over
the UART using minicom or similar tool. To replace u-boot with
the network enabled version, please run the following commands.
Note that in the provided initramfs images, the u-boot.mbn file
is located in /root:
If you have not used the provided initramfs, you must ensure you
are using an image with "boot_layout" ECC configuration enabled in
the Kernel. This will be version 5.10 or higher. If you do not do
this correctly the device will be bricked.
`insmod mtd-rw i_want_a_brick=1
mtd erase /dev/mtd8
nandwrite -pam /dev/mtd8 /root/mr42_u-boot.mbn`
After running nandwrite, ensure you observe the following output:
`Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000`
6. (Optional) If you have no further use for the Meraki OS, you can
remove all other UBI volumes on ubi0 (mtd11), including diagnostic1,
part.old, storage and part.safe. You must not remove the ubi1 ART
partition (mtd12).
`for i in diagnostic1 part.old storage part.safe ; do
ubirmvol /dev/ubi0 -N $i
done`
7. Proceed to flash the sysupgrade image via luci, or else download or
scp the image to /tmp and use the sysupgrade command.
[1] The mentioned images and ubootwrite.py script can be found in this repo:
https://github.com/clayface/openwrt-cryptid
[2] The modified u-boot sources for the MR42 and MR52 are available:
https://github.com/clayface/U-boot-MR52-
20200629
Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
Matthew Hagan [Thu, 13 May 2021 22:15:27 +0000 (23:15 +0100)]
ipq806x: add gsbi2_i2c label
gsbi2_i2c is used by the Meraki MR42 so we need to expose a label here.
Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
Matthew Hagan [Thu, 13 May 2021 20:49:43 +0000 (21:49 +0100)]
ipq806x: backport GMAC_AHB_RESET deassert patches
Add backports of the following patches:
"net: stmmac: explicitly deassert GMAC_AHB_RESET" and
"ARM: dts: qcom: add ahb reset to ipq806x-gmac"
Required for Meraki MR42/MR52.
Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
Matthew Hagan [Thu, 20 May 2021 19:55:06 +0000 (20:55 +0100)]
ipq806x: add GSBI nodes to ipq8064-dtsi-addidions
Rather than having separate patches for each GSBI node added, this patch
consolidates the existing GSBI1 patch into
083-ipq8064-dtsi-additions.patch. In addition, GSBI6 and GSBI7 I2C nodes,
required for the MR42 and MR52 respectively, are added.
Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
Matthew Hagan [Thu, 13 May 2021 18:29:45 +0000 (19:29 +0100)]
kernel: add back kmod-leds-tlc591xx
Add back support for the TLC591xx series LEDs which are used in the
ipq806x-based Meraki Cryptid series devices.
This module previously existed for the mvebu platform but was removed
at commit
f849c2c83247340d623fdb549e2b75f4c1feea62 due to being enabled
in that platform's kernel config.
Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
Robert Marko [Sat, 9 Oct 2021 18:13:25 +0000 (20:13 +0200)]
ipq40xx: add support for MikroTik hAP ac3
This adds support for the MikroTik RouterBOARD RBD53iG-5HacD2HnD
(hAP ac³), a indoor dual band, dual-radio 802.11ac
wireless AP with external omnidirectional antennae, USB port, five
10/100/1000 Mbps Ethernet ports and PoE passthrough.
See https://mikrotik.com/product/hap_ac3 for more info.
Specifications:
- SoC: Qualcomm Atheros IPQ4019
- RAM: 256 MB
- Storage: 16 MB NOR + 128 MB NAND
- Wireless:
· Built-in IPQ4019 (SoC) 802.11b/g/n 2x2:2, 3 dBi antennae
· Built-in IPQ4019 (SoC) 802.11a/n/ac 2x2:2, 5.5 dBi antennae
- Ethernet: Built-in IPQ4019 (SoC, QCA8075) , 5x 1000/100/10 port,
passive PoE in, PoE passtrough on port 5
- 1x USB Type A port
Installation:
1. Boot the initramfs image via TFTP
2. Run "cat /proc/mtd" and look for "ubi" partition mtd device number, ex. "mtd1"
3. Use ubiformat to remove MikroTik specific UBI volumes
* Detach the UBI partition by running: "ubidetach -d 0"
* Format the partition by running: "ubiformat /dev/mtdN -y"
Replace mtdN with the correct mtd index from step 2.
3. Flash the sysupgrade image using "sysupgrade -n"
Signed-off-by: Robert Marko <robimarko@gmail.com>
Tested-by: Mark Birss <markbirss@gmail.com>
Tested-by: Michael Büchler <michael.buechler@posteo.net>
Tested-by: Alex Tomkins <tomkins@darkzone.net>
Robert Marko [Mon, 20 Sep 2021 17:13:43 +0000 (19:13 +0200)]
base-files: dont always create kernel UBI volume
Currently nand_upgrade_tar() will pass the kernel length
to nand_upgrade_prepare_ubi() in all cases except for when
the kernel is to be installed in a separate partition as a
binary with the MTD tool.
While this is fine for almost all cases newer MikroTik NAND
devices like hAP ac3 require the kernel to be installed as a
UBIFS packed UBI volume in its own partition.
So, since we have a custom recipe to use ubiformat to flash
the kernel in its partition it makes no sense for sysupgrade
to also install the kernel as a UBI volume in the "ubi"
partition as it only wastes space and will never be used.
So, simply check whether CI_KERNPART is set to "none" and
if so unset the "has_kernel" variable which will in turn
prevent the kernel length from being passed on and then
the kernel UBI volume wont be created for no usefull purpose.
The ath79 MikroTik NAND target has been setting CI_KERNPART
to "none" for a while now altough that was not preventing
the kernel to be installed as UBI volume as well.
Signed-off-by: Robert Marko <robimarko@gmail.com>
Robert Marko [Mon, 20 Sep 2021 10:19:37 +0000 (12:19 +0200)]
build: image: add command to ubinize the kernel image
Newer NAND devices from MikroTik like the hAP ac3
require the kernel to be packed into UBIFS and then
ubinized.
So, since the ubinize-image.sh script can now ubinize
kernel only as well lets add a command for it.
This now allows calling ubinize-kernel in the kernel
packaging at then end.
Signed-off-by: Robert Marko <robimarko@gmail.com>
Robert Marko [Mon, 20 Sep 2021 10:16:42 +0000 (12:16 +0200)]
build: image: explicitly pass --rootfs to append-ubi
Rootfs is now optional in ubinize-image.sh and
requires --rootfs flag instead of just passing the
rootfs image as the argument before ubinize opts.
So, simply add --rootfs flag before the $(IMAGE_ROOTFS).
Signed-off-by: Robert Marko <robimarko@gmail.com>
Robert Marko [Mon, 20 Sep 2021 10:10:07 +0000 (12:10 +0200)]
scripts: ubinize-image: make rootfs optional
Currently ubinize-image script always expects the
rootfs image to be passed and a volume for it created.
So, to allow only ubinizing a kernel for example which
the MikroTik hAP ac3 and other new NAND devices from
MikroTik require make rootfs an optional parameter like
kernel.
Signed-off-by: Robert Marko <robimarko@gmail.com>
Robert Marko [Sun, 18 Apr 2021 17:05:47 +0000 (19:05 +0200)]
build: image: add UBIFS kernel packer
This allows packing the kernel into UBIFS like newer
MikroTik NAND devices require.
Signed-off-by: Robert Marko <robimarko@gmail.com>
John Audia [Sat, 27 Nov 2021 20:40:46 +0000 (15:40 -0500)]
kernel: bump 5.4 to 5.4.162
All patches automatically rebased.
Build system: x86_64
Build-tested: ramips/mt7621*
*I am hit with the binutils 2.37 bug so I had to revert
7f1edbd41295dff9f2127b169fbc086c0fb2c14e
in order to downgrade to 2.35.1
Signed-off-by: John Audia <graysky@archlinux.us>
John Audia [Sat, 27 Nov 2021 19:56:33 +0000 (14:56 -0500)]
kernel: bump 5.4 to 5.4.161
Removed upstreamed:
ath79/patches-5.4/921-serial-core-add-support-for-boot-console-with-arbitr.patch[1]
Manually rebased:
layerscape/patches-5.4/804-crypto-0016-MLKU-114-1-crypto-caam-reduce-page-0-regs-access-to-.patch
octeontx/patches-5.4/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch
All other patches automatically rebased.
1. Private email exchange with patch author, Hauke Mehrtens
Signed-off-by: John Audia <graysky@archlinux.us>
Hannu Nyman [Sat, 27 Nov 2021 23:09:35 +0000 (01:09 +0200)]
ath10k-ct: update version to fix DFS for VHT160
Update ath10k-ct to get the upstream fix for
DFS support for VHT160 in the 5.15 based ath10k-ct.
(Switch from 5.10 to 5.15 surfaced the upstream regression.)
* refresh one patch
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Christian Lamparter [Thu, 25 Nov 2021 20:32:25 +0000 (21:32 +0100)]
gemini: try fis-index-block with 128 KiB sectors
Steven Maddox reported in the OpenWrt bugzilla, that his
RaidSonic IB-NAS4220-B was no longer booting with the new
OpenWrt 21.02 (uses linux 5.10's device-tree). However, it was
working with the previous OpenWrt 19.07 series (uses 4.14).
(This is still under investigation.)
Bugzilla: https://bugs.openwrt.org/index.php?do=details&task_id=4137
Reported-by: Steven Maddox <s.maddox@lantizia.me.uk>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Christian Lamparter [Fri, 15 Oct 2021 17:17:42 +0000 (19:17 +0200)]
ipq40xx: utilize nvmem on Netgear EX61X0 v2 Series
the Netgear EX6100v2 and EX6150v2 can utilize the nvmem
for the pre-calibration and mac-address for both WIFI
devices.
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Christian Lamparter [Sat, 16 Oct 2021 19:28:52 +0000 (21:28 +0200)]
ath79: convert TP-Link Archer C7v1/2 Wifis to nvmem-cells
For v2, both ath9k (2.4GHz Wifi) and ath10k (5 GHz) driver now
pull the (pre-)calibration data from the nvmem subsystem. v1
is slightly different as only the ath9k Wifi is supported.
This allows us to move the userspace caldata extraction
and mac-address patching for the 5GHZ ath10k supported
wifi into the device-tree definition of the device.
ath9k's nodes are also changed over to use nvmem-cells
over OpenWrt's custom mtd-cal-data property.
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Christian Lamparter [Fri, 15 Oct 2021 17:17:42 +0000 (19:17 +0200)]
ath10k: support nvmem-cells for (pre-)calibration
refreshes mac80211 + ath10k-ct patches.
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Christian Lamparter [Fri, 26 Nov 2021 08:35:45 +0000 (09:35 +0100)]
mpc85xx: backport "fix oops when CONFIG_FSL_PMC=n"
Martin Kennedy reported:
|Presently, I get this kernel panic on mpc85xx (Aerohive HiveAP 370)
|on OpenWrt 'master' which occurs right as the second processor is
|initialized:
|
|[ 0.478804] rcu: Hierarchical SRCU implementation.
|[ 0.535569] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build
|[ 0.627233] smp: Bringing up secondary CPUs ...
|[ 0.681659] kernel tried to execute user page (0) - exploit attempt? (uid: 0)
|[ 0.766618] BUG: Unable to handle kernel instruction fetch (NULL pointer?)
|[ 0.848899] Faulting instruction address: 0x00000000
|[ 0.908273] Oops: Kernel access of bad area, sig: 11 [#1]
|[ 0.972851] BE PAGE_SIZE=4K SMP NR_CPUS=2 P1020 RDB
|[ 1.031179] Modules linked in:
|[ 1.067640] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.10.80 #0
|[ 1.139507] NIP:
00000000 LR:
c0021d2c CTR:
00000000
|[ 1.199921] REGS:
c1051cf0 TRAP: 0400 Not tainted (5.10.80)
|[...]
|[ 1.758220] NIP [
00000000] 0x0
|[ 1.794688] LR [
c0021d2c] smp_85xx_kick_cpu+0xe8/0x568
|[ 1.856126] Call Trace:
|[ 1.885295] [
c1051da8] [
c0021cb8] smp_85xx_kick_cpu+0x74/0x568 (unreliable)
|[ 1.968633] [
c1051de8] [
c0011460] __cpu_up+0xc0/0x228
|[ 2.029038] [
c1051e18] [
c0031bbc] bringup_cpu+0x30/0x224
|[ 2.092572] [
c1051e48] [
c0031f3c] cpu_up.constprop.0+0x180/0x33c
|[..]
|[ 2.727952] ---[ end trace
9b796a4bafb6bc14 ]---
|[ 3.800879] Kernel panic - not syncing: Fatal exception
|[ 3.862353] Rebooting in 1 seconds..
|[ 5.905097] System Halted, OK to turn off power
|
|I bisected this down to commit
3ae5da5adce9 ("kernel: bump 5.10 to 5.10.80");
|that is, I don't get the panic right before this commit, but I do after.
He reported the issue upstream and Xiaoming Ni from huawei came up with
the patch (that is on it's way to upstream). While the AP370 is not in
Openwrt, this will likely affect other SMP P1020 devices OpenWrt ships
with: like the AP330, Enterasys WS-AP3710i, etc.
Reported-by: Martin Kennedy <hurricos@gmail.com>
Tested-by: Martin Kennedy <hurricos@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Christian Lamparter [Wed, 17 Nov 2021 10:53:46 +0000 (11:53 +0100)]
ipq40xx: purge clk_ignore_unused bootarg
these flags have been creeping in from the QSDK.
All needed clocks should be accounted for, and
if a device is broken due to this. It should be
looked into.
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Christian Lamparter [Sun, 21 Nov 2021 10:45:46 +0000 (11:45 +0100)]
ipq40xx: update 105-ipq40xx-fix-sleep-clock.patch
Bjorn Anderson has suggestions which would help to upstream the patch.
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Mathias Kresin [Sat, 27 Nov 2021 20:43:40 +0000 (21:43 +0100)]
uboot-lantiq: danube: fix hanging lzma kernel uncompression #2
Follow up to commit
565b62cca2fc7d27f1f1584c44830a6e5c4f0f61. Managed to
hit the very same issue again while playing with the NOR SPL builds.
Signed-off-by: Mathias Kresin <dev@kresin.me>
Mathias Kresin [Sat, 27 Nov 2021 16:28:19 +0000 (17:28 +0100)]
lantiq: set maximum kernel size for P2812HNUF3
The board has a fixed size kernel partition but do not limit the kernel
size during image building.
Disable image building for both boards as well, since the kernel of the
last release as well as master are to big to fit into the 2 MByte kernel
partition.
Signed-off-by: Mathias Kresin <dev@kresin.me>
Aleksander Jan Bajkowski [Sat, 11 Sep 2021 21:24:35 +0000 (23:24 +0200)]
lantiq: drop kernel 5.4 support
The current state of the kernel 5.4 support is in the openwrt-21.02
branch. No need to keep a not default used kernel in this branch.
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [VRX268/ bthub5]
Aleksander Jan Bajkowski [Tue, 17 Aug 2021 18:55:41 +0000 (20:55 +0200)]
lantiq: switch to kernel 5.10
Use kernel 5.10 by default.
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [VRX268/ bthub5]
Mathias Kresin [Sun, 14 Nov 2021 20:53:45 +0000 (21:53 +0100)]
lantiq: ar7: use okli loader for FRITZ!Box
With Kernel 5.10 the ar7 FRITZ!Box are not booting the initramfs nor the
sysupgrade image any more. Presumably due to the grown kernel.
Use the okli preloader to workaround the bootloader issue. No solution
so far for the initramfs.
Signed-off-by: Mathias Kresin <dev@kresin.me>
Mathias Kresin [Sat, 13 Nov 2021 13:55:13 +0000 (14:55 +0100)]
lantiq: bring back okli loader
Removed due to being unused with
1f7a03a70603, but now required for the
ar7 FRITZ!Box.
Could be used for the ARV7519RW22 as well, for which the image
generation was disabled due to a stock u-boot issue with kernel bigger
than 2 MByte.
The code is combination of the ath79 and ramips okli loader.
Signed-off-by: Mathias Kresin <dev@kresin.me>
Andre Heider [Tue, 12 Oct 2021 11:16:20 +0000 (13:16 +0200)]
uboot-mvebu: update to v2021.10
Signed-off-by: Andre Heider <a.heider@gmail.com>
Andre Heider [Tue, 12 Oct 2021 10:53:39 +0000 (12:53 +0200)]
arm-trusted-firmware-mvebu: bump mv-ddr-marvell to current version
efcad0e Merge pull request #33 from Semihalf/cn913x_cex7_eval
91bed2c cn913x: Add cn913x_cex7_eval config
55139f6 Merge pull request #32 from pali/master
e5573cc ARM: mvebu: a38x: Correct mismatched bound warnings
d83c38b a3700: Remove duplicate check for DDR_TYPE
c0c6bf7 a3700: Put temporary a3700_ddr_type file into $(OBJ_DIR)
Signed-off-by: Andre Heider <a.heider@gmail.com>
Andre Heider [Tue, 12 Oct 2021 10:49:18 +0000 (12:49 +0200)]
arm-trusted-firmware-mvebu: bump a3700-utils to current version
With cryptocpp in place we can now update past the point of dropping
the old tbb_linux binary and build it instead.
Hauke confirmed that this also allows this firmware to be built on
aarch64.
97f01f5 Wtpdownloader: Properly retrieve current tty options
a33ff86 Wtpdownloader: Set CREAD tty cflag
af461d2 Wtpdownloader: Fix stuck during opening UART tty device
38c2135 Makefile: Print error when specified CLOCKSPRESET is not valid
f014428 TBB: Remove out-of-dated x86-64 ELF binary tbb_linux
1b6cb50 TBB: Fix compilation with Crypto++ 5.6.5
d9fb291 TBB: Fix memory corruptions by calling correct delete[] operator
d575885 TBB: Fix initializing CCTIM object
b9e1c4e Wtpdownloader: Fix makefile
8f61591 Wtpdownloader: Fix building with gcc 11
eabea5f TBB: Fix building with gcc 11
Signed-off-by: Andre Heider <a.heider@gmail.com>
Josef Schlehofer [Tue, 14 Sep 2021 12:40:54 +0000 (14:40 +0200)]
arm-trusted-firmware-mvebu: add cryptopp
Based on the Build Instructions for Trusted-Firmware-A [1],
there is a required cryptopp [2].
In the past, it used 'tbb_linux' image tool binary, which seems to
be buggy, deprecated and removed from A3700-utils-marvell and it should
not be used anymore. That's why I removed 001-imagetool.patch, which is
no longer necessary.
[1] https://trustedfirmware-a.readthedocs.io/en/v2.5/plat/marvell/armada/build.html
[2] https://cryptopp.com/
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Kerma Gérald [Tue, 12 Oct 2021 11:25:32 +0000 (13:25 +0200)]
arm-trusted-firmware-mvebu: fix commit ids to for mv-ddr-marvell
without this patch a3700-utils/tim/ddr/ddr_tool.verstr contains the OpenWrt commit ID.
this patch fix the mv_ddr version commit ID by using the global variable MV_DDR_COMMIT_ID.
Upon boot it now prints "mv_ddr
-devel-g02e23dbc-d DDR4 16b 1GB 1CS".
Cc: Andre Heider <a.heider@gmail.com>
Signed-off-by: Kerma Gérald <gandalf@gk2.net>
John Audia [Fri, 26 Nov 2021 13:29:01 +0000 (08:29 -0500)]
kernel: bump 5.10 to 5.10.82
Removed upstreamed:
bcm53xx/patches-5.10/033-v5.16-0014-ARM-dts-NSP-Fix-mpcore-mmc-node-names.patch
Manually rebased:
ipq806x/patches-5.10/086-ipq8064-fix-duplicate-node.patch
All other patches automatically rebased.
Build system: x86_64
Build-tested: bcm2711/RPi4B, ipq806x/R7800
Run-tested: bcm2711/RPi4B, ipq806x/R7800
Signed-off-by: John Audia <graysky@archlinux.us>
John Audia [Sun, 21 Nov 2021 13:39:18 +0000 (08:39 -0500)]
kernel: bump 5.10 to 5.10.81
Manually rebased:
octeontx/patches-5.10/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch
All other patches automatically rebased.
Build system: x86_64
Build-tested: bcm2711/RPi4B, ipq806x/R7800
Run-tested: bcm2711/RPi4B, ipq806x/R7800
Signed-off-by: John Audia <graysky@archlinux.us>
Ansuel Smith [Thu, 18 Nov 2021 02:02:21 +0000 (03:02 +0100)]
ath10k-ct: use 5.15 version
We switched to mac80211 5.15 backport version.
Also switch ath10k-ct to 5.15 and drop the mac address patch
that got merged upstream.
Compile and tested on ipq806x Netgear R7800.
Also update the ath10k-ct to latest version to fix a typo
for the new version in the kernel log.
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Rosen Penev [Mon, 22 Nov 2021 08:49:50 +0000 (00:49 -0800)]
tools/ccache: update to 4.5.1
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Rosen Penev [Mon, 22 Nov 2021 08:38:36 +0000 (00:38 -0800)]
tools/cmake: update to 3.22.0
Refreshed patches.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Felix Fietkau [Fri, 26 Nov 2021 10:25:40 +0000 (11:25 +0100)]
llvm-bpf: fix rebuild check for generating tarball
Check the version file, as it will be regenerated on rebuild
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Felix Fietkau [Fri, 26 Nov 2021 10:24:39 +0000 (11:24 +0100)]
llvm-bpf: use SOURCE_DATE_EPOCH for generated tarball
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Felix Fietkau [Fri, 26 Nov 2021 07:42:25 +0000 (08:42 +0100)]
mac80211: fix a regression in generating radiotap headers
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Felix Fietkau [Fri, 26 Nov 2021 07:40:55 +0000 (08:40 +0100)]
mac80211: backport fix for dealing with stripped IV on rx
This fixes potental rx drop issues
Signed-off-by: Felix Fietkau <nbd@nbd.name>
David Bauer [Mon, 25 Oct 2021 19:33:40 +0000 (21:33 +0200)]
hostapd: add beacon_interval to get_status ubus output
Add the beacon interval to hostapd status output. This allows external
services to discover the beacon interval for a specific VAP.
This way, external wireless management daemons can correctly calculate
fields containing TBTT value from absolute time-values.
Signed-off-by: David Bauer <mail@david-bauer.net>
Sander Vanheule [Sun, 14 Nov 2021 18:45:34 +0000 (19:45 +0100)]
realtek: Remove _machine_restart and _machine_halt
By dropping _machine_restart, users can provide more reliable or
device-specific restart modes.
_machine_halt was already removed in commit
f4b687d1f053 ("realtek: use
kernel defined halt"), but quietly reintroduced in commit
8faffa00cb6b
("realtek: add support for the RTL9300 timer"). Let's remove it again.
Signed-off-by: Sander Vanheule <sander@svanheule.net>
Tested-by: Stijn Segers <foss@volatilesystems.org>
Tested-by: Paul Fertser <fercerpav@gmail.com>
Tested-by: Stijn Tintel <stijn@linux-ipv6.be>
Sander Vanheule [Sun, 14 Nov 2021 18:45:33 +0000 (19:45 +0100)]
realtek: Add and enable watchdog node
Add and enable the Realtek Otto WDT peripheral found on these SoCs.
Default all devices to use standard (cold) reboot and "soc" resets.
Devices that require the PLL value fixup before restarting, should pick
the "cpu" or "software" reset mode. These devices also need to provide a
custom reboot mode, by adding the reboot argument to the kernel command
line:
WDT reset mode | kernel reboot mode
----------------+---------------------------------------
soc | reboot=cold (default if not specified)
cpu | reboot=warm
software | reboot=software
Preferrably, these devices should use an alternative restart method like
gpio-restart to provide reliable restarts.
Note that watchdog restarts are not yet exposed, since the
_machine_restart override is still present.
Signed-off-by: Sander Vanheule <sander@svanheule.net>
Tested-by: Stijn Segers <foss@volatilesystems.org>
Tested-by: Paul Fertser <fercerpav@gmail.com>
Tested-by: Stijn Tintel <stijn@linux-ipv6.be>
Sander Vanheule [Sun, 14 Nov 2021 18:45:32 +0000 (19:45 +0100)]
realtek: Backport Realtek Otto WDT driver
Add patch submitted upstream to linux-watchdog and replace the MIPS
architecture symbols. Requires one extra patch for the DIV_ROUND_*
macros, which have moved to a different header since 5.10.
Signed-off-by: Sander Vanheule <sander@svanheule.net>
Tested-by: Stijn Segers <foss@volatilesystems.org>
Tested-by: Paul Fertser <fercerpav@gmail.com>
Tested-by: Stijn Tintel <stijn@linux-ipv6.be>
Sander Vanheule [Sun, 14 Nov 2021 18:45:31 +0000 (19:45 +0100)]
realtek: Add Lexra bus clock
The CPU peripherals on RTL83xx/RTL930x are connected to the CPU via the
Lexra bus. This bus can provide a clock signal to these peripherals, but
no clock driver is currently available. Instead, use a fixed-clock to
provide the clock frequency, and update the dependent peripherals.
Lexra bus clock frequencies:
- RTL838x: 200MHz
- RTL839x: 200MHz
- RTL930x: 175MHz
Signed-off-by: Sander Vanheule <sander@svanheule.net>
Tested-by: Stijn Segers <foss@volatilesystems.org>
Tested-by: Paul Fertser <fercerpav@gmail.com>
Tested-by: Stijn Tintel <stijn@linux-ipv6.be>
Sander Vanheule [Sun, 14 Nov 2021 18:45:30 +0000 (19:45 +0100)]
realtek: Consolidate bootargs
All current devices use identical bootargs, so let's move that to the
common devicetree includes.
Signed-off-by: Sander Vanheule <sander@svanheule.net>
Tested-by: Stijn Segers <foss@volatilesystems.org>
Tested-by: Paul Fertser <fercerpav@gmail.com>
Tested-by: Stijn Tintel <stijn@linux-ipv6.be>
Sander Vanheule [Thu, 18 Nov 2021 17:39:18 +0000 (18:39 +0100)]
realtek: reset both ethernet NIC and queues
Recent versions of Realtek's SDK reset both the ethernet NIC and queues
(SW_NIC_RST and SW_Q_RST bits) when initialising the hardware.
Furthermore, when issuing a CPU reset on the Zyxel GS1900-8 (not
supported by any current driver), the networking part of the SoC is not
reset. This leads to unresponsive network after the restart. By
resetting both the ethernet NIC and queues, networking always comes up
reliably.
Suggested-by: Birger Koblitz <mail@birger-koblitz.de>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
Tested-by: Stijn Tintel <stijn@linux-ipv6.be>
Felix Fietkau [Wed, 24 Nov 2021 16:02:26 +0000 (17:02 +0100)]
hostapd: add a patch that allows processing auth requests for peers in blocked state
If authentication fails repeatedly e.g. because of a weak signal, the link
can end up in blocked state. If one of the nodes tries to establish a link
again before it is unblocked on the other side, it will block the link to
that other side. The same happens on the other side when it unblocks the
link. In that scenario, the link never recovers on its own.
To fix this, allow restarting authentication even if the link is in blocked
state, but don't initiate the attempt until the blocked period is over.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Felix Fietkau [Wed, 24 Nov 2021 13:02:09 +0000 (14:02 +0100)]
mac80211: add a fix for kernel warnings when forwarding packets in mesh mode
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Felix Fietkau [Wed, 24 Nov 2021 09:45:28 +0000 (10:45 +0100)]
mac80211: fix regression in SSN handling of addba tx
Some drivers that do their own sequence number allocation (e.g. ath9k, mwlwifi) rely
on being able to modify params->ssn on starting tx ampdu sessions.
This was broken by a change that modified it to use sta->tid_seq[tid] instead.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Mark Mentovai [Tue, 23 Nov 2021 17:28:55 +0000 (12:28 -0500)]
hostapd: allow hostapd under ujail to communicate with hostapd_cli
When procd-ujail is available,
1f785383875a runs hostapd as user
"network", with only limited additional capabilities (CAP_NET_ADMIN and
CAP_NET_RAW).
hostapd_cli (CONFIG_PACKAGE_hostapd-utils) communicates with hostapd
over a named UNIX-domain socket. hostapd_cli is responsible for creating
this socket at /tmp/wpa_ctrl_$pid_$counter. Since it typically runs as
root, this endpoint is normally created with uid root, gid root, mode
0755. As a result, hostapd running as uid network is able to receive
control messages sent through this interface, but is not able to respond
to them. If debug-level logging is enabled (CONFIG_WPA_MSG_MIN_PRIORITY
<= 2 at build, and log_level <= 2 in /etc/config/wireless wifi-device),
this message will appear from hostapd:
CTRL: sendto failed: Permission denied
As a fix, hostapd_cli should create the socket node in the filesystem
with uid network, gid network, mode 0770. This borrows the presently
Android-only strategy already in hostapd intended to solve the same
problem on Android.
If procd-ujail is not available and hostapd falls back to running as
root, it will still be able to read from and write to the socket even if
the node in the filesystem has been restricted to the network user and
group. This matches the logic in
package/network/services/hostapd/files/wpad.init, which sets the uid and
gid of /var/run/hostapd to network regardless of whether procd-ujail is
available.
As it appears that the "network" user and group are statically allocated
uid 101 and gid 101, respectively, per
package/base-files/files/etc/passwd and USERID in
package/network/services/hostapd/Makefile, this patch also uses a
constant 101 for the uid and gid.
Signed-off-by: Mark Mentovai <mark@moxienet.com>
[refreshed patch]
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Felix Fietkau [Tue, 23 Nov 2021 15:58:08 +0000 (16:58 +0100)]
mt76: update to the latest version
f0a5b1118fa4 mt76: mt7915: fix decap offload corner case with 4-addr VLAN frames
67f93aa9a207 mt76: mt7615: fix decap offload corner case with 4-addr VLAN frames
46261d4bbfb5 mt76: fix possible pktid leak
a7fdd272efee mt76: mt7921: move mt76_connac_mcu_set_hif_suspend to bus-related files
3d9e13f567a4 mt76: mt7921s: fix the device cannot sleep deeply in suspend
99225b985cbc mt76: mt7615: fix unused tx antenna mask in testmode
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Felix Fietkau [Tue, 23 Nov 2021 12:18:03 +0000 (13:18 +0100)]
mac80211: fix crash in drivers relying on mac80211 retransmitting packets for powersave clients
This showed up primarily on rt2x00
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Oldřich Jedlička [Sun, 7 Nov 2021 20:56:12 +0000 (21:56 +0100)]
dnsmasq: fix ismounted check
Fix the return value, shell return codes should be 0 to indicate success
(i.e. mount point found), 1 should be failure (i.e. mount point not-found).
Fixes: ac4e8aa ("dnsmasq: fix more dnsmasq jail issues")
Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
Jo-Philipp Wich [Thu, 18 Nov 2021 12:00:09 +0000 (13:00 +0100)]
procd: setup /dev/stdin, /dev/stdout and /dev/stderr symlinks
Extend the hotplug.json ruleset to setup the common /dev/std{in,out,err}
symbolic links which are needed by some applications, e.g. nftables when
applying rulesets from stdin.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Daniel Golle [Tue, 23 Nov 2021 14:00:42 +0000 (14:00 +0000)]
procd: update to git HEAD
8de12de system: add diskfree infos to ubus
bf3fe0e service: move jail parsing to end of instance parser
87b5836 procd: add full service shutdown prior to sysupgrade
01ac2c4 procd: service_stop_all: also kill inittab actions
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Rafał Miłecki [Tue, 23 Nov 2021 12:45:36 +0000 (13:45 +0100)]
bcm53xx: fix platform clocks & USB 2.0 PHY
This fixes WARNing, missing clocks and
[ 10.422481] bcm_ns_usb2
1800c164.usb2-phy: Clock not defined
Fixes: 5901917b936d ("bcm53xx: use more upsteam DT patches from 5.16 / 5.17")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Rafał Miłecki [Tue, 23 Nov 2021 09:14:22 +0000 (10:14 +0100)]
bcm53xx: use new USB 2.0 PHY binding
This fixes:
[ 10.440495] bcm_ns_usb2
1800c000.usb2-phy: can't request region for resource [mem 0x1800c000-0x1800cfff]
[ 10.450039] bcm_ns_usb2
1800c000.usb2-phy: Failed to map DMU regs
[ 10.456183] bcm_ns_usb2: probe of
1800c000.usb2-phy failed with error -16
caused by conflict in allocating resources.
Fixes: f55f1dbaad33 ("bcm53xx: switch to the kernel 5.10")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Hauke Mehrtens [Mon, 22 Nov 2021 23:24:08 +0000 (00:24 +0100)]
Revert "ath79: add support for Mikrotik LHG 5"
This reverts commit
48774decea9b42e97edd53ce33e574de7d85f3df.
This commit does not contain a valid name in the Signed-off-by line.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Felix Fietkau [Mon, 22 Nov 2021 16:23:03 +0000 (17:23 +0100)]
qosify: update to the latest version
06872673c10f map: allow referring to a class index directly in tcp/udp default entries
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Felix Fietkau [Mon, 22 Nov 2021 16:21:51 +0000 (17:21 +0100)]
qosify: install hotplug handler into /etc/hotplug.d/iface as well
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Felix Fietkau [Mon, 22 Nov 2021 15:07:56 +0000 (16:07 +0100)]
mt76: update to the latest version
5dd32475c859 mt76: mt7915: get rid of mt7915_mcu_set_fixed_rate routine
f5cfaaff3dd1 mt76: mt7921: drop offload_flags overwritten
f5ad840ca5c0 mt76: mt7615: fix possible deadlock while mt7615_register_ext_phy()
29a8a08827b1 mt76: mt7921: fix MT7921E reset failure
f44685f2faee mt76: mt7915: fix return condition in mt7915_tm_reg_backup_restore()
ae8e02ddd2b0 mt76: mt7915: fix SMPS operation fail
e814e15716b0 mt76: reverse the first fragmented frame to 802.11
c9bca3ed9566 mt76: mt7915: fix NULL pointer dereference in mt7915_get_phy_mode
dd054b7e16e7 mt76: only set rx radiotap flag from within decoder functions
f1520c9bb332 mt76: mt7915: add default calibrated data support
0c489ea2865a mt76: testmode: add support to set MAC
91c5da3d0a7c mt76: mt7921: add support for PCIe ID 0x0608/0x0616
ca39b4bbc227 mt76: debugfs: fix queue reporting for mt76-usb
00b6f497e2e8 mt76: mt7921: introduce 160 MHz channel bandwidth support
c1574466c733 mt76: fix possible OOB issue in mt76_calculate_default_rate
9680a17b0aed mt76: mt7921: fix possible NULL pointer dereference in mt7921_mac_write_txwi
78fc0dcdcef0 mt76: connac: fix a theoretical NULL pointer dereference in mt76_connac_get_phy_mode
05953e7d6fe7 mt76: mt7615: remove dead code in get_omac_idx
39f6c37127c1 mt76: connac: remove PHY_MODE_AX_6G configuration in mt76_connac_get_phy_mode
526591b203f3 mt76: do not pass the received frame with decryption error
256789bb400f mt76: fix the wiphy's available antennas to the correct value
fa187f5cf068 mt76: fix timestamp check in tx_status
11ebf11a3587 mt76: mt7915: fix the wrong SMPS mode
8c69b815ee7f mt76: mt7921: honor mt76_connac_mcu_set_rate_txpower return value in mt7921_config
bc6798f729f9 mt76: move sar utilities to mt76-core module
b1d0ad2e74fe mt76: mt76x02: introduce SAR support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Rafał Miłecki [Sun, 21 Nov 2021 12:44:58 +0000 (13:44 +0100)]
bcm53xx: specify switch ports on TP-LINK devices
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Felix Fietkau [Mon, 22 Nov 2021 12:04:03 +0000 (13:04 +0100)]
mac80211: set beamformer/beamformee number of antennas in VHT caps
Without this, beamforming is probably not working
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Felix Fietkau [Mon, 22 Nov 2021 09:43:43 +0000 (01:43 -0800)]
tools/llvm-bpf: move tarball packing to target/llvm-bpf
This ensures that the tarball is regenerated after make clean or after switching
to a different target
Signed-off-by: Felix Fietkau <nbd@nbd.name>