openwrt/staging/blocktrron.git
2 weeks agoipq806x: tr4400v2: revert nesting of MTD partitions that bricks device
Rodrigo Balerdi [Wed, 13 Nov 2024 20:23:52 +0000 (17:23 -0300)]
ipq806x: tr4400v2: revert nesting of MTD partitions that bricks device

This reverts commit e1043a746a1030062e73ea027d9a35c58bce6c6a, that
attempts to nest partitions that overlap but are not nested. This
causes the 'ubi' partition to be truncated, making rootfs inaccessible
and bricking the device.

Also, had this commit worked, it would have renumbered MTD partitions
in a way that would have broken documented scripts for installation and
update of main and recovery OSes, making backups, return to stock, etc,
and broken user configurations that put the 'extra' partition to use.

Signed-off-by: Rodrigo Balerdi <lanchon@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16944
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 weeks agomediatek: filogic: add support for GatoNetworks GDSP
Enrico Mioso [Sat, 9 Nov 2024 21:14:33 +0000 (22:14 +0100)]
mediatek: filogic: add support for GatoNetworks GDSP

The GatoNetworks GDSP is a re-branded version of the R5000 5G Industrial
router from Yinghua Technologies.
The re-branded device comes with OpenWrt preinstalled, and an OpenWrt-based
U-Boot bootloader version. While the flash layout has been kept compatible
with the OpenWrt version found on the stock device (see [5]), the image format
changed, making a bootloader upgrade necessary.

Specifications:
SoC: Mediatek MT7981BA
RAM: 256MB
Flash: SPI-NOR 32 MiB (Winbond W25Q256)
WLAN: MT7976CN DBDC AX Wi-Fi
Switch: MT7531AE (4x LAN Gigabit ports, 1x WAN Gigabit port)
5G: Quectel RM520N modem
Watchdog: an external WDT connected to GPIO 6 is present and always running;
          the built-in Mediatek watchdog is also present and effective, but
          not used at the moment.

This porting has been tested only with 1x 5G modems installed (the device
supports up to two).

Installation:
Installation is possible via sysupgrade both in the stock device and
re-branded version. However, in the former case, updating the bootloader is
required.

OpenWrt-based U-Boot Bootloader installation
--------------------------------------------
The firmware flashed in the re-branded device at manifacturing time will
flash an OpenWrt-based U-Boot bootloader with some extra recovery features
(see [1]) at first boot.
To update the bootloader, you need to install the mtd-rw module and
insmod it:

insmod mtd-rw i_want_a_brick=1

Then update relevant flash partitions:

mtd erase u-boot-env
mtd erase BL2
mtd erase FIP
mtd write openwrt-mediatek-filogic-gatonetworks_gdsp-preloader.bin BL2
mtd write openwrt-mediatek-filogic-gatonetworks_gdsp-bl31-uboot.fip FIP

And reboot, making sure all previous commands ran succesfully.
If something goes wrong, you can recover your device via the mtk_uartboot
tool.
In my testing, it was possible to start the process even without (un)-plugging
the device, may be handy for remote recovery.

Installation from stock device and firmware
-------------------------------------------
To install vanilla OpenWrt in the stock device (R5000 5G Industrial router
from Yinghua Technologies) running the stock vendor firmware, you will need
to update your bootloader as described in previous section. Remember to use
-F (force upgrade) and -n (not keeping settings).

U-Boot Recovery
---------------
This procedure has been tested only with the OpenWrt-based U-boot bootloader.
Assign your system static IP address 192.168.1.1 and start a TFTP server. The
device will look for an initramfs image named
openwrt-mediatek-filogic-gatonetworks_gdsp-initramfs-kernel.bin
(so you may use openwrt/bin/targets/mediatek/filogic as root dir for your
TFTP server).
Power on the device while keeping the reset button pressed, until you see
a TFTP request from 192.168.1.10. Your environment will be restored to it's
default state.

MAC addresses assignment
------------------------
MAC addresses are assigned slightly differently than in stock firmware. In
particular, the 5 GHz Wi-Fi uses 2.4 GHZ MAC + 1, rather than reusing it with
LA bit set as done in stock firmware. This MAC address is allocated to the
device, so it can be used.
The 2.4 GHz Wi-Fi MAC address is the label MAC. LAN MAC is used to set the
special U-Boot environment ethaddr variable.

device MAC address U-Boot env variable factory partition offset
2.4 GHz Wi-Fi :84 wifi_mac 0x4
5.8 GHz Wi-Fi :85 not present not present
WAN :86 wan_mac 0x24
LAN :87 lan_mac 0x2A

Notes
-----
[1]: the OpenWrt-based U-Boot bootloader you will find installed in the
re-branded device is configured to request for the initramfs image via
TFTP for $gdsp_tftp_tries times before trying normal boot from NOR flash.
Setting this U-Boot environment variable to 0x0 will disable the feature,
which is not implemented in this patch.
[2]: the exposed UART port is connected to ttyS1; the ttyS0 console port is
not exposed.
[3]: the provided bootloader environment has no provision for operating on
BL2 and the FIP partitions. This is an intentional choice to make it
(slightly) more difficult to brick the device.
[4]: it seems GPIO 6 is used both for the "SYS" LED and external WDT.
[5] BL2 expects to find FIP payload at a fixed offset, so some constraints
apply.

Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com>
2 weeks agouboot-envtools: add support for GatoNetworks GDSP
Enrico Mioso [Sat, 9 Nov 2024 21:14:32 +0000 (22:14 +0100)]
uboot-envtools: add support for GatoNetworks GDSP

This configuration should work with both stock and OpenWrt-based U-Boot.

Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com>
2 weeks agouboot-mediatek: add support for GatoNetworks GDSP
Enrico Mioso [Sat, 9 Nov 2024 21:14:31 +0000 (22:14 +0100)]
uboot-mediatek: add support for GatoNetworks GDSP

The GatoNetworks GDSP is a re-branded version of the R5000 5G Industrial
router from Yinghua Technologies.

Advantages over stock bootloader:
1. supports serving the external GPIO WDT, allowing for easier work in U-Boot
   shell
2. supports cool features like netconsole, easy recovery, scripting and so on
3. allows using FIT image and image integrity validation

and ultimately gives you much more flexibility to implement your tweaks.

Known issues
------------
To make it easier to operate the device, console I/O multiplexing support has
been enabled in U-Boot configuration. Setting I/O related U-Boot environment
variables to something like "serial,nc" will have the desired effect. Still,
setting these variables to such a value in the persistent environment will
lead to a crash and make it impossible to boot the system or recover it. I
decided to leave it on anyway since I think it can be very practical in
development.

Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com>
2 weeks agoscripts: download-check-artifact.sh: fix shellcheck and improve
Petr Štetiar [Wed, 6 Nov 2024 10:40:37 +0000 (10:40 +0000)]
scripts: download-check-artifact.sh: fix shellcheck and improve

Fixes following shellcheck's recommendations:

 In scripts/download-check-artifact.sh line 24:
exit $1
             ^-- SC2086 (info): Double quote to prevent globbing and word splitting.

 In scripts/download-check-artifact.sh line 53:
local sum="$(shasum -a 256 "$image_file")";
                      ^-^ SC2155 (warning): Declare and assign separately to avoid masking return values.

 In scripts/download-check-artifact.sh line 72:
 cd "/tmp/verify.$$"
 ^-----------------^ SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

 In scripts/download-check-artifact.sh line 114:
printf "Keyserver to use? [$keyserver_url] > "
                       ^-- SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo".

 In scripts/download-check-artifact.sh line 115:
read url; case "${url:-$keyserver_url}" in
                ^--^ SC2162 (info): read without -r will mangle backslashes.

While at it make it clear, that it is possible to download/check any
build artifacts like even SDK or ImageBuilder.

Link: https://github.com/openwrt/openwrt/pull/16871
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2 weeks agoscripts: add download-check-artifact.sh script
David S. H. Rosenthal [Wed, 6 Nov 2024 10:19:17 +0000 (10:19 +0000)]
scripts: add download-check-artifact.sh script

While checking wiki documentation about GPG signatures checking I found
this nice script and I've thought, that it would be nice to provide it
officially instead of some random internet site.

Usage example:

  $ ./scripts/download-check-artifact.sh https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/openwrt-mediatek-filogic-openwrt_one-squashfs-sysupgrade.itb

  1) Downloading image file
  =========================
  ########################################### 100.0%

  2) Downloading checksum file
  ============================
  ########################################### 100.0%

  3) Downloading the GPG signature
  ================================
  ########################################### 100.0%

  4) Verifying GPG signature
  ==========================
  gpg: Signature made Tue 05 Nov 2024 05:21:50 PM UTC
  gpg:                using EDDSA key 92C561DE55AE6552F3C736B82B0151090606D1D9
  gpg: Good signature from "OpenWrt Build System (Nitrokey3) <contact@openwrt.org>" [ultimate]
  Primary key fingerprint: 8A8B C12F 46B8 36C0 F9CD  B36F 1D53 D187 7742 E911
       Subkey fingerprint: 92C5 61DE 55AE 6552 F3C7  36B8 2B01 5109 0606 D1D9

  5) Verifying SHA256 checksum
  ============================
  openwrt-mediatek-filogic-openwrt_one-squashfs-sysupgrade.itb: OK

  Verification done!
  ==================
  Downloaded artifact placed in '/var/home/ynezz/dev/openwrt/openwrt.git/openwrt-mediatek-filogic-openwrt_one-squashfs-sysupgrade.itb'

  Cleaning up.

Adding file in a state as downloaded from https://www.abitare.org/bin/download.sh

References: https://openwrt.org/docs/guide-quick-start/verify_firmware_checksum?s[]=gpg#linux
Signed-off-by: David S. H. Rosenthal <dshr@abitare.org>
Link: https://github.com/openwrt/openwrt/pull/16871
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2 weeks agoapk: update to Git 417a93ceae540444fdbd3f76d1dadf0e15621fdc (2024-11-13)
Petr Štetiar [Wed, 13 Nov 2024 08:11:38 +0000 (08:11 +0000)]
apk: update to Git 417a93ceae540444fdbd3f76d1dadf0e15621fdc (2024-11-13)

c1a3e69f24e2 db: validate package arch against compatible arches
2a3dbfc9db58 db: add and use apk_db_parse_file helper to parse files line by line
b231eacd8121 db: simplify add_repos_from_file
98d7196a48d4 db: fix permissions of arch file
d2aaf13ee488 commit: sort matched dependencies on error analysis
c259642c006d tests: rework solver tests to not require apk-test binary
08b4d21f922e tests: move solver test data to separate directory
563d36481166 tests: minor updates to root tests
a236fdd39040 pkg: use memfd_create only if target root has dev/fd working
a5aeb3db113f test: unify makefile and meson tests
d86afdef88b0 db: print message when a file is written to .apk-new
5dd91e3c387d db: consider --force-no-chroot when determining /dev/fd availability
5add6fce22d4 apk-tools-3.0.0_pre4
8a13ed96d1d5 test: fix solver.sh for parallel use
fcd4defc18e6 test: move vertest to cmocka based unit testing infrastructure
e38d5b5a9d04 test: add missing alpine tests makefile
19b1df79ebca blob: refactor apk_blob_for_each_segment into apk_blob_foreach_word
76970a938dd7 package: move the location of executable package scripts
1e0411568dad package: respect libexecdir instead of hard-coding /usr/libexec
a4837ae8ffe2 package: don't call make_device_tree when APK_NO_CHROOT is set
ade0be3449e4 db, extract: handle file/directory extraction errors more consistently
4050f9e69d2e db: fix hardlink handling: root directory and v3 checksums
89e4bf1db040 db, fs: do not extract devices in --usermode
64ff8c72d9fb db: allow files starting with a dot in the root directory of apk3 packages
d26b65d30f55 db, audit: remove support for files without embedded checksum
417a93ceae54 pkg: truncate apkv3 description to 256 bytes

Fixes: #16929
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2 weeks agoimagebuilder: fix APK keys dir creation
Kuan-Yi Li [Wed, 13 Nov 2024 16:29:21 +0000 (00:29 +0800)]
imagebuilder: fix APK keys dir creation

Make keys directory for APK instead of OPKG while adding local key.

Signed-off-by: Kuan-Yi Li <kyli@abysm.org>
Link: https://github.com/openwrt/openwrt/pull/16942
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2 weeks agobase-files: improve default root-passwd script
John Crispin [Tue, 12 Nov 2024 06:49:22 +0000 (07:49 +0100)]
base-files: improve default root-passwd script

The script was not exiting cleanly causing it to not be removed from the
uci-defaults folder.

Signed-off-by: John Crispin <john@phrozen.org>
2 weeks agobuild: fix including busybox, procd and apk/opkg in imagebuilder
Felix Fietkau [Wed, 13 Nov 2024 06:04:31 +0000 (07:04 +0100)]
build: fix including busybox, procd and apk/opkg in imagebuilder

Since the image builder pulls package lists from metadata directly,
add procd and busybox as depdendencies to base-files.
As for the package manager itself, since it can be disabled it needs
to be added directly in the image builder makefile

Fixes: 44598c233dd9 ("build: remove broken dependency of metadata on toplevel .config variables")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 weeks agobuild: create package index.json
Eric Fahlgren [Tue, 12 Nov 2024 17:10:02 +0000 (09:10 -0800)]
build: create package index.json

Duplicate the old opkg index.json using the new apk database.
Needed to get the ASU server working on new snapshots.

Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16931
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2 weeks agobuild: add comments to makefiles
Sergey Matsievskiy [Fri, 8 Nov 2024 11:43:52 +0000 (14:43 +0300)]
build: add comments to makefiles

Add comments to build system makefile functions and variables to help
developers in understanding build system internals and ease the
development process.

This patch adds some documentation examples with proposed doxygen-like
syntax. Hopefully, this would start the discussion and result in
generation of the makefile documentation guidelines.

Signed-off-by: Sergey Matsievskiy <matsievskiysv@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16888
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2 weeks agoperf: fix version for APK
Til Kaiser [Tue, 12 Nov 2024 15:33:56 +0000 (16:33 +0100)]
perf: fix version for APK

Change the version schema of perf to be compatible with APK as
described in this commit: e8725a932e16eaf6ec51add8c084d959cbe32ff2.

Signed-off-by: Til Kaiser <mail@tk154.de>
Link: https://github.com/openwrt/openwrt/pull/16930
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2 weeks agoqualcommax: ipq60xx: add NSS reserved memory
Robert Marko [Wed, 6 Nov 2024 19:13:06 +0000 (20:13 +0100)]
qualcommax: ipq60xx: add NSS reserved memory

It seems that despite NSS not being supported in OpenWrt the memory it
usually uses needs to be reserved anyway for stability reasons.

Link: https://github.com/openwrt/openwrt/pull/16928
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 weeks agocryptodev-linux: change home-page URL
Paul Donald [Sun, 10 Nov 2024 18:47:34 +0000 (19:47 +0100)]
cryptodev-linux: change home-page URL

Most links and info on the org page are broken or defunct, and all new
versions are available on the github based repo anyway.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16910
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2 weeks agocryptodev-linux: give a coherent description
Paul Donald [Sun, 10 Nov 2024 18:53:07 +0000 (19:53 +0100)]
cryptodev-linux: give a coherent description

For the last ten years, nobody has noticed that this driver doesn't
actually say what it is for. ;)

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16910
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2 weeks agoairoha: an7581: backport upstream ethernet fixes
Christian Marangi [Tue, 12 Nov 2024 12:55:30 +0000 (13:55 +0100)]
airoha: an7581: backport upstream ethernet fixes

Backport patches fixing some ethernet problem merged upstream.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2 weeks agorealtek: rtl83xx: use devm for mutex_init
Rosen Penev [Sun, 10 Nov 2024 23:54:14 +0000 (15:54 -0800)]
realtek: rtl83xx: use devm for mutex_init

mutex_destroy is missing in remove.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16926
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 weeks agoinclude: meson.mk: honor CONFIG_DEBUG
Daniel Golle [Sat, 9 Nov 2024 23:32:05 +0000 (00:32 +0100)]
include: meson.mk: honor CONFIG_DEBUG

Set buildtype according to CONFIG_DEBUG.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 weeks agoinclude: cmake.mk: honor CONFIG_DEBUG
Daniel Golle [Sat, 9 Nov 2024 23:31:18 +0000 (00:31 +0100)]
include: cmake.mk: honor CONFIG_DEBUG

Set CMAKE_BUILD_TYPE according to CONFIG_DEBUG.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 weeks agoramips: mt7621: fix typo
Rosen Penev [Mon, 11 Nov 2024 20:23:01 +0000 (12:23 -0800)]
ramips: mt7621: fix typo

Missing u caused the regulator to fail probe.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16925
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 weeks agomdadm: backport musl patch
Rosen Penev [Sat, 9 Nov 2024 23:46:26 +0000 (15:46 -0800)]
mdadm: backport musl patch

Needed to fix compilation with GCC14.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16912
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 weeks agobuild: remove broken dependency of metadata on toplevel .config variables
Felix Fietkau [Mon, 11 Nov 2024 18:52:14 +0000 (19:52 +0100)]
build: remove broken dependency of metadata on toplevel .config variables

Instead of relying on .config symbols for metadata, alter the DEFAULT
variable of affected packages. Fixes enabling opkg vs apk among others.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 weeks agospidev_test: fix version for APK
Mieczyslaw Nalewaj [Mon, 11 Nov 2024 08:14:28 +0000 (09:14 +0100)]
spidev_test: fix version for APK

Refactor version of spidev_test for APK.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/16917
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 weeks agoconfig: Use APK as package manager by default
Paul Spooren [Wed, 6 Nov 2024 15:08:32 +0000 (16:08 +0100)]
config: Use APK as package manager by default

This commit comes after a long period of hard work, starting back in
early 2021 as a proof of concept.

Thanks to the Alpine Linux project for creating such a nice package
manager. Thanks to everyone involved; this is going to be great!

Signed-off-by: Paul Spooren <mail@aparcar.org>
2 weeks agonftables: update to 1.1.1
Hauke Mehrtens [Wed, 23 Oct 2024 22:09:22 +0000 (00:09 +0200)]
nftables: update to 1.1.1

Release Announcement:
https://lwn.net/Articles/982283/
https://lwn.net/Articles/992760/

Link: https://github.com/openwrt/openwrt/pull/16769
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 weeks agolibnftnl: update to 1.2.8
Hauke Mehrtens [Wed, 23 Oct 2024 22:06:09 +0000 (00:06 +0200)]
libnftnl: update to 1.2.8

Release Announcement:
https://www.spinics.net/lists/netfilter-devel/msg87287.html
https://www.spinics.net/lists/netfilter-devel/msg88520.html

Link: https://github.com/openwrt/openwrt/pull/16769
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 weeks agolantiq: use devm for mutex_init
Rosen Penev [Thu, 31 Oct 2024 19:22:04 +0000 (12:22 -0700)]
lantiq: use devm for mutex_init

It's common to avoid calling mutex_destroy when done. It's not correct strictly speaking.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16832
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 weeks agolantiq: use more devm for i2c
Rosen Penev [Sat, 19 Oct 2024 02:08:02 +0000 (19:08 -0700)]
lantiq: use more devm for i2c

i2c_add_numbered_adapter is the wrong function to use here. It requires
setting nr to some value, otherwise it behaves the same as
i2c_add_adapter. nr is not set.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16825
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 weeks agogdb: Fix description for apk, remove backtick
Hannu Nyman [Sun, 10 Nov 2024 15:16:51 +0000 (17:16 +0200)]
gdb: Fix description for apk, remove backtick

Remove backtick from gdb description text, as that seems to
be recognized as a shell action by compilation with apk,
causing error.

Example from test buildbot:
 rstrip.sh: /builder/shared-workdir/build/sdk/build_dir/target-aarch64_generic_musl/gdb-15.2/ipkg-aarch64_generic/gdb/usr/bin/gdb: executable
 bash: -c: line 1: unexpected EOF while looking for matching ``'
 bash: -c: line 2: syntax error: unexpected end of file
 make[3]: *** [Makefile:123: /builder/shared-workdir/build/sdk/bin/packages/aarch64_generic/base/gdb-15.2-r1.apk] Error 2

Local compilation:
 rstrip.sh: /OpenWrt/aarch64/build_dir/target-aarch64_cortex-a53_musl/gdb-15.2/ipkg-aarch64_cortex-a53/gdb/usr/bin/gdb: executable
 bash: -c: line 1: unexpected EOF while looking for matching ``'
 make[2]: *** [Makefile:123: /OpenWrt/aarch64/bin/packages/aarch64_cortex-a53/base/gdb-15.2-r1.apk] Error 2

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Link: https://github.com/openwrt/openwrt/pull/16908
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 weeks agowolfssl: Adjust version for apk
Hannu Nyman [Sun, 10 Nov 2024 13:57:01 +0000 (15:57 +0200)]
wolfssl: Adjust version for apk

Adjust wolfssl version for apk by removing the "-stable"
from the OpenWrt version, although it is still needed for
upstream download archive name.

Define PKG_BUILD_DIR accordingly.

Utilize new short version to simplify ABI_VERSION calculation.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Link: https://github.com/openwrt/openwrt/pull/16906
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2 weeks agobase-files: Remove pkg_check when using apk
Hauke Mehrtens [Thu, 7 Nov 2024 21:49:21 +0000 (22:49 +0100)]
base-files: Remove pkg_check when using apk

/sbin/pkg_check uses opkg and is not even packaged when using the
default opkg configuration. remove it when using apk too.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 weeks agokernel: bump 6.6 to 6.6.60
John Audia [Fri, 8 Nov 2024 19:57:44 +0000 (14:57 -0500)]
kernel: bump 6.6 to 6.6.60

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

Removed upstreamed:
generic/backport-6.6/409-mtd-spi-nor-winbond-fix-w25q128-regression.patch

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.60&id=27a58a19bd20a7afe369da2ce6d4ebea70768acd

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

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/16892
Signed-off-by: Nick Hainke <vincent@systemli.org>
2 weeks agoimagebuilder: fix OPKG package inclusion
Paul Spooren [Sun, 10 Nov 2024 03:26:43 +0000 (04:26 +0100)]
imagebuilder: fix OPKG package inclusion

In 451e2ce006 the code would only move packages separated by dashes,
however OPKG uses underscores to split between package name and version.
Result was the lack of such packages in the packed ImageBuilder.

Use dashes or underscores depending on the select package manger.

Fixes: 451e2ce006 "imagebuilder: fix package inclusion and APK index"
Signed-off-by: Paul Spooren <mail@aparcar.org>
2 weeks agotreewide: remove THIS_MODULE assignment
Rosen Penev [Thu, 31 Oct 2024 19:22:04 +0000 (12:22 -0700)]
treewide: remove THIS_MODULE assignment

Matches upstream coccinelle check: api/platform_no_drv_owner.cocci.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16846
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2 weeks agohostapd: split long lines
Leon M. Busch-George [Mon, 19 Feb 2024 11:49:28 +0000 (12:49 +0100)]
hostapd: split long lines

These two were getting rather long.

Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
Link: https://github.com/openwrt/openwrt/pull/16849
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2 weeks agomenuconfig: add help description for Stack Smashing Protection options
Marius Dinu [Sat, 9 Nov 2024 17:20:47 +0000 (19:20 +0200)]
menuconfig: add help description for Stack Smashing Protection options

Descriptions taken from:
https://wiki.osdev.org/Stack_Smashing_Protector

Signed-off-by: Marius Dinu <m95d+git@psihoexpert.ro>
Link: https://github.com/openwrt/openwrt/pull/16897
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2 weeks agoapk: Implement apk list --full patch
Christian Marangi [Tue, 22 Oct 2024 23:13:15 +0000 (01:13 +0200)]
apk: Implement apk list --full patch

Implement apk list --full patch to mimik opkg package info.

Link: https://github.com/openwrt/openwrt/pull/16759
Link: https://github.com/openwrt/openwrt/pull/16759
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2 weeks agoapk: Bump to version 2024-11-08
Christian Marangi [Sun, 10 Nov 2024 01:09:43 +0000 (02:09 +0100)]
apk: Bump to version 2024-11-08

Bump APK to version 2024-11-08, multiple fixup and pending arch patch
for ARM Big Endian merged upstream.

Link: https://github.com/openwrt/openwrt/pull/16759
Link: https://github.com/openwrt/openwrt/pull/16759
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2 weeks agoramips: mt7621: add missing regulator-boot-on
Rosen Penev [Wed, 6 Nov 2024 21:23:35 +0000 (13:23 -0800)]
ramips: mt7621: add missing regulator-boot-on

What seems to be happening is that the kernel requests an ACTIVE_LOW
gpio initially and sets it to high later based on gpios in dts.

This seems to break some devices where the bootloader sets it to high.

Fixes: e612900ae0 ("ramips: mt7621: convert usb power to regulators")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16877
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 weeks agoimagebuilder: init APK dirs every time
Paul Spooren [Fri, 8 Nov 2024 09:37:16 +0000 (10:37 +0100)]
imagebuilder: init APK dirs every time

The `--initdb` command creates basic folders required by APK,
previoiusly it would only run a single time when package_index is
actually called. Since the function isn't called if nothing changes,
`--initdb` doesn't initialize the rootfs again.

This commit moves it to package_reload, which runs every time.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2 weeks agoimagebuilder: cleanup package inclusion
Paul Spooren [Wed, 6 Nov 2024 15:34:32 +0000 (16:34 +0100)]
imagebuilder: cleanup package inclusion

Previously three different ways to include packages in an ImageBuilder
existed:

* buildbot: include libc, kernel (and base-files) in $(IB_LDIR)
* not buildbot, standalone: include all packages in ./packages/
* not buildbot, not standalone: include libc, kernel (and base-files) in
  ./packages/

First of, the separation between *buildbot* and *not buildbot, not
standalone* is not required, we can just always copy packages to
./packages instead of ever using the special place $(IB_LDIR).
Doing so drops the need to handle the extra case and also allows to
clean up the OPKG package installation, which no longer requries the
`firstword` logic, things are now always at ./packages.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2 weeks agoimagebuilder: fix package inclusion and APK index
Paul Spooren [Wed, 6 Nov 2024 15:32:03 +0000 (16:32 +0100)]
imagebuilder: fix package inclusion and APK index

We need to exclude packages from the APK index which must not be
upgraded. To do so, the packages `libc`, `kernel` and `base-files` are
excluded to APK never suggestes them as upgradable.

The previous logic would however match packages like `libcomerr0`,
causing build failures. Make the copying and excluding logic more
precise by adding a single dash.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2 weeks agoimagebuilder: fix APK for packages dir and cache
Paul Spooren [Fri, 1 Nov 2024 11:33:49 +0000 (12:33 +0100)]
imagebuilder: fix APK for packages dir and cache

This commit solves multiple issues. First of just install the three
special packages base-files, libc and kernel directly from the index. In
upstream indexes, those will never appear to prevent accidental upgrades
may breaking the system.

Next, enable caching for the ImageBuilder, which speeds up consecutive
builds from ~33 seconds to ~5 seconds. Using cache however makes APK
create the folder `/var/cache/apk/` which conflicts with the base-files
installation, which ships a symlink from `/var` to `/tmp`, so specify
`--no-cache` for the rootfs initialization.

Lastly, drop the use of `apk update` since APK automatically does that.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2 weeks agoRevert "build: set PATH for post-install scripts"
Daniel Golle [Sat, 9 Nov 2024 13:06:02 +0000 (13:06 +0000)]
Revert "build: set PATH for post-install scripts"

This reverts commit 21b5ac862eed7ac373361c914cf6098cab04f503.
The approach is flawed and cannot work in the ImageBuilder.
Using /etc/uci-defaults/ which is run on the target is the only
possible way.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 weeks agoath79: Add support for Sophos AP15C
David Lutz [Tue, 5 Nov 2024 09:55:43 +0000 (10:55 +0100)]
ath79: Add support for Sophos AP15C

The Sophos AP15C uses the same hardware as the AP15, but has a reset button.

Based on:
commit 6f1efb289837 ("ath79: add support for Sophos AP100/AP55 family")
author    Andrew Powers-Holmes <andrew@omnom.net>
          Fri, 3 Sep 2021 15:53:57 +0200 (23:53 +1000)
committer Hauke Mehrtens <hauke@hauke-m.de>
          Sat, 16 Apr 2022 16:59:29 +0200 (16:59 +0200)

Unique to AP15C:
 - Reset button
 - External RJ45 serial console port

Flashing instructions:

This firmware can be flashed either via a compatible Sophos SG or XG
firewall appliance, which does not require disassembling the device, or via
the U-Boot console available on the internal UART header.

To flash via XG appliance:
 - Register on Sophos' website for a no-cost Home Use XG firewall license
 - Download and install the XG software on a compatible PC or virtual
   machine, complete initial appliance setup, and enable SSH console access
 - Connect the target AP device to the XG appliance's LAN interface
 - Approve the AP from the XG Web UI and wait until it shows as Active
   (this can take 3-5 minutes)
 - Connect to the XG appliance over SSH and access the Advanced Console
   (Menu option 5, then menu option 3)
 - Run `sudo awetool` and select the menu option to connect to an AP via
   SSH. When prompted to enable SSH on the target AP, select Yes.
 - Wait 2-3 minutes, then select the AP from the awetool menu again. This
   will connect you to a root shell on the target AP.
 - Copy the firmware to /tmp/openwrt.bin on the target AP via SCP/TFTP/etc
 - Run `mtd -r write /tmp/openwrt.bin astaro_image`
 - When complete, the access point will reboot to OpenWRT.

To flash via U-Boot serial console:
 - Configure a TFTP server on your PC, and set IP address 192.168.99.8 with
   netmask 255.255.255.0
 - Copy the firmware .bin to the TFTP server and rename to 'uImage_AP15C'
 - Open the target AP's enclosure and locate the 4-pin 3.3V UART header [4]
 - Connect the AP ethernet to your PC's ethernet port
 - Connect a terminal to the UART at 115200 8/N/1 as usual
 - Power on the AP and press a key to cancel autoboot when prompted
 - Run the following commands at the U-Boot console:
    - `tftpboot`
    - `cp.b $fileaddr 0x9f070000 $filesize`
    - `boot`
 - The access point will boot to OpenWRT.

Signed-off-by: David Lutz <kpanic@hirnduenger.de>
3 weeks agovrx518_tc: allow larger MTU to support RFC4638
Andrew MacIntyre [Fri, 8 Nov 2024 12:44:13 +0000 (23:44 +1100)]
vrx518_tc: allow larger MTU to support RFC4638

vrx518_tc currently sets the interface maximum MTU to the ethernet default
of 1500 bytes by default via ether_setup() called from ptm_setup().

To support 1508 byte baby jumbo frames (RFC4638) for PPPoE connections
over VDSL links as already supported by the VR9 ltq_ptm driver ([1], [2])
set the interface maximum MTU to MAX_MTU.

MAX_MTU is defined in dcdp/inc/tc_common.h to 2002 bytes and this value is
used in ptm_change_mtu() and elsewhere as the maximum MTU, however this is
short circuited by checks against the interface maximum MTU.

[1]: https://forum.openwrt.org/t/fritzbox-7530-and-rfc4638-baby-jumbo-frames/181327
[2]: https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=8a2a20e71e2909f84dab47e51dfda9e292a6c1ae

Signed-off-by: Andrew MacIntyre <andymac@pcug.org.au>
Link: https://github.com/openwrt/openwrt/pull/16856
Signed-off-by: Robert Marko <robimarko@gmail.com>
3 weeks agorampis: mt7621: Edgerouter-X adjust IMAGE_SIZE to reflect new kernel size
Tim Lunn [Fri, 26 Apr 2024 01:27:45 +0000 (11:27 +1000)]
rampis: mt7621: Edgerouter-X adjust IMAGE_SIZE to reflect new kernel size

IMAGE_SIZE was previously set to kernel1 + ubi size = 256768k, now
kernel1 is 6MB adjust this value to add 3072k to total image size.

Signed-off-by: Tim Lunn <tim@feathertop.org>
Link: https://github.com/openwrt/openwrt/pull/15194
Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 weeks agoramips: mt7621: Edgerouter-X drop factory image
Tim Lunn [Fri, 19 Apr 2024 12:16:11 +0000 (22:16 +1000)]
ramips: mt7621: Edgerouter-X drop factory image

Edgerouter-X factory images have not built automatically since 19.x due
to images being over 3MB. While it was possible to build custom images
with very stripped down config, this is no longer possible with the size
increases of linux 6.1 and 6.6.

Drop code for generation of factory images, if some dev later wishes to
try custom images they can revert this commit.

Signed-off-by: Tim Lunn <tim@feathertop.org>
Link: https://github.com/openwrt/openwrt/pull/15194
Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 weeks agorampis: mt7621: Re-enable Edgerouter-X image builds
Tim Lunn [Thu, 18 Apr 2024 00:53:54 +0000 (10:53 +1000)]
rampis: mt7621: Re-enable Edgerouter-X image builds

With the new layout providing 6MB for kernel there will be no issues
with kernel size affecting build of images.

Re-enable image builds for Edgerouter-X and X-SFP.

Signed-off-by: Tim Lunn <tim@feathertop.org>
Tested-by: Mauri Sandberg <maukka@ext.kapsi.fi>
Link: https://github.com/openwrt/openwrt/pull/15194
Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 weeks agorampis: mt7621: Edgerouter-X update compat version to 2.0
Tim Lunn [Thu, 18 Apr 2024 00:57:17 +0000 (10:57 +1000)]
rampis: mt7621: Edgerouter-X update compat version to 2.0

Use compat version to indicate that the new layout for larger kernels
is in place. This handled by the patch to ubnt.sh to always select
the kernel1 slot for flashing and as active kernel slot.

Signed-off-by: Tim Lunn <tim@feathertop.org>
Tested-by: Mauri Sandberg <maukka@ext.kapsi.fi>
Link: https://github.com/openwrt/openwrt/pull/15194
Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 weeks agorampis: mt7621: Edgerouter-X set compat version message
Tim Lunn [Thu, 18 Apr 2024 00:56:07 +0000 (10:56 +1000)]
rampis: mt7621: Edgerouter-X set compat version message

Refer user to the wiki page for instructions on how to migrate to the
new kernel layout.

Signed-off-by: Tim Lunn <tim@feathertop.org>
Tested-by: Mauri Sandberg <maukka@ext.kapsi.fi>
Link: https://github.com/openwrt/openwrt/pull/15194
Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 weeks agorampis: mt7621: resize Edgerouter-X kernel size to 6MB
Tim Lunn [Wed, 17 Apr 2024 00:51:35 +0000 (10:51 +1000)]
rampis: mt7621: resize Edgerouter-X kernel size to 6MB

With the updated partition layout set in dts, set the KERNEL_SIZE
parameter to 6MB allowing builds of Linux 6.1 and later to fit.

Signed-off-by: Tim Lunn <tim@feathertop.org>
Tested-by: Mauri Sandberg <maukka@ext.kapsi.fi>
Link: https://github.com/openwrt/openwrt/pull/15194
Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 weeks agorampis: mt7621: Edgerouter-X disable toggling of kernel slots
Tim Lunn [Wed, 17 Apr 2024 02:51:22 +0000 (12:51 +1000)]
rampis: mt7621: Edgerouter-X disable toggling of kernel slots

Uboot selects which kernel slot to boot based on a flag in the factory
mtd partition. Patch ubnt.sh to ensure always flash to kernel1 slot and
update flag if required.

Signed-off-by: Tim Lunn <tim@feathertop.org>
Tested-by: Mauri Sandberg <maukka@ext.kapsi.fi>
Link: https://github.com/openwrt/openwrt/pull/15194
Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 weeks agorampis: mt7621: Convert Edgerouter-X dts to single kernel config
Tim Lunn [Wed, 17 Apr 2024 00:49:49 +0000 (10:49 +1000)]
rampis: mt7621: Convert Edgerouter-X dts to single kernel config

The OEM layout for Edgerouter X provides for two 3MB kernel slots.
As of linux 6.1 the kernel images no longer fit and as such
Edgerouter X builds have been disabled in Main.

Revise the layout to make kernel1 slot 6MB and drop kernel2 slot.

This patch applies the required changes to the dts file.

Signed-off-by: Tim Lunn <tim@feathertop.org>
Tested-by: Mauri Sandberg <maukka@ext.kapsi.fi>
Link: https://github.com/openwrt/openwrt/pull/15194
Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 weeks agonetifd: update to Git HEAD (2024-11-08)
Felix Fietkau [Fri, 8 Nov 2024 09:50:39 +0000 (10:50 +0100)]
netifd: update to Git HEAD (2024-11-08)

e93f6c3fc729 main: fix format string related warnings for log/debug printf functions
6ab44a2413f9 fix signed/unsigned comparison warnings
4fe997b61d7d system-dummy: add system_if_apply_settings_after_up
992d33cb42a6 ubus: add notifications on wireless device state changes
34eb11eb6f5c device/interface: add "tags" attribute from config to status dump

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 weeks agowifi-scripts: add free-form "tags" array option for wifi-iface
Felix Fietkau [Fri, 8 Nov 2024 08:13:54 +0000 (09:13 +0100)]
wifi-scripts: add free-form "tags" array option for wifi-iface

This allows annotating wifi interfaces in the config in a way that can be
queried through wifi status. One example use case is to mark wifi interfaces
for use with specific services without having to explicitly reference the
(often unnamed) sections from elsewhere.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 weeks agokernel: modules: package driver for generic MIPI DBI TFT panels
Daniel Golle [Sat, 2 Nov 2024 20:22:35 +0000 (20:22 +0000)]
kernel: modules: package driver for generic MIPI DBI TFT panels

Package kmod-drm-panel-mipi-dbi as well as modules it depends on in
order to support a wide range of MIPI DBI complaint SPI-connected
TFT panels.

See https://github.com/notro/panel-mipi-dbi/ for more information on
how to use specific panels.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 weeks agoath79: linksys_ea4500-v3: take over the space for user data
Edward Chow [Mon, 4 Mar 2024 17:24:10 +0000 (01:24 +0800)]
ath79: linksys_ea4500-v3: take over the space for user data

The last "syscfg" partition of the OEM firmware turns out to be a
UBIFS used to store user data, just as the "rootfs_data" of OpenWrt,
so it should be reasonable to absorb it into the "ubi" partition.

Factory installations via either OEM firmware or tftp, or by forcibly
flashing factory image to mtd5 (firmware) partition with mtd tool are
confirmed working, but the UBI remaining inside "syscfg" partition
could break upgrade. Fortunately, installing kmod-mtd-rw and erasing
"syscfg" partition before upgrade is confirmed working, in which case,
"ubi" will automatically expand to the blank space once occupied by
the former mtd8 (syscfg), with the total block number increased, but
the UBIFS for rootfs_data will not automatically claim the newly
available space (since it is created when mtd8 still exists, and
sysupgrade does not set "autoresize" flag to rootfs_data). These space
will be claimed during the next upgrade, when rootfs_data is removed
and created again.

Fixes: 50f727b7737d1 ("ath79: add support for Linksys EA4500 v3")
Signed-off-by: Edward Chow <equu@openmail.cc>
Link: https://github.com/openwrt/openwrt/pull/14791
Signed-off-by: Robert Marko <robimarko@gmail.com>
3 weeks agokernel: r8125: update to v9.014.01
Álvaro Fernández Rojas [Wed, 6 Nov 2024 09:00:56 +0000 (10:00 +0100)]
kernel: r8125: update to v9.014.01

Changelog: https://github.com/openwrt/rtl8125/compare/9.013.02...9.014.01

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 weeks agoprocd: update to Git HEAD (2024-11-06)
Christian Marangi [Wed, 6 Nov 2024 09:38:20 +0000 (10:38 +0100)]
procd: update to Git HEAD (2024-11-06)

109fa41b2321 system: fix description value from os-release

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
3 weeks agofritz-tools: fix mixed indentation
David Bauer [Tue, 5 Nov 2024 19:03:39 +0000 (20:03 +0100)]
fritz-tools: fix mixed indentation

Signed-off-by: David Bauer <mail@david-bauer.net>
3 weeks agokernel: r8168: refresh patch
Álvaro Fernández Rojas [Tue, 5 Nov 2024 13:01:06 +0000 (14:01 +0100)]
kernel: r8168: refresh patch

Patches weren't refreshed when r8168 was updated to v8.054.00 in a85e18b53f0f.

Fixes: a85e18b53f0f ("kernel: r8168: update to v8.054.00")
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 weeks agobuild: set PATH for post-install scripts
Daniel Golle [Tue, 5 Nov 2024 03:05:31 +0000 (03:05 +0000)]
build: set PATH for post-install scripts

post-install scripts may need to call executables installed to
STAGING_DIR_HOSTPKG which is not part of the PATH set to TARGET_PATH in
rules.mk.
Set PATH for post-install scripts to TARGET_PATH_PKG.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Link: https://github.com/openwrt/openwrt/pull/16865
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
3 weeks agomediatek: set 7 MACs per wifi band in board.json on OpenWrt One
John Crispin [Tue, 5 Nov 2024 08:43:38 +0000 (09:43 +0100)]
mediatek: set 7 MACs per wifi band in board.json on OpenWrt One

Mass production units will get 16 assigned MAC addresses. This allows each phy
to spawn up to 7 VAPs which will each have unique MAC without needing the
private bit.

Signed-off-by: John Crispin <john@phrozen.org>
3 weeks agomediatek: set mac increment to 7 for the 5G radio on OpenWrt One
John Crispin [Sun, 22 Sep 2024 07:07:58 +0000 (09:07 +0200)]
mediatek: set mac increment to 7 for the 5G radio on OpenWrt One

Mass production units will get 16 assigned MAC addresses. This allows each phy
to spawn up to 7 VAPs which will each have unique MAC without needing the
private bit.

Signed-off-by: John Crispin <john@phrozen.org>
3 weeks agopackages: drop DEVICE specific dependency for omnia
Paul Spooren [Mon, 4 Nov 2024 21:34:52 +0000 (22:34 +0100)]
packages: drop DEVICE specific dependency for omnia

Both packages `ombnia-mcu-firmware` and `omnia-mcutool` would depend on
a specific device. The buildbots however build all devices and therefore
the package isn't build at all, due to unmet dependencies.

While this didn't cause issues with OPKG, APK fails actively due to the
missing packages. Drop the specific dependency, however wants to install
unrelated firmware on any device can do that anyway.

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 weeks agokernel: r8126: update to v10.014.01
Álvaro Fernández Rojas [Mon, 4 Nov 2024 23:33:02 +0000 (00:33 +0100)]
kernel: r8126: update to v10.014.01

Changelog: https://github.com/openwrt/rtl8126/compare/10.013.00...10.014.01

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 weeks agomac80211: compatibility with kernel 6.6.59
Mieczyslaw Nalewaj [Fri, 1 Nov 2024 20:59:23 +0000 (21:59 +0100)]
mac80211: compatibility with kernel 6.6.59

Fix genlmsg_multicast_allns() build error on kernel 6.6.59.
Based on kernel patch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit?h=v6.6.59&id=e0f83d268974dab0361d11904dfc9acec53f96a6

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/16835
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 weeks agokernel: bump 6.6 to 6.6.59
Mieczyslaw Nalewaj [Sun, 3 Nov 2024 07:53:37 +0000 (08:53 +0100)]
kernel: bump 6.6 to 6.6.59

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

Removed upstreamed:
 - generic/backport-6.6/777-netfilter-xtables-fix-typo-causing-some-targets-to-not-load-on-IPv6.patch[1]
 - generic/backport-6.6/780-24-v6.12-r8169-avoid-unsolicited-interrupts.patch[2]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.59&id=433742ba96baf30c21e654ce3e698ad87100593b
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.59&id=7d6d46b429804b1a182106e27e2f8c0e84689e1a

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/16835
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 weeks agonu801: Mark as nonshared to build in step 1
Robert Marko [Mon, 4 Nov 2024 17:20:06 +0000 (18:20 +0100)]
nu801: Mark as nonshared to build in step 1

Mark the package as nonshared to build it in the target specific build
step 1 of the build bots instead of the architecture generic build step 2.

In the build step 2 it may be left out if we build it using a different
target.

Fixes: #16857
Link: https://github.com/openwrt/openwrt/pull/16859
Signed-off-by: Robert Marko <robimarko@gmail.com>
3 weeks agoramips: Fix EX400 imagebuilder
Mauri Sandberg [Fri, 11 Oct 2024 07:38:07 +0000 (10:38 +0300)]
ramips: Fix EX400 imagebuilder

A factory image for DNA EX400 depends on an initramfs image and they
were explicitly removed from the imagebuilder recently. Now the factory
image creation fails miserably and it also affects custom image creation
with the firmware selector.

Add the initramfs kernel to the staging so that it's shipped with the
imagebuilder. Also remove a image build target added solely for DNA EX400.

Tested by creating a factory and syspupgrade images locally with
the imagebuilder and verified their functionality.

Related work
  c85348d9abf4 ("imagebuilder: remove initramfs image files")

Fixes: fea2264d9fdd ("ramips: mt7621: Add DNA Valokuitu Plus EX400")
Signed-off-by: Mauri Sandberg <maukka@ext.kapsi.fi>
---
v4: use append-image-stage, remove Build/kernel-initramfs-bin
v3: adjust commit subject
v2: remove fix for inconsistent line ending elsewhere in the file
Link: https://github.com/openwrt/openwrt/pull/16659
Signed-off-by: Robert Marko <robimarko@gmail.com>
3 weeks agouboot-mediatek: fix boot media for mt7981 RFB NOR profile
Enrico Mioso [Mon, 21 Oct 2024 21:39:59 +0000 (23:39 +0200)]
uboot-mediatek: fix boot media for mt7981 RFB NOR profile

Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com>
CC: Daniel Golle <daniel@makrotopia.org>
3 weeks agogpio-button-hotplug: use flexible array member
Rosen Penev [Fri, 2 Aug 2024 21:30:32 +0000 (14:30 -0700)]
gpio-button-hotplug: use flexible array member

zero length arrays are deprecated.

Fixes coccinelle warning:

WARNING use flexible-array member instead

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16848
Signed-off-by: Robert Marko <robimarko@gmail.com>
3 weeks agoopenwrt-keyring: fix missing 24.10 usign key by installing it
Petr Štetiar [Mon, 4 Nov 2024 07:33:37 +0000 (07:33 +0000)]
openwrt-keyring: fix missing 24.10 usign key by installing it

@KA2107 reported that opkg is not able to verify the artifact signatures
produced by buildbot using the usign 24.10 release keys. So lets fix it
by actually adding the 24.10 usign key with d310c6f2833e97f7 fingerprint
into the openwrt-keyring package.

Fixes: #16850
Reported-by: @KA2107
Fixes: a535cfc09e1c ("openwrt-keyring: add OpenWrt 24.10 release build usign key")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 weeks agomtd: Add backported Winbond fix
Linus Walleij [Sun, 3 Nov 2024 08:34:31 +0000 (09:34 +0100)]
mtd: Add backported Winbond fix

Upstream stable is slow at picking this up and several systems
are regressing. Add the patch locally in OpenWrt.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
3 weeks agomediatek: YunCore AX835: fix voltage regulator
Leon M. Busch-George [Sat, 2 Nov 2024 11:28:51 +0000 (12:28 +0100)]
mediatek: YunCore AX835: fix voltage regulator

Specifying GPIO_ACTIVE_HIGH on the GPIO for the voltage regulator doesn't
suffice. The regulator itself requires enable-active-high to be set.

Fixes: #16292
Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
Link: https://github.com/openwrt/openwrt/pull/16839
Signed-off-by: Robert Marko <robimarko@gmail.com>
3 weeks agoath79: gpio-rb91x-key: use gpiochip_get_data
Rosen Penev [Sat, 19 Oct 2024 22:51:51 +0000 (15:51 -0700)]
ath79: gpio-rb91x-key: use gpiochip_get_data

No need for a custom function that does the same thing.

Oversight from devm conversion.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16748
Signed-off-by: Robert Marko <robimarko@gmail.com>
3 weeks agoath79: gpio-latch-miktorik: use gpiochip_get_data
Rosen Penev [Sat, 19 Oct 2024 22:49:42 +0000 (15:49 -0700)]
ath79: gpio-latch-miktorik: use gpiochip_get_data

Oversight from devm conversion. No need for a custom static inline
function.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16747
Signed-off-by: Robert Marko <robimarko@gmail.com>
3 weeks agoramips: mt7621: convert usb power to regulators
Rosen Penev [Thu, 24 Oct 2024 21:51:29 +0000 (14:51 -0700)]
ramips: mt7621: convert usb power to regulators

These things are regulators. Should silence dmesg messages about using
dummy regulators.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16804
Signed-off-by: Robert Marko <robimarko@gmail.com>
3 weeks agokernel: can: package driver for Geschwister Schneider interface
Chuanhong Guo [Sat, 2 Nov 2024 14:24:21 +0000 (22:24 +0800)]
kernel: can: package driver for Geschwister Schneider interface

Package gs_usb CAN driver, which is for Geschwister Schneider and
bytewerk.org candleLight compatible USB/CAN interfaces.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
3 weeks agomediatek: refresh patches
Daniel Golle [Sun, 3 Nov 2024 02:38:17 +0000 (02:38 +0000)]
mediatek: refresh patches

The mediatek target requires refreshing after recent additions.

Fixes: cfe8e6e75f ("mediatek: add support for Realtek RTL8261n 10G PHYs")
Fixes: ddfae94a14 ("mediatek: add support for swapping the polarity on usxgmii interfaces")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 weeks agomediatek: filogic: BPi-R4: wire up pinctrl for pwm-fan
Daniel Golle [Sat, 2 Nov 2024 20:17:52 +0000 (20:17 +0000)]
mediatek: filogic: BPi-R4: wire up pinctrl for pwm-fan

Assign pwm function of PWM0 pin to the pwm-fan.
This is mostly just cosmetics as it basically reflects the default
setting of that pin.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 weeks agomediatek: pinctrl-mt7988: add missing PWM pingroups
Daniel Golle [Sat, 2 Nov 2024 20:01:05 +0000 (20:01 +0000)]
mediatek: pinctrl-mt7988: add missing PWM pingroups

Add additionals possible pinctrl group for pwm2~7 on pins
pin  4 (GPIO_A)        pwm7
pin 58 (JTAG_JTDI)     pwm2
pin 59 (JTAG_JTDO)     pwm3
pin 60 (JTAG_JTMS)     pwm4
pin 61 (JTAG_JTCLK)    pwm5
pin 62 (JTAG_JTRST_N)  pwm6

They can be useful e.g. on the BPi-R4 as in that way pwm2~6 can be exposed
on the 26-pin header (pwm6 always, pwm2~5 instead of the full UART).

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 weeks agouboot-mediatek: import patches improving menu navigation
Daniel Golle [Thu, 31 Oct 2024 21:08:10 +0000 (21:08 +0000)]
uboot-mediatek: import patches improving menu navigation

Using the arrow keys to navigate the U-Boot menu often leads to being
dropped into the U-Boot shell unexpectedly.
This can be prevented in most cases by improving the logic to detect the
arrow key ESC sequence and only reprinting the menu if actually needed.
Also enable CONFIG_SERIAL_RX_BUFFER for all boards as it helps preventing
the remaining cases.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 weeks agoipq40xx: use devm for mutex_init
Rosen Penev [Sat, 19 Oct 2024 01:56:30 +0000 (18:56 -0700)]
ipq40xx: use devm for mutex_init

Avoids having to call mutex_destroy in remove.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16755
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 weeks agobcm27xx-gpu-fw: fix package
Álvaro Fernández Rojas [Fri, 1 Nov 2024 20:44:43 +0000 (21:44 +0100)]
bcm27xx-gpu-fw: fix package

Install definition was accidentally removed in 7afdbc0955a5 and IB fails.

Fixes: 7afdbc0955a5 ("bcm27xx-gpu-fw: update to latest version")
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 weeks agokernel: KERNEL_NET_L3_MASTER_DEV default to y if !SMALL_FLASH
Paul Donald [Tue, 29 Oct 2024 20:49:00 +0000 (21:49 +0100)]
kernel: KERNEL_NET_L3_MASTER_DEV default to y if !SMALL_FLASH

Follow-up for 45d541bb409355f090b971d96ebebd8610ef84a7

This change allows features such as kmod-vrf

```
KERNEL_NET_L3_MASTER_DEV=n

x86_64 generic
bzImage 6,927,360 bytes
aarch64 coretex-a53
kernel  4,268,836 bytes

KERNEL_NET_L3_MASTER_DEV=y

x86_64 generic
bzImage 6,931,456 bytes
aarch64 coretex-a53
kernel  4,273,042 bytes

Delta:
x86_64 generic
+4096 bytes
aarch64 coretex-a53
+4206 bytes

x86_64 generic vrf.ko - 258,792 bytes
aarch64 coretex-a53 vrf.ko - 263,632 bytes
```

See:
https://forum.openwrt.org/t/vrf-support-testing-out-evpn-at-home/181108
https://forum.openwrt.org/t/please-enable-net-l3-master-dev-in-kernel-build-by-default/201825

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16819
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 weeks agomediatek: filogic: add Arcadyan Mozart platform
John Crispin [Sat, 21 Sep 2024 07:48:47 +0000 (09:48 +0200)]
mediatek: filogic: add Arcadyan Mozart platform

* Mediatek MT7988A (4x Cortex-A73, up to 1.8 GHz clock speed)
* 8 GiB eMMC
* 4 GiB DDR4 RAM
* 2x 10000M + 1x 1000M  ports
* MT7996 Tri-band (2.4G, 5G, 6G) 4T4R 802.11be Wi-Fi
* 2 buttons (Reset, WPS)
* 2x LED for each GMAC
* USB-C PD power input

Signed-off-by: John Crispin <john@phrozen.org>
4 weeks agomediatek: add support for swapping the polarity on usxgmii interfaces
John Crispin [Tue, 29 Oct 2024 12:40:11 +0000 (13:40 +0100)]
mediatek: add support for swapping the polarity on usxgmii interfaces

This patch comes from the MTK SDK.

Signed-off-by: John Crispin <john@phrozen.org>
4 weeks agomediatek: add support for Realtek RTL8261n 10G PHYs
John Crispin [Tue, 29 Oct 2024 12:37:40 +0000 (13:37 +0100)]
mediatek: add support for Realtek RTL8261n 10G PHYs

There is no upstream driver yet. Merge the RTL SDK driver for now.

Signed-off-by: John Crispin <john@phrozen.org>
4 weeks agouboot-mediatek: add support for arcadyan,mozart
John Crispin [Sat, 21 Sep 2024 07:47:26 +0000 (09:47 +0200)]
uboot-mediatek: add support for arcadyan,mozart

Signed-off-by: John Crispin <john@phrozen.org>
4 weeks agoopenwrt-keyring: add OpenWrt 24.10 release build usign key
Petr Štetiar [Fri, 1 Nov 2024 06:25:07 +0000 (06:25 +0000)]
openwrt-keyring: add OpenWrt 24.10 release build usign key

 fbae29d730f8 usign: add OpenWrt 24.10 release build public key

Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 weeks agomediatek: mt7988: fix peripheral SPI busses
Daniel Golle [Fri, 1 Nov 2024 03:37:51 +0000 (03:37 +0000)]
mediatek: mt7988: fix peripheral SPI busses

The clocks for SPI busses were named wrongly which resulted in the
spi-mt65xx driver not requesting them. This has apparently been
worked around by marking the clocks required for SPI0 which is used
for SPI-NOR and SPI-NAND flash chips as critical.
Fix the device tree for all 3 generic SPI host controllers and no
longer mark clocks as critical.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 weeks agoath79: Really fix 5GHz on QCA9886 variant of ZTE MF286
Lech Perczak [Thu, 24 Oct 2024 18:51:00 +0000 (20:51 +0200)]
ath79: Really fix 5GHz on QCA9886 variant of ZTE MF286

Fix in commit 25eead21c5ab ("ath79: fix 5GHz on QCA9886 variant of ZTE MF286")
was incomplete. A user of such variant popped up, and in the boot log
after installation, we discovered that QCA9886 expects different
pre-calibration data size, than the older QCA9880 variant:

ath10k_pci 0000:00:00.0: qca9888 hw2.0 target 0x01000000 chip_id 0x00000000 sub 0000:0000
ath10k_pci 0000:00:00.0: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0
ath10k_pci 0000:00:00.0: firmware ver 10.4b-ct-9888-fW-13-5ae337bb1 api 5 features mfp,peer-flow-ctrl,txstatus-noack,wmi-10.x-CT,ratemask-CT,regdump-CT,txrate-CT,flush-all-CT,pingpong-CT,ch-regs-CT,nop-CT,set-special-CT,tx-rc-CT,cust-stats-CT,txrate2-CT,beacon-cb-CT,wmi-block-ack-CT,wmi-bcn-rc-CT crc32 59e741e7
ath10k_pci 0000:00:00.0: invalid calibration data length in nvmem-cell 'pre-calibration': 2116 != 12064
ath10k_pci 0000:00:00.0: Loading BDF type 0
ath10k_pci 0000:00:00.0: failed to fetch board data for bus=pci,vendor=168c,device=0056,subsystem-vendor=0000,subsystem-device=0000 from ath10k/QCA9888/hw2.0/board-2.bin
ath10k_pci 0000:00:00.0: failed to fetch board-2.bin or board.bin from ath10k/QCA9888/hw2.0
ath10k_pci 0000:00:00.0: failed to fetch board file: -12
ath10k_pci 0000:00:00.0: could not probe fw (-12)

Explicitly define a pre-calibration nvmem-cell for this variant, and use
it instead of the calibration one, which is shorter.

Fixes: 25eead21c5ab ("ath79: fix 5GHz on QCA9886 variant of ZTE MF286")
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16809
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 weeks agobcm27xx: update to latest RPi patches
Álvaro Fernández Rojas [Thu, 31 Oct 2024 09:09:44 +0000 (10:09 +0100)]
bcm27xx: update to latest RPi patches

The patches were generated from the RPi repo with the following command:
git format-patch v6.6.58..rpi-6.6.y

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 weeks agobcm27xx-gpu-fw: update to latest version
Álvaro Fernández Rojas [Wed, 30 Oct 2024 23:25:41 +0000 (00:25 +0100)]
bcm27xx-gpu-fw: update to latest version

Use release tar instead of downloading separate files.

Full changelog: https://github.com/raspberrypi/firmware/compare/1.20240424...1.20241008

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 weeks agoramips: m4r v4: fix typo
Rosen Penev [Fri, 25 Oct 2024 22:39:30 +0000 (15:39 -0700)]
ramips: m4r v4: fix typo

It should be debounce-interval, as with the others.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16802
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 weeks agoCI: labeler: add bcm27xx-utils
Álvaro Fernández Rojas [Thu, 31 Oct 2024 07:52:16 +0000 (08:52 +0100)]
CI: labeler: add bcm27xx-utils

bcm27xx-utils can only be built for bcm27xx target.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 weeks agobcm27xx-utils: update to latest version
Álvaro Fernández Rojas [Wed, 30 Oct 2024 12:49:02 +0000 (13:49 +0100)]
bcm27xx-utils: update to latest version

Fixes build with GCC 14.

Full changelog: https://github.com/raspberrypi/utils/compare/451b9881b72cb994c102724b5a7d9b93f97dc315...6a2a6becebbc38fde34a94386457ac8210f9119b

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>