Commit Graph

67140 Commits

Author SHA1 Message Date
Tianling Shen
d886b0a8eb
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2025-01-02 17:37:14 +08:00
Sander Vanheule
d5f01971f7 realtek: drop extraneous ')' in 02_network
The extraneous closing parenthesis inside the case matching breaks
syntax of the network initialization script 02_network.

/bin/board_detect: /etc/board.d/02_network:
    line 40: syntax error: unexpected newline (expecting ")")

Remove this character so board init is functional again.

Fixes: c8ea1aa970 ("realtek: add support for HPE 1920-24G-PoE-370w")
Signed-off-by: Sander Vanheule <sander@svanheule.net>
(cherry picked from commit a3391d871d)
2025-01-02 09:46:10 +01:00
Jonathan Sturges
36f7db978a ramips: mt7621: enable lzma-loader for Amped Wireless ALLY
Switch to using loader-kernel to accommodate
larger image sizes that are problematic for
many mt7621 uboots.

Signed-off-by: Jonathan Sturges <jsturges@redhat.com>
Link: https://github.com/openwrt/openwrt/pull/17389
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit f8a8a2c5c7)
2025-01-01 23:14:31 +01:00
Chukun Pan
f91d8e9f37 trusted-firmware-a.mk: fix release download URL
The URL of trusted-firmware-a is no longer available for
downloading release:
https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/
curl: (22) The requested URL returned error: 401 Unauthorized

So we switch to the GitHub mirror repository to download.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Link: https://github.com/openwrt/openwrt/pull/17360
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 4b6eb631e1)
2025-01-01 23:14:31 +01:00
George Oldfort
b80de63e9f mediatek: filogic: add KTD2026/7 driver to Acer Connect Vero W6m
This commit adds kmod-leds-ktd202x to the OpenWrt image for the device
"Acer Connect Vero W6m" which is equipped with one KTD2026 controlling the
device's status LED via I2C.

Signed-off-by: George Oldfort <openwrt@10099.de>
Link: https://github.com/openwrt/openwrt/pull/16860
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit e44180d45c)
2025-01-01 23:14:31 +01:00
Álvaro Fernández Rojas
35e02b31c0 generic: add missing CONFIG_LEDS_KTD202X symbol
Commit 56d97fff55 backported leds-ktd202x from upstream but didn't add the
generic config symbol.

Fixes: 56d97fff55 ("generic: backport support for KTD2026/7 rgb(w) led controller")
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17396
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit c846f48f6a)
2025-01-01 23:14:31 +01:00
George Oldfort
a9ddc7432a generic: backport support for KTD2026/7 rgb(w) led controller
This commit adds the Linux kernel mainline driver "leds-ktd202x" for the
KinetIC KTD2026 and KTD2027 RGB/RBGW controller with I2C interface that was
introduced in kernel version 6.7, last changed in mainline on 2024-05-31.

At least the Acer Connect Vero W6m (a variant of the Acer Predator Connect
W6 without 2.5G eth1 port, usb3 port, and the 6 on-board gpio RGB LEDs) is
equipped with a KTD2026 (and a single RGB LED attached to it used by the
stock firmware as status LED), and maybe other router devices also are.

Signed-off-by: George Oldfort <openwrt@10099.de>
Link: https://github.com/openwrt/openwrt/pull/16860
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 56d97fff55)
2025-01-01 23:14:31 +01:00
Roland Reinl
812046971e mediatek: Fix primary MAC of D-Link M60
During port to gluon, I saw that the primary mac is not correct. Updated DTS accordingly.

Signed-off-by: Roland Reinl <reinlroland+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17429
(cherry picked from commit 616621120b)
Link: https://github.com/openwrt/openwrt/pull/17449
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-01-01 22:43:26 +01:00
James Sweeney
a2b1aaee80 realtek: add support for HPE 1920-24G PoE-180W (JG925A)
Hardware information: (largely copied from 11275be)
---------------------

The HPE 1920-24G-PoE+ (180W) (JG925A) is a switch that is
part of the 1920 family which has 180W nominal PoE+ support.

Common with HPE 1920-24G:
- RTL8382 SoC
- 24 Gigabit RJ45 ports (built-in RTL8218B, 2 external RTL8218D)
- 4 SFP ports (external RTL8214FC)
- RJ45 RS232 port on front panel
- 32 MiB NOR Flash
- 128 MiB DDR3 DRAM
- PT7A7514 watchdog

HPE 1920-24G-PoE+ (180W):
- PoE chip
- 2 fans (40mm)

Known issues:
---------------------
- PoE LEDs are uncontrolled.

(Manual taken from f2f09bc)
Booting initramfs image:
------------------------

- Prepare a FTP or TFTP server serving the OpenWrt initramfs image and
connect the server to a switch port.

- Connect to the console port of the device and enter the extended
boot menu by typing Ctrl+B when prompted.

- Choose the menu option "<3> Enter Ethernet SubMenu".

- Set network parameters via the option "<5> Modify Ethernet Parameter".
Enter the FTP/TFTP filename as "Load File Name" ("Target File Name"
can be left blank, it is not required for booting from RAM). Note that
the configuration is saved on flash, so it only needs to be done once.

- Select "<1> Download Application Program To SDRAM And Run".

Initial installation:
---------------------

- Boot an initramfs image as described above, then use sysupgrade to
install OpenWrt permanently. After initial installation, the
bootloader needs to be configured to load the correct image file

- Enter the extended boot menu again and choose "<4> File Control",
then select "<2> Set Application File type".

- Enter the number of the file "openwrt-kernel.bin" (should be 1), and
use the option "<1> +Main" to select it as boot image.

- Choose "<0> Exit To Main Menu" and then "<1> Boot System".

NOTE: The bootloader on these devices can only boot from the VFS
filesystem which normally spans most of the flash. With OpenWrt, only
the first part of the firmware partition contains a valid filesystem,
the rest is used for rootfs. As the bootloader does not know about this,
you must not do any file operations in the bootloader, as this may
corrupt the OpenWrt installation (selecting the boot image is an
exception, as it only stores a flag in the bootloader data, but doesn't
write to the filesystem).

Example PoE config file (/etc/config/poe):
---------------------
config global
        option budget   '180'

config port
        option enable   '1'
        option id       '1'
        option name     'lan8'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '2'
        option name     'lan7'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '3'
        option name     'lan6'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '4'
        option name     'lan5'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '5'
        option name     'lan4'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '6'
        option name     'lan3'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '7'
        option name     'lan2'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '8'
        option name     'lan1'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '9'
        option name     'lan16'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '10'
        option name     'lan15'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '11'
        option name     'lan14'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '12'
        option name     'lan13'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '13'
        option name     'lan12'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '14'
        option name     'lan11'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '15'
        option name     'lan10'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '16'
        option name     'lan9'
        option poe_plus '1'
        option priority '2'

config port
        option enable   '1'
        option id       '17'
        option name     'lan24'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '18'
        option name     'lan23'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '19'
        option name     'lan22'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '20'
        option name     'lan21'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '21'
        option name     'lan20'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '22'
        option name     'lan19'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '23'
        option name     'lan18'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '24'
        option name     'lan17'
        option poe_plus '1'
        option priority '2'

Signed-off-by: James Sweeney <code@swny.io>
Link: https://github.com/openwrt/openwrt/pull/17444
Signed-off-by: Sander Vanheule <sander@svanheule.net>
(cherry picked from commit b948c1e39b)
2025-01-01 22:38:11 +01:00
Tony Ambardar
32981677bd tools/dwarves: update to v1.28
Update to the latest upstream version and refresh local patches.

Release Notes: https://lore.kernel.org/bpf/Z1RcnB8WD8wZphcr@x1/

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/17404
(cherry picked from commit 45187cbad0)
Link: https://github.com/openwrt/openwrt/pull/17418
Signed-off-by: Nick Hainke <vincent@systemli.org>
2025-01-01 21:19:24 +01:00
Tony Ambardar
7a0b76cf0f bpftool: Update to v7.5.0
Update to the latest upstream release to include recent improvements and
bugfixes, and simplify use of PKG_SOURCE_VERSION.

This version supports BPF objects of either endianness, allowing for
introspection, linking and skeleton creation, and enables cross-compiling
modern BPF applications for targets with non-native byteorder.

Link: https://github.com/libbpf/bpftool/releases/tag/v7.5.0
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/17404
(cherry picked from commit 5bcad34154)
Link: https://github.com/openwrt/openwrt/pull/17418
Signed-off-by: Nick Hainke <vincent@systemli.org>
2025-01-01 21:19:19 +01:00
Tony Ambardar
b66773aac3 libbpf: Update to v1.5.0
Update to the latest upstream release to include recent improvements and
bugfixes, including support for handling BPF objects of either endianness.

Link: https://github.com/libbpf/libbpf/releases/tag/v1.5.0
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/17404
(cherry picked from commit 6a6ae41d4b)
Link: https://github.com/openwrt/openwrt/pull/17418
Signed-off-by: Nick Hainke <vincent@systemli.org>
2025-01-01 21:19:05 +01:00
Tianling Shen
9c204d7dff
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2025-01-01 14:01:45 +08:00
Evan Jobling
11275bec82 realtek: add support for HPE 1920-24G-PoE-370w
Hardware information:
---------------------

The HPE 1920-24G-PoE+ (370W) (JG926A) is a switch that is
part of the 1920 family wich 370W nominal PoE+ support.

Common with HPE 1920-24G:
  - RTL8382 SoC
  - 24 Gigabit RJ45 ports (built-in RTL8218B, 2 external RTL8218D)
  - 4 SFP ports (external RTL8214FC)
  - RJ45 RS232 port on front panel
  - 32 MiB NOR Flash
  - 128 MiB DDR3 DRAM
  - PT7A7514 watchdog

HPE 1920-24G-PoE+ (370W):
  - PoE chip
  - 3 fans (40mm)

Known issues:
---------------------
- PoE LEDs are uncontrolled.

(Manual taken from f2f09bc)
Booting initramfs image:
------------------------

- Prepare a FTP or TFTP server serving the OpenWrt initramfs image and
  connect the server to a switch port.

- Connect to the console port of the device and enter the extended
  boot menu by typing Ctrl+B when prompted.

- Choose the menu option "<3> Enter Ethernet SubMenu".

- Set network parameters via the option "<5> Modify Ethernet Parameter".
  Enter the FTP/TFTP filename as "Load File Name" ("Target File Name"
  can be left blank, it is not required for booting from RAM). Note that
  the configuration is saved on flash, so it only needs to be done once.

- Select "<1> Download Application Program To SDRAM And Run".

Initial installation:
---------------------

- Boot an initramfs image as described above, then use sysupgrade to
  install OpenWrt permanently. After initial installation, the
  bootloader needs to be configured to load the correct image file

- Enter the extended boot menu again and choose "<4> File Control",
  then select "<2> Set Application File type".

- Enter the number of the file "openwrt-kernel.bin" (should be 1), and
  use the option "<1> +Main" to select it as boot image.

- Choose "<0> Exit To Main Menu" and then "<1> Boot System".

NOTE: The bootloader on these devices can only boot from the VFS
filesystem which normally spans most of the flash. With OpenWrt, only
the first part of the firmware partition contains a valid filesystem,
the rest is used for rootfs. As the bootloader does not know about this,
you must not do any file operations in the bootloader, as this may
corrupt the OpenWrt installation (selecting the boot image is an
exception, as it only stores a flag in the bootloader data, but doesn't
write to the filesystem).

Example PoE config file (/etc/config/poe):
---------------------
config global
        option budget   '370'

config port
        option enable   '1'
        option id       '1'
        option name     'lan8'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '2'
        option name     'lan7'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '3'
        option name     'lan6'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '4'
        option name     'lan5'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '5'
        option name     'lan4'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '6'
        option name     'lan3'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '7'
        option name     'lan2'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '8'
        option name     'lan1'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '9'
        option name     'lan16'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '10'
        option name     'lan15'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '11'
        option name     'lan14'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '12'
        option name     'lan13'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '13'
        option name     'lan12'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '14'
        option name     'lan11'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '15'
        option name     'lan10'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '16'
        option name     'lan9'
        option poe_plus '1'
        option priority '2'

config port
        option enable   '1'
        option id       '17'
        option name     'lan24'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '18'
        option name     'lan23'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '19'
        option name     'lan22'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '20'
        option name     'lan21'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '21'
        option name     'lan20'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '22'
        option name     'lan19'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '23'
        option name     'lan18'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '24'
        option name     'lan17'
        option poe_plus '1'
        option priority '2'

Signed-off-by: Evan Jobling <evan.jobling@mslsc.com.au>
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Link: https://github.com/openwrt/openwrt/pull/17436
[fix space indentation in DTS]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
(cherry picked from commit c8ea1aa970)
2024-12-31 08:43:19 +01:00
Evan Jobling
1f94fa16d8 realtek: rtl838x: refactor hpe_1920-24g dts
The HPE JG924A, JG925A and JG926A share the same base.
Prepare base device for adding the PoE enabled switch support.

Signed-off-by: Evan Jobling <evan.jobling@mslsc.com.au>
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Link: https://github.com/openwrt/openwrt/pull/17436
Signed-off-by: Sander Vanheule <sander@svanheule.net>
(cherry picked from commit 41b49a157a)
2024-12-31 08:43:19 +01:00
John Audia
67e070c11b kernel: bump 6.6 to 6.6.68
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.68

All patches automatically rebased.

Build system: x86/64
Build-tested: flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64
Run-tested: flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/17394
Signed-off-by: Nick Hainke <vincent@systemli.org>
(cherry picked from commit 1aae1dfaf2)
2024-12-30 20:21:40 +01:00
Tianling Shen
190da4f2c5
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-12-30 15:35:12 +08:00
Robert Marko
1eff737906 ipq40xx: orbi: add ethernet0 alias
Netgear Orbi devices rely on ethernet0 alias to be present to U-Boot will
populate the MAC.

This fixes the random MAC on each boot after the ethernet0 alias was
dropped from the SoC DTSI.

Fixes: cd9c721124 ("ipq40xx: 6.1: use latest DSA and ethernet patches")
Fixes: #17384
Link: https://github.com/openwrt/openwrt/pull/17414
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 9ea174c7bf)
2024-12-29 10:04:51 +01:00
Felix Fietkau
9a0a05d52a busybox: fix LTO compiler flags
When doing LTO builds, the target related CFLAGS need to be passed to the
linker, so that they are considered for target code generation.
Pass TARGET_CFLAGS in EXTRA_LDFLAGS to ensure that this is handled properly.

Fixes: #17200
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit e6ce868c3a)
2024-12-28 22:50:04 +01:00
Álvaro Fernández Rojas
dad450b115 bcm27xx-utils: update to latest version
Full changelog: raspberrypi/utils@6a2a6be...0c02957

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 80189a0350)
2024-12-28 18:51:38 +01:00
Álvaro Fernández Rojas
d1dd5b2301 bcm27xx-gpu-fw: update to v1.20241126
Full changelog: https://github.com/raspberrypi/firmware/compare/1.20241008...1.20241126

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 5bc2d3267d)
2024-12-28 18:51:22 +01:00
Kyle Hendry
684223c4a4 bmips: pinctrl-bcm63268: add gpio function
Right now there's no way to know what state CFE will leave the pinctrl
registers in, so they should be explicitly set by linux on boot. This
patch adds a gpio configuration for drivers that need it, i.e. gpio-leds.

Signed-off-by: Kyle Hendry <kylehendrydev@gmail.com>
[improve patch and fix warnings]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit e44daa4fa5)
2024-12-28 18:07:41 +01:00
Álvaro Fernández Rojas
4b4f319931 Revert "bmips: drop macronix nand block protection patch"
This reverts commit 15b21c474e.

The issue seems to appear spuriously.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 84ca1c28f7)
2024-12-28 16:04:01 +01:00
Álvaro Fernández Rojas
3a5584e0df bcm27xx: pull 6.6 patches from RPi repo
Adds latest 6.6 patches from the Raspberry Pi repository.

These patches were generated from:
https://github.com/raspberrypi/linux/commits/rpi-6.6.y/
With the following command:
git format-patch -N v6.6.67..HEAD
(HEAD -> 811ff707533bcd67cdcd368bbd46223082009b12)

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 692205305d)
2024-12-28 14:11:52 +01:00
John Audia
cccc7651ec bcm27xx/bcm2712: add RP1 drivers via kmods
Add kmods for the following RP1 options that not all users
will necessarily need or want compiled in:
* Composite video
* Display video
* LED control
* PWM control
* Serial video

Build system: x86/64
Build-tested: bcm2712/RPi5B
Run-tested: bcm2712/RPi5B

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/17233
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit d6c5805db3)
2024-12-28 14:11:52 +01:00
John Audia
17752bd9ce kernel: bcm27xx/bcm2712: add RP1 functionality
Build in several options RP1-specific features rather than
generating additional kmods for them since bcm2712 is unique to
RPi5B only.

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/17233
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 87309edba4)
2024-12-28 14:11:52 +01:00
John Audia
f4c5d0e77e bcm27xx: patches: cherry-pick for RP1 kmods
Cherry-pick patches to support building RP1 modules.

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/17233
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 613dd79d5e)
2024-12-28 14:11:52 +01:00
Álvaro Fernández Rojas
3ca3ee6012 bmips: drop macronix nand block protection patch
MX30LFxG18AC OTP area access has been fixed upstream:
e87161321a

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 15b21c474e)
2024-12-28 12:22:40 +01:00
Antonio Pastor
76a546a83a kernel: generic: patch: 802.2+LLC - set transport_header offset
Conversion to DSA broke 802.2+LLC+SNAP packet processing. Frames
received by napi_complete_done with GRO and DSA have transport_header
set two bytes short, or pointing 2 bytes before network_header &
skb->data. As snap_rcv expects transport_header to point to SNAP
header (OID:PID) after LLC processing advances offset over LLC header
(llc_rcv & llc_fixup_skb), code doesn't find a match and packet is
dropped.

Image built at this commit operates properly:
  86dadeba48 - generic: add patch for GPON-ONU-34-20BI quirk
Image built at following commit exhibits the issue:
  337e36e0ef - ipq806x: convert each device to DSA implementation

As issue is LLC specific, to avoid impacting non-LLC traffic, and to
follow up on original assumption made on kernel commit fda55eca5a33
("net: introduce skb_transport_header_was_set()") stating "network
stacks usually reset the transport header anyway", llc_fixup_skb to
reset and advance the offset. llc_fixup_skb already assumes the LLC
header is at skb->data, and by definition SNAP header immediately
follows.

Signed-off-by: Antonio Pastor <antonio.pastor@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17220
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit da7ab64f1f)
2024-12-28 11:18:36 +01:00
Fabian Groffen
5b4a081f47 octeon: add kmod-usb-dwc3-octeon to DEFAULT_PACKAGES
Since 24.10.0 the Linux kernel needs this to enable the USB stack on
Cavium Octeon platforms with DesignWare Core USB3 IP.

Issue: https://github.com/openwrt/openwrt/issues/17195
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Link: https://github.com/openwrt/openwrt/pull/17393
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 0cba20f082)
2024-12-28 10:38:11 +01:00
Fabian Groffen
47e3413f6b kernel: add kmod-usb-dwc3-octeon
Since 24.10.0, Linux 6.6 is used which includes a reorganisation of
Octeon DWC3 glue code.
https://lore.kernel.org/all/ZJC3LLpUlatnLdnv@lenoch/

As a result, Octeon devices using this, such as EdgeRouter 4 have a no
longer functioning USB stack.

Build kmod-usb-dwc3-octeon for Cavium Octeon targets.

Issue: https://github.com/openwrt/openwrt/issues/17195
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Link: https://github.com/openwrt/openwrt/pull/17393
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 9adcf61abb)
2024-12-28 10:38:02 +01:00
Joel Low
7cbaa9e81f netfilter: fix bogus reference to kmod-nf-conntrack-timeout
Fix bogus reference to kmod-nf-conntrack-timeout, fixing the warning
`WARNING: Makefile 'package/kernel/linux/Makefile' has a dependency on
'kmod-nf-conntrack-timeout', which does not exist`.

Fixes: 0e2dcfc4f4 ("netfilter: add kmod-nfnetlink-ct{helper,timeout}")
Signed-off-by: Joel Low <joel@joelsplace.sg>
Link: https://github.com/openwrt/openwrt/pull/17388
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 74354fb463)
2024-12-27 16:11:08 +01:00
Richard Schneidt
90f84a22b0 mvebu: fix Linksys power LED
Kernel 6.6 requires LED node names to be prefixed via "led-", otherwise
probing the LED will fail, so update our downstream patch adding the LED.

Signed-off-by: Richard Schneidt <ricsc@users.noreply.github.com>
Link: https://github.com/openwrt/openwrt/pull/17330
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit f491001f0c)
2024-12-27 16:09:20 +01:00
Tianling Shen
dbcf763194
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-12-27 13:31:34 +08:00
Rany Hany
4cc1da1e44 hostapd: add SAE support for wifi-station and optimize PSK file creation
Regarding SAE support in wifi-station:

Important Note: Unlike PSK wifi-stations, both `mac` and `key` options are required
to make it work. With PSK, hostapd used to perform a brute-force match to find which
PSK entry to use, but with SAE this is infeasible due to SAE's design.

When `mac` is omitted, it will allow any MAC address to use the SAE password if it
didn't have a MAC address assigned to it, but this could only be done once.
The last wildcard entry would be used.

Also, unlike "hostapd: add support for SAE in PPSK option" (commit 913368a),
it is not required to set `sae_pwe` to `0`. This gives it a slight advantage
over using PPSK that goes beyond not needing RADIUS.

Example Configuration:

```
config wifi-vlan
        option iface default_radio0
        option name 999
        option vid 999
        option network management

config wifi-station
        # Allow user with MAC address 00:11:22:33:44:55 and matching
        # key "secretadminpass" to access the management network.
        option iface default_radio0
        option vid 999
        option mac '00:11:22:33:44:55'
        option key secretadminpass

config wifi-vlan
        option iface default_radio0
        option name 100
        option vid 100
        option network guest

config wifi-station
        # With SAE, when 'mac' is omitted it will be the fallback in case no
        # other MAC address matches. It won't be possible for a user that
        # has a matching MAC to use this network (i.e., 00:11:22:33:44:55
        # in this example).
        option iface default_radio0
        option vid 100
        option key guestpass
```

Regarding PSK file creation optimization:

This patch now conditionally runs `hostapd_set_psk_file` depending on `auth_type`.
Previously, `hostapd_set_psk` would always execute `hostapd_set_psk_file`, which
would create a new file if `wifi-station` was in use even if PSK was not enabled.
This change checks the `auth_type` to ensure that it is appropriate to parse the
`wifi-station` entries and create those files.

Furthermore, we now only configure `wpa_psk_file` when it is a supported option
(i.e., psk or psk-sae is used). Previously, we used to configure it when it was
not necessary. While it didn't cause any issues, it would litter `/var/run` with
unnecessary files. This patch fixes that case by configuring it depending on the
`auth_type`.

The new SAE support is aligned with these PSK file changes.

Signed-off-by: Rany Hany <rany_hany@riseup.net>
Link: https://github.com/openwrt/openwrt/pull/17145
Signed-off-by: John Crispin <john@phrozen.org>
(cherry picked from commit 65a1c666f2)
Link: https://github.com/openwrt/openwrt/pull/17248
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-12-26 14:53:05 +01:00
Edward Chow
db0300cb1b ath79: port buffalo WZR-450HP2 from ar71xx
Referencing commit a1837135e0

Hardware
--------
SoC:	Qualcomm Atheros QCA9558
RAM:	128M DDR2 (Nanya NT5TU64M16HG-AC)
FLASH:	128M SPI-NAND (Spansion S34ML01G100TFI00)
WLAN:	QCA9558 3T3R 802.11 bgn
ETH:	Qualcomm Atheros QCA8337
UART:	115200 8n1
BUTTON:	Reset - WPS - "Router" switch
LED:	2x system-LED, 2x wlan-LED, 1x internet-LED,
	2x routing-LED
	LEDs besides the ethernet ports are controlled
	by the ethernet switch

MAC Address:
 use		address(sample 1)	source
 label		cc:e1:d5:xx:xx:ed	art@macaddr_wan
 lan		cc:e1:d5:xx:xx:ec	art@macaddr_lan
 wan		cc:e1:d5:xx:xx:ed	$label
 WiFi4_2G	cc:e1:d5:xx:xx:ec	art@cal_ath9k

Installation from Serial Console
------------

1. Connect to the serial console. Power up the device and interrupt
   autoboot when prompted

2. Connect a TFTP server reachable at 192.168.11.10/24
   to the ethernet port. Serve the OpenWrt initramfs image as
   "openwrt.bin"

3. Boot the initramfs image using U-Boot
   ath> tftpboot 0x84000000 openwrt.bin
   ath> bootm 0x84000000

4. Copy the OpenWrt sysupgrade image to the device using scp and
   install it like a normal upgrade (with no need to keeping config
   since no config from "previous OpenWRT installation" could be kept
   at all)

   # sysupgrade -n /path/to/openwrt/sysupgrade.bin

Installation from Web Interface
------------

To flash just do a firmware upgrade from the stock firmware (Buffalo
branded dd-wrt) with squashfs-factory.bin

Signed-off-by: Edward Chow <equu@openmail.cc>
Link: https://github.com/openwrt/openwrt/pull/17227
(cherry picked from commit 42254d3f5f)
Link: https://github.com/openwrt/openwrt/pull/17359
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-12-26 14:26:18 +01:00
Roland Reinl
7271ee587c mediatek: filogic: Add support for D-Link AQUILA PRO AI M60
Specification:
 - MT7986 CPU using 2.4GHz and 5GHz WiFi (both AX)
 - MT7531 switch
 - 512MB RAM
 - 128MB NAND flash (MX35LF1GE4AB-Z4I) with two UBI partitions with identical size
 - 1 multi color LED (red, green, blue, white) connected via GCA230718 (Same as D-Link M30 A1)
 - 3 buttons (WPS, reset, LED on/off)
 - 1x 2.5 Gbit WAN port with Maxlinear GPY211C
 - 4x 1 Gbit LAN ports

Disassembly:
 - There are five screws at the bottom: 2 under the rubber feet, 3 under the label.
 - After removing the screws, the white plastic part can be shifted out of the blue part.
 - Be careful because the antennas are mounted on the side and the top of the white part.

Serial Interface
 - The serial interface can be connected to the 4 pin holes next to/under the antenna cables.
 - Note that there is another set of 4 pin holes on the side of the board, it's not used.
 - Pins (from front to rear):
   - 3.3V (do not connect)
   - TX
   - RX
   - GND
 - Settings: 115200, 8N1

MAC addresses:
 - MAC address is stored in partition "Odm" at offset 0x81 (for example XX:XX:XX:XX:XX:52)
 - MAC address on the device label is ODM + 1 (for example XX:XX:XX:XX:XX:53)
 - WAN MAC is the one from the ODM partition (for example XX:XX:XX:XX:XX:52)
 - LAN MAC is the one from the ODM partition + 1 (for example XX:XX:XX:XX:XX:53)
 - WLAN MAC (2.4 GHz) is the one from the ODM partition + 2 (for example (XX:XX:XX:XX:XX:54)
 - WLAN MAC (5 GHz) is the one from the ODM partition + 5 (for example (XX:XX:XX:XX:XX:57)

Flashing via OEM web interface:
 - Currently not supported because image crypto is not known

Flashing via recovery web interface:
 - This is only working if the first partition is active because recovery images are always flashed to the active partition and OpenWrt can only be executed from the first partition
 - Use a Chromium based browser, otherwise firmware upgrade might not work
 - Recovery web interface is accessible via 192.168.200.1 after keeping the reset button pressed during start of the device until the LED blinks red
 - Upload the recovery image, this will take some time. LED will continue flashing red during the update process
 - The after flashing, the recovery web interface redirects to http://192.168.0.1. This can be ignored. OpenWrt is accessible via 192.168.1.1 after flashing
 - If the first partition isn't the active partition, OpenWrt will hang during the boot process. In this case:
   - Download the recovery image from https://github.com/RolandoMagico/openwrt/releases/tag/M60-Recovery-UBI-Switch (UBI switch image)
   - Enable recovery web interface again and load the UBI switch image. This image works on the second partition of the M60
   - OpenWrt should boot now as expected. After booting, flash the normal OpenWrt sysupgrade image (for example in the OpenWrt web interface)
   - Flashing a sysupgrade image from the UBI switch image will make the first partition the active partition and from now on, default OpenWrt images can be used

Flashing via Initramfs:
- Before switching to OpenWrt, ensure that both partitions contain OEM firmware.
  - This can be achieved by re-flashing the same OEM firmware version again via the OEM web interface.
  - Flashing via OEM web interface will automatically flash the currently not active partition.
- Open router, connect serial interface
- Start a TFTP server at 192.168.200.2 and provide the initramfs image there
- When starting the router, select "7. Load Image" in U-Boot
- Settings for load address, load method can be kept as they are
- Specify host and router IP address if you use different ones than the default (Router 192.168.200.1, TFTP server 192.168.200.2)
- Enter the file name of the initramfs image
- Confirm "Run loaded data now?" question after loading the image with "Y"
- OpenWrt initramfs will start now
- Before flashing OpenWrt, create a backup of the "ubi" partition. It is required when reverting back to OEM
- Flash sysupgrade image to flash, during flashing the U-Boot variable sw_tryactive will be set to 0
  - During next boot, U-Boot tries to boot from the ubi partition. If it fails, it will switch to the ubi1 partition

Reverting back to OEM:
- Boot the initramfs image as described in "Flashing via Initramfs" above
- Copy the backed up ubi partition to /tmp (e.g. by using SCP)
- Write the backup to the UBI partition: mtd write /tmp/OpenWrt.mtd4.ubi.bin /dev/mtd4
- Reboot the device, OEM firmware will start now

Signed-off-by: Roland Reinl <reinlroland+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17296
(cherry picked from commit b3ce08e0b6)
Link: https://github.com/openwrt/openwrt/pull/17363
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-12-26 14:22:21 +01:00
Joel Low
5829178074 netfilter: add kmod-nfnetlink-ct{helper,timeout}
Add kmod-nfnetlink-ct{helper,timeout} to allow handling firewall rules
in userspace (together with conntrackd). The timeout module allows
specifying custom expiration rules.

Signed-off-by: Joel Low <joel@joelsplace.sg>
Link: https://github.com/openwrt/openwrt/pull/17267
(cherry picked from commit 0e2dcfc4f4)
Link: https://github.com/openwrt/openwrt/pull/17358
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-12-26 14:17:18 +01:00
Tianling Shen
d9bbed6507 mediatek: update openembed som7981 support
The board has been redesigned due to previous hardware bugs
(with other reasons maybe).

Changes in new board:
- Added a gpio beeper
- Added a Atmel i2c eeprom
- Added a Atmel i2c ECC accelerator
- Added a Philips RTC module
- Added two RS485
- Removed WPS button
- Replaced USB3 port with M.2 B-key for LTE modules
- Swapped GbE LEDs gpio

Also assigned wifi mac with nvmem binding, added iface setup for failsafe,
increased phy assert time for rtl8221b, and updated LED labels.

Keeping compatibility for old version is not necessary here as only
few samples were sent to those interested in it.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/17253
(cherry picked from commit 5a7fb834c7)
Link: https://github.com/openwrt/openwrt/pull/17348
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-12-26 14:13:35 +01:00
Tianling Shen
48f9284232 kernel: crypto: add atmel i2c hw accelerator support
Add support for Microchip / Atmel ECC/SHA/RNG hw accelerator.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/17253
(cherry picked from commit 9d434a8abf)
Link: https://github.com/openwrt/openwrt/pull/17348
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-12-26 14:13:35 +01:00
Hauke Mehrtens
738c9e5286 yafut: Mark as nonshared
This package is depending on @NAND_SUPPORT which is only set for some
targets. Mark it nonshared to build it in the target build process.

Fixes: https://github.com/openwrt/openwrt/issues/14714
Link: https://github.com/openwrt/openwrt/pull/17379
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit d275bcc4bb)
2024-12-26 14:09:55 +01:00
Tianling Shen
25f2b3ec79
rockchip: add MMBOX ANAS3035 support
Hardware
--------
RockChip RK3568 ARM64 (4 cores)
4GB LPDDR4X RAM
2x 2500 Base-T (PCIe, rtl8125b)
4x LEDs (POWER / SATA1 / SATA2 / SATA3)
32GB eMMC on-board
Micro-SD Slot
HDMI OUT
2x USB 2.0 Port
3x SATA Slot
DC Jack 12V

Installation
------------
Uncompress the ImmortalWrt sysupgrade and write it to a micro SD card or
internal eMMC using dd.

Signed-off-by: Tianling Shen <i@cnsztl.eu.org>
(cherry picked from commit 934bf398be)
2024-12-26 18:06:35 +08:00
Tianling Shen
35fba462e0
ImmortalWrt v24.10.0-rc3: revert to branch defaults
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-12-26 16:04:32 +08:00
Tianling Shen
415304139d
ImmortalWrt v24.10.0-rc3: adjust config defaults
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-12-26 16:04:31 +08:00
Tianling Shen
afde822cf7
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-12-26 16:02:55 +08:00
David Bentham
55d1fe4aa6 mediatek: add Comfast CF-E395AX support by adding an alternative model name
both these devices share the board and same config, just different model number

Install instructions are the same as the CF-E393AX commit - https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=d8f4453bf2de9fd9baf3d660ed12e0797ff2cfdb

Signed-off-by: David Bentham <db260179@gmail.com>

Link: https://github.com/openwrt/openwrt/pull/16389
Signed-off-by: John Crispin <john@phrozen.org>
(cherry picked from commit 794291bbdf)
2024-12-26 00:57:01 +01:00
Kyle Hendry
45bf30e062 bmips: dts: fix pinctrl error
The kernel logs the error "bcm6368_nand 10000200.nand: there is not valid
maps for state default" on boot and all nand pins show as UNCLAIMED in
sysfs pinmux-pins.

bcm6362.dtsi, bcm6368.dtsi and bcm63268.dtsi use the undocumented property
group which the driver doesn't understand. This has been documented upstream
in commit caf963efd4b0b9ff42ca12e52b8efe277264d35b.

Replacing group with pins allows the nand pins to be properly configured.

Signed-off-by: Kyle Hendry <kylehendrydev@gmail.com>
[add bcm636/bcm6368 and fix commit title]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit d1e9c50d06)
2024-12-24 11:25:39 +01:00
Sander Vanheule
ec49df8692 realtek: generate compat_version 2.0 for GS1900
The GS1900 images have been updated to have a larger firmware partition,
bumping the compatibility version to 2.0. However, since this version is
generated on first boot and the default was used, these images still
advertised 1.0 after a fresh install.

Add a new uci-defaults script that will generate the correct version for
all affected Zyxel GS1900 devices.

Fixes: 35acdbe909 ("realtek: merge Zyxel GS1900 firmware partitions")
Signed-off-by: Sander Vanheule <sander@svanheule.net>
(cherry picked from commit a25809a474)
2024-12-24 11:18:27 +01:00
Tianling Shen
b939c8122c
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-12-24 16:06:00 +08:00
Tianling Shen
d036b42dd9 uboot-rockchip: fix build with swig 4.3.0
Fixes the following error by backporting upstream update:
```
scripts/dtc/pylibfdt/libfdt_wrap.c: In function ‘_wrap_fdt_next_node’:
scripts/dtc/pylibfdt/libfdt_wrap.c:5581:17: error: too few arguments to function ‘SWIG_Python_AppendOutput’
 5581 |     resultobj = SWIG_Python_AppendOutput(resultobj, val);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~
```

Fixes: https://github.com/openwrt/openwrt/issues/17345
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/17352
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 4e68103c4e)
2024-12-23 21:26:47 +01:00