openwrt/openwrt.git
17 months agokernel: backport some Bluetooth RTL8761 USB IDs
Quintin Hill [Tue, 1 Nov 2022 22:41:18 +0000 (22:41 +0000)]
kernel: backport some Bluetooth RTL8761 USB IDs

These USB IDs appear in the 5.15 stable kernel series but not the 5.10
stable series.

Signed-off-by: Quintin Hill <stuff@quintin.me.uk>
17 months agokernel: backport RTL8761B FW name change to v5.10
Quintin Hill [Sun, 23 Oct 2022 08:22:37 +0000 (09:22 +0100)]
kernel: backport RTL8761B FW name change to v5.10

Make the firmware filenames referenced by the module consistent for
v5.10 and v5.15 kernels.  Backport two upstream patches a cleanup commit
and the commit making the change, the former is required for the latter
to apply cleanly.

Signed-off-by: Quintin Hill <stuff@quintin.me.uk>
17 months agolinux-firmware: add rtl8761 bluetooth firmware
Quintin Hill [Sat, 22 Oct 2022 07:15:57 +0000 (08:15 +0100)]
linux-firmware: add rtl8761 bluetooth firmware

Realtek bluetooth devices need firmware.  Add packages for some of
these.

Tested on a WNDR3700v4 with rtl8761bu firmware.

Signed-off-by: Quintin Hill <stuff@quintin.me.uk>
17 months agokernel: support for Realtek USB bluetooth devices
Quintin Hill [Sat, 22 Oct 2022 07:14:42 +0000 (08:14 +0100)]
kernel: support for Realtek USB bluetooth devices

USB adaptors with the RTL8761B chipset are cheap and readily available
but so far support is missing in Openwrt.  Enable the relevant kernel
options and add a module to the kmod-bluetooth package.  Increases size
of kmod-bluetooth ipk from 279140 bytes to 285320 bytes on my ath79 build.

Tested on a WNDR3700v4 with rtl8761bu firmware.

Signed-off-by: Quintin Hill <stuff@quintin.me.uk>
17 months agodnsmasq: add support for filter-AAAA/A
Chen Minqiang [Mon, 7 Nov 2022 08:20:15 +0000 (16:20 +0800)]
dnsmasq: add support for filter-AAAA/A

This add --filter-A and --filter-AAAA options, to remove IPv4 or IPv6
addresses from DNS answers. these options is supported since version 2.87.

Co-authored-by: NueXini <nuexini@alumni.tongji.edu.cn>
Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
17 months agolibnftnl: update to 1.2.4
Nick Hainke [Thu, 10 Nov 2022 15:24:40 +0000 (16:24 +0100)]
libnftnl: update to 1.2.4

Release Announcement:
https://lore.kernel.org/netfilter-devel/Y20W+LT%2F+sq%2Fi2rz@salvia/T/#u

Signed-off-by: Nick Hainke <vincent@systemli.org>
17 months agolinux-firmware: update to 20221109
Nick Hainke [Sat, 12 Nov 2022 09:02:37 +0000 (10:02 +0100)]
linux-firmware: update to 20221109

Changes:
712460c linux-firmware: Update firmware file for Intel Bluetooth 9462
90d5f7e linux-firmware: Update firmware file for Intel Bluetooth 9462
48954ba linux-firmware: Update firmware file for Intel Bluetooth 9560
0e205fd linux-firmware: Update firmware file for Intel Bluetooth 9560
06b941e linux-firmware: Update firmware file for Intel Bluetooth AX201
ba958ff linux-firmware: Update firmware file for Intel Bluetooth AX201
02bdea2 linux-firmware: Update firmware file for Intel Bluetooth AX211
7044d46 linux-firmware: Update firmware file for Intel Bluetooth AX211
1b99bcd linux-firmware: Update firmware file for Intel Bluetooth AX210
4668ae9 linux-firmware: Update firmware file for Intel Bluetooth AX200
5bdfdba linux-firmware: Update firmware file for Intel Bluetooth AX201
b0f995c amdgpu: update DMCUB firmware for DCN 3.1.6
d991031 rtl_bt: Update RTL8822C BT UART firmware to 0xFFB8_ABD6
fd62f01 rtl_bt: Update RTL8822C BT USB firmware to 0xFFB8_ABD3
b15fc21 WHENCE: mrvl: prestera: Add WHENCE entries for newly updated 4.1 FW images
bf5a337 mrvl: prestera: Update Marvell Prestera Switchdev FW to v4.1
4a733c2 iwlwifi: add new FWs from core74_pv-60 release
7d2bb50 qcom: drop split a530_zap firmware file
7d56713 qcom/vpu-1.0: drop split firmware in favour of the mbn file
1431496 qcom/venus-4.2: drop split firmware in favour of the mbn file
cf95783 qcom/venus-4.2: replace split firmware with the mbn file
1fe6f49 qcom/venus-1.8: replace split firmware with the mbn file
abc0302 linux-firmware: Add firmware for Cirrus CS35L41 on new ASUS Laptop
20d9516 iwlwifi: add new PNVM binaries from core74-44 release
06dbfbc iwlwifi: add new FWs from core69-81 release
05df8e6 qcom: update venus firmware files for VPU-2.0
cd6fcdb qcom: remove split SC7280 venus firmware images
1612706 qcom: update venus firmware file for v5.4
ad9fdba qcom: replace split SC7180 venus firmware images with symlink
dae5d46 rtw89: 8852b: update fw to v0.27.32.1
a8e86ec rtlwifi: update firmware for rtl8192eu to v35.7
9aa8db1 rtlwifi: Add firmware v4.0 for RTL8188FU
8f86b5a i915: Add HuC 7.10.3 for DG2
48407ff cnm: update chips&media wave521c firmware.
bd31846 brcm: add symlink for Pi Zero 2 W NVRAM file
771968c linux-firmware: Add firmware for Cirrus CS35L41 on ASUS Laptops
6f9620e linux-firmware: Add firmware for Cirrus CS35L41 on Lenovo Laptops
1d18cb9 linux-firmware: Add firmware for Cirrus CS35L41 on HP Laptops
e497757 rtw89: 8852b: add initial fw v0.27.32.0
98b5577 iwlwifi: add new FWs from core72-129 release
604026c iwlwifi: update 9000-family firmwares to core72-129

Signed-off-by: Nick Hainke <vincent@systemli.org>
17 months agokernel: update U-Boot nvmem driver to v6.2 release version
Rafał Miłecki [Sat, 12 Nov 2022 09:42:51 +0000 (10:42 +0100)]
kernel: update U-Boot nvmem driver to v6.2 release version

Backport queued patches that
1. Fix CRC32 calculation for redundant images
2. Fix CRC32 on big-endian
3. Fix parting images with Broadcom header

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
17 months agomt76: update to the latest version
Felix Fietkau [Fri, 11 Nov 2022 19:03:45 +0000 (20:03 +0100)]
mt76: update to the latest version

8cc34bdc9ef0 wifi: mt76: mt7921: set MT_DRV_AMSDU_OFFLOAD for USB/SDIO
2182de50a37c wifi: mt76: fix receiving LLC packets on mt7615/mt7915
269df4b01f27 wifi: mt76: fix rx checksum offload on mt7615/mt7915/mt7921
fa4ace8e3b58 ieee80211: add EHT 1K aggregation definitions
176df35e7e80 wifi: mt76: mt7915: improve accuracy of time_busy calculation
94b335fa88e1 wifi: mt76: mt7915: add ack signal support
3365c129f73c wifi: mt76: mt7915: enable use_cts_prot support
ad9bd2ba361e wifi: mt76: mt7615: enable use_cts_prot support
68bdcccb0aa7 wifi: mt76: mt7915: fix reporting of TX AGGR histogram
242fece4323f wifi: mt76: mt7921: fix reporting of TX AGGR histogram
75003c69a9bd wifi: mt76: mt7615: rely on mt7615_phy in mt7615_mac_reset_counters
65c70a32f1cf wifi: mt76: move aggr_stats array in mt76_phy
b1ddf8bec058 wifi: mt76: mt7915: rework mt7915_dma_reset()
1ad31c3f76f4 wifi: mt76: mt7915: enable full system reset support
6b0668de7a53 wifi: mt76: mt7915: add full system reset into debugfs
a5e48378d2a6 wifi: mt76: mt7915: enable coredump support
1e9060420c92 wifi: mt76: mt7915: fix incorrect tx path number configuration
0263711ba362 wifi: mt76: mt7915: fix antenna selection with bad eeprom.
869815e5ef86 wifi: mt76: mt7915: Fix chainmask calculation on mt7915 DBDC
fc410557b7e1 wifi: mt76: mt7915: Fix VHT beamforming capabilities with DBDC
daa30a31cf70 wifi: mt76: mt7915: don't claim 160MHz support with mt7915 DBDC
80bcecdbc2ff wifi: mt76: connac: update nss calculation in txs
465219c1f56c wifi: mt76: do not run mt76u_status_worker if the device is not running
c7db15903e5c wifi: mt76: connac: add mt76_connac_mcu_uni_set_chctx
7a2b1a13b1b0 wifi: mt76: mt7921: add chanctx parameter to mt76_connac_mcu_uni_add_bss signature
dece6921e606 wifi: mt76: mt7921: add unified ROC cmd/event support
d4da182389b6 wifi: mt76: mt7921: drop ieee80211_[start, stop]_queues in driver
0c3ef988d8dc wifi: mt76: connac: accept hw scan request at a time
c477225fd10e mt7615: update cr4 firmware to 20190415154149
413a4bf39513 mt76: mt7915: fix unused-but-set variable
f5034abea899 mt76: mt7915: fix format string
a9ac73ed8275 wifi: mt76: mt7615: increase eeprom size for mt7663
4a27f23fc4f2 linux-firmware: update firmware for MT7921 WiFi device

Signed-off-by: Felix Fietkau <nbd@nbd.name>
17 months agobcm4908: refresh kernel 5.15 config
Rafał Miłecki [Fri, 11 Nov 2022 16:04:18 +0000 (17:04 +0100)]
bcm4908: refresh kernel 5.15 config

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
17 months agobcm4908: prepare support for kernel 5.15
Rafał Miłecki [Fri, 11 Nov 2022 15:51:29 +0000 (16:51 +0100)]
bcm4908: prepare support for kernel 5.15

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
17 months agobcm4908: update DTS files with the latest changes
Rafał Miłecki [Fri, 11 Nov 2022 13:54:46 +0000 (14:54 +0100)]
bcm4908: update DTS files with the latest changes

The most affecting change is move of files from bcm4908/ to the bcmbca/.
That required updating few paths.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
17 months agoprocd: update to git HEAD
Daniel Golle [Thu, 10 Nov 2022 20:34:15 +0000 (20:34 +0000)]
procd: update to git HEAD

 24f6bc4 jail: correctly check for null pointer
 93b2c2d jail: ignore missing .dynamic sect
 039b88f sysupgrade: print errno on failure

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
17 months agoath79: add support for Teltonika RUT300
Daniel Golle [Thu, 10 Nov 2022 14:16:32 +0000 (14:16 +0000)]
ath79: add support for Teltonika RUT300

Add support for the Teltonika RUT300 rugged industrial Ethernet router

Hardware
--------
SoC:    Qualcomm Atheros QCA9531
RAM:    64M DDR2 (EtronTech EM68B16CWQK-25IH)
FLASH:  16M SPI-NOR (Winbond W25Q128)
ETH:    4x 100M LAN (QCA9533 internal AR8229 switch, eth0)
        1x 100M WAN (QCA9533 internal PHY, eth1)
UART:   115200 8n1, same debug port as other Teltonika devices
USB:    1 single USB 2.0 host port
BUTTON: Reset
LED:    1x green power LED (always on)
        5x yellow Ethernet port LED (controlled by Linux)
        WAN port LED is used as boot status and upgrade indicator as
        the power LED cannot be controlled in software.

Use the *-factory.bin file to intially flash the device using the
vendor firmware's Web-UI.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
17 months agokernel: more fixes for mtk_eth_soc performance optimization
Felix Fietkau [Thu, 10 Nov 2022 21:24:54 +0000 (22:24 +0100)]
kernel: more fixes for mtk_eth_soc performance optimization

- fix features sync between netdevs
- fix crash in dsa_switch_rcv

Fixes: ceb1451c10c1 ("kernel: add mediatek soc ethernet performance improvements")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
17 months agomac80211: fix mesh airtime link metric estimation
Felix Fietkau [Thu, 10 Nov 2022 13:46:21 +0000 (14:46 +0100)]
mac80211: fix mesh airtime link metric estimation

fix reading the per-packet rate on devices with firmware rate control

Signed-off-by: Felix Fietkau <nbd@nbd.name>
17 months agofstools: update to git HEAD
Rafał Miłecki [Thu, 10 Nov 2022 12:58:19 +0000 (13:58 +0100)]
fstools: update to git HEAD

3affe9e block: try multiple NTFS filesystem implementations

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
17 months agokernel: fix vlan parsing issue in mediatek ethernet driver
Felix Fietkau [Thu, 10 Nov 2022 12:20:55 +0000 (13:20 +0100)]
kernel: fix vlan parsing issue in mediatek ethernet driver

Check the vlan rx offload flag
Sync features across netdevs

Signed-off-by: Felix Fietkau <nbd@nbd.name>
17 months agohostapd: remove invalid dtim_period option processing
Felix Fietkau [Thu, 10 Nov 2022 12:08:28 +0000 (13:08 +0100)]
hostapd: remove invalid dtim_period option processing

dtim_period is a bss property, not a device one.
It is already handled properly in mac80211.sh

Fixes: 30c64825c7ed ("hostapd: add dtim_period, local_pwr_constraint, spectrum_mgmt_required")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
17 months agokernel: support "linux,rootfs" DT property for splitting rootfs
Rafał Miłecki [Tue, 8 Nov 2022 11:22:51 +0000 (12:22 +0100)]
kernel: support "linux,rootfs" DT property for splitting rootfs

OpenWrt's support for splitting rootfs (to create an extra "rootfs_data"
partition) is limited to partitions called "rootfs". Upstream kernel
allows any name partition to be rootfs if it has "linux,rootfs" property
set. Add split support to such partitions in OpenWrt code.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
17 months agobcm53xx: update DTS files with the latest changes
Rafał Miłecki [Thu, 10 Nov 2022 08:28:23 +0000 (09:28 +0100)]
bcm53xx: update DTS files with the latest changes

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
17 months agoipq40xx: add support for GL.iNet GL-A1300
Weiping Yang [Mon, 19 Sep 2022 09:47:40 +0000 (05:47 -0400)]
ipq40xx: add support for GL.iNet GL-A1300

Specifications:
SOC: Qualcomm IPQ4018 (DAKOTA) ARM Quad-Core
RAM: 256 MiB
FLASH1: 4 MiB NOR
FLASH2: 128 MiB NAND
ETH: Qualcomm QCA8075
WLAN1: Qualcomm Atheros QCA4018 2.4GHz 802.11b/g/n 2x2
WLAN2: Qualcomm Atheros QCA4018 5G 802.11n/ac W2 2x2
USB: 1 x USB 3.0 port
Button: 1 x Reset button
Switch: 1 x Mode switch
LED: 1 x Blue LED + 1 x White LED

Install via uboot tftp or uboot web failsafe.

By uboot tftp:
(IPQ40xx) # tftpboot 0x84000000 openwrt-ipq40xx-generic-glinet_gl-a1300-squashfs-nand-factory.ubi
(IPQ40xx) # nand erase 0 0x8000000
(IPQ40xx) # nand write 0x84000000 0 $filesize

By uboot web failsafe:
Push the reset button for 10 seconds util the power led flash faster,
then use broswer to access http://192.168.1.1

Afterwards upgrade can use sysupgrade image.

Signed-off-by: Weiping Yang <weiping.yang@gl-inet.com>
17 months agoath79: calibrate TL-WDR4900 v2 with nvmem-cells
Edward Chow [Sat, 5 Nov 2022 06:29:03 +0000 (14:29 +0800)]
ath79: calibrate TL-WDR4900 v2 with nvmem-cells

Driver for both soc (2.4GHz Wifi) and pci (5 GHz) now pull the calibration
data from the nvmem subsystem.

This allows us to move the userspace caldata extraction for the pci-e ath9k
supported wifi into the device-tree definition of the device.

wmac's nodes are also changed over to use nvmem-cells over OpenWrt's
custom mtd-cal-data property.

Signed-off-by: Edward Chow <equu@openmail.cc>
17 months agoath79: add missing clock name strings in SoC dtsi
Shiji Yang [Thu, 27 Oct 2022 05:17:12 +0000 (13:17 +0800)]
ath79: add missing clock name strings in SoC dtsi

For all SoC in the ath79 target, the PLL controller provides 3 main
clocks "cpu", "ddr" and "ahb" through the input clock "ref".

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
17 months agoath79: move reference clock node to SoC dtsi
Shiji Yang [Sat, 8 Oct 2022 08:06:00 +0000 (16:06 +0800)]
ath79: move reference clock node to SoC dtsi

AR7161, AR724x, AR9132 and QCA95xx only support fixed frequency external
crystal oscillator, so move reference clock node to SoC dtsi files.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
17 months agoRevert "build: fix for sourcing target image config a when target is being replaced"
Christian Marangi [Wed, 9 Nov 2022 21:28:53 +0000 (22:28 +0100)]
Revert "build: fix for sourcing target image config a when target is being replaced"

This reverts commit ce1346a8fc0ce9640a4ecbc37bc1686a25c1165d.

Seems to cause buildbot compilation to fail and require more testing.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
17 months agobuild: fix for sourcing target image config a when target is being replaced
Prasun Maiti [Wed, 12 Oct 2022 08:32:43 +0000 (14:02 +0530)]
build: fix for sourcing target image config a when target is being replaced

Sourcing of image/Config.in will not happen
When a target is installed from target/linux/feeds/

Signed-off-by: Prasun Maiti <prasunmaiti87@gmail.com>
17 months agomac80211: remove old legacy legacy drivers
Felix Fietkau [Wed, 12 Oct 2022 10:54:30 +0000 (12:54 +0200)]
mac80211: remove old legacy legacy drivers

Get rid of drivers that are either limited to 802.11b/g or don't even support
cfg80211/mac80211. Most of these are either limited to boards that we don't even
support anymore because of firmware size, or were only used for custom hacks by
a really small number of users in the past.
Let's get rid of those to reduce the maintenance effort and the number of useless
packages

Signed-off-by: Felix Fietkau <nbd@nbd.name>
17 months agomediatek: filogic: enable maxlinear PHY support, refresh config
Felix Fietkau [Sun, 30 Oct 2022 17:23:00 +0000 (18:23 +0100)]
mediatek: filogic: enable maxlinear PHY support, refresh config

Needed for the 7986 RFB1 board

Signed-off-by: Felix Fietkau <nbd@nbd.name>
17 months agomediatek: filogic: fix mt7986a ethernet devicetree entries
Felix Fietkau [Sun, 30 Oct 2022 06:15:36 +0000 (07:15 +0100)]
mediatek: filogic: fix mt7986a ethernet devicetree entries

Add all ports, rename DSA ports to start at lan1

Signed-off-by: Felix Fietkau <nbd@nbd.name>
17 months agomediatek: drop the use of device tree overlays on mt7986a-rfb board
Felix Fietkau [Sat, 29 Oct 2022 21:03:08 +0000 (23:03 +0200)]
mediatek: drop the use of device tree overlays on mt7986a-rfb board

The boot loader does not support it. Instead make NAND the default image for
this board

Signed-off-by: Felix Fietkau <nbd@nbd.name>
17 months agoscripts/mkits.sh: fix portability issue
Felix Fietkau [Sat, 29 Oct 2022 17:01:48 +0000 (19:01 +0200)]
scripts/mkits.sh: fix portability issue

BSD wc can output more whitespaces, which breaks the cut usage.
Replace the cut invocation with awk, which is more portable.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
17 months agomt76: add firmware package for mt7916
Andrew Powers-Holmes [Tue, 1 Nov 2022 06:06:32 +0000 (17:06 +1100)]
mt76: add firmware package for mt7916

Add kernel package 'mt7916-firmware' with firmware files for MT7916E devices.

These share the same driver as the MT7915 chipset, but use their own firmware.

Tested using a pair of AsiaRF AW7916-NPD cards.

Signed-off-by: Andrew Powers-Holmes <aholmes@omnom.net>
17 months agokernel: add mediatek soc ethernet performance improvements
Felix Fietkau [Fri, 28 Oct 2022 11:15:37 +0000 (13:15 +0200)]
kernel: add mediatek soc ethernet performance improvements

- implement multiqueue via qdma hardware shaper to deal with ports with different speeds
- implement hardware DSA untagging
- add NETIF_F_ALL_TSO to reduce unnecessary segmentation

Signed-off-by: Felix Fietkau <nbd@nbd.name>
17 months agomac80211: subsys: add tags to upstreamed patches
Nick Hainke [Sun, 6 Nov 2022 15:48:32 +0000 (16:48 +0100)]
mac80211: subsys: add tags to upstreamed patches

Some patches were already upstreamed.

Signed-off-by: Nick Hainke <vincent@systemli.org>
17 months agomac80211: rt2x00: add tags to upstreamed patches
Nick Hainke [Sun, 6 Nov 2022 15:05:44 +0000 (16:05 +0100)]
mac80211: rt2x00: add tags to upstreamed patches

Some patches are already upstreamed.

Signed-off-by: Nick Hainke <vincent@systemli.org>
17 months agomac80211: brcm: add tag to upstreamed patch
Nick Hainke [Sun, 6 Nov 2022 14:48:45 +0000 (15:48 +0100)]
mac80211: brcm: add tag to upstreamed patch

Add tag to upstreamed patch.

Signed-off-by: Nick Hainke <vincent@systemli.org>
17 months agomac80211: ath9k: add tag to upstreamed patch
Nick Hainke [Sun, 6 Nov 2022 14:37:05 +0000 (15:37 +0100)]
mac80211: ath9k: add tag to upstreamed patch

Add tag to upstreamed patch.

Signed-off-by: Nick Hainke <vincent@systemli.org>
17 months agomac80211: ath10k: add tags for upstreamed patches
Nick Hainke [Sun, 6 Nov 2022 14:14:58 +0000 (15:14 +0100)]
mac80211: ath10k: add tags for upstreamed patches

Add tags to already upstreamed patches.

Signed-off-by: Nick Hainke <vincent@systemli.org>
17 months agoipq806x: kernel ramoops storage for C2600/AD7200
Edward Matijevic [Sun, 6 Nov 2022 19:12:36 +0000 (13:12 -0600)]
ipq806x: kernel ramoops storage for C2600/AD7200

Define the kernel crash log storage ramoops/pstore feature
for C2600/AD7200 and add kmod-ramoops to default.

Tested with C2600 only.

Signed-off-by: Edward Matijevic <motolav@gmail.com>
17 months agoramips: define loadaddr for U6 Lite DTB
David Bauer [Sun, 6 Nov 2022 23:42:57 +0000 (00:42 +0100)]
ramips: define loadaddr for U6 Lite DTB

The Ubiquiti UniFi 6 Lite does not correctly align the FDT by always
setting fdt_high to 0xffffffff when invoking the bootubnt command.

Work around this issue by loading the DTB to a valid,aligned address, so
the bootloader does not have to relocate the FDT automatically.

Note: The device does read the kernel before invoking bootm on the FIT
image to 0x86000000.

Signed-off-by: David Bauer <mail@david-bauer.net>
17 months agomkits: support definition of DTB loadaddr
David Bauer [Sun, 6 Nov 2022 23:42:40 +0000 (00:42 +0100)]
mkits: support definition of DTB loadaddr

Support defining a per-device loadaddress for the DTB. This is required
for devices which to not align the DTB from the bootloader correctly.

Signed-off-by: David Bauer <mail@david-bauer.net>
17 months agokernel: improve description of NTFS kernel packages
Rafał Miłecki [Wed, 2 Nov 2022 19:26:33 +0000 (20:26 +0100)]
kernel: improve description of NTFS kernel packages

This helps choosing the right NTFS driver from two available options.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
17 months agokernel: backport support for "linux,rootfs" in DT
Rafał Miłecki [Mon, 7 Nov 2022 18:24:48 +0000 (19:24 +0100)]
kernel: backport support for "linux,rootfs" in DT

This DT property allows marking flash partition that Linux should use as
a root device. It's useful for devices that don't use U-Boot and cmdline
parser for partitioning. It may be used with "fixed-partitions" or some
dynamic partitioning based on flash content.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
17 months agokernel: split out mtd hack for CONFIG_FIT_PARTITION + rootfs
Rafał Miłecki [Mon, 7 Nov 2022 22:39:52 +0000 (23:39 +0100)]
kernel: split out mtd hack for CONFIG_FIT_PARTITION + rootfs

This is some hack on top of our old hack. Use separated patch for it so
it's easier to understand and actually possible to describe. We should
ideally get rid of this (and we actually did with kernels 5.15+).

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
17 months agoramips: gl-mt1300: downclock SPI to 50MHz
Michael Lyle [Sun, 30 Oct 2022 04:00:41 +0000 (21:00 -0700)]
ramips: gl-mt1300: downclock SPI to 50MHz

The SPI max frequency was set to 80MHz, considerably higher than the
vendor clocks it in their firmware (10MHz).  Multiple users reported
jffs2 corruption/instability in GitHub issue #10461.

My unit has a W25Q256; datasheet specifies maximum SPI frequency for
read command of 50MHz.

Thanks to @DragonBlueP for suggesting to eliminate m25p,fast-read;
and @MPannen1979 for identifying the problem.

Fixes: #10461
Signed-off-by: Michael Lyle <mlyle@lyle.org>
17 months agoramips: fix TP-Link RE200 v3/v4 LEDs
Sungbo Eo [Sun, 20 Feb 2022 01:20:35 +0000 (10:20 +0900)]
ramips: fix TP-Link RE200 v3/v4 LEDs

Set power LED to gpio 43 instead of 44 for v3 and v4.
Set red wifi LED to gpio 40 (was assigned to `red:wifi5g`).

Tested by the author of the initial v3 and v4 commit.

Reported-by: Richard Fröhning <misanthropos@gmx.de>
Tested-by: Richard Fröhning <misanthropos@gmx.de>
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
Signed-off-by: Jan-Niklas Burfeind <git@aiyionpri.me>
17 months agodnsmasq: remove backported CVE patch
Kevin Darbyshire-Bryant [Sun, 6 Nov 2022 20:38:23 +0000 (20:38 +0000)]
dnsmasq: remove backported CVE patch

Patch no longer applies/required since bump to v2.87

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
17 months agodnsmasq: Support nftables nftsets
Kevin Darbyshire-Bryant [Mon, 29 Nov 2021 17:16:39 +0000 (17:16 +0000)]
dnsmasq: Support nftables nftsets

Add build option for nftables sets. By default disable iptables ipset
support.  By default enable nftable nftset support since this is what
fw4 uses.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
dnsmasq: nftset: serve from ipset config

Use existing ipset configs as source for nftsets to be compatible with
existing configs. As the OS can either have iptables XOR nftables
support, it's fine to provide both to dnsmasq. dnsmasq will silently
fail for the present one. Depending on the dnsmasq compile time options,
the ipsets or nftsets option will not be added to the dnsmasq config
file.

dnsmasq will try to add the IP addresses to all sets, regardless of the
IP version defined for the set. Adding an IPv6 to an IPv4 set and vice
versa will silently fail.

Signed-off-by: Mathias Kresin <dev@kresin.me>
dnsmasq: support populating nftsets in addition to ipsets

Tell dnsmasq to populate nftsets instead of ipsets, if firewall4 is present in
the system. Keep the same configuration syntax in /etc/config/dhcp, for
compatibility purposes.

Huge thanks to Jo-Philipp Wich for basically writing the function.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
dnsmasq: obtain nftset ip family from nft

Unfortunately dnsmasq nft is noisy if an attempt to add a mismatched ip address
family to an nft set is made.

Heuristic to guess which ip family a nft set might belong by inferring
from the set name.

In order of preference:

If setname ends with standalone '4' or '6' use that, else
if setname has '4' or '6' delimited by '-' or '_' use that (eg
foo-4-bar) else
If setname begins with '4' or '6' standalone use that.

By standalone I mean not as part of a larger number eg. 24

If the above fails then use the existing nft set query mechanism and if
that fails, well you're stuffed!

With-thanks-to: Jo-Philipp Wich <jo@mein.io> who improved my regexp
knowledge.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
dnsmasq: specify firewall table for nftset

Permit ipsets to specify an nftables table for the set.  New config
parameter is 'table'.  If not specified the default of 'fw4' is used.

config ipset
list name 'BK_4,BK_6'
option table 'dscpclassify'
option table_family 'ip'
option family '4'
list domain 'ms-acdc.office.com'
list domain 'windowsupdate.com'
list domain 'update.microsoft.com'
list domain 'graph.microsoft.com'
list domain '1drv.ms'
list domain '1drv.com'

The table family can also be specified, usually 'ip' or 'ip6' else the
default 'inet' capable of both ipv4 & ipv6 is used.

If the table family is not specified then finally a family option is
available to specify either '4' or '6' for ipv4 or ipv6 respectively.

This is all in addition to the existing heuristic that will look in the
nftset name for an ip family clue, or in total desperation, query the
value from the nftset itself.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
17 months agodnsmasq: add uci-defaults script for ipset migration
Mathias Kresin [Wed, 4 May 2022 19:50:41 +0000 (21:50 +0200)]
dnsmasq: add uci-defaults script for ipset migration

When running sysupgrade from an existing configuration, move existing
ipset definitions to a dedicated config section. Later on, it will allow
to serve ipset as well as nftable sets from the same configuration.

Signed-off-by: Mathias Kresin <dev@kresin.me>
17 months agodnsmasq: bump to 2.87
Kevin Darbyshire-Bryant [Wed, 15 Sep 2021 20:15:33 +0000 (21:15 +0100)]
dnsmasq: bump to 2.87

Bump dnsmasq to 2.87 & refresh patches

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
17 months agosdk: use git-src-full to allow Git versioning
Kuan-Yi Li [Fri, 4 Nov 2022 16:16:36 +0000 (00:16 +0800)]
sdk: use git-src-full to allow Git versioning

$(AUTORELEASE) uses Git log to determine releases and package timestamps.

Base feed is shallow cloned by default in generated SDK, resulting in
an incomplete Git log and therefore different local package versions than
offered upstream.

This patch complements commit 7fae1e5677 by setting the base feed to use
`src-git-full` to solve that.

Signed-off-by: Kuan-Yi Li <kyli@abysm.org>
17 months agoath79: expand rootfs for DIR-825-B1 with unused space
Alan Luck [Fri, 14 Oct 2022 06:26:27 +0000 (17:26 +1100)]
ath79: expand rootfs for DIR-825-B1 with unused space

Expand currently unused flash space to roofs for DIR-825-B1 by using the same
flash space as the old ar71xx big image without moving the caldata.

With some testing this partition is use by the OEM firmware
but if changed is regenerated which allows reverting to OEM firmware

Signed-off-by: Alan Luck <luckyhome2008@gmail.com>
17 months agoath79: add support to TrendNet TEW-673GRU
Korey Caro [Sun, 13 Mar 2022 04:36:30 +0000 (23:36 -0500)]
ath79: add support to TrendNet TEW-673GRU

Add support for the TrendNet TEW-673GRU to ath79.
This device was supported in 19.07.9 but was deprecated with ar71xx.
This is mostly a copy of D-Link DIR-825 B1.
Updates have been completed to enable factory.bin and sysupgrade.bin both.
Code improvements to DTS file and makefile.

Architecture   |  MIPS
Vendor         |  Qualcomm Atheros
bootloader     |  U-Boot
System-On-Chip |  AR7161 rev 2 (MIPS 24Kc V7.4)
CPU/Speed      |  24Kc V7.4 680 MHz
Flash-Chip     |  Macronix MX25L6405D
Flash size     |  8192 KiB
RAM Chip:      |  ProMOS V58C2256164SCI5 × 2
RAM size       |  64 MiB
Wireless       |  2 x Atheros AR922X 2.4GHz/5.0GHz 802.11abgn
Ethernet       |  RealTek RTL8366S Gigabit w/ port based vlan support
USB            |  Yes 2 x 2.0

Initial Flashing Process:
1) Download 22.03 tew-673gru factory bin
2) Flash 22.03 using TrendNet GUI

OpenWRT Upgrade Process
3) Download 22.03 tew-673gru sysupgrade.bin
4) Flash 22.03 using OpenWRT GUI

Signed-off-by: Korey Caro <korey.caro@gmail.com>
17 months agoCI: packages.yml: Fix usage of pre-build tools
Hauke Mehrtens [Wed, 2 Nov 2022 21:17:51 +0000 (22:17 +0100)]
CI: packages.yml: Fix usage of pre-build tools

Activate CONFIG_AUTOREMOVE to match the settings used to build the
pre-build tools. This has to match the pre-build tools to not rebuild
them.

This prevents the tools being rebuild in packages.yml.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
17 months agoramips: add support for TP-Link MR600 V2(EU)
Linos Giannopoulos [Sun, 2 Oct 2022 22:30:28 +0000 (01:30 +0300)]
ramips: add support for TP-Link MR600 V2(EU)

MR600 V2(EU) is an LTE router that also supports 4G+ band aggregation
etc. and can reportedly achieve higher bandwidth with it.

- Specifications:

* SoC: Mediatek MT7621DAT 880MHz
* RAM: 128MB DDR3
* Flash: 16MB SPI NOR flash (GD25Q128C)
* LTE Modem: Qualcomm MDM9240
* WiFi 5GHz: Mediatek MT7613BEN
* WiFi 2.4GHz: Mediatek MT7603EN
* Ethernet: MT7530, 4x 1000Base-T.
* UART: Serial console (115200 8n1), J1(GND:3)
* Buttons: Reset, WPS.
* LED: Power, WAN, LTE, WiFi 2GHz and 5GHz, LAN, Signal1, Signal2,
  Signal3

- MAC Addresses:

OEM firmware configuration:
54:af:97:xx:xx:7b : 2.4G
54:af:97:xx:xx:7a : 5G
54:af:97:xx:xx:7c : LTE
54:af:97:xx:xx:7b : LAN (label)
54:af:97:xx:xx:7c : WAN

- Installation:

1. Download the OpenWrt initramfs-image.

Place it into a TFTP server root directory and rename it to openwrt.img
Configure the TFTP server to listen at 192.168.0.5/24.

3. Connect to the serial console.

Attach power and interrupt the boot procedure when prompted (type `tpl`).

Credentials are admin / 1234

4. Configure U-Boot for booting OpenWrt from ram

 $ tftpboot
 $ bootm

5. Transfer the OpenWrt sysupgrade image to the device.

- LTE:

In order to setup the wwan0 interface:
1. Add a `qmi` proto interface under `/etc/config/network`, e.g.:
```
config interface 'wwan0'
        option device '/dev/cdc-wdm0'
        option proto 'qmi'
        option pincode 'XXXX'
        option apn 'your_isp_apn'
```

2. Add `wwan0` interface to the `wan` firewall zone
3. `/etc/init.d/network restart`

Signed-off-by: Linos Giannopoulos <linosgian00@gmail.com>
17 months agoramips: add support for SIM SIMAX1800T and Haier HAR-20S2U1
Shiji Yang [Thu, 15 Sep 2022 17:10:52 +0000 (01:10 +0800)]
ramips: add support for SIM SIMAX1800T and Haier HAR-20S2U1

SIM AX18T and Haier HAR-20S2U1 Wi-Fi6 AX1800 routers are designed based
on Tenbay WR1800K. They have the same hardware circuits and u-boot.
SIM AX18T has three carrier customized models: SIMAX1800M (China Mobile),
SIMAX1800T (China Telecom) and SIMAX1800U (China Unicom). All of these
models run the same firmware.

Specifications:
 SOC:      MT7621 + MT7905 + MT7975
 ROM:      128 MiB
 RAM:      256 MiB
 LED:      status *3 R/G/B
 Button:   reset *1 + wps/mesh *1
 Ethernet:      lan *3 + wan *1 (10/100/1000Mbps)
 TTL Baudrate:  115200
 TFTP Server:   192.168.1.254
 TFTP IP:       192.168.1.28 or 192.168.1.160 (when envs is broken)

MAC Address:
 use        address               source
 label      30:xx:xx:xx:xx:62     wan
 lan        30:xx:xx:xx:xx:65     factory.0x8004
 wan        30:xx:xx:xx:xx:62     factory.0x8004 -3
 wlan2g     30:xx:xx:xx:xx:64     factory.0x0004
 wlan5g     32:xx:xx:xx:xx:64     factory.0x0004 set 7th bit

TFTP Installation (initramfs image only & recommend):
1. Set local tftp server IP: 192.168.1.254 and NetMask: 255.255.255.0
2. Rename initramfs-kernel.bin to "factory.bin" and put it in the root
   directory of the tftp server. (tftpd64 is a good choice for Windows)
3. Start the TFTP server, plug in the power supply, and wait for the
   system to boot.
4. Backup "firmware" partition and rename it to "firmware.bin", we need
   it to back to stock firmware.
5. Use "fw_printenv" command to list envs.
   If "firmware_select=2" is observed then set u-boot enviroment:
   /# fw_setenv firmware_select 1
6. Apply sysupgrade.bin in OpenWrt LuCI.

Web UI Installation:
1. Apply update by uploading initramfs-factory.bin to the web UI.
2. Use "fw_printenv" command to list envs.
   If "firmware_select=2" is observed then set u-boot enviroment:
   /# fw_setenv firmware_select 1
3. Apply squashfs-sysupgrade.bin in OpenWrt LuCI.

Recovery to stock firmware:
a. Upload "firmware.bin" to OpenWrt /tmp, then execute:
   /# mtd -r write /tmp/firmware.bin firmware
b. We can also write factory image "UploadBrush-bin.img" to firmware
   partition to recovery. Upload image file to /tmp, then execute:
   /# mtd erase firmware
   /# mtd -r write /tmp/UploadBrush-bin.img firmware

How to extract stock firmware image:
  Download stock firmware, then use openssl:
  openssl aes-256-cbc -d -salt -in [Downloaded_Firmware] \
  -out "firmware.tar.tgz" -k QiLunSmartWL

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
17 months agoltq-tapi: Fix compile with kernel 5.15
Hauke Mehrtens [Tue, 1 Nov 2022 22:18:08 +0000 (23:18 +0100)]
ltq-tapi: Fix compile with kernel 5.15

Do not use find_vpid(), but get_task_pid() to get the pid from
pThrCntrl->tid. This is now a ponter to struct task_struct instead of
an integer.

This fixes the build of ltq-tapi with lantiq/xway.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
17 months agoltq-ifxos: Fix compile with ltq-tapi
Hauke Mehrtens [Tue, 1 Nov 2022 22:14:58 +0000 (23:14 +0100)]
ltq-ifxos: Fix compile with ltq-tapi

Do not include asm/irq.h directly, but include linux/interrupt.h instead.
This fixes the build of ltq-tapi with lantiq/xway.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
17 months agobusybox: awk: fix use after free (CVE-2022-30065)
Hauke Mehrtens [Tue, 1 Nov 2022 14:23:17 +0000 (15:23 +0100)]
busybox: awk: fix use after free (CVE-2022-30065)

This backports a commit which fixes a use after free bug in awk.

CVE-2022-30065 description:
A use-after-free in Busybox 1.35-x's awk applet leads to denial of
service and possibly code execution when processing a crafted awk
pattern in the copyvar function.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
17 months agodnsmasq: Backport DHCPv6 server fix (CVE-2022-0934)
Hauke Mehrtens [Tue, 1 Nov 2022 14:17:03 +0000 (15:17 +0100)]
dnsmasq: Backport DHCPv6 server fix (CVE-2022-0934)

This backports a commit from upstream dnsmasq to fix CVE-2022-0934.

CVE-2022-0934 description:
A single-byte, non-arbitrary write/use-after-free flaw was found in
dnsmasq. This flaw allows an attacker who sends a crafted packet
processed by dnsmasq, potentially causing a denial of service.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
17 months agoramips: add support for Zbtlink ZBT-WG1602-V04
Alexander Horner [Mon, 26 Sep 2022 19:17:40 +0000 (20:17 +0100)]
ramips: add support for Zbtlink ZBT-WG1602-V04

Description heavily based on commit
7e89421a7c3855d66a20350a5bf9ca4cc7a2caf9 by
Sergey Ryazanov <ryazanov.s.a@gmail.com> Details I cannot confirm have
been removed

Completed with great help from \x on IRC. Thanks, \x!

Zbtlink ZBT-WG1602-V04 is a Wi-Fi router intendend for use with WWAN
(UMTS/LTE/3G/4G) modems. The router board offers a couple of miniPCIe
slots with USB and SIM only and another one which is a pure miniPCIe
slot as well as five Gigabit Ethernet ports (4xLAN + WAN).

Specification:

* SoC: MT7621A
* RAM: 256/512 MiB
* Flash: 16/32 MiB
* Eth: 10/100/1000 Mbps Ethernet x5 ports (4xLAN + WAN)
* WLAN 2GHz: MT7603E (.11bgn, MIMO 2x2)
* WLAN 5GHz: MT7662E (.11nac, MIMO 2x2)
* WLAN Ants: detachable x2, shared by 2GHz & 5GHz radios
* miniPCIe: 2x slots with USB&SIM + 1x slot with regular PCIe bus
* WWAN Ants: detachable x4
* External storage: microSD (SDXC) slot
* USB: 3.0 Type-A port
* LED: 11 (5 per Eth phy, 3 SoC controlled, 2 WLAN 2/5 controlled,
  1 power indicator)
* Button: 1 (reset)
* UART: console (115200 baud)
* Power: DC jack (12 V / 2.5 A)

Additional HW information:

* SoC USB port 1 is shared by internal miniPCIe slot and external
  Type-A USB port, USB D+/D- lines are toggled between ports using a
  GPIO controlled DPDT switch.

Installation:

The kernel image can be installed directly onto the device via a browser
to 192.168.1.1 using the built in firmware recovery Web UI available.
It can be accessed by pushing the reset button in, applying power and
holding the reset button for approximately 10 seconds. When the kernel
image has been flashed, you can access LuCI and upload the sysupgrade
as normal.

Signed-off-by: Alexander Horner <ahorner@programmer.net>
17 months agoramips: add support for Youku X2
Shiji Yang [Sat, 5 Nov 2022 11:52:08 +0000 (19:52 +0800)]
ramips: add support for Youku X2

Specifications:
  SOC:      MT7620AN + MT7612EN
  RAM:      128 MiB DDR2
  Flash:    16 MiB (Winbond W25Q28FVFG)
  WLAN:     2.4G + 5G
  LAN:      LAN ports *2
  WAN:      WAN port *1
  USB:      USB2.0 *1
  SD Card:  MicroSD *1
  Buttons:  Reset *1
  LEDs: ethernet *3, system, usb, wlan2g, wlan5g

MAC Address:
  use        address               source
  label      54:36:9b:xx:xx:ac     lan
  lan        54:36:9b:xx:xx:ac     factory.0x0028
  wan        54:36:9b:xx:xx:ad     factory.0x002e
  wlan2g     54:36:9b:xx:xx:ae     factory.0x0004
  wlan5g     54:36:9b:xx:xx:af     factory.0x8004

Installation:
1. Apply initramfs-kernel.bin in stock firmware Web UI.
2. Install sysupgrade.bin on OpenWrt and do not retain any configuration.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
17 months agoramips: improve compatibility for Youku YK-L2 and YK-L1 series
Shiji Yang [Sat, 5 Nov 2022 11:52:08 +0000 (19:52 +0800)]
ramips: improve compatibility for Youku YK-L2 and YK-L1 series

Add UIMAGE_NAME and UIMAGE_MAGIC to allow users to directly install
initramfs-kernel.bin from the stock firmware Web UI. At the same time,
this change makes it possible to boot OpenWrt with the official u-boot.

Notice:
Since the stock firmware is based on OpenWrt and the configuration
will be retained by default during the upgrade process, so we must use
initramfs-kernel.bin to do a initial installation. After the system
restarts, install sysupgrade.bin and do not retain any configuration.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
17 months agouboot-layerscape: adjust LS1012A-IOT config and env
Pawel Dembicki [Mon, 24 Oct 2022 13:11:07 +0000 (15:11 +0200)]
uboot-layerscape: adjust LS1012A-IOT config and env

In a254279a6c30 LS1012A-IOT kernel image was switched to FIT.

But u-boot config is lack of FIT and ext4 support.

This patch enables it.

It also fix envs, because for some reason this board need to use "loadaddr"
variable in brackets.

Fixes: #9894
Fixes: a254279a6c30 ("layerscape: Change to combined rootfs on sd images")
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
17 months agovalgrind: update to 3.20.0
Nick Hainke [Mon, 31 Oct 2022 23:36:37 +0000 (00:36 +0100)]
valgrind: update to 3.20.0

Release Notes:
https://valgrind.org/docs/manual/dist.news.html

Signed-off-by: Nick Hainke <vincent@systemli.org>
17 months agokernel: further cleanup of xfrm[4|6]_mode*
Martin Schiller [Wed, 2 Nov 2022 06:41:04 +0000 (07:41 +0100)]
kernel: further cleanup of xfrm[4|6]_mode*

In my commit da5c45f4d886 ("kernel: remove handling of xfrm[4|6]_mode_*
modules") I missed a few default config options and description entries.
Those should be gone as well.

Fixes: da5c45f4d886 ("kernel: remove handling of xfrm[4|6]_mode_* modules")
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
17 months agorealtek: fix typo in debug message
Luiz Angelo Daros de Luca [Thu, 3 Nov 2022 16:34:22 +0000 (13:34 -0300)]
realtek: fix typo in debug message

vid_end was mentioned twice.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
17 months agokernel: bump 5.15 to 5.15.77
John Audia [Thu, 3 Nov 2022 16:07:30 +0000 (12:07 -0400)]
kernel: bump 5.15 to 5.15.77

Manually rebased:
   bcm27xx/patches-5.15/950-0600-xhci-quirks-add-link-TRB-quirk-for-VL805.patch
   bcm27xx/patches-5.15/950-0606-usb-xhci-add-VLI_TRB_CACHE_BUG-quirk.patch
   bcm27xx/patches-5.15/950-0717-usb-xhci-add-a-quirk-for-Superspeed-bulk-OUT-transfe.patch
   bcm53xx/patches-5.15/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
   lantiq/patches-5.15/0028-NET-lantiq-various-etop-fixes.patch

All other patches automatically rebased

Build system: x86_64
Build-tested: bcm2711/RPi4B, mt7622/RT3200
Run-tested: bcm2711/RPi4B, mt7622/RT3200

Signed-off-by: John Audia <therealgraysky@proton.me>
17 months agokernel: bump 5.10 to 5.10.153
John Audia [Thu, 3 Nov 2022 16:54:01 +0000 (12:54 -0400)]
kernel: bump 5.10 to 5.10.153

Manually rebased:
  bcm53xx/patches-5.10/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
  lantiq/patches-5.10/0028-NET-lantiq-various-etop-fixes.patch

All patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
17 months agotools/fakeroot: update to 1.30.1
Nick Hainke [Fri, 4 Nov 2022 22:34:02 +0000 (23:34 +0100)]
tools/fakeroot: update to 1.30.1

Release Notes:
https://tracker.debian.org/news/1381350/accepted-fakeroot-1301-1-source-into-unstable/

Refresh patches:
- 600-macOS.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
17 months agoopenssl: bump to 1.1.1s
John Audia [Thu, 3 Nov 2022 13:27:49 +0000 (09:27 -0400)]
openssl: bump to 1.1.1s

Changes between 1.1.1r and 1.1.1s [1 Nov 2022]

  *) Fixed a regression introduced in 1.1.1r version not refreshing the
     certificate data to be signed before signing the certificate.
     [Gibeom Gwon]

 Changes between 1.1.1q and 1.1.1r [11 Oct 2022]

  *) Fixed the linux-mips64 Configure target which was missing the
     SIXTY_FOUR_BIT bn_ops flag. This was causing heap corruption on that
     platform.
     [Adam Joseph]

  *) Fixed a strict aliasing problem in bn_nist. Clang-14 optimisation was
     causing incorrect results in some cases as a result.
     [Paul Dale]

  *) Fixed SSL_pending() and SSL_has_pending() with DTLS which were failing to
     report correct results in some cases
     [Matt Caswell]

  *) Fixed a regression introduced in 1.1.1o for re-signing certificates with
     different key sizes
     [Todd Short]

  *) Added the loongarch64 target
     [Shi Pujin]

  *) Fixed a DRBG seed propagation thread safety issue
     [Bernd Edlinger]

  *) Fixed a memory leak in tls13_generate_secret
     [Bernd Edlinger]

  *) Fixed reported performance degradation on aarch64. Restored the
     implementation prior to commit 2621751 ("aes/asm/aesv8-armx.pl: avoid
     32-bit lane assignment in CTR mode") for 64bit targets only, since it is
     reportedly 2-17% slower and the silicon errata only affects 32bit targets.
     The new algorithm is still used for 32 bit targets.
     [Bernd Edlinger]

  *) Added a missing header for memcmp that caused compilation failure on some
     platforms
     [Gregor Jasny]

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

Signed-off-by: John Audia <therealgraysky@proton.me>
17 months agoelfutils: update to 1.88
Nick Hainke [Wed, 2 Nov 2022 15:18:34 +0000 (16:18 +0100)]
elfutils: update to 1.88

Release Notes:
https://sourceware.org/pipermail/elfutils-devel/2022q4/005561.html

Refresh patches:
- 003-libintl-compatibility.patch
- 100-musl-compat.patch
- 101-no-fts.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
17 months agotools/elfutils: update to 1.88
Nick Hainke [Wed, 2 Nov 2022 15:14:22 +0000 (16:14 +0100)]
tools/elfutils: update to 1.88

Release Notes:
https://sourceware.org/pipermail/elfutils-devel/2022q4/005561.html

Signed-off-by: Nick Hainke <vincent@systemli.org>
17 months agostrace: update to 6.0
Nick Hainke [Wed, 2 Nov 2022 15:04:52 +0000 (16:04 +0100)]
strace: update to 6.0

Release Notes:
https://github.com/strace/strace/releases/tag/v6.0

Signed-off-by: Nick Hainke <vincent@systemli.org>
17 months agotools/mtd-utils: update to 2.1.5
Nick Hainke [Wed, 2 Nov 2022 14:25:36 +0000 (15:25 +0100)]
tools/mtd-utils: update to 2.1.5

Release Notes:
https://lore.kernel.org/buildroot/c0992bbb-9487-9a51-ea9f-39cf074b61ec@sigma-star.at/

Refresh patches:
- 130-lzma_jffs2.patch
- 320-mkfs.jffs2-SOURCE_DATE_EPOCH.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
17 months agotools/mtools: update to 4.0.42
Nick Hainke [Wed, 2 Nov 2022 14:13:53 +0000 (15:13 +0100)]
tools/mtools: update to 4.0.42

Release Notes:
https://lists.gnu.org/archive/html/info-mtools/2022-10/msg00000.html

Signed-off-by: Nick Hainke <vincent@systemli.org>
17 months agomediatek: replace mt7986 watchdog assert patch with upstream
Nick Hainke [Thu, 3 Nov 2022 12:48:25 +0000 (13:48 +0100)]
mediatek: replace mt7986 watchdog assert patch with upstream

Replace "920-watchdog-add-mt7986-assert.patch" with upstreamed
- 920-v5.16-watchdog-mtk-add-disable_wdt_extrst-support.patch
- 921-v5.19-watchdog-mtk_wdt-mt7986-Add-toprgu-reset-controller.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
17 months agomediatek: mt7629: add tag to upstreamed patches
Nick Hainke [Thu, 3 Nov 2022 12:00:17 +0000 (13:00 +0100)]
mediatek: mt7629: add tag to upstreamed patches

The patches were upstreamed.

Signed-off-by: Nick Hainke <vincent@systemli.org>
17 months agomediatek: add tag for upstreamed patches
Nick Hainke [Thu, 3 Nov 2022 10:41:44 +0000 (11:41 +0100)]
mediatek: add tag for upstreamed patches

The patches were upstreamed.

Signed-off-by: Nick Hainke <vincent@systemli.org>
17 months agomediatek: mt7986: add tag to upstreamed patches
Nick Hainke [Thu, 3 Nov 2022 10:18:49 +0000 (11:18 +0100)]
mediatek: mt7986: add tag to upstreamed patches

The patch "210-pinctrl-mediatek-add-support-for-MT7986-SoC.patch" and
"212-clk-mediatek-add-mt7986-clock-support.patch" are upstreamed.

Signed-off-by: Nick Hainke <vincent@systemli.org>
17 months agomediatek: mt7622: add tag to upstreamed patches
Nick Hainke [Thu, 3 Nov 2022 10:02:02 +0000 (11:02 +0100)]
mediatek: mt7622: add tag to upstreamed patches

The patches "191-arm64-dts-mt7622-specify-the-L2-cache-topology.patch"
and "192-arm64-dts-mt7622-specify-the-number-of-DMA-requests.patch" are
upstreamed to 5.19.

Signed-off-by: Nick Hainke <vincent@systemli.org>
17 months agomediatek: filogic: disable swconfig
Aleksander Jan Bajkowski [Sat, 22 Oct 2022 14:16:14 +0000 (16:16 +0200)]
mediatek: filogic: disable swconfig

This subtarget supports 3 devices:
 * Bananapi BPi-R3 (added in a96382c1bb204698cd43e82193877c10e4b63027),
 * MediaTek MTK7986 rfba AP (added in cffc77ae55ed0e5b9e70417d6a1e1d280cea92cf),
 * MediaTek MTK7986 rfbb AP (added in cffc77ae55ed0e5b9e70417d6a1e1d280cea92cf).

This subtarget supports DSA from the beginning. It looks like CONFIG_SWCONFIG
was copied from another config when the subtarget was created.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
17 months agomediatek: filogic: refresh config
Aleksander Jan Bajkowski [Sat, 22 Oct 2022 14:13:32 +0000 (16:13 +0200)]
mediatek: filogic: refresh config

This was done by executing these command:
$ time make kernel_oldconfig CONFIG_TARGET=subtarget

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
17 months agouhttpd: use procd to reload on acme renew
Glen Huang [Mon, 24 Oct 2022 15:39:55 +0000 (23:39 +0800)]
uhttpd: use procd to reload on acme renew

Calling /etc/init.d/uhttpd reload directly in the acme hotplug script
can inadvertently start a stopped instance.

Signed-off-by: Glen Huang <i@glenhuang.com>
17 months agobcm4908: backport upstream BQL support for bcm4908_enet
Rafał Miłecki [Thu, 3 Nov 2022 06:37:42 +0000 (07:37 +0100)]
bcm4908: backport upstream BQL support for bcm4908_enet

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
17 months agokernel: Refresh generic patches
Hauke Mehrtens [Wed, 2 Nov 2022 23:20:30 +0000 (00:20 +0100)]
kernel: Refresh generic patches

This patch was out of sync.

Fixes: 1673b7dca384 ("kernel: backport fixes for MediaTek Ethernet driver")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
17 months agokernel: sort filesystems symbols alphabetically
Rafał Miłecki [Wed, 2 Nov 2022 19:09:04 +0000 (20:09 +0100)]
kernel: sort filesystems symbols alphabetically

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
17 months agokernel: backport fixes for MediaTek Ethernet driver
Daniel Golle [Wed, 2 Nov 2022 12:41:40 +0000 (12:41 +0000)]
kernel: backport fixes for MediaTek Ethernet driver

Backport patches from net-next which fix possible memory and resource
leaks in the error codepaths of WED initialization.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
17 months agokernel: support hw flow-offloading counters on newer MediaTek SoCs
Daniel Golle [Wed, 2 Nov 2022 11:24:56 +0000 (11:24 +0000)]
kernel: support hw flow-offloading counters on newer MediaTek SoCs

The packet processing engine (PPE) found in newer ARM-based MediaTek
SoCs provides packet and byte counters for offloaded streams.
Import pending patch reading and using those counters.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
17 months agomediatek: remove obsolete patch
Daniel Golle [Wed, 2 Nov 2022 11:27:47 +0000 (11:27 +0000)]
mediatek: remove obsolete patch

The patch enabling hardware flow offloading support on the MT7623 SoC
has been merged upstream as of Linux 5.13. Remove our local patch which
wrongly got forward-ported and now actually enables hardware flow
offloading for the MT2701 SoC family (unsupported in OpenWrt).

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
17 months agofirewall: config: drop input traffic by default
Baptiste Jonglez [Wed, 19 Oct 2022 14:49:03 +0000 (16:49 +0200)]
firewall: config: drop input traffic by default

This is necessary with firewall4 to avoid a hard-to-diagnose race
condition during boot, causing DNAT rules not to be taken into account
correctly.

The root cause is that, during boot, the ruleset is mostly empty, and
interface-related rules (including DNAT rules) are added incrementally.
If a packet hits the input chain before the DNAT rules are setup, it can
create buggy conntrack entries that will persist indefinitely.

This new default should be safe because firewall4 explicitly accepts
authorized traffic and rejects the rest.  Thus, in normal operations, the
default policy is not used.

Fixes: #10749
Ref: https://github.com/openwrt/openwrt/issues/10749
Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
17 months agolibnl-tiny: update to the latest version
Hauke Mehrtens [Tue, 1 Nov 2022 17:03:33 +0000 (18:03 +0100)]
libnl-tiny: update to the latest version

db3b2cd libnl-tiny: set SOCK_CLOEXEC if available

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
17 months agoiwinfo: update to the latest version
Hauke Mehrtens [Tue, 1 Nov 2022 17:00:54 +0000 (18:00 +0100)]
iwinfo: update to the latest version

00aab87 Correctly identify key management algorithms starting with "FT-"

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
17 months agouboot-envtools: Fix format of autogenerated sectors
Sven Eckelmann [Thu, 29 Sep 2022 10:10:32 +0000 (12:10 +0200)]
uboot-envtools: Fix format of autogenerated sectors

The sector number must be stored in hex. Otherwise, the number (like 16)
will be parsed as hex and any write to the partition will end up with an
error like:

  MTD erase error on /dev/mtd5: Invalid argument

Fixes: 9adfeccd8415 ("uboot-envtools: Add support for IPQ806x AP148 and DB149")
Fixes: 54b275c8ed3a ("ipq40xx: add target")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@fungible.com>
17 months agokernel: Add kmod-drm-ttm-helper
Hauke Mehrtens [Tue, 1 Nov 2022 13:47:14 +0000 (14:47 +0100)]
kernel: Add kmod-drm-ttm-helper

Add a package for drm_ttm_helper.ko. CONFIG_DRM_TTM_HELPER is compiled
into the kernel on armvirt/64, x86/64, x86/generic and x86/legacy
because also some DRM drivers are compiled into the kernel. On x86/geode
it is not compiled into the kernel, but kmod-drm-amdgpu and
kmod-drm-radeon depend on it.

This fixes the x86/geode build.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
17 months agorealtek: mark clock source as continuous
Sander Vanheule [Mon, 31 Oct 2022 09:11:04 +0000 (10:11 +0100)]
realtek: mark clock source as continuous

After replacing the R4K event timer and clock source with the new
Realtek Otto timer, performance for RTL839x devices was severely
impacted, as reported by Hiroshi.

Research by Markus showed that after commit 4657a5301eb5 ("realtek:
avoid busy waiting for RTL839x PHY read/write"), the ethernet driver
could only update a phy once per timer interval, which also heavily
impacted boot time. On e.g. a Zyxel GS1900-48, this added around a
minute to the time to fully initialise the switch.

By marking the otto clocksource as continuous, the kernel enables it to
be used for high resolution timers. This allows readx_poll_timeout() to
sleep for less than one system timer interval, reducing system dead
time.

Link: https://github.com/openwrt/openwrt/issues/11117
Reported-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Cc: Markus Stockhausen <markus.stockhausen@gmx.de>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
Tested-by: INAGAKI Hiroshi <musashino.open@gmail.com> # Panasonic Switch-M48eG PN28480K
Tested-by: Jan Hoffmann <jan@3e8.eu> # HPE 1920-8G, HPE 1920-48G
17 months agotarget/realtek: use netif_receive_skb_list
Rosen Penev [Sun, 30 Oct 2022 19:25:19 +0000 (12:25 -0700)]
target/realtek: use netif_receive_skb_list

Small performance improvement on rx.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
17 months agomediatek: consider adc_oe thermal calibration value in efuse
Daniel Golle [Mon, 31 Oct 2022 19:50:40 +0000 (19:50 +0000)]
mediatek: consider adc_oe thermal calibration value in efuse

The use of the adc_oe value stored in the efuse has been dropped in
MediaTek's SDK during a recent refactorization of the temperature
calculation formula. Don't ignore this offset value and again include
it in raw-to-deg-celsius calculation.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
17 months agoramips: add support for YunCore FAP690
Volodymyr Puiul [Wed, 22 Jun 2022 12:41:36 +0000 (16:41 +0400)]
ramips: add support for YunCore FAP690

It is an in-wall 802.11ax (Wi-Fi 6) router, based on MediaTek MT7621A.

Specifications:
- SoC: MT7621AT (880MHz, 2 Cores)
- RAM: 128 MB
- Flash: 16 MB SPI NOR
- Wi-Fi:
    - MT7915DN + MT7905DAN: 2.4/5 GHz
- Ethernet: 1x 1GiE via MT7530
- UART: J4 (115200 baud)
    - Pinout: [3V3] (TXD) (RXD) (GND)

- Bootloader: U-Boot
- Buttons:
    - SW1 - no label on the box, combined with led
- Led: Status. RGB controlled by
    - GPIO 14 - green color
    - GPIO 15 - red color
    - GPIO 16 - blue color

Installation:
OEM firmware is based on LEDE with custom UI and support standard sysupgrade
variant of firmware. However it requires "*.ubin" extension for sysupgrade file.
Always select "Factory reset" switch on upgrade to OpenWRT, otherwise
it will not boot.

MAC addresses as verified by OEM firmware:
vendor   source
LAN      factory 0x4 (label)
5g       factory 0x4 (label)
2g       label with flipped bits bit in 1-st byte and bits 5, 6, 7 in
4-th byte

Example
label:  44:xx:xx:b7:xx:xx
lan:    44:xx:xx:b7:xx:xx
2g      46:xx:xx:c7:xx:xx
5g      44:xx:xx:b7:xx:xx

Signed-off-by: Volodymyr Puiul <volodymyr.puiul@gmail.com>