1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-10-18 13:29:16 +02:00
Commit Graph

61083 Commits

Author SHA1 Message Date
Aleksander Jan Bajkowski
fda7563c9a kernel: ltq-adsl-mei: fix compilation warning on 6.6
Fix compilation warning:
./include/linux/export.h:29:22: error: passing argument 1 of 'class_create' from incompatible pointer type [-Werror=incompatible-pointer-types]
   29 | #define THIS_MODULE (&__this_module)
      |                     ~^~~~~~~~~~~~~~~
      |                      |
      |                      struct module *
/home/aleksander/workspace/openwrt/build_dir/target-mips_24kc_musl/linux-lantiq_xway/ltq-adsl-mei-ar9/ltq-adsl-mei/drv_mei_cpe.c:2774:34: note: in expansion of macro 'THIS_MODULE'
 2774 |         dsl_class = class_create(THIS_MODULE, "ifx_mei");
      |                                  ^~~~~~~~~~~
In file included from ./include/linux/device.h:31,
                 from ./include/linux/dma-mapping.h:8,
                 from ./include/linux/skbuff.h:28,
                 from ./include/net/net_namespace.h:43,
                 from ./include/linux/netdevice.h:38,
                 from /home/aleksander/workspace/openwrt/build_dir/target-mips_24kc_musl/linux-lantiq_xway/ltq-adsl-mei-ar9/ltq-adsl-mei/drv_mei_cpe.c:39:
./include/linux/device/class.h:230:54: note: expected 'const char *' but argument is of type 'struct module *'
  230 | struct class * __must_check class_create(const char *name);
      |                                          ~~~~~~~~~~~~^~~~
/home/aleksander/workspace/openwrt/build_dir/target-mips_24kc_musl/linux-lantiq_xway/ltq-adsl-mei-ar9/ltq-adsl-mei/drv_mei_cpe.c:2774:21: error: too many arguments to function 'class_create'
 2774 |         dsl_class = class_create(THIS_MODULE, "ifx_mei");
      |                     ^~~~~~~~~~~~
./include/linux/device/class.h:230:29: note: declared here
  230 | struct class * __must_check class_create(const char *name);
      |                             ^~~~~~~~~~~~
cc1: all warnings being treated as errors

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
2024-06-14 14:32:28 +02:00
Rosen Penev
932808ebde ath79: fix wrong mac address for ecb1xx0
0db4f9785ca30f79fa1abbffb0fab5a6053f68f5 changed the variable name from
athaddr to ethaddr. Restore.

Fixes: 0db4f9785ca3 ("ath79: convert ath10k calibration data to NVMEM (ASCII MAC)")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-06-14 14:20:27 +02:00
Rosen Penev
6b03050192 mac80211: remove mtd-cal-data
All usages of mtd-cal-data have been removed. To avoid submissions that
rely on this deprecated behavior, remove it.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15671
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-13 18:10:27 +02:00
Chukun Pan
0a76244a72 qualcommax: ipq807x: fix sysupgrade for ZBT-Z800AX
This router has two rootfs partitions and dualboot is used.
Vendor firmware may swap the rootfs partition location, u-boot append
'ubi.mtd=rootfs' in the end of cmdline. Since we use fixed-partitions,
force boot from the first rootfs partition to avoid boot failure.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Link: https://github.com/openwrt/openwrt/pull/15700
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-13 18:01:03 +02:00
Tony Ambardar
ce51f27fb0
kernel: 6.6: prevent garbage-cleanup of BPF kfuncs
Backport an upstream Linux fix to prevent BPF kfunc functions from being
removed during linker optimization when building BTF-enabled vmlinux.

The telltale sign of this occurring is build log warnings (e.g. mips64el):

      BTFIDS  vmlinux
    WARN: resolve_btfids: unresolved symbol bpf_verify_pkcs7_signature
    WARN: resolve_btfids: unresolved symbol bpf_lookup_user_key
    WARN: resolve_btfids: unresolved symbol bpf_lookup_system_key
    WARN: resolve_btfids: unresolved symbol bpf_key_put
    WARN: resolve_btfids: unresolved symbol bpf_iter_task_next
    WARN: resolve_btfids: unresolved symbol bpf_iter_css_task_new
    WARN: resolve_btfids: unresolved symbol bpf_get_file_xattr
    WARN: resolve_btfids: unresolved symbol bpf_ct_insert_entry
      NM      System.map
      SORTTAB vmlinux

Link: https://lore.kernel.org/bpf/ZlkoM6%2FPSxVcGM6X@kodidev-ubuntu/
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15697
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-06-13 14:16:34 +02:00
Tony Ambardar
546559587f
tools/dwarves: update to v1.27
Update to the latest upstream version and add a patch that enables pahole
reproducible builds if SOURCE_DATE_EPOCH is defined in the environment.

This patch helps avoid BTF-related module loading problems with packages
built separately from the kernel such as mac80211 or kselftests-bpf, e.g.:

    [   16.858856] BPF:      type_id=1185 bits_offset=0
    [   16.859099] BPF:
    [   16.859199] BPF: Invalid name
    [   16.859352] BPF:
    [   16.859612] failed to validate module [cfg80211] BTF: -22
    [   17.015178] PPP generic driver version 2.4.2
    [   17.052703] NET: Registered PF_PPPOX protocol family
    [   17.348722] BPF:      type_id=1185 bits_offset=0
    [   17.348912] BPF:
    [   17.348996] BPF: Invalid name
    [   17.349106] BPF:
    [   17.349220] failed to validate module [cfg80211] BTF: -22
    [   17.472070] kmodloader: 3 modules could not be probed
    [   17.473133] kmodloader: - cfg80211 - 0
    [   17.473762] kmodloader: dependency not loaded cfg80211
    [   17.474421] kmodloader: - mac80211 - 1
    [   17.474988] kmodloader: dependency not loaded mac80211
    [   17.475632] kmodloader: dependency not loaded cfg80211
    [   17.476263] kmodloader: - mac80211_hwsim - 2

    root@OpenWrt:/usr/libexec/kselftests-bpf# insmod bpf_testmod.ko
    [ 4735.776792] missing module BTF, cannot register kfuncs
    [ 4735.777371] missing module BTF, cannot register kfuncs
    [ 4735.777955] missing module BTF, cannot register kfuncs
    [ 4735.778452] missing module BTF, cannot register kfuncs

Release Notes: https://lore.kernel.org/bpf/ZmjBHWw-Q5hKBiwA@x1/

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15697
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-06-13 14:16:33 +02:00
Tony Ambardar
f97da2c61a
tools/elfutils: add missing MIPS reloc support
Backport an upstream patch series that adds backend elfutils support for
DWARF relocations in MIPS debug info. This support is needed by pahole to
generate BTF for modules in BTF-enabled kernel builds.

The problem first manifests as pahole warnings during build:

    BTF [M] lib/libcrc32c.ko
    die__process_unit: DW_TAG_compile_unit (0x11) @ <0x932d> not handled!
    die__process_unit: tag not supported 0x11 (compile_unit)!
    die__process: got compile_unit unexpected tag after DW_TAG_compile_unit!
    die__process_unit: DW_TAG_compile_unit (0x11) @ <0x99a3> not handled!
    die__process_unit: tag not supported 0x11 (compile_unit)!
    die__process: got compile_unit unexpected tag after DW_TAG_compile_unit!

During system boot the problem then causes module loading failures, which
may result in many other runtime issues:

    [   13.169785] kmodloader: loading kernel modules from /etc/modules.d/*
    [ ... ]
    [   17.422840] mac80211_hwsim: initializing netlink
    [   17.526518] PPP generic driver version 2.4.2
    [   17.550346] NET: Registered PF_PPPOX protocol family
    [   17.795353] kmodloader: 26 modules could not be probed
    [   17.796084] kmodloader: dependency not loaded nf_conntrack
    [   17.796737] kmodloader: - act_connmark - 1
    [   17.797402] kmodloader: dependency not loaded nf_conntrack
    [   17.798056] kmodloader: - act_ctinfo - 1
    [ ... ]

Link: https://lore.kernel.org/bpf/ZlkoM6%2FPSxVcGM6X@kodidev-ubuntu/
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15697
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-06-13 14:16:33 +02:00
Tony Ambardar
cc6a1e2abc
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>
2024-06-13 14:16:32 +02:00
Kristian Skramstad
75a76355cb 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>
2024-06-13 11:01:59 +02:00
Robert Marko
169a695280 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>
2024-06-12 21:52:41 +02:00
Christian Marangi
3810219441
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>
2024-06-12 15:55:17 +02:00
Christian Marangi
95597dc2e3
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>
2024-06-12 15:16:58 +02:00
Koen Vandeputte
167b016a21 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>
2024-06-12 14:25:56 +02:00
Paul Spooren
213bd273ed 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>
2024-06-12 11:12:13 +02:00
Petr Å tetiar
b2a84c86e3
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>
2024-06-11 23:58:20 +02:00
Christian Marangi
a77397e830
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>
2024-06-11 23:58:19 +02:00
Christian Marangi
25bbefcdd9
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>
2024-06-11 23:58:19 +02:00
Christian Marangi
8ca2e2852e
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>
2024-06-11 23:58:18 +02:00
Christian Marangi
9f6fc4f524
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>
2024-06-11 23:58:17 +02:00
Christian Marangi
93d49529a1
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>
2024-06-11 23:58:17 +02:00
Christian Marangi
9a52ec4fa0
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>
2024-06-11 23:58:16 +02:00
Christian Marangi
98703bf458
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>
2024-06-11 23:58:16 +02:00
Paul Spooren
2c769cff23
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>
2024-06-11 23:58:15 +02:00
Christian Marangi
2951e0a80e
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>
2024-06-11 23:58:14 +02:00
Petr Å tetiar
617431685e
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>
2024-06-11 23:58:14 +02:00
Christian Marangi
52e9431731
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>
2024-06-11 23:58:13 +02:00
Christian Marangi
ba7305c3e4
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>
2024-06-11 23:58:13 +02:00
Christian Marangi
b569d0cc3f
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>
2024-06-11 23:58:12 +02:00
Christian Marangi
b92e62d464
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>
2024-06-11 23:58:11 +02:00
Robert Marko
b47fbca97f 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>
2024-06-11 14:27:47 +02:00
Daniel Golle
83311b7470 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>
2024-06-11 00:10:21 +01:00
Sebastian Schaper
aa4d63c2da 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>
2024-06-11 00:09:06 +02:00
Sebastian Schaper
3d6cbe287a 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>
2024-06-11 00:09:06 +02:00
Florian Eckert
fe5fe3c8e7 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>
2024-06-10 16:50:29 +02:00
Nick Hainke
ac2722cb02 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>
2024-06-10 16:08:19 +02:00
Hauke Mehrtens
5be9a8790c 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>
2024-06-10 12:42:23 +01:00
Nick Hainke
712c10ec48 tools/findutils: update to 4.10.0
Release Notes:
https://savannah.gnu.org/news/?id=10638

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

[0] - fa7e628e19

Signed-off-by: Nick Hainke <vincent@systemli.org>
2024-06-10 13:02:06 +02:00
Luis Mita
d780d530dd 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>
2024-06-10 10:13:56 +02:00
Tianling Shen
0397932fdd 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>
2024-06-10 10:08:19 +02:00
Nick Hainke
3fd593b848 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>
2024-06-10 01:27:02 +02:00
Nick Hainke
10a1e9b44a tools/quilt: update to 0.68
Release Notes:
https://savannah.nongnu.org/news/?id=10611

Signed-off-by: Nick Hainke <vincent@systemli.org>
2024-06-09 21:23:28 +02:00
Sijia Huang
33db914607 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>
2024-06-09 14:58:25 +02:00
Rosen Penev
dd6bbbabd3 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>
2024-06-09 12:24:15 +02:00
Rosen Penev
74f2df9dbc ath79: mtd-cal-data removals
Replacement can be done with nvmem.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-06-09 12:24:15 +02:00
Rosen Penev
79fc4dba60 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>
2024-06-09 12:24:15 +02:00
Rosen Penev
6483615580 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>
2024-06-09 12:24:15 +02:00
Rosen Penev
85c5c9aa68 ath79: remove unused dts labels
These are not referenced.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-06-09 12:24:15 +02:00
Rosen Penev
ff5e8476d9 ath79: fix dtc address warnings
These should match reg values.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-06-09 12:24:15 +02:00
Shiji Yang
2d00ed7caa 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>
2024-06-09 11:45:34 +02:00
John Audia
bac2f1bed6 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
2024-06-08 23:29:31 +02:00