Commit graph

63549 commits

Author SHA1 Message Date
Christian Marangi
84927ebac6
mt76: update to Git HEAD (2025-10-03)
9ee788a38251 wifi: mt76: mt7996: fix null pointer deref in mt7996_conf_tx()
ec3f05480e5b tools: CMakeLists: update cmake minimum required version to 3.10

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 3531322a4a)
2025-11-19 13:54:15 +01:00
Pawel Dembicki
dbc2b142ce
mac80211: mwl8k: inject DSSS Parameter Set element into beacons if missing
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
Some Marvell AP firmware used with mwl8k misbehaves when beacons do not
contain the DSSS Parameter Set (WLAN_EID_DS_PARAMS) with the current
channel. When hostapd/mac80211 omits this element (which is valid on
some bands), the firmware may report bogus RX channel information and AP
mode becomes unusable.

Backport the upstream fix that ensures beacons always carry the DSSS
Parameter Set for mwl8k: when setting the beacon, detect if the element
is missing and inject it after SSID and Supported Rates (per spec
ordering). This mirrors behaviour in newer Marvell drivers and restores
stable operation.

Tested on Linksys EA4500 (88W8366).

Fixes: openwrt/openwrt#19088
Link: https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless.git/commit/?id=c4e1ac09ee1c750890e36cb1f841f25518f23589

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20757
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 38ed1510db)
[refreshed patches]
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20817
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-18 12:41:38 +01:00
Álvaro Fernández Rojas
4d1c1d7754 odhcpd: backport memleak fix from Git HEAD
Some checks failed
Build all core packages / Build all core packages for selected target (push) Has been cancelled
be7ca7c0792b config: fix memleak during odhcpd reload

https://github.com/openwrt/odhcpd/commit/be7ca7c0792b

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-11-14 23:02:27 +01:00
George Tsiamasiotis
58cde9ec22
scripts/patch-kernel.sh: do not try to check files after patch
Since we are not using patch -b, *.orig files are only created when
there are conflicts, or never according to posix patch.

As such, it doesn't really make sense to always delete *.orig files
presuming they are patch backups, even if they are patch backups.
Doing so is both deleting potentially useful information for failed
patch applications and creating hard to diagnose bugs [1].

In a similar vein, checking for *.rej files does not add any value
since we're already checking the patch command's return code.

[1]: https://github.com/openwrt/packages/issues/27485

Signed-off-by: George Tsiamasiotis <george@tsiamasiotis.gr>
Link: https://github.com/openwrt/openwrt/pull/20141
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 75ca6bafd6)
Link: https://github.com/openwrt/openwrt/pull/20742
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-12 12:09:43 +01:00
Ernestas Kulik
dddeea5e7f
scripts: feeds: Don’t hardcode IS_TTY
When building in environments that set IS_TTY, the feeds script does not
honor it and passes a hardcoded value to scan.mk, causing unwanted
control characters to appear in stdout.

This commit addresses the issue by checking IS_TTY and MAKE_TERMOUT
variables and uses their values if defined.

Closes #8039

Signed-off-by: Ernestas Kulik <ernestas.k@iconn-networks.com>
Link: https://github.com/openwrt/openwrt/pull/20743
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit fd7e43d429)
2025-11-12 12:06:51 +01:00
Christian Marangi
d804c3110b
airoha: backport patch fixing out of order DMA for ethernet driver
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Backport upstream patch fixing out of order DMA access for ethernet
driver. This is relevant in the context of QoS when packets doesn't
follow linear handling by QDMA HW.

(cherry picked from commit 3169ffa4c7)
[ fix conflict errors ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-12 10:13:26 +01:00
Shiji Yang
b01c68ddbd
ipq806x: migrate wifi configuration device paths for 6.12 kernel
Some checks failed
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Has been cancelled
The device tree PCIe host node names have been changed in the new
6.12 kernel[1]. Hence we have to update the wifi device path to
make sure it can work properly.

This script is based on:
target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/ieee80211/05-wifi-migrate

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.12.y&id=07299ba2e7d98045e6b522f7c5b97f402b15bc82
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18989
(cherry picked from commit ae70dbc267)

Backport the migration script that can also work backward, migrating
from 6.12 to 6.6. Like going from main/master to stable 24.10.
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Link: https://github.com/openwrt/openwrt/pull/20739
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-12 00:08:15 +01:00
Shiji Yang
42ca1612a2
base-files: introduce a function to get kernel version number
A new function "get_linux_version()" to normalize and print the
kernel version as an integer. In some migration scripts, it is
useful for checking the Linux kernel version.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/19172
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit a0fe3cfb62)
Link: https://github.com/openwrt/openwrt/pull/20739
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-12 00:08:14 +01:00
Christian Marangi
ae51d0098e
airoha: refresh kernel patches
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
After all the backports, automatically refresh all the patches for
Airoha target.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-10 18:29:44 +01:00
Christian Marangi
2d05923d2e
airona: an7583: fix typo for CONFIG_PHY_AIROHA_USB
KConfig flag have an extra whitespace for CONFIG_PHY_AIROHA_USB and
value is not ignored.

Drop the extra whitespace to correctly ignore the value on kernel
compilation.

Fixes: c5b12fc02a ("airoha: Introduce support for Airoha AN7583 SoC")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit eedc7b3b79)
2025-11-10 18:26:30 +01:00
Christian Marangi
81929a31af
airoha: replace PWM patch with upstream version
Replace Airoha AN7581 PWM patch with upstream version and add kernel
version tag.

(cherry picked from commit 2352de96c1)
[ fix conflict error ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-10 18:20:45 +01:00
Christian Marangi
b3e90139ce
airoha: backport minor fixes for NPU handling
Backport upstream minor fixed for NPU handling that might result in
kernel panic or handle leak.

(cherry picked from commit 83eacb6ab0)
[ fix conflict errors ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-10 18:20:45 +01:00
Lorenzo Bianconi
dcced671e2
airoha: Add missing board files for EN7581
Add missing leds and network board files for EN7581 SoC.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
[ drop reference to downstream 10g RFB board ]
Link: https://github.com/openwrt/openwrt/pull/20556
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 738eacb9a0)
2025-11-10 18:20:44 +01:00
Ziyang Huang
9d218f0853
airoha: adjust and default the loadaddr
Similar to e92b153e99 ("mediatek: introduce KERNEL_LOADADDR to Device/Default template"),
let's move the default loadaddr to Device/Default.

What's more, use 0x80200000 instead of the SDK default value 0x80088000
to avoid the following error which may overwrite TZ memory and cause crash:

    [    0.000000] [Firmware Bug]: Kernel image misaligned at boot, please fix your bootloader!
    [    0.000000] OF: reserved mem: Reserved memory: failed to reserve memory for node 'atf@80000000': base 0x0000000080000000, size 2 MiB

Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
[ fix spelling mistake ]
Link: https://github.com/openwrt/openwrt/pull/20470
(cherry picked from commit fed2d31343)
[ fix conflict error ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-10 18:20:44 +01:00
Christian Marangi
e905c45b05
airoha: an7581: enable USB node on eMMC RFB board
Enable USB node on eMMC RFB board and disable USB2 3.0 port to make the
3rd PCIe line correctly work.

This is needed to prevent the xHCI driver to mess with PCIe by
configuring the USB2 3.0 port. Port will still be detected but won't be
configureed by the driver and won't have PHY to configure for.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 6d51c80424)
2025-11-10 18:20:44 +01:00
Christian Marangi
b5a66740c2
airoha: an7581: correctly attach the USB2 PHY for 3rd PCIe line
The 3rd PCIe line use the USB2 serdes for PCIe operation. Correctly set
it to the DT node so that the mode can be correctly set in the PHY
driver.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 3ba92e0e32)
2025-11-10 18:20:44 +01:00
Christian Marangi
64ad16e3ed
airoha: an7581: add USB nodes
Add USB nodes to AN7581 DTSI, disabled by default.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 3db72b71d1)
2025-11-10 18:20:44 +01:00
Christian Marangi
9aeda89c05
airoha: add pending patch for USB support on AN7581
Add pending patch for USB support on AN7581 SoC. This is also required
to make operational the 3rd PCIe line that use the USB2 Serdes for PCIe
operations.

(cherry picked from commit 7afc2da3fc)
[ fix conflict errors, add missing Kconfig flag ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-10 18:20:40 +01:00
Christian Marangi
9097d73cbb
airoha: add nodes for 3rd PCIe line for AN7581
Some SoC might use the Serdes for the second USB port as a 3rd PCIe
line (with the SSTR register correctly setup).

Add the node for the 3rd PCIe card and enable for the eMMC RFB board.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 2fae199953)
2025-11-10 18:09:14 +01:00
Christian Marangi
7af48fdcd3
airoha: backport fix for Airoha offload support with airoha_hw_init fail
Backport a patch fixing a kernel panic on airoha_hw_init fail. This
should better handle scenario with NPU load Probe deferring.

(cherry picked from commit c3c75d0e68)
[ fix conflict error ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-10 18:09:14 +01:00
Christian Marangi
518f3c6171
airoha: backport cleanup patch for Airoha Ethernet driver
Backport cleanup patch for Airoha Ethernet patch to permit easier
backport in the future.

Automatically refresh all affected patch.

(cherry picked from commit 2f3ea18f91)
[ fix conflict errors, drop upstream patch ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-10 18:05:46 +01:00
Christian Marangi
9babe16bd2
airoha: an7581: add Aeonsemi AS21xxx PHY to RFB eMMC board
Airoha AN7581 eMMC RFB board mount 2 Aeonsemi AS21xxx PHY. One is
usually connected to GDM4 and the other is optionally connected to GDM2.
Add the relevant nodes to support the one connected to GDM4.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 26da4bf552)
2025-11-10 17:55:48 +01:00
Christian Marangi
fda425adf4
airoha: an7581: add BL2 and BL31+U-Boot Artifacts for RFB board
Pack the BL2 and BL31+U-Boot artifacts as Airoha AN7581 is currently
supported in upstream U-Boot and bootloader files can be used for
unfused boards.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 17cb69fe7f)
2025-11-10 17:55:41 +01:00
Christian Marangi
1f7de3311c
airoha: backport additional upstream patch for NPU support for AN7583
Backport additional patch required for NPU support of Airoha AN7583.
These are specific for the NPU module with some minor fixes and to adds
upport for loading the specific Airoha AN7583 NPU firmware.

(cherry picked from commit 8b4adfbb87)
[ fix conflict errors ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-10 17:54:54 +01:00
Christian Marangi
4391bf8729
airoha: an7583: add NPU nodes and enable kernel config
Add relevant nodes for NPU support for Airoha AN7583 and enable the
kernel config to enable support in the Airoha Ethernet driver.

NPU firmware is scheduled to be upstreamed to linux-firmware and will be
added once present upstream.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 8758b58f25)
2025-11-10 17:54:16 +01:00
Christian Marangi
ed8ba06ced
airoha: an7583: drop bootloader artifacts entry and add default pkg
Fix the current image Makefile for Airoha AN7583 by dropping the
artifacts entry for bootloader and add default PKG for the PHY mounted
on the RFB boards.

The artifacts for the bootloader will be readded later once ATF-A
support will be pushed mainline.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit a7964f0893)
2025-11-10 17:54:10 +01:00
Christian Marangi
89cee1bf3f
airoha: an7583: Add missing DTS for EMMC RFB board
While adding support for Airoha AN7583, it was forget to push the EMMC
DTS while defining the variant in the image Makefile.

Add the missing DTS to fix image creation error.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 6fe65d404b)
2025-11-10 17:54:03 +01:00
Christian Marangi
4d4fd4d125
airoha: an7583: add additional comments on EVB board
On the Airoha AN7583 EVB there are 2 Aeonsemi AS21xxx PHY but only the
one connected to Serdes Ethernet is usable as the other connected to
Serdes PON is not actually HW connected (as the serdes is connected to
the BOSA port)

Add comments and disable the relevant PHY.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit ea850b5a18)
2025-11-10 17:53:56 +01:00
Christian Marangi
262b537f48
airoha: backport upstream patch for AN7583 Ethernet support
Backport upstream patch for AN7583 Ethernet support. While at it also
backport some additional fixes required to apply the AN7583 patches
cleanly.

Refresh all affected patch automatically (aside from the XSI patch that
changed the implementation)

Link: https://github.com/openwrt/openwrt/pull/20489
(cherry picked from commit 46a454fb9b)
[ fix conflict errors ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-10 17:53:47 +01:00
Aleksander Jan Bajkowski
c56fbe156e
airoha: fix scuclk node for an7581
Add missing syscon compatible for scuclk node.
Fix the unit-address of the scuclk node.
This fixes the pcs driver error:

airoha-pcs 1fa08000.pcs: probe with driver airoha-pcs failed with error -22
airoha-pcs 1fa09000.pcs: probe with driver airoha-pcs failed with error -22

Fixes: c3d70b1 ("airoha: en7581: Add support for external PHY")
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Link: https://github.com/openwrt/openwrt/pull/20190
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit a30daf8a0b)
2025-11-10 17:48:34 +01:00
Chukun Pan
84944c0311
airoha: set default DEVICE_DTS/DEVICE_DTS_DIR
All devices under airoha use dts directory under the target,
so update the default DEVICE_DTS_DIR. Also set the default
DEVICE_DTS based on the SoC name for non-dev boards.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Link: https://github.com/openwrt/openwrt/pull/20190
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 866c4e5cdf)
2025-11-10 17:46:45 +01:00
Christian Marangi
0272d79e34
airoha: Introduce support for Airoha AN7583 SoC
Introduce initial support for Airoha AN7583 SoC and add all the required
patch for basic functionality of the SoC.

Airoha AN7583 is based on Airoha EN7581 SoC with some major changes on
the PHY handling and Serdes. It can be see as a lower spec of EN7581
with modern and simplified implementations.

All the patch are sent upstream and are pending revision. Support for
PCIe and USB will come later as soon as DT structure is accepted
upstream.

(cherry picked from commit c5b12fc02a)
[ fix conflict errors, add MDIO_AIROHA config ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-10 17:46:13 +01:00
Christian Marangi
1181c031a0
airoha: en7581: Add pending ASOC driver
Add pending ASOC driver for I2S sound support on Airoha EN7581 SoC.

(cherry picked from commit 14bc87cf76)
[ fix conflict error ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-10 17:37:04 +01:00
Christian Marangi
48ec8469fd
airoha: en7581: Add support for external PHY
This add a pending version of the Airoha PCS driver to add support for
External PHY. The Airoha PCS driver will receive some minor modification
once we the PCS subsystem will be defined upstream.

Add all the required node for GDM2 and GDM4 and enable the PCS config.

(cherry picked from commit c3d70b1ae5)
[ fix conflict error ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-10 17:36:25 +01:00
Aleksander Jan Bajkowski
8c5ad273b4
airoha: en7581: dts: fix typo "disable"
No functional changes intended.

Fixes warning:
/linux/arch/arm64/boot/dts/airoha/en7581-gemtek-w1700k.dtb: i2c1@1fbf8100 (mediatek,mt7621-i2c): status: 'oneOf' conditional failed, one must be fixed:
	['disable'] is not of type 'object'
	'disable' is not one of ['okay', 'disabled', 'reserved', 'fail', 'fail-needs-probe']
	from schema $id: http://devicetree.org/schemas/dt-core.yaml#

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/20131
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 3872e9d317)
2025-11-10 17:30:05 +01:00
Aleksander Jan Bajkowski
f364fe5e09
airoha: an7581: enable uart baudrate control
The baud rate control on Airoha does not function properly. This
patch enables the inactive code responsible for this. The UART2
baud rate is correct. HSUART3 operates at twice the requested
baud rate. The same problem exists in the current code, so this
doesn't introduce any regression. Support for baud rates higher
than 460800 is still required. This will be added in the future.

Tested on Gemtek W1700k. UART2 and HSUART3 are working fine.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/20049
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 440b85f5b1)
[ solve conflict error ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-10 17:30:05 +01:00
Christian Marangi
dc11868486
airoha: backport upstream fixes for pinctrl PHY LED and MDIO
Backport fixes for Airoha pinctrl driver for PHY LED and MDIO bus. This
fix a copy-paste error for PHY LED and a misconfiguration for MT7530
embedded Switch MDIO bus GPIO pin to permit usage of external PHYs.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 35ff70e807)
2025-11-10 17:30:05 +01:00
Christian Marangi
6a7b16e616
airoha: add NPU and reserved memory node for AN7581
Add the NPU and reserved memory node for AN7581 dtsi since it's not
supported.

Link: https://github.com/openwrt/openwrt/pull/19816
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 3dca527e6d)
2025-11-10 17:30:05 +01:00
Christian Marangi
671f4d53ac
airoha: major backport of Airoha Ethernet driver feature support
Major backport of upstream patch for support of multiple feature of the
Airoha Ethernet driver.

Feature backported are TSO, Jumbo packet, Offload and initial Wlan
Offload support.

Link: https://github.com/openwrt/openwrt/pull/19816
(cherry picked from commit 9d3009f426)
[ add missing kconfig flag ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-10 17:29:48 +01:00
Christian Marangi
bac7ee02f9
airoha: backport trivial fixes for pinctrl and ethernet driver
Backport trivial fixes from upstream related to pinctrl and ethernet
driver.

Link: https://github.com/openwrt/openwrt/pull/19816
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 354d7472d5)
2025-11-10 17:24:44 +01:00
Christian Marangi
3b1fc6661a
airoha: backport patch adding support for AN7581 Ethernet PHY
Backport patch adding support for AN7581 Ethernet PHY based on the same
Mediatek embedded Switch PHY.

Link: https://github.com/openwrt/openwrt/pull/19816
(cherry picked from commit 0adaeff5ee)
[ rework backported patch ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-10 17:24:10 +01:00
Christian Marangi
a6e8cbdf53
airoha: replace thermal patch with upstream version
Replace thermal patch with upstream version. The thermal maintainer
reported that the sysfs entry are considered deprecated and that slope
and offset should be handled internally to the driver.

Link: https://github.com/openwrt/openwrt/pull/19816
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit a713260966)
2025-11-10 17:11:10 +01:00
Tianling Shen
a167e68c76 mediatek: add Konka KOMI A31 support
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
This board is also as known as E-Life ETR631-T/ETR635-U.

Hardware specification:
  SoC: MediaTek MT7981B 2x A53
  Flash: 128 MB SPI-NAND
  RAM: 256MB DDR3
  Ethernet: 4x 10/100/1000 Mbps
  Switch: MediaTek MT7531AE
  WiFi: MediaTek MT7976C
  Button: Reset, Mesh
  Power: DC 12V 1A

Gain telnet access:
1. Login into web interface, and download the configuration.
2. Uncompress the configuration:
     * Enter fakeroot if you are not login as root.
   tar -zxf <filename>.tar.gz
3. Edit 'etc/passwd', remove root password: 'root::1:0:99999:7:::'.
4. Edit 'etc/rc.local', insert telnetd command before 'exit 0':
   ( sleep 3s; telnetd; ) &
5. Repack the configuration:
   tar -zcf backup.tar.gz etc/
6. Upload new configuration via web interface, now you can connect to
   KOMI A31 via telnet.

Flash instructions:
1. Connect to KOMI A31, backup everything, especially 'Factory' part.
2. Write new BL2:
   mtd write openwrt-mediatek-filogic-konka_komi-a31-preloader.bin BL2
3. Write new FIP:
   mtd write openwrt-mediatek-filogic-konka_komi-a31-bl31-uboot.fip FIP
4. Set static IP on your PC:
   IP 192.168.1.254/24, GW 192.168.1.1
5. Serve OpenWrt initramfs image using TFTP server.
6. Cut off the power and re-engage, wait for TFTP recovery to complete.
7. After OpenWrt has booted, perform sysupgrade.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/20357
(cherry picked from commit 8a7de107d8)
[rebase uboot patches upon 24.10 branch]
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/20595
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-09 14:42:06 +01:00
Luis Mita
d414ed185e ramips: mt76x8: add support for Cudy RE1200 Outdoor v1
Hardware:
 - SoC: MediaTek MT7628DAN
 - Flash: 8 MiB XMC 25QH64CHIQ
 - RAM: 64 MiB (integrated on SoC)
 - WLAN: 2.4 GHz (MT7603E, 11n), 5 GHz (MediaTek MT7613BEN, 11ac)
 - Ethernet: 1x10/100 Mbps LAN
 - Buttons: 1 Reset button, 1 WPS button
 - LEDs: 5x Green
 - Serial Console: unpopulated header 115200 8n1
 - Power: 24v Passive POE

MAC addresses:
+---------+-------------------+-----------+
|         | MAC               | Algorithm |
+---------+-------------------+-----------+
| LAN     | 80:af:ca:xx:xx:x0 | label     |
| WLAN 2g | 80:af:ca:xx:xx:x0 | label     |
| WLAN 5g | 80:af:ca:xx:xx:x2 | +2        |
+---------+-------------------+-----------+

Installation:
Please check the Wiki for this device for a more convenient solution than the one below.

1. Disassemble the device, desolder and dump the flash chip with a SPI programmer.
2. Separate the partitions with dd:

dd if=spi_dump.bin of=u-boot.bin     bs=1  skip=0        count=196608  status=progress
dd if=spi_dump.bin of=u-boot-env.bin bs=1  skip=196608   count=65536   status=progress
dd if=spi_dump.bin of=factory.bin    bs=1  skip=262144   count=65536   status=progress
dd if=spi_dump.bin of=firmware.bin   bs=1  skip=327680   count=7995392 status=progress
dd if=spi_dump.bin of=bdinfo.bin     bs=1  skip=8323072   count=65536   status=progress

3. Download the sysupgrade firmware at openwrt.bin.
4. The firmware size should be 7995392 bytes. Fix the size of your firmware putting zeros to the end, with:

truncate -s 7995392 firmware.bin

5. Combine all the parititions:

cat u-boot.bin u-boot-env.bin factory.bin openwrt.bin bdinfo.bin > spi_new.bin

6. Erase and flash the SPI chip with the new file. Solder the chip and boot the router.

Signed-off-by: Luis Mita <luis@luismita.com>
Link: https://github.com/openwrt/openwrt/pull/20381
(cherry picked from commit 65215e6d46)
Link: https://github.com/openwrt/openwrt/pull/20463
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-09 14:39:45 +01:00
Tianling Shen
c3b4e8e531 rockchip: add Lunzn FastRhino R66S support
Hardware
--------
RockChip RK3568 ARM64 (4 cores)
1/2GB LPDDR4 RAM
2x 2500 Base-T (PCIe, r8125b)
1 LED (Power)
1 Button (Reset)
Micro-SD Slot
2x USB 3.0 Port
12V DC Jack

Installation
------------
Uncompress the OpenWrt sysupgrade and write it to a micro SD card using
dd.

Tested-by: Francisco G Luna <frangonlun@gmail.com>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/19990
(cherry picked from commit d76a774270)
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/20618
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-09 14:36:56 +01:00
Tianling Shen
32a2193a48 uboot-rockchip: add Fastrhino R66S support
Add support for the Lunzn FastRhino R66S board.

Tested-by: Francisco G Luna <frangonlun@gmail.com>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/19990
(cherry picked from commit 678536740e)
[rebase patches upon 24.10 branch]
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/20618
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-09 14:36:56 +01:00
Shiji Yang
a902c0d020 ramips: dts: increase maximum MMC clock frequency
The High-Speed SD mode stability issue should have been fixed.
Increase the MMC max-frequency to improve the IO speed. We can
still use the sysfs to limit the clock frequency, e.g.

root@OpenWrt:~# echo 25000000 > /sys/kernel/debug/mmc0/clock

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18896
(cherry picked from commit 143cfd6113)
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/20258
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-09 14:26:35 +01:00
Shiji Yang
43c1a0440f ramips: mtk-sd: stability improvements for MIPS mt762x SoCs
* Add tuning parameters to improve the stability of 48~50 MHz
  High-Speed SD mode.

* Fix I/O errors on EMMC mode by disabling unsupported auto CMD23
  feature.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18896
(cherry picked from commit 3f78e5c918)
[removed kernel 6.12 patches]
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/20258
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-09 14:26:34 +01:00
Shiji Yang
0be05cdf72 ramips: mtk-sd: backport Host Software Queue support
This new feature has some improvements for random RW performance.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18896
(cherry picked from commit db76fe6a02)
[removed kernel 6.12 patches]
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/20258
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-09 14:26:34 +01:00
Shiji Yang
0ed371472c ramips: mtk-mmc: fix data timeout value
The MT7628 programing guide shows that the correct DTOC unit is
1048576 clocks instead of 65536 clocks. This value is also used
by linux upstream mtk-sd driver. Correct the DTOC register and
also round up its value.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18896
(cherry picked from commit e69c867cdf)
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/20258
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-09 14:26:34 +01:00