openwrt/staging/neocturne.git
5 months agotoolchain/musl: add support for renameat2()
Tony Ambardar [Wed, 12 Jun 2024 05:30:48 +0000 (22:30 -0700)]
toolchain/musl: add support for renameat2()

Backport an upstream patch to support the renameat2 syscall, added in Linux
3.15 and supported by glibc since 2.28. It is commonly used in filesystem
or security contexts, and needed building upstream kernel bpf selftests.

Link:
https://inbox.vuxu.org/musl/20240421153640.379015-1-Tony.Ambardar@gmail.com/

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15697
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agoqualcommax: ipq807x: wax620 and wax630: fix wifi mac address
Kristian Skramstad [Fri, 31 May 2024 04:15:10 +0000 (06:15 +0200)]
qualcommax: ipq807x: wax620 and wax630: fix wifi mac address

The wifi radios on wax620 and wax630 got a random mac
address on boot. So fix this by using ath11k_patch_mac
and give a static mac address from label-mac-device.

Tested and working on wax620 and wax630.

Signed-off-by: Kristian Skramstad <kristian+github@83.no>
Link: https://github.com/openwrt/openwrt/pull/15597
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoocteontx: drop target
Robert Marko [Tue, 11 Jun 2024 12:31:43 +0000 (14:31 +0200)]
octeontx: drop target

octeontx is currently stuck on kernel 5.15 since using 6.1 breaks booting,
and unfortunately nobody has stepped up to fix this issue.

Gateworks who were primary users have supported the removal.

Link: https://github.com/openwrt/openwrt/pull/15686
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agotoplevel.mk: make sure tmp exist for .packagedynamicdefault
Christian Marangi [Wed, 12 Jun 2024 13:55:17 +0000 (15:55 +0200)]
toplevel.mk: make sure tmp exist for .packagedynamicdefault

With some big corner case, tmp directory might not exist when
check-dynamic-def-pkg is called. To handle this, make sure tmp exist
before creating the .packagedynamicdefault file.

Fixes: 9a52ec4fa092 ("toplevel.mk: implement logic to invalidate targetinfo with some config")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agotools: tar: backport patch for paxlib shipped in tar
Christian Marangi [Wed, 12 Jun 2024 13:11:48 +0000 (15:11 +0200)]
tools: tar: backport patch for paxlib shipped in tar

Tar 1.34 ship an old version of paxlib with rtapelib.c that produce some
compilation warning. This library got updated in 1.35 but we still can't
use the new Tar version.

GCC 14 then made these compilarion warning errors.

Manually backport the fixes to rtapelib.c and patch the version shipped
in 1.34 to fix these compilation warning.

Fixes: #15692
Fixes: 2951e0a80e9f ("tools: tar: backport patches fixing broken --delete")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agoipq40xx: fix invalid GPIO numbers since kernel 6.6
Koen Vandeputte [Wed, 12 Jun 2024 12:15:45 +0000 (14:15 +0200)]
ipq40xx: fix invalid GPIO numbers since kernel 6.6

The bump to kernel 6.6 increased the GPIO base from
412 to 512 on this target.

We need to compensate for that in the GPIO numbers being passed
to uci to fix following kernel report:

[   24.176183] export_store: invalid GPIO 423

Tested on a Wallys DR40x9 board.

Please note that:

Boards "rtl30vw" and "wpj428" are not being altered here.
They define GPIO numbers which are even below the previous
base of 412 which looks wrong.
Actual testing on these boards should be conducted to validate
and optionally fix GPIO numbering.

Suggested-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
5 months agobase-files: Reapply fixed "Ignore exit code of uci.sh inclusion"
Paul Spooren [Mon, 10 Jun 2024 14:59:41 +0000 (16:59 +0200)]
base-files: Reapply fixed "Ignore exit code of uci.sh inclusion"

This reverts commit 80d1c353b79e6c216dcb2534420470e3e6ed5d60 with the
fix which won't break running systems. A logic error on how shell
handles && and || more the init process.

Signed-off-by: Paul Spooren <mail@aparcar.org>
5 months agoapk: host: make the help available
Petr Štetiar [Mon, 10 Jun 2024 09:43:23 +0000 (09:43 +0000)]
apk: host: make the help available

Currently, the apk utility lacks accessible help documentation, making
it cumbersome for human users:

 apk-tools 3.0.0_pre20240519, compiled for x86_64.

 ERROR: This apk-tools has been built without help

This absence of help forces users to delve into the apk's build
directory to understand its functionality. To enhance usability, we will
enable the help feature for the host build. The host environment can
accommodate the 3% increase in binary size for the added convenience.

On Ubuntu 22.04, x86_64 platform, the apk size increases by 17,816 bytes
(from 594,144 to 611,960 bytes), a 2.99% increase. This is a reasonable
trade-off for improved ergonomics.

Additionally fix the Lua host build dependency as apk-tools uses during
the build Lua to convert SCDOC manpages to apk-tools help messages.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Link: https://github.com/openwrt/openwrt/pull/15543
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agoconfig: imply apk-mbedtls with USE_APK
Christian Marangi [Thu, 6 Jun 2024 17:16:55 +0000 (19:16 +0200)]
config: imply apk-mbedtls with USE_APK

On top of the fixup to select apk-mbedtls when USE_APK is enabled from a
new config, also imply the package when enabling the config to catch
.config that are already init.

(Having both opkg and apk installed in a system is not a problem but if
USE_APK is used, APK presence in the system is mandatory)

Link: https://github.com/openwrt/openwrt/pull/15543
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agoapk: limit CONFIG_IPK_FILES_CHECKSUMS config to OPKG
Christian Marangi [Sun, 26 May 2024 17:54:29 +0000 (19:54 +0200)]
apk: limit CONFIG_IPK_FILES_CHECKSUMS config to OPKG

Limit CONFIG_IPK_FILES_CHECKSUMS config to OPKG as APK have different
way to validate package integrity (apk audit)

Link: https://github.com/openwrt/openwrt/pull/15543
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agobase-files: skip fix-group-user uci-default for APK installation
Christian Marangi [Sun, 26 May 2024 17:30:32 +0000 (19:30 +0200)]
base-files: skip fix-group-user uci-default for APK installation

For APK installation we don't have /usr/lib/opkg/info and user fixup are
handled dirrectly. Skip the script in such case.

Also remove this uci-defaults if we have CONFIG_USE_APK enabled.

Link: https://github.com/openwrt/openwrt/pull/15543
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agodropbear: don't install /usr/lib/opkg/info in package install
Christian Marangi [Sun, 26 May 2024 17:28:46 +0000 (19:28 +0200)]
dropbear: don't install /usr/lib/opkg/info in package install

Don't install /usr/lib/opkg/info in package install as it doesn't make
sense and conflicts with APK installations.

Fixes: a377aa9ab534 ("add dropkey ssh keys and config files to the conffiles section (#2014)")
Link: https://github.com/openwrt/openwrt/pull/15543
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agoapk: provide csum for static conffiles
Christian Marangi [Sat, 25 May 2024 14:00:27 +0000 (16:00 +0200)]
apk: provide csum for static conffiles

For non-overlay configuration we need checksum for config file that
weren't modified by the user. For OPKG in sysupgrade we check the status
file for the Conffiles: entry of every package. this entry contains
checksum for every static file that the package contains.

Provide the same info for APK by creating a conffiles_static file and
parse this file on sysupgrade for non-overlay configurations.

This is also used by the sysupgrade -u option to exclude non-changed
files from the final backup.

Link: https://github.com/openwrt/openwrt/pull/15543
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agotoplevel.mk: implement logic to invalidate targetinfo with some config
Christian Marangi [Fri, 24 May 2024 18:13:49 +0000 (20:13 +0200)]
toplevel.mk: implement logic to invalidate targetinfo with some config

Implement some logic to invalidate targetinfo files in tmp with the
changing of some config.

Some config might affect DEFAULT_PACKAGES list but DEFAULT_PACKAGES is
only evaluated once. This cause the interesting scenario where someone
install feeds packages, targetinfo is evaluated in tmp and then add some
config like CONFIG_USE_APK. Using make defconfig will still select OPKG
as default package as DEFAULT_PACKAGES in targetinfo has been already
evaluated in the feeds install and is never updated.

To handle this add some logic in toplevel.mk to cache the current state
of these special config and wipe targetinfo when these change.

This cause the targetinfo to be reevaluated and handle this REALLY
corner case.

Link: https://github.com/openwrt/openwrt/pull/15543
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agotarget.mk: add support to early scan of default package configuration
Christian Marangi [Fri, 24 May 2024 10:49:15 +0000 (12:49 +0200)]
target.mk: add support to early scan of default package configuration

There is currently a problem with how some option that modify default
package configuration are parsed.

When the DEFAULT_PACKAGES list is composed, DUMP is used. Using DUMP
disable the loading of .config to remove and modification done by the
user to prevent any kind of conflict or strange thing one creating all
the info for each target. Because of this, .config is never parsed and
any check to CONFIG doesn't work (for the first creation of .config).

Later image build will check what is set in .config and the default
package list won't be parsed anymore.

This is problematic for some config that are OK to parse, for example
SELINUX or USE_APK.

To better handle them add some logic when DUMP is used to selectively
parse these option if present in a to-be-init .config so that option are
correctly parsed and DEFAULT_PACKAGES is correctly set.

Link: https://github.com/openwrt/openwrt/pull/15543
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agotarget: install apk-mbedtls by default
Paul Spooren [Thu, 23 May 2024 22:08:56 +0000 (00:08 +0200)]
target: install apk-mbedtls by default

since the split of APK in mbedtls and openssl version, installing `apk`
as default package doesn't do the trick anymore. Instead specify
`apk-mbedtls` directly.

Signed-off-by: Paul Spooren <mail@aparcar.org>
Link: https://github.com/openwrt/openwrt/pull/15543
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agotools: tar: backport patches fixing broken --delete
Christian Marangi [Thu, 23 May 2024 17:02:41 +0000 (19:02 +0200)]
tools: tar: backport patches fixing broken --delete

In experimenting with --delete for APK handling, it was discovered that
--delete is broken and corrupts the TAR in some case.

This is fixed in version 1.35 but 1.35 introduce some problem with MacOS
making it difficult to bump. Backport the 2 required patches to fix this
problem so --delete is usable again.

Link: https://github.com/openwrt/openwrt/pull/15543
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agobuild: package: fix missing host apk dependency
Petr Štetiar [Thu, 23 May 2024 10:24:11 +0000 (10:24 +0000)]
build: package: fix missing host apk dependency

Currently the build with USE_APK=y fails in package/libs/toolchain:

 staging_dir/host/bin/fakeroot: line 182: staging_dir/host/bin/apk: No such file or directory
 make[2]: *** [Makefile:758: bin/targets/mediatek/filogic/packages/libgcc1-13.2.0-r4.apk] Error 127

as commit d788ab376f ("build: add APK package build capabilities") added
dependency on apk in packaging step, but there is no host build
dependency defined, thus apk binary is missing when libgcc1 apk package is being
created. So lets fix it by adding explicit apk/host dependency to all
targets in the subdirectories.

Fixes: d788ab376f ("build: add APK package build capabilities")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
[ rework logic to be more self contained ]
Link: https://github.com/openwrt/openwrt/pull/15543
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agoinclude/package-pack: add special handling for CONTROL conffiles
Christian Marangi [Wed, 22 May 2024 17:35:35 +0000 (19:35 +0200)]
include/package-pack: add special handling for CONTROL conffiles

Add special handling for CONTROL conffiles. Some packages (base-files)
manually append stuff to the CONTROL directory.

The CONTROL directory is something for OPKG that is added in the root of
the ipkg directory and usually contains postinst, list, and conffiles
file. For APK the implementation is different, to keep compatibility
with this and maybe other packages, apply manual fixup and check for
these corner case.

Also check if the CONTROL directory is present and is empty to make sure
we don't drop other special file while removing any pending CONTROL
directory in the ipkg directory.

Link: https://github.com/openwrt/openwrt/pull/15543
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agoinclude/package-pack: remove APK files before building package
Christian Marangi [Wed, 22 May 2024 17:33:52 +0000 (19:33 +0200)]
include/package-pack: remove APK files before building package

As done for OPKG, correctly remove APK files before building package to
make sure we don't work on dirty files.

Link: https://github.com/openwrt/openwrt/pull/15543
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agoinclude/rootfs: improve readability of OPKG status fixup block
Christian Marangi [Tue, 11 Jun 2024 11:03:17 +0000 (13:03 +0200)]
include/rootfs: improve readability of OPKG status fixup block

Improve readability of OPKG status fixup block.

Link: https://github.com/openwrt/openwrt/pull/15543
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agoinclude/rootfs: rework handling of post-install scripts for APK
Christian Marangi [Wed, 22 May 2024 17:29:32 +0000 (19:29 +0200)]
include/rootfs: rework handling of post-install scripts for APK

Rework handling of post-install scripts for APK. As we do with OPKG,
lets just iterate between each post-install package so we can actually
check if something fail in applying them.

To do this we first extract each .post-install script in APK
scripts.tar.

Also remove these files from final image as they are needed only for the
first installation of the packages.

Link: https://github.com/openwrt/openwrt/pull/15543
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agoyafut: update to fix basename() issue
Robert Marko [Tue, 11 Jun 2024 12:08:58 +0000 (14:08 +0200)]
yafut: update to fix basename() issue

Since musl 1.2.5 update yafut would throw a warning about implicit
declaration of basename() but would still somehow compile.
However, trying to use it on a device will cause it to instantly
Segmentation fault.

So, to fix this lets update to the current upstream repository version
that has removed the use of basename() completely.

Link: https://github.com/openwrt/openwrt/pull/15685
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agomt76: mt7996: select required kernel and hostap options
Daniel Golle [Mon, 10 Jun 2024 22:39:36 +0000 (23:39 +0100)]
mt76: mt7996: select required kernel and hostap options

Select DRIVER_11AX_SUPPORT and KERNEL_RELAY also for kmod-mt7996 to
prevent build failure if only this driver is selected during build and
end up with (most) required hostap features (IEEE 802.11be rates are not
yet supported).

Reported-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 months agoramips: add support for 7Links WLR-1240
Sebastian Schaper [Mon, 20 May 2024 21:44:30 +0000 (23:44 +0200)]
ramips: add support for 7Links WLR-1240

The WLR-1240 (ZX-5434) is an AC1200 Wave 2 outdoor repeater
with omnidirectional antennas for wall or pole mounting.
The device is manufactured by Todaair and meant to be used with
a tuya-based app, there is no webinterface for configuration.

Specifications:
- MT7628AN, 8 MiB SPI NOR flash, 64 MiB RAM, 2x2 802.11n
- MT7613 2x2 802.11ac Wave 2
- 802.3af PoE or 12V 1A 5.5x2.1 power supply (included)
- top RGB LED ring

TFTP installation:
- rename sysupgrade to `firmware_auto.bin`
- provide at 192.168.1.10 during boot

HTTP installation:
- keep reset button pressed for 5 seconds during power on (light blue
  LED flashes slowly, then quickly to confirm, then remains steady on)
- recovery web interface is at 192.168.1.1, upload sysupgrade

Opening the device
- use suction cup to remove top cap within LED ring
- two screws are located in holes underneath silicone sealant
- two further screws are located at the bottom

initramfs boot
- open device, connect serial console (pins are labelled)
- keep pressing `4` during second tftp attempt to enter uboot shell
- run `tftpboot 82000000` to avoid memory overlap, then `bootm`

Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
5 months agoramips: add support for 7Links WLR-1230
Sebastian Schaper [Mon, 20 May 2024 21:43:09 +0000 (23:43 +0200)]
ramips: add support for 7Links WLR-1230

The WLR-1230 (ZX-5207) is an AC1200 Wave 2 outdoor repeater
with sector antennas for wall or pole mounting.
The device is manufactured by Todaair and meant to be used with
a tuya-based app, there is no webinterface for configuration.

Specifications:
- MT7628AN, 8 MiB SPI NOR flash, 64 MiB RAM, 2x2 802.11n
- MT7613 2x2 802.11ac Wave 2
- 802.3af PoE or 12V 1A 5.5x2.1 power supply (included)
- 3 LEDs WLAN, LAN, RES; PWR LED is not software-controllable

TFTP installation:
- rename sysupgrade to `firmware_auto.bin`
- provide at 192.168.1.10 during boot

HTTP installation:
- keep reset button pressed for 5 seconds during power on (LEDs
  flash slowly, then quickly to confirm, then remain steady on)
- recovery web interface is at 192.168.1.1, upload sysupgrade

Opening the device
- two screws are located in the bottom left and right corners
  underneath the label, inner tray slides out easily

initramfs boot
- open device, connect serial console (pins are labelled)
- keep pressing `4` during second tftp attempt to enter uboot shell
- run `tftpboot 82000000` to avoid memory overlap, then `bootm`

Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
5 months agokernel: modules: netdevice: remove kmod-of-mdio dependency for kmod-stmmac-core
Florian Eckert [Mon, 10 Jun 2024 08:52:52 +0000 (10:52 +0200)]
kernel: modules: netdevice: remove kmod-of-mdio dependency for kmod-stmmac-core

The 'kmod-stmmac-core' package is referenced by the following packages:
* kmod-dwmac-intel
* kmod-dwmac-imx
* kmod-dwmac-sun8i

The problem is that 'kmod-of-mdio' is not selectable for 'TARGET_x86'.
That means the package 'kmod-dwmac-intel' is not available on this
architecture and so the package 'kmod-dwmac-intel' could not be enabled.

To fix this remove the dependencies 'kmod-of-mdio' from 'kmod-stmmac-core'.
This is not needed on this level, because the modules 'kmod-of-mdio' is
already selected by the packages 'kmod-dwmac-imx' and 'kmod-dwmac-sun8i'.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
5 months agotools/ccache: update to 4.10.0
Nick Hainke [Mon, 10 Jun 2024 10:31:49 +0000 (12:31 +0200)]
tools/ccache: update to 4.10.0

Release Notes:
https://ccache.dev/releasenotes.html#_ccache_4_10

Refresh patch:
- 100-honour-copts.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
5 months agomediatek: Ruijie RG-X60 Pro: Add kmod-mt7915e
Hauke Mehrtens [Sun, 9 Jun 2024 13:16:22 +0000 (15:16 +0200)]
mediatek: Ruijie RG-X60 Pro: Add kmod-mt7915e

Add the kmod-mt7915e wifi driver to the default packages for the Ruijie
RG-X60 Pro. kmod-mt7915e has to be added recently and was not done
before merging the support for Ruijie RG-X60 Pro.

Fixes: 3de3c2bdfa6b ("mediatek: add support for Ruijie RG-X60 Pro")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 months agotools/findutils: update to 4.10.0
Nick Hainke [Mon, 10 Jun 2024 08:30:49 +0000 (10:30 +0200)]
tools/findutils: update to 4.10.0

Release Notes:
https://savannah.gnu.org/news/?id=10638

Remove upstreamed patch:
- 010-endpwent.patch [0]

[0] - https://github.com/jamesyoungman/findutils/commit/fa7e628e19c75a3650b9010a37f3388758245b68

Signed-off-by: Nick Hainke <vincent@systemli.org>
5 months agoramips: mt76x8: sync Cudy TR1200 v1 naming
Luis Mita [Thu, 6 Jun 2024 20:43:19 +0000 (16:43 -0400)]
ramips: mt76x8: sync Cudy TR1200 v1 naming

Cudy assigns hardware versions to its devices on its website, and
the Cudy TR1200 router is now Cudy TR1200 v1.
OpenWrt currently uses both variants, and this commit removes
inconsistencies using only the new name.

Signed-off-by: Luis Mita <luis@luismita.com>
5 months agomediatek: convert eeprom/macaddr to nvmem format for jdcloud re-cp-03
Tianling Shen [Thu, 6 Jun 2024 09:17:10 +0000 (17:17 +0800)]
mediatek: convert eeprom/macaddr to nvmem format for jdcloud re-cp-03

Switch to new nvmem binding.

Also fixes a issue that the MAC address assigned to lan/wan was reversed.

Tested-by: Yangyu Chen <cyy@cyyself.name>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
5 months agotools/cmake: update to 3.29.5
Nick Hainke [Sun, 9 Jun 2024 23:25:45 +0000 (01:25 +0200)]
tools/cmake: update to 3.29.5

Changelog:
- https://www.kitware.com/cmake-3-29-1-available-for-download/
- https://www.kitware.com/cmake-3-29-2-available-for-download/
- https://www.kitware.com/cmake-3-29-3-available-for-download/
- https://www.kitware.com/cmake-3-29-4-available-for-download/
- https://www.kitware.com/cmake-3-29-5-available-for-download/

Signed-off-by: Nick Hainke <vincent@systemli.org>
5 months agotools/quilt: update to 0.68
Nick Hainke [Sun, 9 Jun 2024 19:23:28 +0000 (21:23 +0200)]
tools/quilt: update to 0.68

Release Notes:
https://savannah.nongnu.org/news/?id=10611

Signed-off-by: Nick Hainke <vincent@systemli.org>
5 months agomediatek: filogic: Add support for Wavlink WL-WN586X3
Sijia Huang [Thu, 7 Mar 2024 02:12:11 +0000 (20:12 -0600)]
mediatek: filogic: Add support for Wavlink WL-WN586X3

Hardware
--------
- SOC: MediaTek MT7981
- ram: 256MB DDR3
- FLASH: 16MB SPI-NOR
- Ethernet: 2x1Gb Lan 1x1Gb Wan
- WIFI: MediaTek MT7981 2x2 DBDC 802.11ax 2T2R (2.4/5)
- LEDs: 2xLan 1x Wan 1x WIFI 1xSTATUS

MAC table, same as stock firmware:
LAN: 80:3F:5D:xx:xx:x1 partition "hw" at 0x44e (ASCII)
WAN: 80:3F:5D:xx:xx:x2 partition "hw" at 0x460 (ASCII)
 2G: 80:3F:5D:xx:xx:x3 partition "factory" at 0x4 (binary), on label
 5G: 80:3F:5D:xx:xx:x3 Same as 2G

Installation Method 1: ssh
--------------------------
1. Connect PC to the lan port. Set the PC IP to 192.168.10.100 if
   required.
2. Navigate to http://192.168.10.1/
3. Log into the Wavlink WebGUI. Default username/password is
   admin/admin.
4. Use WebGUI to upgrade the firmware to
   WAVLINK_WN586X3-A_M86X3A_V240113_WO-GDBYFM-modified.bin
   downloaded from
   https://github.com/themaverickdm/firmware-misc/tree/main/wavlink/wl-wn586x3
   Warning: All settings will be lost!
5. Wait about 5 minutes, and after flashing is completed, log into
   the router using (with admin123 as password):
   ssh root@192.168.10.1
6. scp the openwrt image file onto the router, usually under /tmp
   somewhere.
   openwrt-mediatek-filogic-wavlink_wl-wn586x3-squashfs-sysupgrade.bin
7. Flash openwrt image file like so:
   mtd write \
     openwrt-mediatek-filogic-wavlink_wl-wn586x3-squashfs-sysupgrade.bin \
     firmware
   Warning: Previous firmware will be overwritten!
8. Wait about 5 minutes, and after the flashing is completed, set
   the PC IP to 192.168.1.100 if required and log into the router
   like so:
   ssh root@192.168.1.1

Installation Method 2: u-boot
-----------------------------
1. Connect UART:  TX-> 586X3 RX, RX-> 586X3 TX, GND-> 586 GND.
2. Connect PC to the wan (not lan!) port.
3. Setup the tftp server on PC, set IP to 192.168.10.100,
4. Power on the device. Select '2' to upgrade firmware in Uboot.
5. Input the image name and start to upgrade.

Uboot console log:

CPU:   MediaTek MT7981
Model: mt7981-rfb
DRAM:  256 MiB
Core:  34 devices, 13 uclasses, devicetree: embed
Loading Environment from nowhere... OK
In:    serial@11002000
Out:   serial@11002000
Err:   serial@11002000
Net:
Warning: ethernet@15100000 (eth0) using random MAC address -
02:47:fb:b2:53:2d
eth0: ethernet@15100000
UBOOT WN586X3A
gpio: pin 9 (gpio 9) value is 0
gpio: pin 10 (gpio 10) value is 0
gpio: pin 5 (gpio 5) value is 0
gpio: pin 12 (gpio 12) value is 0
gpio: pin 13 (gpio 13) value is 0

  *** U-Boot Boot Menu ***

      1. Startup system (Default)
      2. Upgrade firmware
      3. Upgrade ATF BL2
      4. Upgrade ATF FIP
      5. Upgrade single image
      6. Load image
      0. U-Boot console

Co-authored-by: R Maru <deviantmaru@gmail.com>
Signed-off-by: R Maru <deviantmaru@gmail.com>
Signed-off-by: Sijia Huang <engineer31@win-star.com>
5 months agoath79: 8dev: remove wmac userspace handling
Rosen Penev [Tue, 4 Jun 2024 00:26:55 +0000 (17:26 -0700)]
ath79: 8dev: remove wmac userspace handling

Before the nvmem rework, this was already handled in dts with
mtd-cal-data instead of qca,no-eeprom. No need to duplicate. Also, the
800 size value seems nonsensical. 440 is the standard.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
5 months agoath79: mtd-cal-data removals
Rosen Penev [Sat, 17 Feb 2024 05:17:20 +0000 (21:17 -0800)]
ath79: mtd-cal-data removals

Replacement can be done with nvmem.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
5 months agoath79: convert pcs,cap324 calibration to nvmem
Rosen Penev [Sun, 18 Feb 2024 05:22:13 +0000 (21:22 -0800)]
ath79: convert pcs,cap324 calibration to nvmem

Userspace handling is deprecated.

Also fix a bug with userspace handling where the wrong calibration data
was being used for the PCI card. The dts was correct but userspace was
not.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
5 months agoath79: cd-e380ac-v2: remove duplicate eth0
Rosen Penev [Sat, 1 Jun 2024 23:41:10 +0000 (16:41 -0700)]
ath79: cd-e380ac-v2: remove duplicate eth0

It seems in the transition to nvmem, eth0 was specified twice and was
already converted to use nvmem.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
5 months agoath79: remove unused dts labels
Rosen Penev [Sat, 17 Feb 2024 05:17:20 +0000 (21:17 -0800)]
ath79: remove unused dts labels

These are not referenced.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
5 months agoath79: fix dtc address warnings
Rosen Penev [Sat, 1 Jun 2024 04:53:20 +0000 (21:53 -0700)]
ath79: fix dtc address warnings

These should match reg values.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
5 months agokernel: trim outdated kernel config symbols
Shiji Yang [Sat, 8 Jun 2024 04:41:54 +0000 (04:41 +0000)]
kernel: trim outdated kernel config symbols

These symbols have already been removed from the upstream Linux source
code. They are automatically compared and removed by a kernel config
scanning script[1].

[1] https://github.com/openwrt/openwrt/pull/15324

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
5 months agoopenssl: update to 3.0.14
John Audia [Wed, 5 Jun 2024 19:55:29 +0000 (15:55 -0400)]
openssl: update to 3.0.14

Major changes between OpenSSL 3.0.13 and OpenSSL 3.0.14 [04-Jun-2024]

* Fixed potential use after free after SSL_free_buffers() is called.
  [CVE-2024-4741]
* Fixed checking excessively long DSA keys or parameters may be very slow.
  [CVE-2024-4603]
* Fixed an issue where some non-default TLS server configurations can cause
  unbounded memory growth when processing TLSv1.3 sessions. An attacker may
  exploit certain server configurations to trigger unbounded memory growth that
  would lead to a Denial of Service.  [CVE-2024-2511]
* New atexit configuration switch, which controls whether the OPENSSL_cleanup
  is registered when libcrypto is unloaded. This can be used on platforms
  where using atexit() from shared libraries causes crashes on exit

Signed-off-by: John Audia <therealgraysky@proton.me>
Build system: x86/64
Build-tested: x86/64/AMD Cezanne

5 months agokernel: ltq-vdsl-vr9: fix compilation with linux 6.6
Martin Schiller [Wed, 15 May 2024 08:48:08 +0000 (10:48 +0200)]
kernel: ltq-vdsl-vr9: fix compilation with linux 6.6

This adds some compile fixes for linux 6.6 compatibility.

class_create now require only the name instead of the module ownership
reference.

Also the kernel enabled checks for enum.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
5 months agokernel: ltq-vdsl-vr9-mei: fix compilation with linux 6.6
Martin Schiller [Wed, 15 May 2024 08:42:53 +0000 (10:42 +0200)]
kernel: ltq-vdsl-vr9-mei: fix compilation with linux 6.6

This adds some compile fixes for linux 6.6 compatibility.

class_create now require only the name instead of the module ownership
reference.

Also the kernel enabled checks for enum.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
5 months agokernel: ltq-deu: fix compilation with linux 6.6
Martin Schiller [Wed, 15 May 2024 08:38:15 +0000 (10:38 +0200)]
kernel: ltq-deu: fix compilation with linux 6.6

struct u128 and u128_xor() was removed by upstream commit f413e724818c
("cyrpto/b128ops: Remove struct u128").

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
5 months agokernel: ltq-vectoring: Avoid flush_scheduled_work() usage
Martin Schiller [Tue, 14 May 2024 10:52:07 +0000 (12:52 +0200)]
kernel: ltq-vectoring: Avoid flush_scheduled_work() usage

This fixes some compile warnings for linux 6.6.

Flushing system-wide workqueues is dangerous and will be forbidden.
Replace system_wq with local vectoring_wq.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
5 months agolantiq: Refresh patches and configuration for linux 6.6
Martin Schiller [Tue, 14 May 2024 09:05:34 +0000 (11:05 +0200)]
lantiq: Refresh patches and configuration for linux 6.6

Make all the patches apply. This also refreshes some of the kernel
configurations.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
5 months agolantiq: set Linux 6.6 as testing kernel
Martin Schiller [Wed, 15 May 2024 08:36:21 +0000 (10:36 +0200)]
lantiq: set Linux 6.6 as testing kernel

Add KERNEL_TESTING_PATCHVER for Linux 6.6.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
5 months agokernel/lantiq: Restore kernel files for v6.1
Martin Schiller [Fri, 7 Jun 2024 06:16:13 +0000 (08:16 +0200)]
kernel/lantiq: Restore kernel files for v6.1

This is an automatically generated commit which aids following Kernel patch
history, as git will see the move and copy as a rename thus defeating the
purpose.

For the original discussion see:
https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
5 months agokernel/lantiq: Create kernel files for v6.6 (from v6.1)
Martin Schiller [Fri, 7 Jun 2024 06:16:13 +0000 (08:16 +0200)]
kernel/lantiq: Create kernel files for v6.6 (from v6.1)

This is an automatically generated commit.

When doing `git bisect`, consider `git bisect --skip`.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
5 months agompc85xx: only build zImage on required targets
David Bauer [Sat, 8 Jun 2024 02:34:09 +0000 (04:34 +0200)]
mpc85xx: only build zImage on required targets

Make the OF-compatible zImage per-board selectable. This allows the
image to only be built with the wrapper if the target actually uses it.

This fixes build-failures for the mpc85xx-p2020 subtarget.

Fixes: 557c094f0579 ("mpc85xx: only build zImage on required targets")
Signed-off-by: David Bauer <mail@david-bauer.net>
5 months agokernel: rtl8367b: remove unnecessary cpu_port setting
Mieczyslaw Nalewaj [Tue, 4 Jun 2024 15:59:54 +0000 (17:59 +0200)]
kernel: rtl8367b: remove unnecessary cpu_port setting

Set the appropriate cpu_port value based on the use of realtek,extif0 to extif2
instead of the additional cpu_port parameter.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15033
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agokernel: rtl8367: set the correct cpu_port value
Mieczyslaw Nalewaj [Tue, 4 Jun 2024 15:25:39 +0000 (17:25 +0200)]
kernel: rtl8367: set the correct cpu_port value

Set the appropriate cpu_port value based on the use of realtek,extif0 or realtek,extif1 parameter.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15033
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agolibbpf: Update to v1.4.3
Tony Ambardar [Wed, 5 Jun 2024 03:30:16 +0000 (20:30 -0700)]
libbpf: Update to v1.4.3

Update to the latest upstream release to include recent improvements and
bugfixes, and simplify use of PKG_SOURCE_VERSION.

Link: https://github.com/libbpf/libbpf/releases/tag/v1.4.3
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
5 months agokernel: bump 6.1 to 6.1.92
Zxl hhyccc [Sat, 25 May 2024 11:38:35 +0000 (19:38 +0800)]
kernel: bump 6.1 to 6.1.92

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

Removed upstreamed:
 bcm27xx/patches-6.1/950-0270-net-bcmgenet-Reset-RBUF-on-first-open.patch
 generic/backport-6.1/600-v6.9-03-net-gro-add-flush-check-in-udp_gro_receive_segment.patch
 generic/pending-6.1/681-net-bridge-fix-multicast-to-unicast-with-fraglist-GS.patch
 generic/pending-6.1/682-net-core-reject-skb_copy-_expand-for-fraglist-GSO-sk.patch
 generic/pending-6.1/684-net-bridge-fix-corrupted-ethernet-header-on-multicas.patch
 generic/pending-6.1/778-net-l2tp-drop-flow-hash-on-forward.patch
 imx/patches-6.1/002-6.2-phy-freescale-imx8m-pcie-Refine-i.MX8MM-PCIe-PHY-dri.patch

All other patches automatically rebased.

Signed-off-by: Zxl hhyccc <zxlhhy@gmail.com>
5 months agokexec-tools: fix multiple compile errors
Tony Ambardar [Sat, 8 Jun 2024 05:03:30 +0000 (22:03 -0700)]
kexec-tools: fix multiple compile errors

Add two patches to fix compile errors being repeatedly seen on OpenWrt CI.

The first is an upstream backport to fix this i386-related error:

  x86_64-openwrt-linux-musl-gcc  -mcmodel=large -I./purgatory/include
  -I./purgatory/arch/x86_64/include -I./util_lib/include -I./include -Iinclude
  -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-x86_64_gcc-13.3.0_musl/lib/gcc/x86_64-openwrt-linux-musl/13.3.0/include
  -c -MD -o purgatory/arch/i386/entry32-16.o purgatory/arch/i386/entry32-16.S
  purgatory/arch/i386/entry32-16.S: Assembler messages:
  purgatory/arch/i386/entry32-16.S:23: Error: 64bit mode not supported on `i386'.

The second addresses an error using basename() on musl libc:

  kexec/arch/i386/x86-linux-setup.c: In function 'add_edd_entry':
  kexec/arch/i386/x86-linux-setup.c:332:20: warning: implicit declaration of function 'basename' [-Wimplicit-function-declaration]
    332 |         if (sscanf(basename(sysfs_name), "int13_dev%hhx", &devnum) != 1) {
        |                    ^~~~~~~~
  kexec/arch/i386/x86-linux-setup.c:332:20: warning: passing argument 1 of 'sscanf' makes pointer from integer without a cast [-Wint-conversion]
    332 |         if (sscanf(basename(sysfs_name), "int13_dev%hhx", &devnum) != 1) {
        |                    ^~~~~~~~~~~~~~~~~~~~
        |                    |
        |                    int
  ...

Fixes: #14621
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
5 months agoRevert "base-files: Ignore exit code of uci.sh inclusion"
Robert Marko [Sat, 8 Jun 2024 10:57:18 +0000 (12:57 +0200)]
Revert "base-files: Ignore exit code of uci.sh inclusion"

This reverts commit 17d8c5825e6f5c5d2e4d2c320c3b4b797f4ca0e9.
This commit is breaking init somehow, even the hostname is not set,
so until its fixed, revert it.

Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoipq40xx: fix broken image generation for EX6150v2
David Bauer [Fri, 7 Jun 2024 17:23:56 +0000 (19:23 +0200)]
ipq40xx: fix broken image generation for EX6150v2

All NETGEAR EX6150v2 validate the rootfs for which OpenWrt places a
fakeheader at the position, where the bootloader expects it.

Some EX6150v2 bootloaders do however make a broken assumption about
where the rootfs starts. This is due to them calculating the rootfs
start not based upon the kernel-length but the string-offset of the
FIT-image.

We have to be compatible with both this broken as well as the valid
calculation. So we do relocate the FDT string section to a
block-boundary and enlarge the FIT image to end at this boundary +
BLOCKSIZE / 2. This way, both the broken as well as correct calculations
do expect the rootfs-header at the same position.

It is worth noting, that this is a rare edge-case in which only happens
if the image-length as well as the start of the string-section are not
placed in the same erase-block. This is an edge-case which happens very
rarely (thus it was not spotted prior).

Affected:
 - U-Boot 2012.07 (Jun 16 2016 - 11:59:37)

Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 8f9546f7b0a14f3afa813e39ed45c968ece24464)

5 months agobase-files: Ignore exit code of uci.sh inclusion
Paul Spooren [Fri, 7 Jun 2024 14:26:14 +0000 (16:26 +0200)]
base-files: Ignore exit code of uci.sh inclusion

When running unit tests this causes trouble since `/lib/config/uci.sh`
isn't available in those cases. Instead exit with a clean status fo the
unit test framework don't wrongly interpret things as an error.

Signed-off-by: Paul Spooren <mail@aparcar.org>
5 months agokirkwood: Add Marvell RTC to two devices
Linus Walleij [Sat, 1 Jun 2024 20:29:59 +0000 (22:29 +0200)]
kirkwood: Add Marvell RTC to two devices

The recently added D-Link DNS-320L and the Zyxel NSA310S
is missing an RTC module so let's give them the default
Marvell RTC at least.

Reviewed-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 months agomediatek: fix wps button for nokia ea0326gmp
Tianling Shen [Fri, 7 Jun 2024 11:28:47 +0000 (19:28 +0800)]
mediatek: fix wps button for nokia ea0326gmp

The gpio is actually low active, fix it.

Fixes: 40e7fab9e4a2 ("mediatek: add Nokia EA0326GMP support")
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/15651
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agobuild: add explicit timezone in CycloneDX SBOM
Roman Azarenko [Tue, 4 Jun 2024 16:00:03 +0000 (18:00 +0200)]
build: add explicit timezone in CycloneDX SBOM

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

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
Per the CycloneDX 1.4 spec, the `metadata.timestamp` field contains
the date/time when the BOM was created [1].

Before the change, the value generated by the package-metadata.pl
script would look like this:

2024-06-03T15:51:10

CycloneDX 1.4 relies on the JSON Schema specification version draft-07,
which defines the `date-time` format [2] as derived from RFC 3339,
section 5.6 [3]. In this format, the `time-offset` component is required,
however in the original version of package-metadata.pl it is omitted.

This is causing problems with OWASP Dependency-Track version 4.11.0 or
newer, where it now validates submitted SBOMs against the JSON schema
by default [4]. SBOMs with incorrect timestamp values are rejected with
the following error:

{
    "detail": "Schema validation failed",
    "errors": [
        "$.metadata.timestamp: 2024-06-03T15:51:10 is an invalid date-time"
    ],
    "status": 400,
    "title": "The uploaded BOM is invalid"
}

Add explicit `Z` (UTC) timezone offset in the `timestamp` field
to satisfy the CycloneDX schema.

[1]: https://github.com/CycloneDX/specification/blob/1.4/schema/bom-1.4.schema.json#L116-L121
[2]: https://json-schema.org/draft-07/draft-handrews-json-schema-validation-01#rfc.section.7.3.1
[3]: https://datatracker.ietf.org/doc/html/rfc3339#section-5.6
[4]: https://github.com/DependencyTrack/dependency-track/pull/3522

Signed-off-by: Roman Azarenko <roman.azarenko@iopsys.eu>
5 months agoconfig: kernel: remove KASAN_EXTRA
Qingfang Deng [Fri, 7 Jun 2024 09:55:38 +0000 (17:55 +0800)]
config: kernel: remove KASAN_EXTRA

The option has been removed from the kernel since 5.1.

Signed-off-by: Qingfang Deng <dqfext@gmail.com>
5 months agomac80211: backport an upstream patch needed by mt76 for AES_GMAC key support
Felix Fietkau [Fri, 7 Jun 2024 04:02:05 +0000 (06:02 +0200)]
mac80211: backport an upstream patch needed by mt76 for AES_GMAC key support

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 months agoapk: bump to 2024-05-23
Paul Spooren [Thu, 6 Jun 2024 17:25:32 +0000 (19:25 +0200)]
apk: bump to 2024-05-23

containing fixes around tar and internal checksums.

Signed-off-by: Paul Spooren <mail@aparcar.org>
Link: https://github.com/openwrt/openwrt/pull/15646
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agoimx: 6.6: update kernel config
Tim Harvey [Mon, 20 May 2024 23:55:58 +0000 (16:55 -0700)]
imx: 6.6: update kernel config

added some missing configs needed when building 6.6 with all kmods

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
5 months agoimx: 6.6: refresh kernel patches
Tim Harvey [Mon, 20 May 2024 03:13:33 +0000 (20:13 -0700)]
imx: 6.6: refresh kernel patches

refresh 6.6 kernel patches via 'make target/linux/refresh'

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
5 months agoimx: add 6.6 kernel as testing
Tim Harvey [Thu, 16 May 2024 23:31:30 +0000 (16:31 -0700)]
imx: add 6.6 kernel as testing

allow to test 6.6 kernel for imx

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
5 months agokernel: modules: video: adapt imx modules for 6.6
Tim Harvey [Mon, 20 May 2024 17:37:05 +0000 (10:37 -0700)]
kernel: modules: video: adapt imx modules for 6.6

the ipuv3 based video kernel modules moved into the ipuv3 directory for
6.6.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
5 months agoimx: fix cortexa9/cortexa7 image builds due to dts move
Tim Harvey [Mon, 20 May 2024 19:28:52 +0000 (12:28 -0700)]
imx: fix cortexa9/cortexa7 image builds due to dts move

The IMX device-tree's for arm moved from arch/arm/boot/dts to
arch/arm/boot/dts/nxp/imx. Use that if using the 6.6 kernel.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
5 months agoimx: copy config from 6.1 to 6.6
Tim Harvey [Thu, 16 May 2024 21:09:33 +0000 (14:09 -0700)]
imx: copy config from 6.1 to 6.6

Copy the 6.1 config to 6.6

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
5 months agoimx: copy patches from 6.1 to 6.6
Tim Harvey [Thu, 16 May 2024 21:08:43 +0000 (14:08 -0700)]
imx: copy patches from 6.1 to 6.6

copy 6.1 patches to 6.6 and fixup:
 - removed patches already upstream
 - adapted pathnames of dts patches for new kernel

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
5 months agokernel: modules: video: fix imx-ldb
Tim Harvey [Mon, 20 May 2024 22:19:37 +0000 (15:19 -0700)]
kernel: modules: video: fix imx-ldb

Commit ae8bf1a26e15 ("imx: add imx8m support") configured the
drm-imx-ldb kmod for imx_cortexa9 and imx_cortexa7 however it is only
applicable to imx_cortexa9 (imx6).

Fix this so that we can avoid a missing module config for cortexa7 when
moving to the 6.6 kernel.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
5 months agomdadm: update to 4.3
Rosen Penev [Sat, 18 May 2024 00:28:29 +0000 (17:28 -0700)]
mdadm: update to 4.3

Backport three patches, add one for GCC14, and add Alpine time_t patch for
musl.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
5 months agoRevert "hostapd: add support for authenticating with multiple PSKs via ubus helper"
Felix Fietkau [Thu, 6 Jun 2024 19:33:53 +0000 (21:33 +0200)]
Revert "hostapd: add support for authenticating with multiple PSKs via ubus helper"

This reverts commit c67d5189a405b2dca015f47f31c55ba38a0d61eb.
Revert until reported issues have been resolved

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 months agogeneric: 6.6: refresh patches
Daniel Golle [Thu, 6 Jun 2024 19:08:13 +0000 (20:08 +0100)]
generic: 6.6: refresh patches

Patch 733-01-net-ethernet-mtk_eth_soc-use-napi_build_skb.patch needs
a refresh as line numbers no longer match.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 months agomediatek: filogic: move nand-only devices out of bootdev detection
Tianling Shen [Sun, 14 Apr 2024 02:42:21 +0000 (10:42 +0800)]
mediatek: filogic: move nand-only devices out of bootdev detection

For the first-time installation (mostly migrates from vendor firmware)
the ubiblock is not ready, but bootdev detection relies on it. This
means users must create ubiblock manually otherwise the sysupgrade
will not work.

Now a unique case is added for nand devices which use new fit format,
let's move to it.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
5 months agomediatek: add Nokia EA0326GMP support
Tianling Shen [Sun, 24 Mar 2024 13:26:07 +0000 (21:26 +0800)]
mediatek: add Nokia EA0326GMP support

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

Gain SSH access:
1. Login into web interface, and download the configuration.
2. Download the configration utilities:
   https://firmware.download.immortalwrt.eu.org/cnsztl/mediatek/filogic/openwrt-mediatek-mt7981-nokia-ea0326gmp-config-utils.tar.gz
     These binaries are extraced from the factory firmware, which are
     dynamically linked with aarch64 musl 1.1.24. To use them, you
     must run them under the same runtime environment, otherwise the
     binaries will not work properly!
3. Upload the configuration and utilities to a suitable environment.
4. Uncompress the utilities, move them to '/bin' and give them executable permisison:
   tar -zxf openwrt-mediatek-mt7981-nokia-ea0326gmp-config-utils.tar.gz
   mv mkconfig seama /bin
   chmod +x /bin/mkconfig
   chmod +x /bin/seama
5. Decrypt and uncompress the configuration:
     Enter fakeroot if you are not login as root.
   mkconfig -a de-enca -m EA0326GMP_3FE79221BAAA -i EA0326GMP_3FE79221BAAA-xxxxxxxx-backup.tar.gz -o backup.tar.gz
   tar -zxf backup.tar.gz
6. Edit 'etc/config/dropbear', set 'enable' to '1'.
7. Edit 'etc/passwd', remove root password: 'root::1:0:99999:7:::'.
8. Repack the configuration:
   tar -zcf backup.tar.gz etc/
   mkconfig -a enca -m EA0326GMP_3FE79221BAAA -i backup.tar.gz -o EA0326GMP_3FE79221BAAA-xxxxxxxx-backup.tar.gz
9. Upload new configuration via web interface, now you can SSH to EA0326GMP.

A minimum configuration which enabled SSH access is also provided
to simplify the process:
https://firmware.download.immortalwrt.eu.org/cnsztl/mediatek/filogic/openwrt-mediatek-mt7981-nokia-ea0326gmp-enable-ssh.tar.gz

Flash instructions:
1. SSH to EA0326GMP, backup everything, especially 'Factory' part.
2. Write new BL2:
   mtd write openwrt-mediatek-filogic-nokia_ea0326gmp-preloader.bin BL2
3. Write new FIP:
   mtd write openwrt-mediatek-filogic-nokia_ea0326gmp-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>
5 months agohostapd: add support for authenticating with multiple PSKs via ubus helper
Felix Fietkau [Thu, 23 May 2024 18:16:40 +0000 (20:16 +0200)]
hostapd: add support for authenticating with multiple PSKs via ubus helper

Also supports assigning a VLAN ID based on the PSK

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 months agokernel: use napi_build_skb in mtk_eth_soc
Felix Fietkau [Mon, 20 May 2024 12:36:55 +0000 (14:36 +0200)]
kernel: use napi_build_skb in mtk_eth_soc

Improves performance

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 months agogeneric: routerbootpart: fix compilation on 64-bit
Robert Marko [Thu, 6 Jun 2024 08:14:39 +0000 (10:14 +0200)]
generic: routerbootpart: fix compilation on 64-bit

Trying to compile routerbootpart parsers on 64-bit platforms will fail:
drivers/mtd/parsers/routerbootpart.c: In function 'routerboot_find_dynparts':
./include/linux/kern_levels.h:5:25: error: format '%X' expects argument of type 'unsigned int', but argument 3 has type 'size_t' {aka 'long unsigned int'} [-Werror=format=]
    5 | #define KERN_SOH        "\001"          /* ASCII Start Of Header */
      |                         ^~~~~~
./include/linux/printk.h:427:25: note: in definition of macro 'printk_index_wrap'
  427 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
      |                         ^~~~
./include/linux/printk.h:498:9: note: in expansion of macro 'printk'
  498 |         printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
      |         ^~~~~~
./include/linux/kern_levels.h:11:25: note: in expansion of macro 'KERN_SOH'
   11 | #define KERN_ERR        KERN_SOH "3"    /* error conditions */
      |                         ^~~~~~~~
./include/linux/printk.h:498:16: note: in expansion of macro 'KERN_ERR'
  498 |         printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
      |                ^~~~~~~~
drivers/mtd/parsers/routerbootpart.c:170:25: note: in expansion of macro 'pr_err'
  170 |                         pr_err("%s: mtd_read error while parsing (offset: 0x%X): %d\n",

So, lets simply add the length modifier 'z' to fix compilation.

Link: https://github.com/openwrt/openwrt/pull/15640
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agomediatek: improve reliability of Fidelix/Dosilicon SPI-NAND
Daniel Golle [Mon, 8 Apr 2024 16:46:33 +0000 (17:46 +0100)]
mediatek: improve reliability of Fidelix/Dosilicon SPI-NAND

Prior to performing a PROGRAM LOAD RANDOM DATA operation, a WRITE
ENABLE (06h) command must be issued to change the contents of the
memory array. Following a WRITE ENABLE (06) command, **first a PROGRAM
LOAD (02h or 32h) command must be issued to reset the cache**, then
issue a PROGRAM LOAD RANDOM DATA (84h or 34h) command

This is dirty fix provided to use by MediaTek engineer Sky Huang which
may resolve the "OpenWrt Kiss of Death" issue we've been seeing on the
Linksys E8450 aka. Belkin RT3200. However, it means that everything has
to be re-written with that patch already applied, ie. we need to rebuild
the installer once it is part of snapshot builds to have any effect.

Users already on FIP-in-UBI layout are advised to re-write 'fip' UBI
volume and 'bl2' MTD partition manually once from within Linux after
this fix has been applied.

A similar fix will also be required for U-Boot.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 months agouboot-mediatek: snfi: FM35Q1GA is x4-only
Daniel Golle [Mon, 8 Apr 2024 18:35:27 +0000 (19:35 +0100)]
uboot-mediatek: snfi: FM35Q1GA is x4-only

Dont allow x2 read and cache read operations on FM35Q1GA as they seem
to be unstable. Also the Linux drivers does not allow x2 ops.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 months agoarm-trusted-firmware-mediatek: import patchset for Fidelix flash on SNFI
Daniel Golle [Mon, 8 Apr 2024 20:43:38 +0000 (21:43 +0100)]
arm-trusted-firmware-mediatek: import patchset for Fidelix flash on SNFI

Import pending patches to set pinconf settings for SPI-NAND pins on
MT7622 identical to what the old proprietary preloader did.

Should further increase the reliability of some SNFI-attached SPI-NAND
flash chips.

Link: https://github.com/mtk-openwrt/arm-trusted-firmware/pull/7
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 months agoarm-trusted-firmware-mediatek: update to MediaTek-patched v2.10.0
Daniel Golle [Mon, 8 Apr 2024 20:40:34 +0000 (21:40 +0100)]
arm-trusted-firmware-mediatek: update to MediaTek-patched v2.10.0

Update ARM TrustedFirmware-A to the most recent release of
MediaTek downstream patched version released 2024-01-17.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 months agoramips: add support for Buffalo WSR-2533DHPL2
INAGAKI Hiroshi [Sat, 30 Mar 2024 06:33:58 +0000 (15:33 +0900)]
ramips: add support for Buffalo WSR-2533DHPL2

Buffalo WSR-2533DHPL2 is a 2.4/5 GHz band 11ac (Wi-Fi 5) router, based
on MediaTek MT7621A.

Specification:

- SoC           : MediaTek MT7621AT
- RAM           : DDR3 128 MiB (Winbond W631GG6MB12J)
- Flash         : RAW-NAND 128 MiB (Winbond W29N01HVSINF)
- WLAN          : 2.4/5 GHz (2x MediaTek MT7615N)
- Ethernet      : 10/100/1000 Mbps x4
  - Switch      : MediaTek MT7530 (SoC)
- LED/keys      : 8x/6x (2x buttons, 1x slide-switch)
- UART          : through-hole on PCB (J4)
  - arrangement : 3.3V, GND, TX, RX from triangle-mark
  - settings    : 57600n8
- Power         : 12VDC 1.5A

Flash instruction using factory.bin image:

1. boot WSR-2533DHPL2 normally with "Router" mode
2. access to the WebI ("http://192.168.11.1/") on the device and open
   firmware update page
   ("管理" -> "ファームウェア更新")
3. select the OpenWrt factory.bin image and click update ("更新実行")
   button
   Attention: do not use "factory-uboot.bin" image
4. Wait ~120 seconds to complete flashing

Flash instruction using initramfs image:

1. prepare the TFTP server with the initramfs image renamed to
   "linux.trx-recovery" and IP address "192.168.11.2"
2. press the "AOSS" button while powering on the WSR-2533DHPL2
3. after 10 seconds, release the "AOSS" button, WSR-2533DHPL2 downloads
   the initramfs image and boot with it automatically
4. on the initramfs image, download the factory-uboot.bin image to the
   device and perform sysupgrade with it and "-F" option
5. wait ~120 seconds to complete flashing

Notes:

- There are 2x factory*.bin images for different purposes.

  - factory.bin      : for flashing on OEM WebUI
  - factory-uboot.bin: for flashing on OEM bootloader or initramfs image

  factory-uboot.bin is useful for recoverying the device, or refreshing
  when the kernel partition is expanded in the future. sysupgrade on
  this device accepts factory-uboot.bin with option "-F", but on that
  situation, user configurations won't be kept, so it's not for normal
  use.

MAC addresses:

LAN    : 18:EC:E7:xx:xx:E0 (board_data, "mac" (text))
WAN    : 18:EC:E7:xx:xx:E0 (board_data, "mac" (text))
2.4 GHz: 18:EC:E7:xx:xx:E1 (Factory, 0x4    (hex))
5 GHz  : 18:EC:E7:xx:xx:E4 (Factory, 0x8004 (hex))

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
5 months agoramips: add support for Buffalo WSR-2533DHPLS
INAGAKI Hiroshi [Sat, 30 Mar 2024 06:33:58 +0000 (15:33 +0900)]
ramips: add support for Buffalo WSR-2533DHPLS

Buffalo WSR-2533DHPLS is a 2.4/5 GHz band 11ac router, based on MediaTek
MT7621A.

Very similar to Buffalo WSR-2533DHPL, but with NAND, different GPIO
and TRX partitions.

Specification:

- SoC           : MediaTek MT7621AT
- RAM           : DDR3 256 MiB (Samsung K4B2G1646F-BYMA)
- Flash         : RAW-NAND 128 MiB
                  (Winbond W29N01HV or KIOXIA TC58BVG0S3HTAI0)
- WLAN          : 2.4/5 GHz (2x MediaTek MT7615N)
- Ethernet      : 10/100/1000 Mbps
  - Switch      : MediaTek MT7530 (SoC) 4 ports
- LED/keys      : 8x/6x (2x buttons, 1x slide-switch)
- UART          : through-hole on PCB (J4)
  - arrangement : 3.3V, GND, TX, RX from triangle-mark
  - settings    : 115200n8
- Power         : 12VDC 1.5A

Flash instruction using factory.bin image:

1. boot WSR-2533DHPLS normally with "Router" mode
2. access to the WebI ("http://192.168.11.1/") on the device and open
   firmware update page
   ("管理" -> "ファームウェア更新")
3. select the OpenWrt factory.bin image and click update ("更新実行")
   button
   Attention: do not use "factory-uboot.bin" image
4. Wait ~120 seconds to complete flashing

Flash instruction using initramfs image:

1. prepare the TFTP server with the initramfs image renamed to
   "linux.trx-recovery" and IP address "192.168.11.2"
2. press the "AOSS" button while powering on the WSR-2533DHPLS
3. after 10 seconds, release the "AOSS" button, WSR-2533DHPLS downloads
   the initramfs image and boot with it automatically
4. on the initramfs image, download the factory-uboot.bin image to the
   device and perform sysupgrade with it and "-F" option
5. wait ~120 seconds to complete flashing

Notes:

- The embedded addresses in eeprom data in Factory partition have
  Buffalo's OUI, but they don't match with the actual addresses
  assigned to wlan devices. So fixup addresses by the user-space
  script.

  root@localhost:/# hexdump -C /dev/mtdblock3 | grep "^0000[08]000\s"
  00000000  15 76 a0 00 88 57 ee bc  01 a8 15 76 c3 14 00 80  |.v...W.....v....|
  00008000  15 76 a0 00 88 57 ee bc  01 f8 15 76 c3 14 00 80  |.v...W.....v....|

  See "MAC addresses" below for actual addresses.

- There are 2x factory*.bin images for different purposes.

  - factory.bin      : for flashing on OEM WebUI
  - factory-uboot.bin: for flashing on OEM bootloader or initramfs image

  factory-uboot.bin is useful for recoverying the device, or refreshing
  when the kernel partition is expanded in the future. sysupgrade on
  this device accepts factory-uboot.bin with option "-F", but on that
  situation, user configurations won't be kept, so it's not for normal
  use.

MAC addresses:

LAN    : 90:96:F3:xx:xx:30 (board_data, "mac" (text))
WAN    : 90:96:F3:xx:xx:30 (board_data, "mac" (text))
2.4 GHz: 90:96:F3:xx:xx:31
5 GHz  : 90:96:F3:xx:xx:38

[original work]
Signed-off-by: Audun-Marius Gangstø <audun@gangsto.org>
[convert to ubi, fix/improve DT, add sysupgrade support]
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
5 months agoramips: mt7621: switch trx parser to parser_trx from mtdsplit
INAGAKI Hiroshi [Wed, 27 Mar 2024 09:54:47 +0000 (18:54 +0900)]
ramips: mt7621: switch trx parser to parser_trx from mtdsplit

Switch trx parser to parser_trx of Linux Kernel from mtdsplit_trx to
split firmware partition using model-specific trx magic number on
some Buffalo devices.
This change is tested on Buffalo WSR-2533DHPL.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
5 months agobuild: move Build/buffalo-trx to image-commands.mk
INAGAKI Hiroshi [Wed, 27 Mar 2024 11:38:04 +0000 (20:38 +0900)]
build: move Build/buffalo-trx to image-commands.mk

Move Build/buffalo-trx to image-commands.mk from image/mt7622.mk to use
that definition from ramips as well.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
5 months agomtd: enable trx feature on ramips
INAGAKI Hiroshi [Wed, 27 Mar 2024 11:21:58 +0000 (20:21 +0900)]
mtd: enable trx feature on ramips

Enable trx feature of mtd command to fixup trx length and crc32 while
booting for some Buffalo devices.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
5 months agomediatek: add support for Ruijie RG-X60 Pro
Ashley Lee [Sat, 30 Dec 2023 14:54:54 +0000 (22:54 +0800)]
mediatek: add support for Ruijie RG-X60 Pro

This pull request ports Ruijie RG-X60 Pro router support to the main branch.

Parameters:
- SoC       : MediaTek MT7986A Quad-core ARM Cortex-A53 2.0GHz
- RAM       : DDR3 512MiB (W634GU6QB)
- Flash     : SPI-NAND 128 MiB (W25N01GVZEIG)
- WLAN      : MediaTek MT7986A integration dual-band WiFi 6
  - 2.4 GHz : b/g/n/ax, MIMO 4x4
  - 5 GHz   : a/n/ac/ax, MIMO 4x4
- Ethernet  : 10/100/1000 Mbps x4 (MediaTek MT7531AE)
                    2500Mbps x 1 (Realtek RTL8221B-VB-CG)
- UART      : through-hole on PCB
  - [J500] GND, TX, RX, 3.3V (115200n1)
- Buttons   : Mesh, Reset
- LEDs      : 1x Power (Blue)
                  1x Turbo (Purple)
- Power     : 12 VDC, 3 A

How to Installation:
1. Remove the case and connect the TTL cable to the corresponding position.
2. Power on the device and quickly press "down" on the keyboard, then
   U-Boot will stay in the menu.
3. Select "1. Upgrade Firmware", select "0. TFTP Client(Default)".
4. Input the IP address, input the Openwrt image file name to be
   flashed, start the TFTP server, and press "Enter".
5. Wait for the flashing to complete.

How return to stock:

1. Remove the case and connect the TTL cable to the corresponding
   position.
2. Power on the device and quickly press "down" on the keyboard, then
   U-Boot will stay in the menu.
3. Select "1. Upgrade Firmware", select "0. TFTP Client(Default)".
4. Input the IP address, input the Stock “E-WEBOS” image file name to
   be flashed, start the TFTP server, and press "Enter".
5. Wait for the flashing to complete.

About recovery:
Connect uart, use u-boot menu to flash stock firmware image or boot
OpenWrt initramfs image.

About MAC Address:
+---------+-------------------+-----------+
|         | MAC               | Algorithm |
+---------+-------------------+-----------+
| WAN     | 10:82:3D:XX:XX:9E | label     |
| LAN     | 10:82:3D:XX:XX:9F | label+1   |
| WLAN 2g | 10:82:3D:XX:XX:A0 | label+2   |
| WLAN 5g | 10:82:3D:XX:XX:A1 | label+3   |
+---------+-------------------+-----------+

Signed-off-by: Ashley Lee <code@emtips.net>
5 months agoyafut: sync version between tools/ and package/ directories
Michał Kępień [Mon, 13 May 2024 17:26:15 +0000 (19:26 +0200)]
yafut: sync version between tools/ and package/ directories

Use the same Yafut code revision for both updating devices with NAND
flash and preparing firmware images for devices with NOR flash.

Signed-off-by: Michał Kępień <openwrt@kempniu.pl>
Link: https://github.com/openwrt/openwrt/pull/13453
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agotools: remove kernel2minor
Michał Kępień [Mon, 13 May 2024 17:26:15 +0000 (19:26 +0200)]
tools: remove kernel2minor

Since the Yafut tool is now used for both updating the kernel on
MikroTik devices with NAND flash and preparing firmware images for
MikroTik devices with NOR flash, remove the kernel2minor utility from
the tree as it is no longer used for anything.

Signed-off-by: Michał Kępień <openwrt@kempniu.pl>
Link: https://github.com/openwrt/openwrt/pull/13453
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agomikrotik: switch to Yafut for building MikroTik NOR images
Michał Kępień [Mon, 13 May 2024 17:26:15 +0000 (19:26 +0200)]
mikrotik: switch to Yafut for building MikroTik NOR images

The Yafut tool now has limited capabilities for working on filesystem
images stored in regular files.  This enables preparing Yaffs2 images
for devices with NOR flash using upstream Yaffs2 filesystem code instead
of the custom kernel2minor tool.

Since minimizing the size of the resulting filesystem image size is
important and upstream Yaffs2 code requires two allocator reserve blocks
to be available when writing a file to the filesystem, a trick is
employed while preparing an OpenWRT image: the blank filesystem image
that Yafut operates on initially contains two extra erase blocks that
are chopped off after the kernel file is written.  This is safe to do
because Yaffs2 has a true log structure and therefore only ever writes
sequentially (and the size of the kernel file is known beforehand).
While the two extra erase blocks are necessary for writes, Yaffs2 code
seems to be perfectly capable of reading back files from a "truncated"
filesystem that does not contain these extra erase blocks.

In terms of image size, this new approach is only marginally worse than
the current kernel2minor-based one: specifically, upstream Yaffs2 code
needs to write three object headers (each of which takes up an entire
data chunk) when the kernel file is written to the filesystem:

  - an object header for the kernel file when it is created,

  - an object header for the root directory when the kernel file is
    created,

  - an updated object header for the kernel file when the latter is
    fully written (so that its new size can be recorded).

kernel2minor only writes two of these headers, which is the absolute
minimum required for reading the file back.  This means that the
Yafut-based approach causes firmware images to be at most one erase
block (64 kB) larger than those created using kernel2minor, but only in
the very unfortunate scenario where the size of the kernel file is
really close to a multiple of the erase block size.

The rest of the calculations performed when the empty filesystem image
is first prepared stems from the Yaffs2 layout used by MikroTik NOR
devices: each 65,536-byte erase block contains 63 chunks, each of which
consists of 1024 bytes of data followed by 16-byte Yaffs tags without
ECC data; each such group of 63 chunks is then followed by 16 bytes of
padding, which translates to "-C 1040 -B 64k -E" in the Yafut
invocation.  Yaffs2 checkpoints and summaries are disabled (using
Yafut's -P and -S switches, respectively) as they are merely performance
optimizations that require extra storage space.  The -L and -M switches
are used to force little-endian or big-endian byte order (respectively)
in the resulting filesystem image, no matter what byte order the build
host uses.  The tr invocation is used to ensure that the filesystem
image is initialized with 0xFF bytes (which are an indicator of unused
space for Yaffs2 code).

Signed-off-by: Michał Kępień <openwrt@kempniu.pl>
Link: https://github.com/openwrt/openwrt/pull/13453
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agotools: add Yafut to enable creating Yaffs filesystem images
Michał Kępień [Mon, 13 May 2024 17:26:15 +0000 (19:26 +0200)]
tools: add Yafut to enable creating Yaffs filesystem images

The Yafut tool has so far been used to update the kernel on devices with
NAND flash via MTD character devices.  Recent upstream updates extended
the tool with limited support for working with filesystem images stored
in regular files.  This enables Yafut to be used for preparing a Yaffs
filesystem image for a device with NOR flash on a build host and
subsequently flashing it to the target device without using Yafut
itself.

Add Yafut to tools/ so that it can be compiled and run on the host
building OpenWRT.

Signed-off-by: Michał Kępień <openwrt@kempniu.pl>
Link: https://github.com/openwrt/openwrt/pull/13453
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoipq40xx: use NVMEM-on-UBI for ASUS RT-AC58U
Daniel Golle [Sun, 25 Feb 2024 21:59:39 +0000 (21:59 +0000)]
ipq40xx: use NVMEM-on-UBI for ASUS RT-AC58U

Instead of extracting WiFi precal as well as MAC addresses in userspace
use recently introduced NVMEM-on-UBI instead.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Tested-by: Christian Lamparter <chunkeey@gmail.com>
5 months agoramips: mt76x8: add support for Cudy TR1200 v1
Luis Mita [Thu, 30 May 2024 18:50:23 +0000 (14:50 -0400)]
ramips: mt76x8: add support for Cudy TR1200 v1

Hardware:
 - SoC: MediaTek MT7628AN (MIPS 580MHz)
 - Flash: 16 MiB XMC 25QH128CH10
 - RAM: 128 MiB ESMT M14D1G1664A
 - WLAN: 2.4 GHz (MT7628), 5 GHz (MT7613BEN 802.11ac)
 - Ethernet: 1x 10/100 Mbps WAN, 1x 10/100 LAN (MT7628)
 - USB 2.0 port
 - Buttons: 1 Reset button, 1 slider button
 - LEDs: 1x Red, 1x White
 - Serial console: unpopulated header, 115200 8n1
 - Power: 5 VDC, 2 A

MAC addresses:
+---------+-------------------+-----------+
|         | MAC               | Algorithm |
+---------+-------------------+-----------+
| WAN     | 80:af:ca:xx:xx:x0 | label     |
| 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 | label+2   |
+---------+-------------------+-----------+

Installation:
The installation must be done via TFTP by disassembling the router.
On other occasions Cudy has distributed intermediate firmware to make
installation easier, and so I recommend checking the Wiki for this
device if there is a more convenient solution than the one below.

To install using TFTP:
1. Upgrade to a beta firmware (signed by Cudy) that can be downloaded
from the wiki. This is required in order to use an unlocked u-boot.
2. Connect to UART.
3. While the router is turning on, press 1.
4. Connect to LAN and set your IP to 192.168.1.88/24. Configure a TFTP
server and an OpenWrt initramfs-kernel.bin firmware file as recovery.bin.
5. Press Enter three times. Verify the filename.
6. If you can reach LuCI or SSH now, just use the sysupgrade image with
the 'Keep settings' option turned off.

If you don't want to use the beta firmware nor the unlocked u-boot, you
can install the firmware writing the sysupgrade image on the firmware
partition of the SPI flash.

Signed-off-by: Luis Mita <luis@luismita.com>
5 months agoairoha: drop kernel 6.1 support
Robert Marko [Tue, 4 Jun 2024 20:45:33 +0000 (22:45 +0200)]
airoha: drop kernel 6.1 support

Now that 6.6 is the default, lets remove 6.1.

Link: https://github.com/openwrt/openwrt/pull/15630
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoairoha: default to kernel 6.6
Robert Marko [Tue, 4 Jun 2024 20:44:53 +0000 (22:44 +0200)]
airoha: default to kernel 6.6

Move airoha do kernel 6.6 as the default.

Link: https://github.com/openwrt/openwrt/pull/15630
Signed-off-by: Robert Marko <robimarko@gmail.com>