Commit Graph

31146 Commits

Author SHA1 Message Date
Rosen Penev
da8abd4a1e kernel: remove GCC11_NO_ARRAY_BOUNDS
This symbol is no longer present.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16770
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-11-17 14:55:16 +01:00
Mieczyslaw Nalewaj
84665993d6 kernel: move CONFIG_INTEL_MEI settings to target generic
Move settings CONFIG_INTEL_MEI_GSC_PROXY, CONFIG_INTEL_MEI_HDCP
and CONFIG_INTEL_MEI_PXP to target generic.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/16971
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-11-17 12:41:51 +01:00
Rodrigo Balerdi
491121288e ipq807x: delete unused legacy eMMC sysupgrade code
All ipq807x devices that were using the legacy 'mmc_do_upgrade' eMMC
sysupgrade code were ported to the replacement 'emmc_do_upgrade' code.

Signed-off-by: Rodrigo Balerdi <lanchon@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16505
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-11-17 12:24:43 +01:00
Rodrigo Balerdi
17f84bba44 ipq807x: order devices alphabetically
Alphabetically sort devices in platform.sh

Signed-off-by: Rodrigo Balerdi <lanchon@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16505
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-11-17 12:24:43 +01:00
Rodrigo Balerdi
fe481c9c47 ipq807x: prpl haze & qnap 301w: use the standard eMMC sysupgrade code
Note that the old ad-hoc method did not explicitly align backup data
to 64 KiB boundaries.

Also note that the qnap 301w has a 'rootfs_data' partition in the eMMC
that is being ignored by fstools during boot, presumably due to a bug.
This is why the partition is also ignored in the sysupgrade code and
there is no definition of CI_DATAPART="rootfs_data".

Signed-off-by: Rodrigo Balerdi <lanchon@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16505
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-11-17 12:24:43 +01:00
Rodrigo Balerdi
5583d23189 ipq807x: nbg7815: use the standard eMMC sysupgrade code
Note that the old ad-hoc method did not explicitly align backup data
to 64 KiB boundaries.

Signed-off-by: Rodrigo Balerdi <lanchon@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16505
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-11-17 12:24:43 +01:00
Markus Stockhausen
65964c42f8 realtek: align kernel config with upstream
Since the start of the Realtek target OpenWrt works with RTL83XX as the
target architecture. Upstream is using MACH_REALTEK_RTL instead. To
simplify further development align that.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/16963
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-11-16 18:02:18 +01:00
John Audia
31111680f6
x86: switch config to a tickless kernel
This commit fixes and closes #16313.

Switch the x86 kernel's timer to tickless operation which is
more power efficient since it is not woken up by periodic timer
interrupts when idle.  Also add several other options for CPU
idle governors particularly the upstream default for tickless
kernels, CONFIG_CPU_IDLE_GOV_MENU. Without this commit, my AMD
Ryzen 7 5800U can only achieve a minimum core frequency of 1,384
MHz which is over 3x higher than the processor's minimum
frequency of 400 MHz which is accessible with this modification.
In addition to the lower clock rate, I have seen a concomitant
reduction in both idle temps and at-the-wall power consumption.

Summary:
* Idle CPU freqs dropped from 1,384 MHz to 400 Mhz.
* Idle power consumption dropped from 7 W avg to 5 W.
* Idle temps have dropped from 50C on avg to 43C.

There are other well known reasons to switch to a tickless
timer including: reduced interrupt overhead, better use of CPU
resources, and reduced latency to name a few.

Build system: x86/64
Build-tested: x86/64/AMD Cezanne
Run-tested: x86/64/AMD Cezanne

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/16317
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-11-16 14:33:58 +01:00
John Audia
487ca61f91 kernel: bump 6.6 to 6.6.61
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.61

Manually rebased:
	bcm27xx/patches-6.6/950-0998-i2c-designware-Add-support-for-bus-clear-feature.patch

All other patches automatically rebased.

Build system: x86/64
Build-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3
Run-tested: x86/64/AMD Cezanne, 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/16959
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-11-16 00:25:14 +01:00
Joe Zheng
77cfe8fd15 x86: make i915 as a kmod with required firmware
i915 driver requires to load correct firmware to work on latest x86
GPU, it is more reasonable to make it as a kernel module, so that
initramfs is not required, and it can also save some space from the
kernel image comparing being a built-in driver

Signed-off-by: Joe Zheng <joe.zheng@intel.com>
Link: https://github.com/openwrt/openwrt/pull/16276
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-11-15 19:03:21 +01:00
Marek Behún
749a43325b utils: Add the omnia-eeprom utility
Add a new utility, `omnia-eeprom`, which can be used to print / set
EEPROM fields on Turris Omnia.

One example when this utility might be useful is if the board
experiences random crashes due to newer versions of the DDR training
algorithm in newer U-Boot. The user can change the DDR speed from 1600K
to 1333H to solve these issues, with

  ```
  omnia-eeprom set ddr_speed 1333H
  ```

Signed-off-by: Marek Behún <kabel@kernel.org>
Link: https://github.com/openwrt/openwrt/pull/16264
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-11-15 13:01:31 +01:00
Rodrigo Balerdi
0e59eaa796 ipq806x: tr4400v2: revert nesting of MTD partitions that bricks device
This reverts commit e1043a746a, 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>
2024-11-14 10:01:30 +01:00
Enrico Mioso
b43194e041 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>
2024-11-14 04:14:23 +00:00
Kuan-Yi Li
93d005e6bc
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>
2024-11-13 17:42:04 +01:00
Felix Fietkau
4c65359af4 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: 44598c233d ("build: remove broken dependency of metadata on toplevel .config variables")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-11-13 07:12:21 +01:00
Robert Marko
8729d2a64d 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>
2024-11-12 17:42:37 +01:00
Christian Marangi
64fbc96595
airoha: an7581: backport upstream ethernet fixes
Backport patches fixing some ethernet problem merged upstream.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-11-12 13:55:30 +01:00
Rosen Penev
1125ed408c 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>
2024-11-12 11:19:52 +01:00
Rosen Penev
3e42526404 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>
2024-11-11 21:28:32 +01:00
Rosen Penev
fccff963c0 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>
2024-11-10 22:39:45 +01:00
Rosen Penev
44824f0b78 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>
2024-11-10 22:36:16 +01:00
John Audia
85844cfc5c 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>
2024-11-10 10:35:05 +01:00
Paul Spooren
999ef8270f 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>
2024-11-10 04:27:19 +01:00
Rosen Penev
cc98cfafd7
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>
2024-11-10 02:16:31 +01:00
Rosen Penev
a7bc6bf7db 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>
2024-11-09 17:31:59 +01:00
Paul Spooren
12a7307869 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>
2024-11-09 16:46:44 +01:00
Paul Spooren
15b7994c01 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>
2024-11-09 16:46:41 +01:00
Paul Spooren
451e2ce006 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>
2024-11-09 16:46:35 +01:00
Paul Spooren
ad1c1b7047 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>
2024-11-09 16:46:35 +01:00
David Lutz
a7abc7ec3b ath79: Add support for Sophos AP15C
The Sophos AP15C uses the same hardware as the AP15, but has a reset button.

Based on:
commit 6f1efb2898 ("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>
2024-11-09 03:21:36 +01:00
Tim Lunn
5b406bccac
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>
2024-11-08 12:37:14 +00:00
Tim Lunn
4d90b79704
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>
2024-11-08 12:37:12 +00:00
Tim Lunn
71b4842e3b
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>
2024-11-08 12:37:10 +00:00
Tim Lunn
1bdbd511b2
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>
2024-11-08 12:37:08 +00:00
Tim Lunn
70c371d91c
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>
2024-11-08 12:37:06 +00:00
Tim Lunn
09a6bffb6e
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>
2024-11-08 12:37:04 +00:00
Tim Lunn
5e355f1f90
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>
2024-11-08 12:37:02 +00:00
Tim Lunn
dc51c4355d
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>
2024-11-08 12:37:01 +00:00
Edward Chow
6691ff86b7 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: 50f727b773 ("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>
2024-11-07 14:56:39 +01:00
John Crispin
48028cd102 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>
2024-11-05 10:11:44 +01:00
John Crispin
6ec1477b4d 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>
2024-11-05 10:11:44 +01:00
Mieczyslaw Nalewaj
4fc47c6000 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>
2024-11-04 23:40:12 +01:00
Mauri Sandberg
11ba2b141f 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
  c85348d9ab ("imagebuilder: remove initramfs image files")

Fixes: fea2264d9f ("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>
2024-11-04 11:25:36 +01:00
Linus Walleij
7da9d6bfe0 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>
2024-11-04 08:31:00 +01:00
Leon M. Busch-George
d64e1ed421 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>
2024-11-03 21:40:53 +01:00
Rosen Penev
e99b5832e8 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>
2024-11-03 20:12:35 +01:00
Rosen Penev
6d2ed484fa 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>
2024-11-03 20:12:06 +01:00
Rosen Penev
e612900ae0 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>
2024-11-03 20:08:17 +01:00
Daniel Golle
675d7c8849 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>
2024-11-03 02:39:58 +00:00
Daniel Golle
591272d197 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>
2024-11-02 22:37:34 +00:00