openwrt/staging/nbd.git
3 months agotools/mkimage: update to 2024.01
Nick Hainke [Wed, 24 Jan 2024 12:26:31 +0000 (13:26 +0100)]
tools/mkimage: update to 2024.01

Update to latest version.

Refresh patch:
- 030-allow-to-use-different-magic.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
3 months agotools/cpio: update to 2.15
Nick Hainke [Wed, 24 Jan 2024 12:18:53 +0000 (13:18 +0100)]
tools/cpio: update to 2.15

Release Notes:
https://lists.gnu.org/archive/html/info-gnu/2024-01/msg00006.html

Signed-off-by: Nick Hainke <vincent@systemli.org>
3 months agobmips: bcm6368-enetsw: Bump max MTU
Linus Walleij [Wed, 24 Jan 2024 08:23:12 +0000 (09:23 +0100)]
bmips: bcm6368-enetsw: Bump max MTU

The safe max frame size for this ethernet switch is 1532 bytes,
excluding the DSA TAG and extra VLAN header, so the maximum
outgoing frame is 1542 bytes.

The available overhead is needed when using the DSA switch with
a cascaded Marvell DSA switch, which is something that exist in
real products, in this case the Inteno XG6846.

Use defines at the top of the size for max MTU so it is clear how
we think about this, add comments.

We need to adjust the RX buffer size to fit the new max frame size,
which is 1542 when the DSA tag (6 bytes) and VLAN header (4 extra
bytes) is added.

We also drop this default MTU:

  #define ENETSW_TAG_SIZE (6 + VLAN_HLEN)
  ndev->mtu = ETH_DATA_LEN + ENETSW_TAG_SIZE;

in favor of just:

  ndev->mtu = ETH_DATA_LEN;

I don't know why the default MTU is trying to second guess the
overhead required by DSA and VLAN but the framework will also
try to bump the MTU for e.g. DSA tags, and the VLAN overhead is
not supposed to be included in the MTU, so this is clearly not
right.

Before this patch (on the lan1 DSA port in this case):
dsa_slave_change_mtu: master->max_mtu = 9724, dev->max_mtu = 10218, DSA overhead = 8
dsa_slave_change_mtu: master = extsw, dev = lan1
dsa_slave_change_mtu: master->max_mtu = 1510, dev->max_mtu = 9724, DSA overhead = 6
dsa_slave_change_mtu: master = eth0, dev = extsw
dsa_slave_change_mtu new_master_mtu 1514 > mtu_limit 1510
mdio_mux-0.1:00: nonfatal error -34 setting MTU to 1500 on port 0

My added debug prints before the nonfatal error: the first switch from the top
is the Marvell switch, the second in the bcm6368-enetsw with its 1510 limit.

After this patch the error is gone.

OpenWrt adds a VLAN to each port so we get VLAN tags on all frames. On this
setup we even have 4 more bytes left after the two DSA tags and VLAN so
we can go all the way up to 1532 as MTU.

Testing the new 1532 MTU:

    eth0             ext1              enp7s0
 .--------.     .-----------.  cable  .------.
 | enetsw | <-> | mv88e6152 | <-----> | host |
 `--------´     `-----------´         `------´

On the router we set the max MTU for test:
ifconfig eth0 mtu 1520
ifconfig br-wan mtu 1520
ifconfig ext1 mtu 1506

An MTU of 1506 on ext1 is a logic consequence of the above setup:
this is the max bytes actually transferred. The framing added will be:

- 18 bytes standard ethernet header
- 4 bytes VLAN header
- 6 bytes DSA tag for enetsw
- 8 bytes DSA tag for mv88e6152

Sum: 1506 + 18 + 4 + 6 + 8 = 1542 which is out max frame size.

Test pinging from host:
ping -s 1478 -M do 192.168.1.220
PING 192.168.1.220 (192.168.1.220) 1478(1506) bytes of data.
1486 bytes from 192.168.1.220: icmp_seq=1 ttl=64 time=0.696 ms
1486 bytes from 192.168.1.220: icmp_seq=2 ttl=64 time=0.615 ms

Test pinging from router:
PING 192.168.1.2 (192.168.1.2): 1478 data bytes
1486 bytes from 192.168.1.2: seq=0 ttl=64 time=0.931 ms
1486 bytes from 192.168.1.2: seq=1 ttl=64 time=0.810 ms

The max IP packet without headers is 1478, the outgoing ICMP packet is
1506 bytes. Then the DSA, VLAN and ethernet overhead is added.

Let us verify the contents of the resulting ethernet frame of 1542 bytes.

Ping packet on router side as viewed with tcpdump:

00:54:51.900869 AF Unknown (1429722180), length 1538:
        0x0000:  3d93 bcae c56b a83d 8874 0300 0004 8100  =....k.=.t......
        0x0010:  0000 dada 0000 c020 0fff 0800 4500 05e2  ............E...
        0x0020:  0000 4000 4001 b0ec c0a8 0102 c0a8 01dc  ..@.@...........
        0x0030:  0800 7628 00c3 0001 f5da 1d65 0000 0000  ..v(.......e....
        0x0040:  ce65 0a00 0000 0000 1011 1213 1415 1617  .e..............
        0x0050:  1819 1a1b 1c1d 1e1f 2021 2223 2425 2627  .........!"#$%&'
        0x0060:  2829 2a2b 2c2d 2e2f 3031 3233 3435 3637  ()*+,-./0123456
(...)

- 3d93 = First four bytes are the last two bytes of the destination
  ethernet address I don't know why the first four are missing,
  but it sure explains why the paket is 1538 bytes and not 1542
  which is the actual max frame size.
- bcae c56b a83b = source ethernet address
- 8874 0300 0004 = Broadcom enetsw DSA tag
- 8100 0000 = VLAN 802.1Q header
- dada 0000 c020 0fff = EDSA tag for the Marvell (outer) switch,
- 0800 is the ethertype (part of the EDSA tag technically)
- Next follows the contents of the ping packet as it appears if
  we dump it on the DSA interface such as tcpdump -i lan1
  etc, there we get the stripped out packet, 1506 bytes.
- At the end 4 bytes of FCS.

This clearly illustrates that the DSA tag is included in the MTU
which we set up in Linux, but the VLAN tag and ethernet headers and
checksum is not.

Tested-by: Paul Donald <newtwen@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 months agolibxml2: update to 2.12.4
Nick Hainke [Wed, 24 Jan 2024 12:09:40 +0000 (13:09 +0100)]
libxml2: update to 2.12.4

Release Notes:
- https://gitlab.gnome.org/GNOME/libxml2/-/releases/v2.12.4

Signed-off-by: Nick Hainke <vincent@systemli.org>
3 months agoubox: update to Git HEAD (2024-01-24)
Christian Marangi [Wed, 24 Jan 2024 12:08:36 +0000 (13:08 +0100)]
ubox: update to Git HEAD (2024-01-24)

2c5887cb4688 kmodloader: fix invalid read outside mapped region

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
3 months agomediatek: drop NMBM layout for Xiaomi WR30U
Chuanhong Guo [Tue, 23 Jan 2024 11:20:47 +0000 (19:20 +0800)]
mediatek: drop NMBM layout for Xiaomi WR30U

This reverts commit dcdcfc15115a1038e90f21f5aa41726d9c7e2fe5.

This is a firmware for third-party u-boot mod, which should not
be carried here by us.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
3 months agorealtek: d-link dgs-1210-10p improve sfp support
Michel Thill [Sun, 7 Jan 2024 18:39:30 +0000 (19:39 +0100)]
realtek: d-link dgs-1210-10p improve sfp support

The current dts file of dgs-1210-10p doesn't support link states
for the sfp ports (they are always up).
This patch tries to give better support for this and was run tested
on dgs-1210-10p.

It was heavily inspired from Paul Fertser, RaylynnKnight
and the author of dgs-1210-10mp-f.dts

https://forum.openwrt.org/t/dlink-dgs-1210-10p-with-glc-t-co-sfp/170928

Signed-off-by: Michel Thill <jmthill@gmail.com>
3 months agoath79: fix mac address on eap2x5-1port devices
Nikolay Martynov [Sun, 21 Jan 2024 21:51:16 +0000 (16:51 -0500)]
ath79: fix mac address on eap2x5-1port devices

Commit e816591e226a ("ath79: qca: convert to nvmem-layout") mistakenly
switched the source of the mac address from the 'info' to 'art'
partition.

This patch updates all devices that share same 'parent' device tree file
and was tested to fix the problem for eap225-outdoor-v3 - device that I
actually own.

Fixes: e816591e226a ("ath79: qca: convert to nvmem-layout")
Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
[amend commit message]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
3 months agowireguard-tools: avoid redundant jsonfilter calls
Jo-Philipp Wich [Tue, 23 Jan 2024 08:19:35 +0000 (09:19 +0100)]
wireguard-tools: avoid redundant jsonfilter calls

Use a single jsonfilter expression to yield the list of logical wireguard
interface names in shell compatible notation.

Supersedes: #12344
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
3 months agojsonfilter: update to Git HEAD (2024-01-23)
Jo-Philipp Wich [Tue, 23 Jan 2024 08:07:16 +0000 (09:07 +0100)]
jsonfilter: update to Git HEAD (2024-01-23)

013b75ab0598 jsonfilter: drop legacy json-c support
594cfa86469c main: fix spurious premature parse aborts in array mode

Fixes: https://bugs.openwrt.org/?task_id=3683
Fixes: https://github.com/openwrt/openwrt/issues/8703
Fixes: https://github.com/openwrt/openwrt/issues/11649
Fixes: https://github.com/openwrt/openwrt/issues/12344
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
3 months agolantiq: fix boot isues on danube boards
Aleksander Jan Bajkowski [Sun, 21 Jan 2024 18:02:33 +0000 (19:02 +0100)]
lantiq: fix boot isues on danube boards

Enabling SMP on Danube[1] is incompatible with a patch that
adds support for interrupt handling on all cores on other
platforms[2]. This patch fixes the mentioned issue.

1. 084c20f6c54180f2dc6b3efc1c5ba9b62afbaf26 ("lantiq: xway: kernel: enable SMP support ")
2. fbd33d61648ae8982fbada7ad3b6d8222b367ab5 ("lantiq: enable interrupts on second VPEs")

Fixes: #13934
Fixes: #14283
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
3 months agoqualcommax: add SMP affinity script
Robert Marko [Tue, 9 Jan 2024 10:21:11 +0000 (11:21 +0100)]
qualcommax: add SMP affinity script

By default Linux will default to most IRQ-s being mapped to core 0 which
during high loads will completely swamp the core 0, so lets add the widely
used script that has been floating around forums for a long time to try and
optimize the IRQ mapping a bit.

Signed-off-by: Robert Marko <robimarko@gmail.com>
3 months agoscripts/rstrip.sh: ignore /lib/firmware
Felix Fietkau [Mon, 22 Jan 2024 12:00:41 +0000 (13:00 +0100)]
scripts/rstrip.sh: ignore /lib/firmware

On some platforms, some firmware files might look like executables.
These need to be ignored in order to avoid messing them up.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 months agoramips: mt76x8: enable small_flash feature
Tomasz Maciej Nowak [Wed, 10 Jan 2024 15:59:48 +0000 (16:59 +0100)]
ramips: mt76x8: enable small_flash feature

Some of devices in this target have only 8 MiB space and are closing to
borders of usable space. Particularly, TP-Link RE305 v1 already suffers
from this issue[1], where with current partition layout, on release
images, there's not enough space for overlay. So activate small_flash
feature, which will remove some userspace hardening but will gain almost
1 MiB additional flash memory space. Here is small size comparison of
similar device (RE365 v1) with default config + LuCI:

kernel rootfs sysupgrade
current: 2305728 3635044 5964584
small_flash: 1713571 3320132 5047080

1. https://github.com/openwrt/openwrt/issues/14215

Suggested-by: Sander Vanheule <sander@svanheule.net>
Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
3 months agofstools: update to Git HEAD (2024-01-22)
Christian Marangi [Mon, 22 Jan 2024 00:46:43 +0000 (01:46 +0100)]
fstools: update to Git HEAD (2024-01-22)

2171f6261556 libfstools: force mkfs when formatting overlay
08cd7083cac4 libfstools: fit: improve fit_volume_find string handling

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
3 months agoubox: update to Git HEAD (2024-01-22)
Christian Marangi [Mon, 22 Jan 2024 00:28:52 +0000 (01:28 +0100)]
ubox: update to Git HEAD (2024-01-22)

b2f6da671f7c kmodloader: Fix NULL pointer dereferences error
202d7c05029a kmodloader: fix memory leak in print_modinfo
6cf7d837ee7e kmodloader: fix TOCTOU problem with scan_builtin_modules

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
3 months agoipq806x: replace tsens patch with upstream version
Christian Marangi [Sun, 21 Jan 2024 21:42:54 +0000 (22:42 +0100)]
ipq806x: replace tsens patch with upstream version

Replace tsens patch with upstream version.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
3 months agoipq806x: renumber backport patches starting from 000
Christian Marangi [Sun, 21 Jan 2024 21:38:11 +0000 (22:38 +0100)]
ipq806x: renumber backport patches starting from 000

Renumber backport patches starting from 000 to tidy things up.
Also fix patch name format for the mmc backport patch.

Refresh patches affected by this renumber change.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
3 months agogeneric: 6.1: move stmmac backport fix patches to generic
Christian Marangi [Sun, 21 Jan 2024 21:07:31 +0000 (22:07 +0100)]
generic: 6.1: move stmmac backport fix patches to generic

Move stmmac backport fix patches from ipq806x to generic backport
directory as they got merged upstream and they fix wide performance
regression.

This will eventually cause performance increase on any user of the
stmmac driver.

Generic patch automatically refreshed with make target/linux/refresh.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
3 months agobcm27xx: drop unneeded github workflow and readme patches
Álvaro Fernández Rojas [Sun, 21 Jan 2024 12:39:33 +0000 (13:39 +0100)]
bcm27xx: drop unneeded github workflow and readme patches

These patches can be dropped since we don't care about RPi's Github CI and
READMEs.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 months agouboot-rockchip: Update to 2024.01
Tianling Shen [Wed, 10 Jan 2024 09:12:46 +0000 (17:12 +0800)]
uboot-rockchip: Update to 2024.01

Runtime tested on Orange Pi R1 Plus LTS and NanoPi R4S.

Removed upstreamed patches:
- 100-rockchip-rk3328-Add-support-for-Orange-Pi-R1-Plus.patch
- 101-rockchip-rk3328-Add-support-for-Orange-Pi-R1-Plus-LT.patch
- 103-rockchip-rk3568-Add-support-for-FriendlyARM-NanoPi-R.patch
- 104-rockchip-rk3568-Add-support-for-FriendlyARM-NanoPi-R.patch

Refreshed remaining patches.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
3 months agoarm-trusted-firmware-rockchip: Update to 2.10
Tianling Shen [Wed, 10 Jan 2024 09:10:13 +0000 (17:10 +0800)]
arm-trusted-firmware-rockchip: Update to 2.10

Runtime tested on Orange Pi R1 Plus LTS (RK3328) and NanoPi R4S (RK3399).

Changelog: https://trustedfirmware-a.readthedocs.io/en/v2.10/change-log.html

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
3 months agokernel: bump 6.1 to 6.1.74
John Audia [Sat, 20 Jan 2024 13:03:12 +0000 (08:03 -0500)]
kernel: bump 6.1 to 6.1.74

Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.74

No patches needed a rebase/only updated source hash.

Build system: x86/64
Build-tested: x86/64/AMD Cezanne
Run-tested: x86/64/AMD Cezanne

Signed-off-by: John Audia <therealgraysky@proton.me>
3 months agoath79: generic: rework ar9342_ubnt_xw dtsi, and add support for Ubiquiti LiteBeam...
Samuele Longhi [Wed, 20 Dec 2023 18:27:15 +0000 (19:27 +0100)]
ath79: generic: rework ar9342_ubnt_xw dtsi, and add support for Ubiquiti LiteBeam M5 (XW), Ubiquiti AirGrid M5 HP (XW), Ubiquiti PowerBeam M5 300 (XW)

Add support for Ubiquiti LiteBeam M5 (XW).
The device was previously supported in ar71xx.
See commit: https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=d0988235dd277b9a832bbc4b2a100ac6e821f577

Add ALTX_MODEL for Ubiquiti AirGrid M5 HP (XW), Ubiquiti PowerBeam M5 300 (XW) in generic-ubnt.mk
This models are identical (firmware-wise) to the already supported Ubiquiti Nanostation Loco M (XW)

Add also Ubiquiti NanoBeam M5 to ALTX_MODEL of Ubiquiti Nanostation Loco M (XW) since it's another clone.

Tested on:
- Ubiquiti LiteBeam M5 (XW)
- Ubiquiti PowerBeam M5 (XW)

This also modify target/ath79/dts/ar9342_ubnt_xw.dtsi to use nvmem for calibration data
Checked that the caldata size in the eeprom partition are actually 0x440 on:
- Ubiquiti PowerBeam M5 (XW)
- Ubiquiti Nanostation M5 (XW)
- Ubiquiti LiteBeam M5 (XW)
- Ubiquiti AirGrid M5 HP (XW)

Signed-off-by: Samuele Longhi <agave@dracaena.it>
3 months agouboot-bcm53xx: bump to 2024.01
Linus Walleij [Fri, 19 Jan 2024 23:08:42 +0000 (00:08 +0100)]
uboot-bcm53xx: bump to 2024.01

Bump the U-Boot version used for BCM53xx to the 2024.01
version that includes all the needed patches upstream, so we
can get rid of those in the process.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
3 months agobusybox: switch to sha256 for passwd
Paul Spooren [Fri, 19 Jan 2024 10:49:27 +0000 (11:49 +0100)]
busybox: switch to sha256 for passwd

Right now sha256 is considered more secure than md5, use it to harden
against password decryption.

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 months agobusybox: enable sha hash for /etc/shadow
Paul Spooren [Thu, 18 Jan 2024 15:25:34 +0000 (16:25 +0100)]
busybox: enable sha hash for /etc/shadow

It appears `md5` is no longer state of the art. Let's switch it to
something slightly newer to increase security.

Suggested-by: abnoeh <abnoeh@mail.com>
Signed-off-by: Paul Spooren <mail@aparcar.org>
3 months agoubox: update to Git HEAD (2024-01-15)
Christian Marangi [Fri, 19 Jan 2024 20:45:19 +0000 (21:45 +0100)]
ubox: update to Git HEAD (2024-01-15)

11cb29e15d68 kmodloader: remove unneeded uname() call
811ca6c2234a kmodloader: fix memory leak in scan_loaded_modules()
8c95fc7039cb kmodloader: support loadable module parameters in modinfo
4ffc29e4041c kmodloader: add basic support for builtin modules
ba3908351232 kmodloader: add modinfo support for builtin modules
c006dccecb6f kmodloader: cleanup duplicated mmap() code

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
3 months agomediatek: add support for JDCloud RE-CP-03
Tianling Shen [Wed, 1 Nov 2023 06:46:15 +0000 (14:46 +0800)]
mediatek: add support for JDCloud RE-CP-03

Hardware specification:
  SoC: MediaTek MT7986A 4x A53
  Flash: 128GB eMMC
  RAM: 1GB DDR4
  Ethernet: 4x 1GbE, 1x 2.5GbE (RTL8221B)
  Switch: MediaTek MT7531AE
  WiFi: MediaTek MT7976C
  Button: Reset, Joylink
  Power: DC 12V 2A

Flash instructions:
1. Download and flash the vendor migration firmware via webUI:
   https://firmware.download.immortalwrt.eu.org/cnsztl/mediatek/filogic/openwrt-mediatek-mt7986-jdcloud_re-cp-03-vendor-migration.bin
   (Default address is 192.168.68.1, user root, no password)
2. After device has booted up, write new GPT table:
   dd if=openwrt-mediatek-filogic-jdcloud_re-cp-03-gpt.bin of=/dev/mmcblk0 bs=512 seek=0 count=34 conv=fsync
3. Erase and write new BL2:
   echo 0 > /sys/block/mmcblk0boot0/force_ro
   dd if=/dev/zero of=/dev/mmcblk0boot0 bs=512 count=8192 conv=fsync
   dd if=openwrt-mediatek-filogic-jdcloud_re-cp-03-preloader.bin of=/dev/mmcblk0boot0 bs=512 conv=fsync
4. Erase and write new FIP:
   dd if=/dev/zero of=/dev/mmcblk0 bs=512 seek=13312 count=8192 conv=fsync
   dd if=openwrt-mediatek-filogic-jdcloud_re-cp-03-bl31-uboot.fip of=/dev/mmcblk0 bs=512 seek=13312 conv=fsync
5. Set static IP on your PC:
   IP 192.168.1.254/24, GW 192.168.1.1
6. Serve OpenWrt initramfs image using TFTP server.
7. Cut off the power and re-engage, wait for TFTP recovery to complete.
8. After OpenWrt has booted, perform sysupgrade.
9. Additionally, if you want to have eMMC recovery boot feature:
     (Don't worry! You will always have TFTP recovery boot feature.)
   dd if=openwrt-mediatek-filogic-jdcloud_re-cp-03-initramfs-recovery.itb of=/dev/mmcblk0p4 bs=512 conv=fsync

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
3 months agouboot-mediatek: add support for JDCloud RE-CP-03
Tianling Shen [Wed, 1 Nov 2023 06:44:50 +0000 (14:44 +0800)]
uboot-mediatek: add support for JDCloud RE-CP-03

The vendor U-Boot has enabled signature verification, so add
a custom U-Boot build for OpenWrt.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
3 months agorockchip: fix boot from non-MMC devices
Justin Klaassen [Sat, 13 Jan 2024 20:28:57 +0000 (20:28 +0000)]
rockchip: fix boot from non-MMC devices

Booting from non-MMC devices on Rockchip targets without this
change results in a boot failure:

Model: FriendlyElec NanoPi R5S
Net:   eth0: ethernet@fe2a0000
Hit any key to stop autoboot:  0
** Booting bootflow 'nvme#0.blk#1.bootdev.part_1' with script
** No partition table - mmc 0 **
** No partition table - mmc 0 **
Couldn't find partition mmc 0:1
Can't set block device
Wrong Image Type for bootm command
ERROR -91: Protocol wrong type for socket: can't get kernel image!
Boot failed (err=1)

This change fixes the default boot script for Rockchip targets to
support booting from non-MMC devices such as NVMe or USB drives.

Some targets with only a boot rom (e.g. NanoPi R5S) may require u-boot
to be installed on the eMMC or a MicroSD card in order to boot from
non-MMC devices.

Fixes: #14420
Reviewed-by: Tianling Shen <cnsztl@immortalwrt.org>
Signed-off-by: Justin Klaassen <justin@tidylabs.app>
3 months agotoolchain: glibc: add --enable-stack-protector=all option for glibc
Cedric DOURLENT [Thu, 18 Jan 2024 09:17:21 +0000 (10:17 +0100)]
toolchain: glibc: add --enable-stack-protector=all option for glibc

Add missing configurition for glibc based on CONFIG_PKG_CC_STACKPROTECTOR_ALL

Signed-off-by: Cedric DOURLENT <cedric.dourlent@softathome.com>
3 months agobuild: add option for building with stack-protector-all
Cedric DOURLENT [Fri, 12 Jan 2024 08:23:46 +0000 (09:23 +0100)]
build: add option for building with stack-protector-all

The GCC option -fstack-protector-all is a security feature used to protect against stack-smashing attacks.
This option enhances the stack-smashing protection provided by -fstack-protector-strong.
-fstack-protector-all option applies stack protection to all functions, regardless of their characteristics.
While this offers the most comprehensive protection against stack-smashing attacks, it can significantly impact
the performance of the program because every function call includes additional checks for stack integrity.
This option can incur a performance penalty because of the extra checks added to every function call,
but it significantly enhances security, making it harder for attackers to exploit buffer overflows to execute arbitrary code.
It's particularly useful in scenarios where security is paramount and performance trade-offs are acceptable.

Signed-off-by: Cedric DOURLENT <cedric.dourlent@softathome.com>
3 months agokernel: bump 6.1 to 6.1.73
John Audia [Mon, 15 Jan 2024 19:39:17 +0000 (14:39 -0500)]
kernel: bump 6.1 to 6.1.73

Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.73

Patch automatically rebased.

Build system: x86/64
Build-tested: x86/64/AMD Cezanne, filogic/xiaomi_redmi-router-ax6000-ubootmod
Run-tested: x86/64/AMD Cezanne, filogic/xiaomi_redmi-router-ax6000-ubootmod

Signed-off-by: John Audia <therealgraysky@proton.me>
3 months agokernel: bump 6.1 to 6.1.72
John Audia [Wed, 10 Jan 2024 20:54:42 +0000 (15:54 -0500)]
kernel: bump 6.1 to 6.1.72

Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.72

Manually rebased:
generic/hack-6.1/650-netfilter-add-xt_FLOWOFFLOAD-target.patch

All other patches automatically rebased.

Build system: x86/64
Build-tested: x86/64/AMD Cezanne
Run-tested: x86/64/AMD Cezanne

Signed-off-by: John Audia <therealgraysky@proton.me>
3 months agomediatek: fix WED + wifi reset
Felix Fietkau [Fri, 19 Jan 2024 13:48:05 +0000 (14:48 +0100)]
mediatek: fix WED + wifi reset

The WLAN + WED reset sequence relies on being able to receive interrupts from
the card, in order to synchronize individual steps with the firmware.
When WED is stopped, leave interrupts running and rely on the driver turning
off unwanted ones.
WED DMA also needs to be disabled before resetting.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 months agomt76: update to Git HEAD (2024-01-18)
Felix Fietkau [Thu, 18 Jan 2024 19:53:04 +0000 (20:53 +0100)]
mt76: update to Git HEAD (2024-01-18)

83e3947e2c52 linux-firmware: update firmware for MT7922 WiFi device
ddaa8cb6e81a linux-firmware: update firmware for MT7921 WiFi device
f83b1601cc10 linux-firmware: update firmware for MT7922 WiFi device
61d334ab0f33 linux-firmware: add firmware for MT7925
a7836e4c8a60 wifi: mt76: disable HW AMSDU when using fixed rate
a8571ebbcd95 wifi: mt76: check txs format before getting skb by pid
3d5890e2cab3 wifi: mt76: mt7915: fix error recovery with WED enabled
703c26d01197 wifi: mt76: mt7915: add locking for accessing mapped registers
f77188160441 wifi: mt76: mt7915: update mt798x_wmac_adie_patch_7976

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 months agohostapd: ACS: Fix typo in bw_40 frequency array
David Bauer [Thu, 18 Jan 2024 21:47:17 +0000 (22:47 +0100)]
hostapd: ACS: Fix typo in bw_40 frequency array

[Upstream Backport]

The range for the 5 GHz channel 118 was encoded with an incorrect
channel number.

Fixes: ed8e13decc71 (ACS: Extract bw40/80/160 freqs out of acs_usable_bwXXX_chan())
Signed-off-by: Michael Lee <michael-cy.lee@mediatek.com>
Signed-off-by: David Bauer <mail@david-bauer.net>
3 months agobcm27xx-utils: update to latest version
Álvaro Fernández Rojas [Thu, 18 Jan 2024 09:50:45 +0000 (10:50 +0100)]
bcm27xx-utils: update to latest version

Fixes build with GCC 13.
Disable LTO to fix build with CONFIG_USE_LTO.

Changelog:
e65f5ec eeptools: eepdump: init type before calling eepio_atom_start

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 months agobcm27xx: config: update documentation links
Álvaro Fernández Rojas [Wed, 17 Jan 2024 09:39:37 +0000 (10:39 +0100)]
bcm27xx: config: update documentation links

The documentation links have changed and are no longer valid.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 months agobcm27xx-utils: add new package
Álvaro Fernández Rojas [Tue, 16 Jan 2024 13:52:05 +0000 (14:52 +0100)]
bcm27xx-utils: add new package

The raspberypi/userland repository has been deprecated and the RPi tools have
been moved to the raspberrypi/utils repository.
https://github.com/raspberrypi/userland/commit/96a7334ae9d5fc9db7ac92e59852377df63f1848

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 months agobmips: dts: remove unneeded cferom alias
Álvaro Fernández Rojas [Thu, 18 Jan 2024 07:57:43 +0000 (08:57 +0100)]
bmips: dts: remove unneeded cferom alias

This is no longer needed after nvmem-layout changes.
Same as 6f328dfe19 for NAND devices.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 months agokernel: bump 5.15 to 5.15.147
John Audia [Mon, 15 Jan 2024 20:25:53 +0000 (15:25 -0500)]
kernel: bump 5.15 to 5.15.147

Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.147

Manually rebased:
generic/backport-5.15/005-v5.17-01-Kbuild-use-Wdeclaration-after-statement.patch

All other patches automatically rebased.

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>
3 months agokernel: ksmbd: only v2 leases handle the directory
Chen Minqiang [Tue, 16 Jan 2024 09:20:04 +0000 (17:20 +0800)]
kernel: ksmbd: only v2 leases handle the directory

This backport a fix for ksmbd.

Refer: https://github.com/namjaejeon/ksmbd/issues/469

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
3 months agomediatek: refresh patches-6.1
Daniel Golle [Wed, 17 Jan 2024 01:48:29 +0000 (01:48 +0000)]
mediatek: refresh patches-6.1

Refresh patches for Linux 6.1 which no longer apply cleanly after
adding patches to fix ethernet rx hang issue on MT7981/MT7986.

Fixes: ede34465de ("mediatek: fix ethernet rx hang issue on MT7981/MT7986")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 months agoramips: mt7621: convert Linksys devices EEPROM to NVMEM format
Shiji Yang [Tue, 16 Jan 2024 13:41:40 +0000 (21:41 +0800)]
ramips: mt7621: convert Linksys devices EEPROM to NVMEM format

-+-----------------------------+-
 |    Model   |       NIC      |
-+-----------------------------+-
 | EA6350 v4 | MT7603 + MT7613 |
-+-----------------------------+-
 | EA7300 v2 | MT7603 + MT7615 |
-+-----------------------------+-
 |  Others   |    MT7615 *2    |
-+-----------------------------+-

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
3 months agoramips: mt7621: convert NETGEAR devices EEPROM to NVMEM format
Shiji Yang [Tue, 16 Jan 2024 13:24:41 +0000 (21:24 +0800)]
ramips: mt7621: convert NETGEAR devices EEPROM to NVMEM format

-+------------------------------+-
 |    Model   |       NIC       |
-+------------------------------+-
 | chj series | MT7603 + MT7615 |
-+------------------------------+-
 | bzv series |    MT7615 *2    |
-+------------------------------+-

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
3 months agoramips: mt7621: convert Wavlink devices EEPROM to NVMEM format
Shiji Yang [Tue, 16 Jan 2024 13:03:42 +0000 (21:03 +0800)]
ramips: mt7621: convert Wavlink devices EEPROM to NVMEM format

-+------------------------------+-
 |    Model   |       NIC       |
-+------------------------------+-
 | WL-WN531A6 | MT7603 + MT7615 |
-+------------------------------+-
 | WL-WN533A8 |    MT7615 *2    |
-+------------------------------+-

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
3 months agoramips: mt7621: convert Ubiquiti devices EEPROM to NVMEM format
Shiji Yang [Tue, 16 Jan 2024 12:57:35 +0000 (20:57 +0800)]
ramips: mt7621: convert Ubiquiti devices EEPROM to NVMEM format

-+-------------------------+-
 | Model |       NIC       |
-+-------------------------+-
 | All   | MT7603 + MT7615 |
-+-------------------------+-

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
3 months agoramips: mt7621: convert I-O DATA devices EEPROM to NVMEM format
Shiji Yang [Tue, 16 Jan 2024 12:42:59 +0000 (20:42 +0800)]
ramips: mt7621: convert I-O DATA devices EEPROM to NVMEM format

-+-------------------------------------------+-
 |          Model          |       NIC       |
-+-------------------------------------------+-
 | WN-DX1167R/WN-AX1167GR2 |     MT7615D     |
-+-------------------------------------------+-
 | WN-AX2033GR/WN-DX2033GR | MT7603 + MT7615 |
-+-------------------------------------------+-

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
3 months agoramips: mt7621: convert Xiaomi devices EEPROM to NVMEM format
Shiji Yang [Tue, 16 Jan 2024 12:21:35 +0000 (20:21 +0800)]
ramips: mt7621: convert Xiaomi devices EEPROM to NVMEM format

-+---------------------------+-
 |  Model  |       NIC       |
-+---------------------------+-
 | AC2100  | MT7603 + MT7615 |
-+---------------------------+-
 | MI4A V2 | MT7603 + MT7613 |
-+---------------------------+-
 | Others  | MT7603 + MT7612 |
-+---------------------------+-

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
3 months agoramips: mt7621: convert MT7915 EEPROM to NVMEM format
Shiji Yang [Tue, 16 Jan 2024 11:56:05 +0000 (19:56 +0800)]
ramips: mt7621: convert MT7915 EEPROM to NVMEM format

Some MT7915 calibration data consists of two parts. The first part
"eeprom" size is 0xe00. The second part "precal" size is 0x19c10.

Though some devices may not have precal data, it's better to assume
that precal data exists as no users/developers confirm it. On the
other hand, some devices definitely do not contain precal data
because the EEPROM partition size is smaller than the precal NVMEM
cell size.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
3 months agouqmi: update to git HEAD
Daniel Golle [Tue, 16 Jan 2024 22:22:17 +0000 (22:22 +0000)]
uqmi: update to git HEAD

c3488b8 uqmi: cancel all requests on SYNC indication reception
dfa612e uqmi: improve response detection

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 months agomediatek: fix ethernet rx hang issue on MT7981/MT7986
Felix Fietkau [Tue, 16 Jan 2024 18:29:52 +0000 (19:29 +0100)]
mediatek: fix ethernet rx hang issue on MT7981/MT7986

Add patches by Lorenzo/Daniel to use QDMA instead of ADMAv2

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 months agoipq806x: DTS format fixup for Fortinet FAP-421E
Christian Marangi [Tue, 16 Jan 2024 14:53:16 +0000 (15:53 +0100)]
ipq806x: DTS format fixup for Fortinet FAP-421E

Small clanup and fixup for DTS format for Fortinet FAP-421E.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
3 months agobcm27xx-gpu-fw: update to latest version
Álvaro Fernández Rojas [Tue, 16 Jan 2024 10:58:01 +0000 (11:58 +0100)]
bcm27xx-gpu-fw: update to latest version

raspberrypi/firmware is about 40G, so getting the full history log isn't an
option.
There have been multiple improvements and also support for the RPi 5 has been
added.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 months agobcm27xx-userland: update to latest version
Marty Jones [Mon, 25 Dec 2023 00:03:31 +0000 (19:03 -0500)]
bcm27xx-userland: update to latest version

This is the last update for bcm27xx-userland as it has been
deprecated but funcional up to raspberry pi 5.

96a7334 README: Update to make it clear that most code in this repo is deprecated
3c97f76 userland: dtoverlay: /boot/firmware is a valid path
153a235 Assorted clang static analysis fixes
eca070c bcm_host: Update kms/fkms check for pi5
06a7618 dtoverlay: Support bcm2712 as a platform
0489c07 dtoverlay: Add dtoverlay_first/next_subnode
a1c7f81 dtoverlay: Support literal assignments of path strings
44a3953 raspivid: Also flush PTS file if flush is enabled
cc1ca18 userland: dtoverlay: Use os_prefix if set
9d5250f libfdt: Add null-ptr check for prop-data to resolve clang --analyzer warning
50527c6 mmal: Only include Videocore components if not running on Videocore
df245ea tvservice: Update unsupported message to recommend kmsprint
de0cfe8 dtoverlay: Fix clang warnings
0182f05 dtoverlay: Fix various compiler warnings
2a6306b dtoverlay: Fix path rebasing and exports
d1e92d7 dtoverlay: Add support for string escape sequences
b1ee39e gencmd: Add a fallback to mailbox interface if vchiq is not available
54fd97a hello_pi: Fix some build issues

Signed-off-by: Marty Jones <mj8263788@gmail.com>
3 months agolayerscape: refresh patches-6.1
Daniel Golle [Tue, 16 Jan 2024 13:41:06 +0000 (13:41 +0000)]
layerscape: refresh patches-6.1

Patches no longer cleanly apply after commit c2c741ccce ("generic:
6.1: initial backport of at803x PHY driver cleanup"). Refresh patches
to address that.

Fixes: c2c741ccce ("generic: 6.1: initial backport of at803x PHY driver cleanup")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 months agobmips: drop patches/config for kernel 5.15
Álvaro Fernández Rojas [Tue, 16 Jan 2024 10:04:29 +0000 (11:04 +0100)]
bmips: drop patches/config for kernel 5.15

Drop patches/config for kernel 5.15 now that they are not used anymore.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 months agobmips: move to kernel 6.1 by default
Álvaro Fernández Rojas [Tue, 16 Jan 2024 10:02:01 +0000 (11:02 +0100)]
bmips: move to kernel 6.1 by default

Move bmips to kernel 6.1 by default.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 months agobmips: dts: remove unneeded cfe alias
Álvaro Fernández Rojas [Tue, 16 Jan 2024 09:59:47 +0000 (10:59 +0100)]
bmips: dts: remove unneeded cfe alias

This is no longer needed after nvmem-layout changes.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 months agobmips: bcm6328: add Innacomm W3400V6
Sieng-Piaw Liew [Wed, 9 Aug 2023 05:13:57 +0000 (13:13 +0800)]
bmips: bcm6328: add Innacomm W3400V6
Innacomm W3400V6 is an xDSL B/G wireless router based on Broadcom
BCM6328 SoC.

SoC: Broadcom BCM6328
CPU: BMIPS4350 V8.0, 320 MHz, 1 core
Flash: SPI-NOR 8MB, MX25L6406E
RAM: 64 MB
Ethernet: 4x 10/100 Mbps
Switch: Integrated
Wireless: 802.11b/g, BCM4312
LEDs/Buttons: 9x / 2x

Flash instruction, web UI:
1. Set a static IP on your computer compatible with 192.168.1.1, i.e
192.168.1.100.
2. Connect the ethernet cable from your computer to the router.
3. Make sure the router is powered off.
4. Press the reset button, don't release it yet!
5. While pressing reset, power on the router.
6. Wait 10 seconds or more.
Note: The power LED is red at first then turns to solid green when
ready.
7. Release the reset button.
8. Browse to 192.168.1.1
9. Select .bin file.
10. Upgrade the image.
11. Wait for it to reboot.

Signed-off-by: Sieng-Piaw Liew <liew.s.piaw@gmail.com>
[Fix cfe nvmem-layout and pinctrl_leds indentation]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 months agobcm27xx: 6.1: turn on cpu erratum for A72 and disable A53
Yangyu Chen [Mon, 18 Dec 2023 19:21:53 +0000 (03:21 +0800)]
bcm27xx: 6.1: turn on cpu erratum for A72 and disable A53

The original configuration might be copied from bcm2710 which uses
cortex A53 rather than A72 in BCM2711, without errata might be harmful
to system stability and security.

Signed-off-by: Yangyu Chen <cyy@cyyself.name>
3 months agobcm27xx: Remove unneeded kernel patch
Hauke Mehrtens [Wed, 10 Jan 2024 21:10:28 +0000 (22:10 +0100)]
bcm27xx: Remove unneeded kernel patch

This problem was fixed upstream in a different way, see:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.1.y&id=f434703fb893ddffcdbc1eec7646ce321e1190a8

Remove this now obsolete patch.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 months agoipq40xx: drop PSGMII PHY patch
Christian Marangi [Tue, 16 Jan 2024 00:00:31 +0000 (01:00 +0100)]
ipq40xx: drop PSGMII PHY patch

Drop PSGMII PHY patch as it has been moved to generic in preparation for
the PHY driver to be also used for ipq807x SoC as the same PHY is also
used there.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
3 months agogeneric: 6.1: backport FIELD_PREP_CONST patch
Christian Marangi [Mon, 15 Jan 2024 21:47:20 +0000 (22:47 +0100)]
generic: 6.1: backport FIELD_PREP_CONST patch

Backport FIELD_PREP_CONST patch needed for at803x backport patches to
correctly compile and work.

This MACRO is needed to treat values derived from FIELD_PREP usage as
const to be used by switch case or other needed usage.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
3 months agoipq806x: Stabilize LAN 2 MAC address, interface ordering
Bryan Berg [Sun, 26 Nov 2023 21:34:01 +0000 (13:34 -0800)]
ipq806x: Stabilize LAN 2 MAC address, interface ordering

Part 1 of #13629 split.

* Sets the LAN 2 MAC address in the DTS by deriving it from LAN 1's
address. The factory OS derives this from the `eth1addr` u-boot env
variable, but the nvmem_u-boot-env driver doesn't support parsing MAC
addresses from fields other than `ethaddr`. But for all of the device
samples I've checked (~10) it derives the correct MAC.

* Updates 02_network to ensure that interfaces are assigned to roles
correctly and consistently.

Signed-off-by: Bryan Berg <bdb@north-eastham.org>
3 months agogeneric: 6.1: initial backport of at803x PHY driver cleanup
Christian Marangi [Mon, 15 Jan 2024 18:54:23 +0000 (19:54 +0100)]
generic: 6.1: initial backport of at803x PHY driver cleanup

Initial backport of at803x PHY driver cleanup. This is in preparation
for split and addition of new PHY Family based on at803x needed for
ipq807x and other IPQ Series SoC.

Other affected patch are automatically refreshed with
make target/linux/refresh

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
3 months agogeneric: 6.1: renumber MediaTek SGMII PCS patch
Christian Marangi [Mon, 15 Jan 2024 18:53:06 +0000 (19:53 +0100)]
generic: 6.1: renumber MediaTek SGMII PCS patch

Renumber MediaTek SGMII PCS patch to make space for upcoming at803x
backport patches.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
3 months agobase-files: functions.sh: prepend() always adds separator
Philip Prindeville [Mon, 1 Jan 2024 22:37:34 +0000 (15:37 -0700)]
base-files: functions.sh: prepend() always adds separator

It shouldn't gate on the value, since the value will ostensibly
always be set; instead it should depend on the variable being
prepended to being non-empty.

Fixes #14403

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
3 months agortl838x: debugfs use constants from mach-rtl83xx.h
Peter Körner [Tue, 19 Sep 2023 22:45:14 +0000 (00:45 +0200)]
rtl838x: debugfs use constants from mach-rtl83xx.h

The register constants were duplicated in net/dsa/rtl83xx/debugfs.c and asm
mach-rtl838x/mach-rtl83xx.h. This commit removes this duplication.

Signed-off-by: Peter Körner <git@mazdermind.de>
3 months agortl838x: fix RTL838X_LED_SW_CTRL definition
Peter Körner [Tue, 19 Sep 2023 22:44:39 +0000 (00:44 +0200)]
rtl838x: fix RTL838X_LED_SW_CTRL definition

According to https://svanheule.net/realtek/maple/register/led_sw_ctrl and also
drivers/net/dsa/rtl83xx/debugfs.c LED_SW_CTRL on the RTL838X should be 0xa00c
not 0x0128. Please note, that is is 0x0128 on the RTL8390/cypress SOC family.

Signed-off-by: Peter Körner <git@mazdermind.de>
3 months agortl931x: reformat broken indentation
Peter Körner [Tue, 19 Sep 2023 20:27:11 +0000 (22:27 +0200)]
rtl931x: reformat broken indentation

the given code-format did not correctly express the condition and made the code
harder to read then necessary.

Signed-off-by: Peter Körner <git@mazdermind.de>
3 months agogettext-full: use autoreconf host fixup
Alexander Egorenkov [Thu, 8 Jun 2023 06:34:13 +0000 (08:34 +0200)]
gettext-full: use autoreconf host fixup

To prevent use of host's library path on Void Linux:

   /usr/lib/libacl.so: file not recognized: file format not recognized
   collect2: error: ld returned 1 exit status
   libtool:   error: error: relink 'libgettextlib.la' with the above command before installing it

Signed-off-by: Alexander Egorenkov <egorenar-dev@posteo.net>
3 months agofstools: update to Git HEAD (2024-01-15)
Christian Marangi [Mon, 15 Jan 2024 16:31:47 +0000 (17:31 +0100)]
fstools: update to Git HEAD (2024-01-15)

325d63d67006 mount_root: fix compilation error for wrong condition

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
3 months agomediatek: GL-MT6000: Change LED colors
Thomas Schröder [Wed, 10 Jan 2024 10:12:10 +0000 (11:12 +0100)]
mediatek: GL-MT6000: Change LED colors

Fine tuning PR: openwrt/openwrt#14355 Ref: 5a82bb909bf1
("mediatek: GL-MT6000: Add missing LED state definitions")

As the only LED is using white in the stock firmware when the device is
running and blue for the bootloader I suggest following changes:
 - Using blue for the BL and preinit+failsafe
 - White for normal operation (like the original FW) and sysupgrade

With this changes it's clear by looking to the LED in which operation
mode the device is and a possible BL stuck can be seen easily.

Tested with [GL-MT6000](https://openwrt.org/toh/gl.inet/gl-mt6000).

Signed-off-by: Thomas Schröder <tschroeder_github@outlook.com>
Tested-by: Hannu Nyman <hannu.nyman@iki.fi>
3 months agoipq807x: prpl-haze: enable LED driver on device tree
CheWei Chien [Thu, 4 Jan 2024 10:09:06 +0000 (18:09 +0800)]
ipq807x: prpl-haze: enable LED driver on device tree

Enable LED driver LP5562 on HAZE device tree and include its kernel
module package on default package for HAZE.

Signed-off-by: CheWei Chien <chewei.chien@wnc.com.tw>
3 months agokernel: add kmod-leds-lp5562 and kmod-leds-lp55xx-common
CheWei Chien [Thu, 4 Jan 2024 05:28:40 +0000 (13:28 +0800)]
kernel: add kmod-leds-lp5562 and kmod-leds-lp55xx-common

Add kernel module for lp5562 LED driver.
The kmod-leds-lp5562 depends on kmod-leds-lp55xx-common.

Signed-off-by: CheWei Chien <chewei.chien@wnc.com.tw>
3 months agoipq806x: add support for Fortinet FAP-421E
JinGen Lim [Tue, 2 Jan 2024 16:54:52 +0000 (00:54 +0800)]
ipq806x: add support for Fortinet FAP-421E

Hardware
--------

SoC:    Qualcomm IPQ8064
RAM:    235MB
Flash:  128MB NAND (Micron MT29F1G08ABBDAH4)
        32MB SPI-NOR (Spansion FL256SAIFRO)
WLAN2:  Qualcomm Atheros QCA9980
WLAN5:  Qualcomm Atheros QCA9980
ETH:    LAN1 - Atheros AR8035
        LAN2 - Atheros AR8033
USB:    USB-A, 2.0
LED:    Power (yellow/amber)
        LAN1 (yellow/amber)
        LAN2 (yellow/amber)
        WLAN2G (yellow)
        WLAN5G (yellow)
BTN:    Reset
Serial: RJ45 Port (9600 8n1) Cisco console cable, TTL voltage

MAC Address:    LAN1 (label) at APPSBL partition
                LAN2: label + 1
                WLAN2: label + 8
                WLAN5: label + 16

Installation
------------

Connect to the RJ45 console (TTL)
Connect LAN1 to host, set host ip as 192.168.1.10
Start a tftp server to serve the initramfs image
Open console connection (9600n8)
Connect power through the DC jack

`Hit any key to stop autoboot:  5`: press any key
`Enter G,Q,or H:`: press `K` to access the hidden option
`Enter password:`: `fap22b1!$` to access a limited u-boot console
`(FAP) #`: `tftpboot your_initramfs_image_name.itb`
`(FAP) #`: `bootm`

Once OpenWrt has booted, install the firmware through sysupgrade

Signed-off-by: JinGen Lim <openwrt@sn.sg>
3 months agoipq807x: use devinfo MAC for Linksys MX4200
Paweł Owoc [Sat, 6 Jan 2024 16:05:40 +0000 (17:05 +0100)]
ipq807x: use devinfo MAC for Linksys MX4200

Some devices (MX42CF) have a wrong MAC address configuration. The correct one is located only on the devinfo partition.

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
3 months agoipq807x: fix whitespace usage
Paweł Owoc [Sat, 6 Jan 2024 15:46:30 +0000 (16:46 +0100)]
ipq807x: fix whitespace usage

Replace with tab and remove unused whitespaces

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
3 months agoimagebuilder: copy from buildroot only target/linux/generic and target/linux/<target...
a-gave [Thu, 11 Jan 2024 10:33:21 +0000 (11:33 +0100)]
imagebuilder: copy from buildroot only target/linux/generic and target/linux/<target> to reduce the size

This reduces the size of a single imagebuilder by about 40MB
In example for the target ath79 it would be the sum of generic and <target> directories, so about 16MB,
instead of the whole size of the target directory, about 53MB:
11M target/linux/generic/
3.9M target/linux/ath79/

Signed-off-by: a-gave <agave@dracaena.it>
3 months agobase-files: add support for rootfs mount options from cmdline
Christian Marangi [Sat, 16 Sep 2023 15:16:04 +0000 (17:16 +0200)]
base-files: add support for rootfs mount options from cmdline

Add support for configuring rootfs mount options from cmdline.

Rootfs mount options can be passed by declaring in the kernel
cmdline as much options as needed prefixed with "rootfs_mount_options."

An example usage is with rootfs with F2FS filesystem to enable
compress_algorithm to reduce flash wear by compressing the files before
writing to flash.

Example usage:
"... rootfs_mount_options.compress_algorithm=zstd ..."

To pass multiple options:
"... rootfs_mount_options.compress_algorithm=zstd rootfs_mount_options.noinline_data ..."

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
3 months agofstools: update to Git HEAD (2024-01-15)
Christian Marangi [Mon, 15 Jan 2024 15:37:11 +0000 (16:37 +0100)]
fstools: update to Git HEAD (2024-01-15)

97bacb70138a libfstools: query drivers by priority
41e619ed1352 block: recognize /dev/fit* block devices
bc3b8cdd3de3 libfstools: add uImage.FIT fitblk driver
846302d09246 libfstools: partname: raise priority to 25
1a5695925ecf mount_root: add support for passing args to mount_root start
1858a492c300 mount_root: permit to pass mount options for rootfs mount

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
3 months agomediatek: TOTOLINK A8000RU: add missing usb3 package
Chukun Pan [Sat, 23 Dec 2023 15:16:15 +0000 (23:16 +0800)]
mediatek: TOTOLINK A8000RU: add missing usb3 package

This device has a usb 3.0 port, so add it.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
3 months agomediatek: fixes typo for spi properties
Chukun Pan [Thu, 21 Dec 2023 15:16:08 +0000 (23:16 +0800)]
mediatek: fixes typo for spi properties

Same as commit 3674689, correct 'buswidth' to 'bus-width'.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
3 months agomediatek: YunCore AX835: convert to nvmem-layout
Chukun Pan [Tue, 9 Jan 2024 15:15:27 +0000 (23:15 +0800)]
mediatek: YunCore AX835: convert to nvmem-layout

The nvmem-cells is deprecated. Also simplify mac address settings.

Fixes: b4086f4 ("mediatek: add support for YunCore AX835")
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
3 months agomediatek: Cudy WR3000: simplify mac address setup
Chukun Pan [Wed, 20 Dec 2023 15:15:31 +0000 (23:15 +0800)]
mediatek: Cudy WR3000: simplify mac address setup

The mac address of the network port under the switch is
the same as the corresponding gmac by default, so there
is no need to repeat the setting. Compile test only.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
3 months agomediatek: Cetron CT3003: move mac address setup to dts
Chukun Pan [Tue, 19 Dec 2023 15:15:38 +0000 (23:15 +0800)]
mediatek: Cetron CT3003: move mac address setup to dts

It looks like we can put the mac address setting
into the device tree. Compile test only.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
3 months agomediatek: filogic: refresh kernel config
Chukun Pan [Mon, 18 Dec 2023 15:15:20 +0000 (23:15 +0800)]
mediatek: filogic: refresh kernel config

Refresh kernel config with 'make kernel_oldconfig'.
Also disable the useless rtl8367s gsw driver.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
3 months agomediatek: mt7622: refresh kernel config
Chukun Pan [Sun, 17 Dec 2023 15:15:08 +0000 (23:15 +0800)]
mediatek: mt7622: refresh kernel config

Refresh kernel config with 'make kernel_oldconfig'.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
3 months agorealtek: rtl838x: add Netgear GS110TUP v1 support
Jacob Potter [Sun, 24 Dec 2023 02:37:54 +0000 (21:37 -0500)]
realtek: rtl838x: add Netgear GS110TUP v1 support

The GS110TUP v1 is a managed switch similar to the GS110TPP v1, but with
port 10 as SFP instead of RJ-45 and a total budget of 240 watts. Ports
1-4 support 60-watt 802.3bt PoE and ports 5-8 support 30-watt 802.3at.

The flash layout of the two switches are identical, and the U-Boot
configurations are the same except for having a different magic number,
so installation can be done via the same U-Boot method.

The following command will be needed to enable the port LEDs as per
https://forum.openwrt.org/t/72510/51 :
    fw_setenv bootcmd "rtk network on; boota"

Additionally, port 9 (1000base-T from a separate QSGMII PHY) does not
function without this. Port 10 was not tested as no SFP module was
available.

Signed-off-by: Jacob Potter <jacob@j4cbo.com>
[rebase on merged flash layout]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
3 months agorealtek: rtl838x: join Netgear GSxxx flash layouts
Sander Vanheule [Sun, 7 Jan 2024 14:51:36 +0000 (15:51 +0100)]
realtek: rtl838x: join Netgear GSxxx flash layouts

Flash layouts for GS108Tv3, GS110TPPv1, GS308Tv1 and GS310TPv1 are
almost identical, except for the uimage header magic.

Move the flash layout to the common dtsi, and only place the magic value
in the device dts files.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
3 months agohostapd: add back missing function for updating wpa_supplicant macaddr list
Felix Fietkau [Sat, 13 Jan 2024 15:11:41 +0000 (16:11 +0100)]
hostapd: add back missing function for updating wpa_supplicant macaddr list

Make the call deferred instead of blocking to avoid deadlock issues

Fixes: 3df9322771cc ("hostapd: make ubus calls to wpa_supplicant asynchronous")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 months agohostapd: fix an exception in hostapd.uc on interface add failure
Felix Fietkau [Sat, 13 Jan 2024 14:22:27 +0000 (15:22 +0100)]
hostapd: fix an exception in hostapd.uc on interface add failure

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 months agoRevert "mac80211: rework interface setup, fix race condition"
Felix Fietkau [Sat, 13 Jan 2024 10:19:07 +0000 (11:19 +0100)]
Revert "mac80211: rework interface setup, fix race condition"

This reverts commit b7f9742da82fa9b122e8d63e48a9a5c0dec298f2.
There are several reports of regressions with this commit. Will be added
back once I've figured out and fixed the cause

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 months agomac80211: rework interface setup, fix race condition
Felix Fietkau [Tue, 14 Nov 2023 12:00:27 +0000 (13:00 +0100)]
mac80211: rework interface setup, fix race condition

Only tell netifd about vifs when the setup is complete and hostapd +
wpa_supplicant have been notified

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 months agomac80211.sh: fix deadlock on configuring multiple PHYs simultaneously
Felix Fietkau [Sun, 22 Oct 2023 16:00:08 +0000 (18:00 +0200)]
mac80211.sh: fix deadlock on configuring multiple PHYs simultaneously

When hitting a timing window where ubus configuration calls are hitting hostapd
and wpa_supplicant simultaneously, they can deadlock waiting for each other.
Fix this by using a lock around the ubus calls.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 months agoci: no longer require real name
Paul Spooren [Wed, 10 Jan 2024 16:21:01 +0000 (17:21 +0100)]
ci: no longer require real name

This goes in accordance with the Linux Kernel:

> using a known identity (sorry, no anonymous contributions.)

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?id=HEAD#n442

Signed-off-by: Paul Spooren <mail@aparcar.org>
4 months agohostapd: make ubus calls to wpa_supplicant asynchronous
Felix Fietkau [Thu, 11 Jan 2024 08:14:59 +0000 (09:14 +0100)]
hostapd: make ubus calls to wpa_supplicant asynchronous

This fixes a deadlock issue where depending on the setup order, hostapd and
wpa_supplicant could end up waiting for each other

Reported-by: Michael-cy Lee (李峻宇) <Michael-cy.Lee@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>