openwrt/staging/jow.git
21 months agotoolchain/binutils: switch to version 2.40 by default
Hauke Mehrtens [Mon, 20 Feb 2023 21:38:27 +0000 (22:38 +0100)]
toolchain/binutils: switch to version 2.40 by default

This was build tested with all core packages on all targets
successfully.

This was run tested on the following systems:
* lantiq/xrx200 musl
* x86/64 musl
* x86/64 glibc
* malta/be

The size of some of the initramfs images from lantiq/xrx increased by
240 bytes.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
21 months agotoolchain/binutils: backport stable patches
Hauke Mehrtens [Mon, 20 Feb 2023 21:35:50 +0000 (22:35 +0100)]
toolchain/binutils: backport stable patches

Add the patches with real changes from the binutils 2.40 stable branch.
I am not aware that we ran into any of these problems, but I think it is
better to take the existing stable patches.

They were exported like this:
git format-patch binutils-2_40...origin/binutils-2_40-branch
I removed the patches changing the version numbers and updating the
translations only.

I removed the following patches:
 *Automatic-date-updat*
 001-Re-enable-development.-Update-version-to-2.40.0.patch
 004-Updated-translations-for-the-gas-and-binutils-sub-di.patch
 015-Updated-Swedish-translation-for-the-binutils-sub-dir.patch
 027-Updated-Swedish-translation-for-the-binutils-sub-dir.patch

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
21 months agokernel: fix hwmon-gsc driver
Tim Harvey [Tue, 28 Feb 2023 00:11:33 +0000 (16:11 -0800)]
kernel: fix hwmon-gsc driver

Fix hwmon-gsc driver by replacing out-of-tree hwmon-gsc driver with in-tree
driver that was merged in Linux v5.8:
 - remove the old out-of-tree module
 - add configuration for the in-tree modules

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
21 months agomt7621: move uboot-envtools to DEFAULT_PACKAGES
Bjørn Mork [Tue, 28 Feb 2023 11:39:36 +0000 (12:39 +0100)]
mt7621: move uboot-envtools to DEFAULT_PACKAGES

Several devices depend on fw_printenv during sysupgrade.  Make sure
it always is present in all images, including initramfs images built
by the buildbots.

Fixes: 2449a632084b ("ramips: mt7621: Add support for ZyXEL NR7101")
Signed-off-by: Bjørn Mork <bjorn@mork.no>
21 months agoramips: rt5350: enable lzma-loader for ALLNET ALL5003
Sergio Paracuellos [Sat, 25 Feb 2023 11:01:40 +0000 (12:01 +0100)]
ramips: rt5350: enable lzma-loader for ALLNET ALL5003

Fixes the boot loader LZMA decompression issue:
LZMA ERROR 1 - must RESET board to recover

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
21 months agokexec-tools: update to 2.0.26
Nick Hainke [Sun, 28 Aug 2022 04:57:17 +0000 (06:57 +0200)]
kexec-tools: update to 2.0.26

Release Notes:
- 2.0.22: https://www.spinics.net/lists/kexec/msg26864.html
- 2.0.23: https://www.spinics.net/lists/kexec/msg27693.html
- 2.0.24: https://www.spinics.net/lists/kexec/msg28922.html
- 2.0.25: https://lore.kernel.org/all/YuYl22cyGldQQc5m@vergenet.net/
- 2.0.26: https://www.spinics.net/lists/kexec/msg30743.html

Remove upstreamed patch:
- 001-arm-do-not-copy-magic-4-bytes-of-appended-DTB-in-zIm.patch

Tested-by: Linhui Liu <liulinhui36@gmail.com> # x86_64
Signed-off-by: Nick Hainke <vincent@systemli.org>
21 months agokernel: add tty led trigger kernel module package
Florian Eckert [Wed, 8 Feb 2023 08:23:08 +0000 (09:23 +0100)]
kernel: add tty led trigger kernel module package

This allows LEDs to be controlled by activity on ttys which includes
serial devices like '/dev/ttyS0'.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
22 months agokernel: bump 5.15 to 5.15.96
John Audia [Mon, 27 Feb 2023 22:54:37 +0000 (17:54 -0500)]
kernel: bump 5.15 to 5.15.96

All patches automatically rebased.

Build system: x86_64
Build-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3
Run-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
22 months agokernel: bump 5.15 to 5.15.95
John Audia [Thu, 23 Feb 2023 11:16:52 +0000 (06:16 -0500)]
kernel: bump 5.15 to 5.15.95

Removed upstreamed:
backport-5.15/807-v6.1-0003-nvmem-core-add-error-handling-for-dev_set_name.patch[1]
bcm47xx/patches-5.15/070-net-bgmac-fix-BCM5358-support-by-setting-correct-fla.patch[2]

Added fix:
backport-5.15/883-0001-net-Remove-WARN_ON_ONCE-sk-sk_forward_alloc-from-sk_.patch[3]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.95&id=14eea6449473c1f55e196cc104ba16d144465869
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.95&id=2603a5ca6223bb3a88814e2728335eec14f715ab
3. https://lore.kernel.org/stable/20230227211548.13923-1-kuniyu@amazon.com

Build system: x86_64
Build-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod
Run-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod

Signed-off-by: John Audia <therealgraysky@proton.me>
22 months agofstools: update to the latest master
Rafał Miłecki [Tue, 28 Feb 2023 09:04:56 +0000 (10:04 +0100)]
fstools: update to the latest master

bfe882d libblkid-tiny: add exfat superblock support

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
22 months agobcm47xx: fix bgmac support for BCM5358
Rafał Miłecki [Mon, 27 Feb 2023 09:46:14 +0000 (09:46 +0000)]
bcm47xx: fix bgmac support for BCM5358

Fix two long-standing regressions.

Fixes: https://github.com/openwrt/openwrt/issues/8278
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
22 months agobcm47xx: add pending devices support
Rafał Miłecki [Mon, 27 Feb 2023 07:44:12 +0000 (07:44 +0000)]
bcm47xx: add pending devices support

This includes Lines E2500 V2 and Huawei B593u-12.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
22 months agobcm47xx: reorder MIPS BCM47XX patches
Rafał Miłecki [Mon, 27 Feb 2023 06:30:58 +0000 (06:30 +0000)]
bcm47xx: reorder MIPS BCM47XX patches

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
22 months agomac80211: fix mesh path discovery based on unicast packets
Felix Fietkau [Sun, 26 Feb 2023 19:35:40 +0000 (20:35 +0100)]
mac80211: fix mesh path discovery based on unicast packets

If a packet has reached its intended destination, it was bumped to the code
that accepts it, without first checking if a mesh_path needs to be created
based on the discovered source.
Fix this by moving the destination address check further down

Signed-off-by: Felix Fietkau <nbd@nbd.name>
22 months agomac80211: rework mesh fast xmit implementation
Felix Fietkau [Sun, 26 Feb 2023 12:36:58 +0000 (13:36 +0100)]
mac80211: rework mesh fast xmit implementation

Refactor in order to make use of generic fast xmit functions
Fix issues with mesh SA/DA addressing

Signed-off-by: Felix Fietkau <nbd@nbd.name>
22 months agoocteontx: add f2fs and ext4 support
Tim Harvey [Tue, 21 Feb 2023 23:08:29 +0000 (15:08 -0800)]
octeontx: add f2fs and ext4 support

Add both ext4 and f2fs support for overlayfs. The fstools mount_root
application will choose f2fs if the overlay volume space available
exceeds 100MB, otherwise ext4 is used.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
22 months agoocteontx: add default packages for on-board devices
Tim Harvey [Sat, 18 Feb 2023 01:06:41 +0000 (17:06 -0800)]
octeontx: add default packages for on-board devices

The Gateworks Newport boards supported by the octeontx target have
the following on-board devices:
 - Gateworks System Controller
 - GPIO buttons
 - GPIO leds
 - GPS PPS
 - Accelerometer
 - MCP251X CAN controller

Add kernel drivers for these devices in DEFAULT_PACKAGES

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
22 months agoath79: add support for MikroTik RouterBOARD 911 Lite2/Lite5
Tomasz Maciej Nowak [Wed, 24 Aug 2022 16:05:58 +0000 (18:05 +0200)]
ath79: add support for MikroTik RouterBOARD 911 Lite2/Lite5

Forward-port from ar71xx target the board introduced in commit
eb9e3651dd1a (" ar71xx: add support for the MikroTik RB911-2Hn/5Hn
boards"). Citing:

The patch adds support for the MikroTik RB911-2Hn (911 Lite2)
and the RB911-5Hn (911 Lite5) boards:

  https://mikrotik.com/product/RB911-2Hn
  https://mikrotik.com/product/RB911-5Hn

The two boards are using the same hardware design, the only difference
between the two is the supported wireless band.

Specifications:
  * SoC: Atheros AR9344 (600MHz)
  * RAM: 64MiB
  * Storage: 16 MiB SPI NOR flash
  * Ethernet: 1x100M (Passive PoE in)
  * Wireless: AR9344 built-in wireless MAC, single chain
              802.11b/g/n (911-2Hn) or 802.11a/g/n (911-5Hn)

Notes:
  * Older versions of these boards might be equipped with a NAND
    flash chip instead of the SPI NOR device. Those boards are not
    supported (yet).[1]
  * The MikroTik RB911-5HnD (911 Lite5 Dual) board also uses the
    same hardware. Support for that can be added later with little
    effort probably.[2]

End of citation.

Follow intallation instruction from that commit message, using
openwrt-ath79-mikrotik-mikrotik_routerboard-911-lite-initramfs-kernel.bin
and
openwrt-ath79-mikrotik-mikrotik_routerboard-911-lite-squashfs-sysupgrade.bin
images found in ath79/mikrotik directory. Be advised that the board
accepts 10-30 V on PoE input.

Known issues
Compared to ar71xx target image, there is still small leak of current to
user LED, which makes it lit, although weaker, even if brightness is set
to 0. The cause of that is still unknown.

1. https://github.com/openwrt/openwrt/pull/3652
2. RB911-5HnD should work with this commit or with [1], depending on
   what flash topology was used.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
22 months agoath79: mikrotik: stack ar9344 devices to single dtsi
Tomasz Maciej Nowak [Wed, 24 Aug 2022 16:05:57 +0000 (18:05 +0200)]
ath79: mikrotik: stack ar9344 devices to single dtsi

Most of boards from MikroTik with AR9344 SoC (supported and
un-supported) replicate the same schematic, so stack common device nodes
to a single dtsi.

ar9344_mikrotik_routerboard-16m-nor.dtsi:
- remove include paragraph and wmac node, make it single nor flash node
  for others dts to include

ar9344_mikrotik_routerboard-lhg-5nd.dts:
- move all of the nodes to new file ar9344_mikrotik_routerboard.dtsi
  and leave only power, user and lan LEDs which differ from sxt-5nd-r2
  and other yet unsupported devices

ar9344_mikrotik_routerboard-sxt-5n.dtsi:
- remove, it made no sense to keep it, as only
  ar9344_mikrotik_routerboard-sxt-5nd-r2.dts included this file and
  added only compatible and model

ar9344_mikrotik_routerboard-sxt-5nd-r2.dts:
- include ar9344_mikrotik_routerboard.dtsi
- add nand gpio activating node, beeper, additional LEDs and flash chips
  which previously have been in ar9344_mikrotik_routerboard-sxt-5n.dtsi

ar9344_mikrotik_routerboard.dtsi:
- inherited most of the content from ar9344_mikrotik_routerboard-lhg-5nd.dts
  except three LEDs
- add wmac node, removed from ar9344_mikrotik_routerboard-16m-nor.dtsi

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
22 months agobuild: fix for sourcing targets image config installed via feeds
Prasun Maiti [Wed, 16 Nov 2022 11:03:33 +0000 (16:33 +0530)]
build: fix for sourcing targets image config installed via feeds

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>
Acked-by: Petr Štetiar <ynezz@true.cz>
22 months agotreewide: remove label = "cpu" from DSA dt-binding
Arınç ÜNAL [Wed, 30 Nov 2022 18:00:13 +0000 (21:00 +0300)]
treewide: remove label = "cpu" from DSA dt-binding

This is not used by the DSA dt-binding, so remove it from all devicetrees.

Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9cc115d8d6f73dd260de1609182f3645844d6907
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
22 months agobcm53xx: Add D-Link DWL-8610AP board settings
Linus Walleij [Fri, 16 Dec 2022 20:52:44 +0000 (21:52 +0100)]
bcm53xx: Add D-Link DWL-8610AP board settings

The D-Link DWL-8610AP does not make use of the B53 switch
like most equipment. It lies dormant and the machine is using
eth0 and eth1 directly.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
22 months agobcm53xx: Add support for D-Link DWL-8610AP
Linus Walleij [Fri, 16 Dec 2022 20:52:27 +0000 (21:52 +0100)]
bcm53xx: Add support for D-Link DWL-8610AP

The D-Link DWL-8610AP is a pretty straight-forward BC53016
device, D-Link has invented a firmware package format which
is a tar file, and we implement this for the factory image.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
22 months agosunxi: enable CONFIG_NVMEM_SYSFS
Jan-Niklas Burfeind [Fri, 30 Dec 2022 02:41:17 +0000 (03:41 +0100)]
sunxi: enable CONFIG_NVMEM_SYSFS

in both the stable and the testing kernel

h2+/h3/h5 devices have a Secure ID that can be read from
`/sys/bus/nvmem/devices/sunxi-sid0/nvmem`.
Enabling CONFIG_NVMEM_SYSFS grants sysfs access from userspace.

Signed-off-by: Jan-Niklas Burfeind <git@aiyionpri.me>
22 months agogrub2: re-add test module
Tomasz Maciej Nowak [Mon, 23 Jan 2023 13:44:50 +0000 (14:44 +0100)]
grub2: re-add test module

It seems more hardware needs early load of firmware when initialised
to work properly (at least Intel hardware). One of previous case is CPU
microcode, which this series[1] tried to change. The second one is Intel
graphics IC, which needs firmware for controlling DMC circuit (switch
conncted display to DC6 power state). As it stands, the i915 module is
built-in and it seems the hardware can't cope with firmware loaded
later from rootfs, it needs to be supplied when the module is loaded.
Unfortunately we need bootloader to handle the load of firmware in this
case, but as previously mentioned series[1], there was an error when
initrd was hardcoded, instead of testing existence for it and then
loading. To remedy this in later the 55b808e0c4be ('x86: image: add test
module to bootloader') was commited. Which was later accidentally
dropped when grub2 image creation was moved to packages. Therefore bring
back test module, so we can test for cases of existing firmware in
grub.cfg.

1. https://patchwork.ozlabs.org/project/openwrt/cover/20181120162044.16371-1-tomek_n@o2.pl

Fixes: 5a5df62d95f5 ("x86/grub2: move grub2 image creation to package")
Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
22 months agox86: remove bootloader upgrade from preinit
Tomasz Maciej Nowak [Mon, 23 Jan 2023 13:44:49 +0000 (14:44 +0100)]
x86: remove bootloader upgrade from preinit

This hack was to bring all existing installations to the newest GRUB
version as fast as possible. Since 19.07.x is EoL we can assume this
task is completed. Now sysupgrade will solely be responsible for
bootloader upgrade.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
22 months agomvebu: add support for Buffalo LinkStation LS220DE
Daniel González Cabanelas [Mon, 20 Feb 2023 23:43:55 +0000 (00:43 +0100)]
mvebu: add support for Buffalo LinkStation LS220DE

The Buffalo LinkStation LS220DE is a dual bay NAS, based on Marvell
Armada 370

Hardware:
   SoC:         Marvell Armada 88F6707
   CPU:         Cortex-A9 800 MHz, 1 core
   Flash 1:     SPI-NOR 1 MiB (U-Boot)
   Flash 2:     NAND 512 MiB (OS)
   RAM:         DDR3 256 MiB
   Ethernet:    1x 1GbE
   USB:         1x 2.0
   SATA:        2x 3Gb/s
   LEDs/Input:  5x / 2x (1x button, 1x slide-switch)
   Fan:         1x casing

Flash instructions, from hard drive:
  1. Get access to the "boot" partition at the hard drive where the stock
     firmware is installed. It can be done with acp-commander or by
     plugging the hard drive to a computer.
  2. Backup the stock uImage:
         mv /boot/uImage.buffalo /boot/uImage.buffalo.bak
  3. Move and rename the Openwrt initramfs image to the boot partition:
         mv openwrt-initramfs-kernel.bin /boot/uImage.buffalo
  4. Power on the Linkstation with the hardrive inside. Now Openwrt will
     boot, but still not installed.
  5. Connect via ssh to OpenWrt:
         ssh root@192.168.1.1
  6. Rename boot files inside boot partition
         mount -t ext3 /dev/sda1 /mnt
         mv /mnt/uImage.buffalo /mnt/uImage.buffalo.openwrt.bak
         mv /mnt/initrd.buffalo /mnt/initrd.buffalo.bak
  7. Format ubi partitions at the NAND flash ("kernel_ubi" and "ubi"):
         ubiformat /dev/mtd0 -y
         ubidetach -p /dev/mtd1
         ubiformat /dev/mtd1 -y
  8. Flash the sysupgrade image:
         sysupgrade -n openwrt-squashfs-sysupgrade.bin
  9. Wait until it finish, the device will reboot with OpenWrt installed
     on the NAND flash.

Restore the stock firmware:
  1. Take the hard drive used for the installation and restore boot backup
     files to their original names:
         mount -t ext3 /dev/sda1 /mnt
         mv /mnt/uImage.buffalo.bak /mnt/uImage.buffalo
         mv /mnt/initrd.buffalo.bak /mnt/initrd.buffalo
  2. Boot from the hard drive and perform a stock firmware update using
     the Buffalo utility. The NAND will be restored to the original
     state.

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
22 months agoocteontx: switch to Kernel 5.15
Tim Harvey [Tue, 21 Feb 2023 20:35:05 +0000 (12:35 -0800)]
octeontx: switch to Kernel 5.15

Switch over from testing version.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
22 months agoramips: Alternative name Asus RT-AC750L for Asus RT-AC1200V2
Karl Chan [Thu, 16 Feb 2023 10:47:21 +0000 (18:47 +0800)]
ramips: Alternative name Asus RT-AC750L for Asus RT-AC1200V2

The Asus RT-AC750L is identical to the already supported Asus RT-AC1200V2. Use the ALT0 buildroot tags to show both devices.

Reference : https://forum.openwrt.org/t/asus-rt-ac750l-is-the-same-as-rt-ac1200-v2/151783

Signed-off-by: Karl Chan <exkc@exkc.moe>
22 months agomac80211: fix mesh fast xmit header cache flush
Felix Fietkau [Thu, 23 Feb 2023 14:06:14 +0000 (15:06 +0100)]
mac80211: fix mesh fast xmit header cache flush

split into multiple functions depending on sta, mpath or mpp

Signed-off-by: Felix Fietkau <nbd@nbd.name>
22 months agoncurses: add alacritty terminfo
Tobias Hilbig [Sat, 25 Feb 2023 10:40:37 +0000 (11:40 +0100)]
ncurses: add alacritty terminfo

Add terminfo file for the terminal emulator alacritty.

https://github.com/alacritty/alacritty

Signed-off-by: Tobias Hilbig <web.tobias@hilbig-ffb.de>
22 months agodnsmasq: bump to v2.89
Kevin Darbyshire-Bryant [Wed, 18 Jan 2023 09:39:18 +0000 (09:39 +0000)]
dnsmasq: bump to v2.89

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
22 months agoipq40xx: Linksys MR8300: fix the USB port power
Daniel González Cabanelas [Thu, 16 Feb 2023 22:04:20 +0000 (23:04 +0100)]
ipq40xx: Linksys MR8300: fix the USB port power

The USB port on the MR8300 randomly fails to feed bus-powered devices.

This is caused by a misconfigured pinmux. The GPIO68 should be used to
enable the USB power (active low), but it's inside the NAND pinmux.

This GPIO pin was found in the original firmware at a startup script in
both MR8300 and EA8300. Therefore apply the fix for both boards.

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
Reviewed-by: Robert Marko <robimarko@gmail.com>
22 months agoramips: correct the PCIe port number for some mt7621 devices
Felix Baumann [Mon, 20 Feb 2023 02:40:20 +0000 (03:40 +0100)]
ramips: correct the PCIe port number for some mt7621 devices

MT7621 uses a new PCIe driver in the 5.15+ kernel. Allocating wrong PCIe
port will cause the PCIe NIC to not work properly. This commit fixes
the wrong port numbers on Netgear R6220, WAC104 and WNDR3700 v5.

According to bootlog, MT7612E (5GHz) is connected to pcie0, and
MT7603E (2GHz) is connected to pcie2:
[2.758986] mt7621-pci 1e140000.pcie: pcie1 no card, disable it (RST & CLK)
[2.772862] mt7621-pci 1e140000.pcie: PCIE0 enabled
[2.782579] mt7621-pci 1e140000.pcie: PCIE2 enabled
...
[3.009151] pci 0000:01:00.0: [14c3:7662] type 00 class 0x028000
[3.125715] pci 0000:02:00.0: [14c3:7603] type 00 class 0x028000

Tested-by: Maximilian Baumgartner <aufhaxer@googlemail.com>
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
[felix.bau@gmx.de: adjust commit message for Netgear devices]
Signed-off-by: Felix Baumann <felix.bau@gmx.de>
22 months agotools/squashfs4: fix PKG_MIRROR_HASH
Daniel Golle [Sat, 25 Feb 2023 17:49:10 +0000 (17:49 +0000)]
tools/squashfs4: fix PKG_MIRROR_HASH

The hash currently matches neither the SHA256 of the Github download
nor the hash of the archive generated by the OpenWrt build system.
(and yes, they differ...)

Set hash of Github-generated tarball.

Fixes: 30f2d516ba ("tools/squashfs4: add new tool for squashfs4 images")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
22 months agomvebu: setup effective thermal zones on Puzzle M901 and M902
Daniel Golle [Sat, 25 Feb 2023 17:42:23 +0000 (17:42 +0000)]
mvebu: setup effective thermal zones on Puzzle M901 and M902

Assign fan with 4 active cooling levels to be used for the main CPU as
well as external SerDes units.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
22 months agomvebu: puzzle: fix fan thermal cooling driver
Daniel Golle [Sat, 25 Feb 2023 02:35:16 +0000 (02:35 +0000)]
mvebu: puzzle: fix fan thermal cooling driver

Several fixes for the Puzzle WT61P803 hwmon driver were needed to make
it behave well as thermal cooling device:
 - wire-up cooling device with OF node in device tree
 - properly parse cooling-levels (u32 with range check vs. u8)
 - actually use cooling-levels
 - keep current state and only write to uC if state has changed
   (avoids flooding the uC with commands which will result in uC crashing)

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
22 months agonetifd: update to the latest version
Hauke Mehrtens [Sat, 25 Feb 2023 18:56:12 +0000 (19:56 +0100)]
netifd: update to the latest version

ed65a00 netifd: bridge: Fix format string position
19372d8 netifd: Fix multiple -Wsign-compare warnings
8ebf033 netifd: Do not return values in void function
c77417a netifd: Explicitly zero initialize variables
463a120 netifd: Activate -Wextra compile warnings

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
22 months agoustream-ssl: update to Git version 2023-02-25
Hauke Mehrtens [Sat, 25 Feb 2023 17:37:26 +0000 (18:37 +0100)]
ustream-ssl: update to Git version 2023-02-25

498f6e2 ustream-mbedtls: Use getrandom() instead of /dev/urandom

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
22 months agoath79: add support for GL.iNet GL-X1200
Xinfa Deng [Thu, 9 Feb 2023 07:37:30 +0000 (15:37 +0800)]
ath79: add support for GL.iNet GL-X1200

This patch adds supports for GL-X1200.

Specification:
- SOC: QCA9563 (775MHz)
- Flash: 16 MiB
- RAM: 128 MiB DDR2
- Ethernet: 4x 1Gbps LAN + 1x 1Gbps WAN
- Wireless: QCA9563(2.4GHz) and QCA9886(5GHz)
- SIM: 2x SIM card slots
- MicroSD: 1x microSD slot
- Antenna: 2x external 5dBi antennas
- USB: 1x USB 2.0 port
- Button: 1x reset button
- LED: 16x LEDs (3x GPIO controllable)
- UART: 1x UART on PCB (JP1: 3.3V, RX, TX, GND)
- OEM U-Boot supplies HTTP/GUI access

Implementation Notes
====================

Both the NOR and NAND variants boot off a NOR-based kernel,
consistent with the OEM's firmware.

The mode LEDs are
    * Boot, Running   system
    * Failsafe        2G
    * Upgrade         5G

Installation
============

Using sysupgrade
----------------

sysupgrade may be used to install a NAND image on a device running
a NAND image or a NOR image on a device running a NOR image. It is
recommended to *not* preserve config when upgrading from OEM firmware
or previous versions of OpenWrt. No supported sysupgrade path should
require "force". Transitioning from NOR to NAND can be accomplished

Using U-Boot
------------

The OEM U-Boot can be put into a graphical, firmware-upload mode by
holding down the button on the side of the router while applying power
and for a bit more than five seconds following with the current OEM
U-Boot. The power LED will come on, then the 5G LED will flash five
times, about once a second.  When the 5G LED stops flashing and the
2G LED lights solid, the router's U-Boot will provide an upload page
at http://192.168.1.1/ Either a browser may be used to upload an image,
or a utility such as curl may be used:

curl -X POST -F gl_firmware=\@*-nand-squashfs-factory.img \
         http://192.168.1.1/index.html
or
    curl -X POST -F gl_firmware=\@*-nor-squashfs-sysupgrade.bin \
         http://192.168.1.1/index.html

Note that NOR vs. NAND is based on the file name extension.

Signed-off-by: Xinfa Deng <xinfa.deng@gl-inet.com>
22 months agotoolchain: remove references to $(LIBC)/utils subtarget
Michael Pratt [Tue, 21 Feb 2023 19:58:20 +0000 (14:58 -0500)]
toolchain: remove references to $(LIBC)/utils subtarget

The utils subtarget was used for uClibc and eglibc
which are both obsolete and replaced in Openwrt by mainline
musl and glibc, which do not have a utils Makefile target.

Ref: 5d19a38d8 ("toolchain: sync eglibc headers/build split with uclibc changes")
Fixes: 63fb17520 ("toolchain: remove uClibc-ng")
Suggested-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Michael Pratt <mcpratt@pm.me>
22 months agotoolchain: cleanup dependencies
Michael Pratt [Wed, 10 Aug 2022 21:56:41 +0000 (17:56 -0400)]
toolchain: cleanup dependencies

Reorganize dependencies between toolchain targets to save a line.
This also puts them in a linear order which is easier to read.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
22 months agotoolchain: fix stampfile dependency
Michael Pratt [Sat, 10 Sep 2022 01:43:18 +0000 (21:43 -0400)]
toolchain: fix stampfile dependency

Use the gcc/final/install target stampfile as the prerequisite
for the toolchain/compile target stampfile.

The previous filename was also incorrect,
the stampfile name format was changed (see reference)
but was never updated here.

The issue was never noticed
because the usage of timestamp.pl was broken
(fixed in previous commit)
causing the extra prereq files passed to 'call stampfile'
to never get checked at all.

Fixes: 5149ed151 ("gcc: split up the build process into three distinct stages")
Signed-off-by: Michael Pratt <mcpratt@pm.me>
22 months agoiproute2: update to 6.2
Nick Hainke [Wed, 22 Feb 2023 14:56:25 +0000 (15:56 +0100)]
iproute2: update to 6.2

Release Notes:
https://lwn.net/Articles/923952/

Refresh patches:
- 110-darwin_fixes.patch
- 115-add-config-xtlibdir.patch
- 140-allow_pfifo_fast.patch
- 140-keep_libmnl_optional.patch
- 145-keep_libelf_optional.patch
- 150-keep_libcap_optional.patch
- 155-keep_tirpc_optional.patch
- 170-ip_tiny.patch
- 175-reduce-dynamic-syms.patch
- 180-drop_FAILED_POLICY.patch
- 190-fix-nls-rpath-link.patch
- 195-build_variant_ip_tc.patch
- 200-drop_libbsd_dependency.patch
- 300-selinux-configurable.patch

Remove upstreamed:
- 320-configure-Remove-include-sys-stat.h.patch

While working on it remove AUTORELEASE.

Signed-off-by: Nick Hainke <vincent@systemli.org>
22 months agoethtool: update to 6.2
Nick Hainke [Wed, 22 Feb 2023 14:50:43 +0000 (15:50 +0100)]
ethtool: update to 6.2

Release notes:
- Feature: link down event statistics (no option)
- Feature: JSON output for coalesce (-c)
- Feature: new link modes (no option)
- Feature: JSON output for ring (-g)
- Feature: netlink handler for RSS get (-x)
- Fix: fix boolean value output in JSON output
- Fix: fix build errors and warnings

Remove upstreamed patches:
- 100-uapi-Bring-in-if-h.patch
- 101-netlink-Fix-maybe-uninitialized-meters-variable.patch
- 102-raw-marvell-c-Fix-build-with-musl-libc.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
22 months agolibcap: update to 2.67
Nick Hainke [Sun, 5 Feb 2023 20:38:19 +0000 (21:38 +0100)]
libcap: update to 2.67

Release notes:
https://sites.google.com/site/fullycapable/release-notes-for-libcap#h.o8papfkfh1x9

While working on it, remove $(AUTORELEASE).

Tested-by: Linhui Liu liulinhui36@gmail.com # Xiaomi AX3600
Signed-off-by: Nick Hainke <vincent@systemli.org>
22 months agobase-files: add support for retrieving IPv6 assignments
Mark Baker [Thu, 2 Feb 2023 01:30:57 +0000 (20:30 -0500)]
base-files: add support for retrieving IPv6 assignments

In DHCPv6-PD enabled environments, addresses are assigned to interfaces.
These new functions retrieve the IPv6 assigned prefix(es).

Signed-off-by: Mark Baker <mark@vpost.net>
22 months agobcm47xx: switch default kernel to the 5.15
Rafał Miłecki [Fri, 24 Feb 2023 11:06:10 +0000 (12:06 +0100)]
bcm47xx: switch default kernel to the 5.15

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
22 months agobcm47xx: relocate LZMA loader #2
Rafał Miłecki [Tue, 7 Feb 2023 14:06:50 +0000 (15:06 +0100)]
bcm47xx: relocate LZMA loader #2

Increased size of the 5.15 kernel requires bumping BZ_TEXT_START again.
Without this CFE hangs at the:
Starting program at 0x80001000

This fixes booting 5.15 based mips74k images on:
1. BCM4706 (Luxul XWR-1750)
2. BCM5357B0 (Linksys E1000 V2.1)
3. BCM47186B0 (Luxul XWR-600)
4. BCM5358 (Linksys E2500 V3)

It isn't needed but also doesn't break:
1. BCM5354 (Asus WL-500gP V2)

Ref: 4cd97e476089 ("bcm47xx: relocate LZMA loader")
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
22 months agokernel: Add CONFIG_PPC_QUEUED_SPINLOCKS configuration option
Hauke Mehrtens [Tue, 21 Feb 2023 22:13:27 +0000 (23:13 +0100)]
kernel: Add CONFIG_PPC_QUEUED_SPINLOCKS configuration option

The CONFIG_PPC_QUEUED_SPINLOCKS configuration option is not defined for
kernel 5.15, it is defined for kernel 5.10.

This fixes the compilation of mpc85xx/p2020 with kernel 5.15.

Reviewed-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
22 months agomac80211: ath11k: sync with ath-next
Robert Marko [Wed, 22 Feb 2023 17:04:39 +0000 (18:04 +0100)]
mac80211: ath11k: sync with ath-next

Synchronize the ath11k backports with the current ath-next tree.

This backports several memory leak issues, PCI IRQ fixup, peer add locking
fix as well as IPQ5018 support, though IPQ5018 support is unused for now.

This allows to easily backport further fixes as cherry picking them has
started requiring manual conflict resolution.

Signed-off-by: Robert Marko <robimarko@gmail.com>
22 months agokernel: backport NVMEM late fixes from v6.2
Rafał Miłecki [Thu, 23 Feb 2023 08:47:39 +0000 (09:47 +0100)]
kernel: backport NVMEM late fixes from v6.2

They were backported to stable kernels but we backport more stuff on our
own so we have to pick up few remaining.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
22 months agompc85xx: switch default kernel to 5.15
Nick Hainke [Wed, 1 Feb 2023 10:42:57 +0000 (11:42 +0100)]
mpc85xx: switch default kernel to 5.15

The default kernel should be switched to 5.15 in order to enable testing
by a broader audience.

Tested on TP-Link TL-WDR4900 v1.

Acked-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Signed-off-by: Nick Hainke <vincent@systemli.org>
22 months agoopenssl: fix powerpc & arc libatomic dependencies
Eneas U de Queiroz [Tue, 21 Feb 2023 20:55:26 +0000 (17:55 -0300)]
openssl: fix powerpc & arc libatomic dependencies

PowerPC CONFIG_ARCH is defined as powerpc, not ppc.  Fix that in the
DEPENDS condition.

Arc needs to be built with libatomic.  Change the OpenSSL configuration
file, and add it to the libatomic DEPENDS condition.

Fixes: 7e7e76afca "openssl: bump to 3.0.8"
Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
22 months agomvebu: mochabin: enlarge PCI memory window
Robert Marko [Sun, 19 Feb 2023 11:58:56 +0000 (12:58 +0100)]
mvebu: mochabin: enlarge PCI memory window

Armada 7040 uses a rather small 15MB memory window for every PCI adapter,
however this is not sufficient for Qualcomm QCA6390 802.11ax cards that
are shipped along with the OpenWrt WLAN model of MOCHAbin as ath11k
requires at least 16MB of memory.

So, similar to what MACCHIATOBin has been doing for years, lets move
to using the second PCIe 2 memory window and expand it to 128MB to
make it future proof.

This has been already sent upstream [1].
[1] https://lore.kernel.org/linux-arm-kernel/20230219121418.1395401-1-robert.marko@sartura.hr/

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
22 months agokernel: update NVMEM subsystem to the v6.3
Rafał Miłecki [Tue, 21 Feb 2023 10:25:49 +0000 (11:25 +0100)]
kernel: update NVMEM subsystem to the v6.3

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
22 months agomcp85xx: Switch TP-Link TL-WDR4900 v1 to DSA
Pawel Dembicki [Thu, 29 Sep 2022 20:25:24 +0000 (22:25 +0200)]
mcp85xx: Switch TP-Link TL-WDR4900 v1 to DSA

This patch introduces DSA support for TP-Link TL-WDR4900 v1 switch.
Swconfig driver for QCA8327 switch is removed because this router is
only one device which use Qualcom swconfig switch.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Tested-by: Nick Hainke <vincent@systemli.org> # TP Link WDR4900 v1 (5.15)
22 months agompc85xx: refresh kernel config
Pawel Dembicki [Thu, 29 Sep 2022 13:18:48 +0000 (15:18 +0200)]
mpc85xx: refresh kernel config

It was done by "make kernel_oldconfig" command for 5.10 and 5.15.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
22 months agoopenssl: bump to 3.0.8
Eneas U de Queiroz [Tue, 7 Feb 2023 21:14:27 +0000 (18:14 -0300)]
openssl: bump to 3.0.8

This is a major update to the current LTS version, supported until
2026-09-07.

Changelog:
https://github.com/openssl/openssl/blob/openssl-3.0.8/CHANGES.md

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
22 months agotools/squashfskit4: drop unused tool
Christian Marangi [Fri, 14 Oct 2022 15:36:21 +0000 (17:36 +0200)]
tools/squashfskit4: drop unused tool

Drop squashfskit4 tool as it got replaced by new version of squashfs4
tool.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
22 months agoimage: update LZMA_XZ_OPTIONS with new squashfs4 tool
Christian Marangi [Mon, 6 Feb 2023 22:28:14 +0000 (23:28 +0100)]
image: update LZMA_XZ_OPTIONS with new squashfs4 tool

The -Xpreset option changed format and dropped the -Xe and just require
the extreme string to be passed to the -Xpreset option.

Update the LZMA_XZ_OPTIONS to reflect this change.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
22 months agotools/squashfs4: add new tool for squashfs4 images
Christian Marangi [Mon, 6 Feb 2023 22:22:43 +0000 (23:22 +0100)]
tools/squashfs4: add new tool for squashfs4 images

squashfs tool is finally reborn and correctly maintained.

Introduce the new version as a replacement for squasfs4kit as it was a
fork and also abandoned.

Add additional patch to add the missing feature present in squashfskit4
but still missing on this new project.

Backport each required patch that fix compilation error on macos.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
22 months agomac80211: fix mesh issues and improve performance
Felix Fietkau [Wed, 15 Feb 2023 18:40:02 +0000 (19:40 +0100)]
mac80211: fix mesh issues and improve performance

fix forwarding received mesh a-msdu packets
add fast xmit support for mesh to improve performance

Signed-off-by: Felix Fietkau <nbd@nbd.name>
22 months agotoolchain: remove installing twice in the "initial" subdir
Andre Heider [Tue, 7 Feb 2023 20:33:33 +0000 (21:33 +0100)]
toolchain: remove installing twice in the "initial" subdir

This was apparently introduced to recreate the toolchain (wipe
staging_dir/toolchain*, but keep build_dir/toolchain*, followed by a
`make toolchain/compile`).

But it leaves leftovers and causes re-links to happen at src_install phase,
because of the changed paths, possibly adding yet another source of issues.

With the prior commits removing various hacks related to the "initial"
folder we can remove installing it twice altogether.

The recreated toolchain is exactly the same as before.

Signed-off-by: Andre Heider <a.heider@gmail.com>
22 months agotoolchain/musl: remove libgcc_initial hack
Andre Heider [Thu, 9 Feb 2023 10:06:31 +0000 (11:06 +0100)]
toolchain/musl: remove libgcc_initial hack

This reverts r15599 [0].

This was added to fix an uclibc rebuild issue, but since uclibc
isn't supported anymore [Fixes:] this can be removed.

[0] https://git.openwrt.org/?p=openwrt/svn-archive/archive.git;a=commitdiff;h=016a052efeee6bc2da3f501a8c66b5aea20350b4

Fixes: 63fb1752 "toolchain: remove uClibc-ng"
Signed-off-by: Andre Heider <a.heider@gmail.com>
22 months agotoolchain/glibc: fixup the libm.so linker script too
Andre Heider [Mon, 30 Jan 2023 09:55:53 +0000 (10:55 +0100)]
toolchain/glibc: fixup the libm.so linker script too

Add it to the existing list to fix it up.

Found by mold:
toolchain-x86_64_gcc-12.2.0_glibc/lib/libm.so:4: GROUP ( /lib/libm.so.6  AS_NEEDED ( /lib/libmvec.so.1 ) )
                                                         ^ library not found: /lib/libm.so.6

Signed-off-by: Andre Heider <a.heider@gmail.com>
22 months agotoolchain/gcc: remove glibc libgcc_eh hack
Andre Heider [Thu, 9 Feb 2023 09:09:08 +0000 (10:09 +0100)]
toolchain/gcc: remove glibc libgcc_eh hack

A modern glibc only links against libgcc_eh for its tests or when building it
static, which doesn't happen here.

Reverts a hunk of: a3edea1b "add support for alternative C libraries..."

Signed-off-by: Andre Heider <a.heider@gmail.com>
22 months agotoolchain/binutils: get rid of outdated linaro version string hack
Andre Heider [Wed, 8 Feb 2023 19:20:27 +0000 (20:20 +0100)]
toolchain/binutils: get rid of outdated linaro version string hack

This reverts commit 9d1b619cb1a7dd18cd12cab0d9f93452b10e2e11.

No Linaro binutils are supported anymore, the leftover removal commit
missed one line.

Fixes: b648e1c0 "binutils: remove 2.25.1 support and leftovers of older versions"
Signed-off-by: Andre Heider <a.heider@gmail.com>
22 months agotoolchain/binutils: get rid of outdated libiberty hack
Andre Heider [Wed, 8 Feb 2023 17:58:05 +0000 (18:58 +0100)]
toolchain/binutils: get rid of outdated libiberty hack

This reverts commit 68fcb15f90edd92ef36990c5696b9e79df07a6ec.

binutils syncs libiberty from gcc, which defaults to not installing itself
since [0], see also [1].

That change is apparently part of binutils 2.24, and the oldest supported
version here is 2.37, hence we can remove this hack.

[0] https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=48d7db63ff581b026e057badf39f1f23fdf47928
[1] https://gcc.gnu.org/onlinedocs/libiberty/Using.html

Signed-off-by: Andre Heider <a.heider@gmail.com>
22 months agotoolchain/binutils: get rid of ARC leftovers
Andre Heider [Wed, 8 Feb 2023 17:04:25 +0000 (18:04 +0100)]
toolchain/binutils: get rid of ARC leftovers

In [0] support for ARC specific binutils were added, which was later removed
again [Fixes:].

Upstream binutils never had an extlib.

[0] 8b5d644b "toolchain: add support of ARC architecture"

Fixes: 8568dcd9 "toolchain: Remove binutils 2.29 for ARC targets"
Signed-off-by: Andre Heider <a.heider@gmail.com>
22 months agotoolchain/binutils: fill in missing GRAPHITE_CONFIGURE
Andre Heider [Tue, 31 Jan 2023 10:07:42 +0000 (11:07 +0100)]
toolchain/binutils: fill in missing GRAPHITE_CONFIGURE

This var is used further down, but it's empty.
Fix that with the very same values gcc uses.

Signed-off-by: Andre Heider <a.heider@gmail.com>
22 months agohostapd: always use sae_password for mesh/SAE auth
Leon M. Busch-George [Wed, 23 Nov 2022 16:40:08 +0000 (17:40 +0100)]
hostapd: always use sae_password for mesh/SAE auth

This patch fixes a corner case when using passwords that are exactly 64
characters in length with mesh mode or passwords longer than 63 characters
with SAE because 'psk' is used instead of 'sae_password'.
SAE is obligatory for 802.11s (mesh point).

The 'psk' option for hostapd is suited for WPA2 and enforces length
restrictions on passwords. Values of 64 characters are treated as PMKs.
With SAE, PMKs are always generated during the handshake and there are no
length restrictions.
The 'sae_password' option is more suited for SAE and should be used
instead.

Before this patch, the 'sae_password' option is only used with mesh mode
passwords that are not 64 characters long.
As a consequence:
- mesh passwords can't be 64 characters in length
- SAE only works with passwords with lengths >8 and <=63 (due to psk
  limitation).

Fix this by always using 'sae_password' with SAE/mesh and applying the PMK
differentiation only when PSK is used.

Fixes: #11324
Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
[ improve commit description ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
22 months agohostapd: add quotes in assignments
Leon M. Busch-George [Wed, 23 Nov 2022 17:22:36 +0000 (18:22 +0100)]
hostapd: add quotes in assignments

It's generally advised to use quotes for variable assignments in bash.

Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
22 months agoramips: add alternative device name for Wiflyer WF3526-P
Shiji Yang [Sun, 19 Feb 2023 01:06:32 +0000 (09:06 +0800)]
ramips: add alternative device name for Wiflyer WF3526-P

Wiflyer WF3526-P and Zbtlink ZBT-WE1326 have the same circuit design.
Installing the misunderstading firmware of ZBT-WE3526 will cause Wi-Fi
not work due to allocate the wrong pcie port. Add alternative name to
help users easily build or download the correct firmware.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
22 months agoramips: correct the PCIe port number for Zbtlink ZBT-WE1326
Shiji Yang [Sun, 19 Feb 2023 01:06:32 +0000 (09:06 +0800)]
ramips: correct the PCIe port number for Zbtlink ZBT-WE1326

MT7621 gets a new PCIe driver in the 5.15+ kernel. Allocating wrong PCIe
port will cause the PCIe NIC to not work properly. This commit fixes
the wrong port numbers on Zbtlink ZBT-WE1326.

According to the bootlog, MT7612E (5 GHz) is connected to pcie1, and
MT7603E (2 GHz) is connected to pcie2:
[4.197658] mt7621-pci 1e140000.pcie: pcie0 no card, disable it (RST & CLK)
[4.204609] mt7621-pci 1e140000.pcie: PCIE1 enabled
[4.209476] mt7621-pci 1e140000.pcie: PCIE2 enabled
...
[4.307988] pci 0000:01:00.0: [14c3:7662] type 00 class 0x028000
[4.367206] pci 0000:02:00.0: [14c3:7603] type 00 class 0x028000

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
22 months agobase-files: sysfixtime: Fix time on the fake RTC
Yuan Tao [Mon, 14 Sep 2020 09:19:49 +0000 (17:19 +0800)]
base-files: sysfixtime: Fix time on the fake RTC

On some devices the chip has RTC but no battery save time.
This leads back to getting the wrong time
and skipping the check of the last file modification date.

This commit ensures that the file time is checked even
if the RTC exists.
which would ordinarily return an approbiate
system time used for e.g. certificate generation.

Tested-on: NanoPi R2S

Signed-off-by: Yuan Tao <ty@wevs.org>
22 months agotools/squashfs: rename to squashfs3-lzma
Christian Marangi [Mon, 6 Feb 2023 22:07:24 +0000 (23:07 +0100)]
tools/squashfs: rename to squashfs3-lzma

The name of squashfs is confusing since in reality it's a really old
version using an old lzma library. This tools is used for old ath79
netgear target and to produde a fake squasfs3 image needed for some
specific bootloader from some OEM (AVM for example)

Rename squashfs tool to squasfs3-lzma to better describe it.
Rename the installed bin from mksquashfs-lzma to mksquashfs3-lzma.
Use tar transform to migrate the root directory in tar to the new
naming.
Drop redundant PKG_CAT variable not needed anymore.
Also update any user of this tool.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
22 months agowireguard-tools: remove unnecessary .mk includes
Andre Heider [Thu, 16 Feb 2023 11:50:56 +0000 (12:50 +0100)]
wireguard-tools: remove unnecessary .mk includes

Including kernel.mk moves the package build folder in the linux one, which
is confusing since this isn't building any kernel modules.

package-defaults.mk is already included my package.mk.

Signed-off-by: Andre Heider <a.heider@gmail.com>
22 months agoipq40xx: chromium: Enable kmod-ramoops by default
Brian Norris [Sun, 5 Feb 2023 00:35:35 +0000 (16:35 -0800)]
ipq40xx: chromium: Enable kmod-ramoops by default

Chromium devices (like Google WiFi) have ramoops memory reserved by the
bootloader. Let's enable the ramoops kernel module by default, so we get
better crash logging.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
22 months agoipq806x: chromium: Enable kmod-ramoops by default
Brian Norris [Sun, 5 Feb 2023 00:35:34 +0000 (16:35 -0800)]
ipq806x: chromium: Enable kmod-ramoops by default

Chromium devices (like OnHub) have ramoops memory reserved by the
bootloader. Let's enable the ramoops kernel module by default, so we get
better crash logging.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
22 months agokernel: kmod-ramoops: Include pstore console support
Brian Norris [Sun, 5 Feb 2023 00:35:33 +0000 (16:35 -0800)]
kernel: kmod-ramoops: Include pstore console support

Pstore ramoops support is useful even when there isn't an explicit
panic/crash. We can log all kernel messages via a "console", and then
retrieve them in the event of some non-kernel-panic reset (e.g.,
watchdog).

Since the buffer memory is already reserved, there isn't much overhead
to doing this.

The new console files will show up as:

  /sys/fs/pstore/console-ramoops-N

Cc: Hannu Nyman <hannu.nyman@iki.fi>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
22 months agoramips: add support for Huasifei WS1208V2
Arınç ÜNAL [Sat, 4 Feb 2023 07:52:29 +0000 (10:52 +0300)]
ramips: add support for Huasifei WS1208V2

The Huasifei WS1208V2 is an AC1200 router featuring 5 Ethernet ports with a
Quectel RM520N-GL cellular modem which supports QMI and MBIM modes.

Specifications:
- MT7621AT, 256 MiB RAM, 16 MiB SPI Flash
- MT7603EN 2.4 GHz & MT7612EN 5 GHz WLAN
- Quectel RM520N-GL Cellular Modem
- 2 WLAN & 4 Cellular Antennas
- 5 Gigabit Ethernet Ports
- 1 USB 2.0 port
- 1 PCI-E Slot
- 1 M.2 slot
- 1 SIM card slot
- 1 SD card slot

Installation:
- Install sysupgrade image via ROOter OS.

TFTP Recovery:
- Connect to serial console.
- Boot initramfs image by choosing option 1 when U-Boot prompts.
- Install sysupgrade image via OpenWrt.

Link: https://www.huasifei.com/a/Products/5G%20CPE/240.html
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
22 months agoelfutils: fix build with GCC 11
Andre Heider [Tue, 7 Feb 2023 19:23:06 +0000 (20:23 +0100)]
elfutils: fix build with GCC 11

GCC 11 doesn't know about -Wno-error=use-after-free and aborts
compilation.

Fixes: 2748c45d "elfutils: Ignore wrong use-after-free error"
Signed-off-by: Andre Heider <a.heider@gmail.com>
22 months agokernel: can: fix MCP251x CAN controller module autoload
Tim Harvey [Sat, 18 Feb 2023 00:53:18 +0000 (16:53 -0800)]
kernel: can: fix MCP251x CAN controller module autoload

Fix autoload module name for can-mcp251x kmod.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
22 months agokernel: bump 5.10 to 5.10.168
John Audia [Wed, 15 Feb 2023 19:05:27 +0000 (14:05 -0500)]
kernel: bump 5.10 to 5.10.168

Manually rebased:
  backport-5.10/804-v5.14-0001-nvmem-core-allow-specifying-of_node.patch

Removed upstreamed:
  generic-backport/807-v5.17-0003-nvmem-core-Fix-a-conflict-between-MTD-and-NVMEM-on-w.patch[1]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.168&id=34ec4c7831c416ac56619477f1701986634a7efc

Build system: x86_64
Build-tested: ramips/tplink_archer-a6-v3
Run-tested: ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
22 months agotools/zstd: update to 1.5.4
Rosen Penev [Fri, 10 Feb 2023 02:13:14 +0000 (18:13 -0800)]
tools/zstd: update to 1.5.4

Mostly performance improvements, as usual.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
22 months agonetfilter: add kmod-nf-conntrack
Aviana Cruz [Thu, 2 Feb 2023 13:39:41 +0000 (21:39 +0800)]
netfilter: add kmod-nf-conntrack

There have been some demands for the `ct count` expression,
like https://forum.openwrt.org/t/22-03-2-unable-to-use-ct-count-nft-rules/146680.

This adds the required kernel modules for the expression to work.

Signed-off-by: Aviana Cruz <gwencroft@proton.me>
22 months agoramips: add label MAC address for EPG600 and ESR600
Michael Pratt [Tue, 27 Apr 2021 21:41:31 +0000 (17:41 -0400)]
ramips: add label MAC address for EPG600 and ESR600

set label mac for the current ESR600 and new EPG600
using the board.d scripts

Signed-off-by: Michael Pratt <mcpratt@pm.me>
22 months agoramips: add support for Senao Engenius EPG600
Michael Pratt [Mon, 19 Apr 2021 19:45:32 +0000 (15:45 -0400)]
ramips: add support for Senao Engenius EPG600

FCC ID: A8J-EPG600

Engenius EPG600 is an indoor wireless router with
1 Gb ethernet switch, dual-band wireless,
internal antenna plates, USB, and phone lines (not supported)

this board is a Senao device:
the hardware is equivalent to EnGenius ESR600 (except for phone lines)
the software is Senao SDK which is based on openwrt and uboot
which uses the legacy Senao header with Vendor / Product IDs
to verify the firmware upgrade image.

**Specification:**

  - MT7620 SOC MIPS 24kec, 2.4 GHz WMAC, 2x2
  - RT5592N WLAN PCI chip, 5 GHz, 2x2
  - QCA8337N Gb SW RGMII GbE, SW P0 -- SOC P5, 5 LEDs
  - 40 MHz clock
  - 16 MB FLASH MX25L12845EMI-10G
  - 64 MB RAM NT5TU32M16
  - UART console J2, populated
  - USB 2.0 port direct to SOC
  - 6 GPIO LEDs power, 2G, 5G, wps2g, wps5g, line
  - 3 buttons reset, wps, "reg" (registeration)
  - 4 antennas internal omni-directional plates

NOT YET SUPPORTED: VoIP

  - Si3050-FT + Si3019-FT Voice DAA, SPI control, PCM data
  - Phone Ports "TEL", "LINE" RJ11, 4P2C (2 pins)

**MAC addresses:**

  MAC address labeled as MAC ADDRESS
  MACs present in both wifi cal data and uboot environment

  eth0.1/phy1 ---- *:82 rf 0x4
  phy0 ---- *:83 factory 0x4
  eth0.2 MAC *:b8 "wanaddr"

**Installation:**

  Method 1: Firmware upgrade page:

    (if you cannot access the APs webpage)
    factory reset with the reset button
    connect ethernet to a computer
    OEM webpage at 192.168.0.1
    username and password 'admin'

    Navigate to gear icon, "Device Management", "Tools"
    select the factory.dlf image
    Upload and verify checksum

  Method 2: Serial to upload initramfs:

    Follow directions for TFTP recovery
    upload and boot initramfs and do a sysupgrade

**TFTP recovery:**

  Requires UART serial console, reset button does nothing

  rename initramfs-kernel.bin to 'uImageEPG600'
  make available on TFTP server at 192.168.99.8
  power board, interrupt boot with "4"
  execute `tftpboot` and `bootm` (with the load address)

**Return to OEM:**

  Images from OEM are provided, but not compatible
  with openwrt sysupgrade. So it must be modified.

  Alternatively, back up all mtd partitions before flashing

**Note on switch registers:**

  The necessary registers needed for the QCA8337 switch
  can be read from interrupted boot (tftpboot, bootm)
  by using the following lines in the switch driver ar8327.c
  in the function 'ar8327_hw_config_of'
  where 'qca,ar8327-initvals' is parsed from DTS
  before the new register values are written:

    pr_info("0x04 %08x\n", ar8xxx_read(priv, AR8327_REG_PAD0_MODE));
    pr_info("0x08 %08x\n", ar8xxx_read(priv, AR8327_REG_PAD5_MODE));
    pr_info("0x0c %08x\n", ar8xxx_read(priv, AR8327_REG_PAD6_MODE));
    pr_info("0x10 %08x\n", ar8xxx_read(priv, AR8327_REG_POWER_ON_STRAP));

Signed-off-by: Michael Pratt <mcpratt@pm.me>
22 months agoramips: mt7620: split gsw hw_init to mac_init, ephy_init
Michael Pratt [Thu, 17 Mar 2022 03:02:42 +0000 (23:02 -0400)]
ramips: mt7620: split gsw hw_init to mac_init, ephy_init

in order for the option ephy-disable to work
without also needing ephy-base option,
we have to skip all the lines that write to mdio addresses that
assume those addresses do not have an external switch.

Otherwise, ephy ports will be disabled in hardware,
but register writes still happen as if they are enabled.

Split the functions so that other things are done first,
and ephy port setup can be skipped with a simple "return".

Tested on Engenius EPG600 (MT7620A ver:2 eco:3)
with QCA8337 external switch

Ref: cc6fd6fbb505 ("ramips: mt7620: add ephy-disable option to switch driver")
Signed-off-by: Michael Pratt <mcpratt@pm.me>
22 months agowireless-regdb: update to 2023.02.13
Yuu Toriyama [Tue, 14 Feb 2023 05:44:11 +0000 (14:44 +0900)]
wireless-regdb: update to 2023.02.13

Changes:
  7f7a9f7 wireless-regdb: update regulatory database based on preceding changes
  660a1ae wireless-regdb: Update regulatory info for Russia (RU) on 5GHz
  fe05cc9 wireless-regdb: Update regulatory rules for Japan (JP) on 6GHz
  d8584dc wireless-regdb: Update regulatory rules for Japan (JP) on 5GHz
  c04fd9b wireless-regdb: update regulatory rules for Switzerland (CH)
  f29772a wireless-regdb: Update regulatory rules for Brazil (BR)

Signed-off-by: Yuu Toriyama <PascalCoffeeLake@gmail.com>
22 months agoipq807x: Add bluetooth driver to zyxel nbg7815
Karol Przybylski [Tue, 14 Feb 2023 22:32:56 +0000 (23:32 +0100)]
ipq807x: Add bluetooth driver to zyxel nbg7815

Zyxel NBG7815 supports bluetooth with blsp1_uart3.
Configuration are already added to dts file, device needs only module to working bluetooth properly.
Tested at below posts:
https://forum.openwrt.org/t/openwrt-support-for-armor-g5-nbg7815/98598/259?u=itork

Reviewed-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Karol Przybylski <karol.przybylski@esm-technology.pl>
22 months agoramips: fix the name of ASUS AX54 because it has dupilcated twice
Karl Chan [Thu, 16 Feb 2023 10:36:25 +0000 (18:36 +0800)]
ramips: fix the name of ASUS AX54 because it has dupilcated twice

The name of ASUS AX54 has dupilcated in the DEVICE_ALT0_VENDOR/DEVICE_ALT0_MODEL

Signed-off-by: Karl Chan <exkc@exkc.moe>
22 months agomediatek: add support for Netgear WAX206
Marcel Ziswiler [Thu, 29 Sep 2022 20:40:31 +0000 (22:40 +0200)]
mediatek: add support for Netgear WAX206

Specifications:
* SoC: MediaTek MT7622BV
* RAM: DDR3 512 MiB (Nanya NT5CC256M16ER-EK)
* Flash: SPI-NAND 256 MiB (Toshiba TC58CVG1S3HRAIJ)
* Wi-Fi 2.4/5 GHz 4T4R:
  * 2.4 GHz: MediaTek MT7622BV
  * 5 GHz: MediaTek MT7915AN/MT7975AN
* Ethernet: 4x 10/100/1000 Mbps LAN,
            1x 10/100/1000/2500 Mbps WAN (Realtek RTL8221B PHY)
* Switch: MediaTek MT7531AE
* LEDs/Keys: 8/1 (Power, Internet, LAN1, LAN2, LAN3, LAN4,
             Wifin and Wifia dual-colour LEDs + Reset pin)
* UART: Marked J19 on board VCC GND TX RX, beginning from "1". 3.3v,
        115200n8
* Power: 12 VDC, 2.5 A

Installation:
* Flash the factory image through the stock web interface, or TFTP to
  the bootloader. NMRP can be used to TFTP without opening the case.
* U-Boot allows booting an initramfs image via TFTP as follows:
  setenv ipaddr 192.168.1.1
  setenv serverip 192.168.1.100
  tftpboot openwrt-mediatek-mt7622-netgear_wax206-initramfs-recovery.itb
  bootm

Known Limitations:
* The 2.5G WAN port labeled 'wan' only works for speeds up to 1G at the
  moment. If connected to a multi-gig port the speed has to be manually
  set to 1G/full either for the switch port or in OpenWrt. For example
  add the following to /etc/rc.local to set it on boot:
  /usr/sbin/ethtool -s wan speed 1000 duplex full

Revert to stock firmware:
* Flash the stock firmware to the bootloader using TFTP/NMRP.

References to WAX206 GPL source:
https://www.downloads.netgear.com/files/GPL/WAX206_V1.0.4.0_Source.rar

* openwrt/target/linux/mediatek/dts/mt7622-netgear-wax206.dts
  DTS file for this device.
* openwrt/target/linux/mediatek/image/mt7622.mk
  Image creation code for this device

Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>
[fix WAN port (1G only), adjust partition layout, adjust image creation]
Signed-off-by: Thomas Kupper <thomas.kupper@gmail.com>
22 months agokernel: bump 5.15 to 5.15.94
John Audia [Wed, 15 Feb 2023 18:15:38 +0000 (13:15 -0500)]
kernel: bump 5.15 to 5.15.94

Patches automatically rebased.

Build system: x86_64
Build-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod
Run-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod

Signed-off-by: John Audia <therealgraysky@proton.me>
22 months agoramips: backport mt7621 PCIs initialization delay patch
Shiji Yang [Thu, 9 Feb 2023 14:00:59 +0000 (22:00 +0800)]
ramips: backport mt7621 PCIs initialization delay patch

The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
Some devices like ZBT WE1326 and ZBT WF3526-P and some Netgear models need
to delay phy port initialization after calling the mt7621_pcie_init_port()
driver function to get into reliable boots for both warm and hard resets.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
22 months agokernel: 5.15: refresh patches
Paul Spooren [Fri, 17 Feb 2023 17:30:00 +0000 (18:30 +0100)]
kernel: 5.15: refresh patches

This commit fixes the following commit

    f584fb2f7e kernel: import accepted MediaTek Ethernet patches

Unrefreshed patches caused the CI to fail.

Signed-off-by: Paul Spooren <mail@aparcar.org>
22 months agoRevert "ipq806x: disable ea8500 image by default"
Christian Marangi [Fri, 17 Feb 2023 03:17:13 +0000 (04:17 +0100)]
Revert "ipq806x: disable ea8500 image by default"

This reverts commit c4a9a67de8ec85a12a004a34a740bd89ca8895e9.

Device is now fixed and works correctly with kernel 5.15.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
22 months agoRevert "ipq806x: disable ea8500 image by default"
Christian Marangi [Fri, 17 Feb 2023 03:16:40 +0000 (04:16 +0100)]
Revert "ipq806x: disable ea8500 image by default"

This reverts commit 5384c9337f2323727081e32369a86b62e72c47d8.

Device is now fixed and works correctly with kernel 5.15.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
22 months agoipq806x: 5.10: refresh patches
Christian Marangi [Fri, 17 Feb 2023 03:25:59 +0000 (04:25 +0100)]
ipq806x: 5.10: refresh patches

Refresh patches for kernel 5.10

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>