Commit Graph

65879 Commits

Author SHA1 Message Date
Christian Marangi e112fd8e59
scripts/feeds: implement support for --root option
Some feeds might need to set the source for their packages in a
different directory than the cloned one.

For example a feed "test" might be an entire repository and the relevant
packages that wants to be included are in the directory "foo".

In such scenario the source info in the package will result in something
like "feeds/test/foo/network/dnsmasq" instead of an expected entry like
"feeds/test/network/dnsmasq".

To give a more real-world example, this problem is currently present
with OpenWrt SDK where the SDK clone the entire OpenWrt core repository
as "base" feeds but the package are present in the "package" directory.

This cause every package to have the source entry set to
"feeds/base/package/..." conflicting with what a non-SDK build do with
setting the source entry to "feeds/base/..."

To solve this, actually enable support for "flags" in the feeds script
and implement a new option "--root" to set the root directory for the
defined feed to an inner directory.

The "flags" in the feed script are no more than argument option that can
be defined right after the "src-" type in the feed.conf file.

This feature was partially implemented but never actually used for
anything keeping it dormant with all the core piece there (the pattern
regex always accounted for these extra option but they were never passed
to the relevant functions)

An example of the "--root" flag is the following:

src-git --root=package base https://git.openwrt.org/openwrt/openwrt.git;main

With "--root" defined, the script will append "_root" to the feed name
clone directory and will create a symbolic link named with the feed name
and pointing to the feed name clone directory + the value in root.

From the previous example:

feed name: base -> clone directory: base_root
symbolic link: base -> base_root/package

The script internally reference the "_root" directory for every update
operation and OpenWrt build system transparently use the feed name
directory to reference feed packages producing consistent source info
entry.

Link: https://github.com/openwrt/openwrt/pull/20396
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-10-13 11:47:07 +02:00
Zhi-Jun You 6a68c2fef0 wifi-scripts: ucode: fix airtime_mode with hostapd-mini
Currently wifi-scripts ucode appends airtime_mode to hostapd config file
unconditionally.
However this breaks bringing up interface with hostapd-mini
because the mini variant doesn't support airtime policy.

Fix this by changing the script to append airtime_mode only when
airtime_mode is set to greater than zero value in /etc/config/wireless.

Fixes: #20136
Fixes: #20314

Signed-off-by: Zhi-Jun You <hujy652@protonmail.com>
2025-10-13 10:56:39 +02:00
Felix Fietkau 255d999783 ucode: add fs.mkdtemp function
Useful for creating temporary directories

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-10-13 10:56:39 +02:00
INAGAKI Hiroshi f4d7eee8e0 uboot-ath79: update to v2025.10
Update the version of uboot-ath79 package to U-Boot v2025.10 release.

Tested on:

- NEC Aterm WG600HP (AR9344)
- NEC Aterm WG1400HP (QCA9558)

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20358
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-10-13 00:43:11 +02:00
Lorenz Brun 0e8231c887 realtek: fix SFP ports on RTL83xx
Right now the phylink capability function enables 2.5G and 10G modes on
Maple and Cypress, which they mostly (other than two SERDES on Cypress)
don't support. This causes these modes to be selected and break the link
as they are not supported by hardware.

I looked into doing this properly, but it cannot just be done based on
SoC, but needs to take the whole topology into account as a given MAC
might have very different capabilities depending on what SERDES are
assigned to it. So for now just use 1G and QSGMII for RTL83xx and 10G
for RTL93xx. This mostly works, except it will downgrade some 10G links
on RTL839x, but since there are also 1G SFPs on these this cannot be
solved without fully accounting for the global MAC and SERDES
configuration.

So this makes all of the 1G SFP slots work again, while keeping most of
the 10G SFP+ slots working at 10G with minimal changes.

Signed-off-by: Lorenz Brun <lorenz@brun.one>
Link: https://github.com/openwrt/openwrt/pull/20374
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-10-12 16:12:54 +02:00
Sven Eckelmann 3f7776a260 realtek: Skip auto-MAC assignment for devices with MACs in DT
If the devicetree contains the appropriate nodes to configure the MAC
addresses for each physical DSA port, then these MAC addresses must be used
in OpenWrt and not some automatically generated ones. Otherwise the device
often ends up with addresses which are locally administered and not
matching any expected port-to-MAC scheme.

Devices which only get the MAC address for eth0 must still auto-generate
these MAC addresses until the devicetree was updated to also include the
correct ones.

Signed-off-by: Sven Eckelmann <se@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/20241
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-10-12 15:52:13 +02:00
Sven Eckelmann 18e1929401 realtek: Avoid empty lan mac in initial network setup
If the lan_mac cannot be found, it is still used (as empty string) in
various operations. This is not valid and other 02_network scripts checking
for a non-empty string before using it. This should also be adopted for the
realtek 02_network.

Signed-off-by: Sven Eckelmann <se@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/20241
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-10-12 15:52:12 +02:00
Sven Eckelmann f0648fd576 realtek: Split initial network setup in functions
Having everything in a big script without any structure makes it
unnecessary hard to get an overview or modify it without triggering
unexpected side effects.

Signed-off-by: Sven Eckelmann <se@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/20241
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-10-12 15:52:12 +02:00
Sven Eckelmann 1e0a4f11b3 realtek: dsa: Adjust prefix for bridge member functions
The preferred prefix for the Realtek DSA driver code is "rtldsa" and no
longer "rtl83xx". This makes sure that the different drivers have
non-conflicting prefixes and because of this non-conflicting function
names.

Suggested-by: Felix Baumann <felix.bau@gmx.de>
Signed-off-by: Sven Eckelmann <se@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/20360
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-10-12 12:49:49 +02:00
Sven Eckelmann 6c6a003c7d realtek: dsa: Fix name of RTL93xx switch_ops
The RTL930x and the RTL931x SoC families share the same struct
dsa_switch_ops. This should be represented in the name of the object.

Suggested-by: Felix Baumann <felix.bau@gmx.de>
Signed-off-by: Sven Eckelmann <se@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/20360
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-10-12 12:49:49 +02:00
Sven Eckelmann 0eeb8b7da6 realtek: dsa: Add support for port isolation
If two ports are in isolation mode then these ports are not supposed to be
able to communicate between each other. This can be achieved in the realtek
switch by removing the other isolated port(s) from the port list of an
isolated port.

Signed-off-by: Sven Eckelmann <se@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/20360
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-10-12 12:49:49 +02:00
Sven Eckelmann 9b4e1a412e realtek: dsa: Drop unused traffic_get helpers
The realtek driver is now in full control of the port matrix. It doesn't
need to rely on the current state of the HW to adjust it. The new port
matrix is calculated automatically using rtldsa_update_port_member() and
then written to the registers/tables.

Signed-off-by: Sven Eckelmann <se@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/20360
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-10-12 12:49:49 +02:00
Sven Eckelmann 77ce3f1a72 realtek: dsa: Simplify port member handling
It is not necessary to read the back the current port members for a
specific port for enabling/disabling a port. All these members which are
expected to be in the HW port matrix of an active port are already stored
in the port specific member "pm".

And when a port is disabled, the port must no longer forwarding traffic to
any other port. Just writing 0 to the members is therefore good enough and
no read-back of the old HW state is necessary.

Signed-off-by: Sven Eckelmann <se@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/20360
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-10-12 12:49:49 +02:00
Sven Eckelmann 622e2d0971 realtek: dsa: Share port member configuration code
The leave and join callbacks for DSA were using their own implementation of
the port member handling code. This makes the implementation of additional
functionality based on the port member matrix complicated because it needs
to be implemented in both places and also in the new code path for the
introduced feature.

By sharing this code, it is much easier to guarantee that all code paths
behave the same. This approach is already implemented by other DSA drivers
like qca8k, mt7530 or ksz.

Signed-off-by: Sven Eckelmann <se@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/20360
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-10-12 12:49:49 +02:00
Sven Eckelmann e696f39da8 realtek: Switch booleans in rtl838x_port to single bits
In upstream kernel, it is not well received to use a lot of simple booleans
in structs. It is preferred to use 1-bit bitfields [1] and consolidate the
booleans together.

[1] https://www.kernel.org/doc/html/v6.16/process/coding-style.html#using-bool

Signed-off-by: Sven Eckelmann <se@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/20360
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-10-12 12:49:49 +02:00
Robert Marko 5e001d7ac3 ipq-wifi: add Yuncore AX850
It seems that adding Yuncore AX850 was missed during the board support,
and this breaks buildbots for ipq50xx with:
ERROR: unable to select packages:
  ipq-wifi-yuncore_ax850 (no such package):
    required by: world[ipq-wifi-yuncore_ax850]
make[4]: *** [/builder/shared-workdir/build/include/image.mk:396: target-dir-90b51871] Error 1
make[4]: *** Waiting for unfinished jobs....

So, add the required meta package.

Fixes: 5d2994a73e ("qualcommax: ipq50xx: Add support for Yuncore AX850")
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-10-12 12:01:00 +02:00
Robert Marko 8ef2c4e881 ipq-wifi: update to Git HEAD (2025-10-09)
20e5a5a32656 qca4019: add Linksys MR6350 BDF

Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-10-12 11:49:39 +02:00
Florian Eckert 112f594042 kernel: add missing cpe id for linux
No 'PKG_CPE_ID' is stored for the kernel package Makefile. This commit
adds this.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2025-10-11 22:12:46 +02:00
Tianling Shen 875e0bf791 uboot-rockchip: add u-boot device tree back for Radxa ROCK 4D
This was removed by mistake.

Fixes: 292cca0e5c ("uboot-rockchip: Update to 2025.10")
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/20376
Signed-off-by: Nick Hainke <vincent@systemli.org>
2025-10-11 21:56:15 +02:00
Stefan Kalscheuer 8c952afd91 uboot-mvebu: update to version 2025.10
Update package to the latest stable version.
All patches automatically refreshed.

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
Link: https://github.com/openwrt/openwrt/pull/20380
Signed-off-by: Nick Hainke <vincent@systemli.org>
2025-10-11 21:52:21 +02:00
Stefan Kalscheuer 50e4d4f4ba tools/mkimage: update to version 2025.10
Update package to the latest stable version.
All patches need to be updated.

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
Link: https://github.com/openwrt/openwrt/pull/20379
Signed-off-by: Nick Hainke <vincent@systemli.org>
2025-10-11 21:50:41 +02:00
Stefan Kalscheuer cf498325f1 uboot-tools: update to version 2025.10
Update package to the latest stable version.
All patches automatically refreshed.

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
Link: https://github.com/openwrt/openwrt/pull/20379
Signed-off-by: Nick Hainke <vincent@systemli.org>
2025-10-11 21:50:41 +02:00
Daniel Golle 011ba05fd3 uboot-mediatek: update to U-Boot v2025.10
The most relevant change is the removal of the empty board_init()
functions by u-boot/u-boot@70a4d1fa1d, which makes many patches not
apply anymore and also requires most board defconfigs to be updated
by adding "# CONFIG_BOARD_INIT is not set" to them.

Also some config symbols have been renamed and downstream boards
had to be adapted accordingly:

u-boot/u-boot@0fd9a3480a ("env: Rename OVERWRITE_ETHADDR_ONCE to
                            ENV_OVERWRITE_ETHADDR_ONCE")

u-boot/u-boot@5fb88fa725 ("env: Rename SYS_REDUNDAND_ENVIRONMENT to
                            ENV_REDUNDANT")

u-boot/u-boot@123682c765 ("env: Rename SYS_RELOC_GD_ENV_ADDR to
                            ENV_RELOC_GD_ENV_ADDR")

u-boot/u-boot@0f44d5549e ("env: Rename SYS_MMC_ENV_DEV to
                            ENV_MMC_DEVICE_INDEX")

u-boot/u-boot@31617b880a ("env: Rename SYS_MMC_ENV_PART to
                            ENV_MMC_EMMC_HW_PARTITION")

u-boot/u-boot@ffc4914703 ("env: Rename ENV_MMC_PARTITION to
                            ENV_MMC_SW_PARTITION")

u-boot/u-boot@fb5235239a ("env: Rename DEFAULT_ENV_FILE to
                            ENV_DEFAULT_ENV_TEXT_FILE")

(also renamed USE_DEFAULT_ENV_FILE to USE_ENV_DEFAULT_ENV_TEXT_FILE)

Remove upstreamed patches:
 * 001-mtd-spinand-winbond-add-Winbond-W25N04KV-flash-suppo.patch
   u-boot/u-boot@fe37fb8214

 * 002-mtd-spinand-gigadevice-sync-supported-chips-with-lin.patch
   u-boot/u-boot@506ceddffd

 * 003-net-mediatek-correct-the-AN8855-TPID-value-in-port-i.patch
   u-boot/u-boot@70db2be9fb

 * 004-01-serial-mediatek-fix-register-names-and-offsets.patch
   u-boot/u-boot@6e15d3f91a

 * 004-02-serial-mediatek-enable-baudrate-accuracy-compensatio.patch
   u-boot/u-boot@6952209ef2

 * 005-clk-mediatek-add-dummy-clk-enable-disable-ops-for-ap.patch
   u-boot/u-boot@1bf2121297

 * 006-env-Fix-possible-out-of-bound-access-in-env_do_env_s.patch
   u-boot/u-boot@0ffd456516

 * 130-01-env-mtd-add-the-missing-put_mtd_device.patch
   u-boot/u-boot@39ae954b04

 * 130-02-env-mtd-initialize-saved_buf-pointer.patch
   u-boot/u-boot@7e842bd331

 * 170-cmd-bootmenu-permit-to-select-bootmenu-entry-with.patch
   u-boot/u-boot@8c986521c3

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-10-10 16:35:58 +01:00
Tianling Shen 292cca0e5c uboot-rockchip: Update to 2025.10
Removed upstreamed patches, rebased local patches.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/20331
Signed-off-by: Nick Hainke <vincent@systemli.org>
2025-10-10 11:07:48 +02:00
Jonas Jelonek 5b527704b1 realtek: pcs: add setup_serdes callback to rtpcs_cfg
Add a callback for a serdes setup function to rtpcs_cfg to allow each
SoC variant to define its own SerDes setup routine.

Call the setup_serdes operation in pcs_config if it is defined.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20352
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-10-10 11:00:15 +02:00
Jonas Jelonek 3cf04d2e0b realtek: pcs: add more SerDes access helpers
Add more SerDes access helpers for the upcoming code import from PHY
driver. There, similar helpers are used to read and write full SerDes
registers or only parts of them (aka bitfields).

The helpers are expected to replace the following used in PHY SerDes
code:
  - rtl9300_sds_field_r
  - rtl9300_sds_field_w
  - rtsds_931x_read
  - rtsds_931x_read_field
  - rtsds_931x_write
  - rtsds_931x_write_field

Mark the helpers as unused for now to make the compiler happy. This will
be removed as soon as they are used.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20352
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-10-10 11:00:15 +02:00
Patrick Oppenlander 74f74edfe1 x86/64: enable 8250_DW
This driver is required for the serial port on headless embedded AMD Ryzen
Embedded V3000 devices such as the SolidRun BEDROCK V3000.

Signed-off-by: Patrick Oppenlander <patrick.oppenlander@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20353
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-10-10 10:32:20 +02:00
Mikhail Kshevetskiy a626b7e74d airoha: spi: use airoha snfi driver for EN7523
There are two spi drivers for en7523/an7581/an7583:
 * en7581-snand (spi-airoha-snfi.c)
 * en7523-spi (spi-en7523.c)
The first one supports DMA, but until recently it has several nasty
issues. The second do things properly but does not support DMA.
Recently the first driver was greatly improved, so there is no sence
keep both drivers anymore.

This patch removes en7523-spi driver and use DMA capable driver instead.
Unfortunately there is a nasty en7523 specific issue.

We found that some serial console may pull TX line to GROUND during board
boot time. Airoha uses TX line as one of it's BOOT pins. This will lead
to booting in RESERVED boot mode. It was found that some flashes operates
incorrectly in RESERVED mode if DMA used.

This patch also adds a hack that turns off DMA and prints big fat warning
if booting in reserved mode was detected. This slow down flash operations
but does not kill your data.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Link: https://github.com/openwrt/openwrt/pull/20365
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-10-10 10:30:10 +02:00
Mikhail Kshevetskiy 25c48519cd airoha: clk: add support of reset controller
This allows us use more easily port en7581 drivers to en7523.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Link: https://github.com/openwrt/openwrt/pull/20365
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-10-10 10:30:09 +02:00
Mikhail Kshevetskiy fe31e5c82a airoha: net: fix building for en7523
Latest an7581/an7583 improvements breaks en7523. This patch just fixes
en7523 building.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Link: https://github.com/openwrt/openwrt/pull/20365
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-10-10 10:30:09 +02:00
John Audia 17badf6099 kernel: bump 6.12 to 6.12.51
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.51

All patches automatically rebased.

Build system: x86/64
Build-tested: flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64-glibc
Run-tested: flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64-glibc

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/20315
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-10-09 23:13:45 +02:00
Mikhail Kshevetskiy 1949fb996a boot: airoha: apply network driver fixes
This series improve network reliability.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Link: https://github.com/openwrt/openwrt/pull/20295
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-10-09 16:37:25 +02:00
Mikhail Kshevetskiy e06725222e boot: airoha: snfi: remove dirty hack required for both u-boot & linux
This patch removes dirty hack used to:
 * operate with flash
 * pass flash page settings to linux driver via SNFI registers

It has been proven that spinand flash page size is actually unnecessary.
We can get all required data from dirmap requests. Thus this patch
series drops the hack and do things properly.

After this fix (and corresponding linux fix) the hack is not needed
anymore.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Link: https://github.com/openwrt/openwrt/pull/20295
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-10-09 16:37:25 +02:00
Mikhail Kshevetskiy e67ba973d2 boot: airoha: speed up spinand flash operations using dma
This patch series greatly improve flash operation speed in u-boot.
The measurement shows:

With DMA:
  => mtd read.benchmark spi-nand0 $loadaddr 0 0x8000000
  Reading 134217728 byte(s) (65536 page(s)) at offset 0x00000000
  Read speed: 8131kiB/s

Without DMA:
  mtd read.benchmark spi-nand0 $loadaddr 0 0x8000000
  Reading 134217728 byte(s) (65536 page(s)) at offset 0x00000000
  Read speed: 2062kiB/s

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Link: https://github.com/openwrt/openwrt/pull/20295
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-10-09 16:37:25 +02:00
Mikhail Kshevetskiy a406e38077 airoha: spi: remove snfi driver dirty hack
This patch series removes dirty hack that reads flash page settings from
SNFI registers during driver startup.

Before these patches the airoha spi snfi driver needs to know spinand
flash page size. The driver can't get it from spinand subsystem, so the
following approach was implemented:
 * bootloader know the flash page size (and some other parameters)
 * to operate properly the bootloader writes flash page size (and some
   other parameters) to SNFI registers
 * bootloader starts linux
 * after linux start SNFI registers keeps the values stored by bootloader
 * linux snfi driver reads flash parameters from SNFI registers.

This works, but we can do better. It has been proven that flash page size
is actually unnecessary. We can get all required data from dirmap requests.

This patch series drops the hack and do things properly.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Link: https://github.com/openwrt/openwrt/pull/20295
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-10-09 16:37:25 +02:00
Mikhail Kshevetskiy 5ff0e70930 airoha: spi: snfi driver fixes & improvements
This patch series greatly improve airoha snfi driver and fix a
number of serious bugs.

Fixed bugs:
 * Fix reading/writing of flashes with more than one plane per lun
 * Fill the buffer with 0xff before writing
 * Fix reading of flashes supporting continuous reading mode
 * Fix error paths

Improvements:
 * Add support of dual/quad wires spi modes in exec_op(). This also
   fix flash reading/writing if dirmap can't be created.
 * Support of dualio/quadio flash reading commands

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Link: https://github.com/openwrt/openwrt/pull/20295
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-10-09 16:37:25 +02:00
Mikhail Kshevetskiy 32229a4bb7 kernel: mtd: spinand: continuous mode fixes
Continuous reading mode is broken for some spi controllers. There are two
possible bug scenarios:

1) "continuous mode" flash and spi controller without dirmap support,
   but with restriction on transfer length in adjust_op_size()

2) "continuous mode" flash and spi controller with dirmap support for a
   single flash page

In the first case, any read that exceeds the limit specified in adjust_op_size()
will result in an EIO error. The limit may even be less than a size of a single
flash page. In this case, any read will result in an error.

In the second case, any read larger than flash page size will result in an EIO
error or spinand driver spoofing (because the spi controller driver returns
more bytes than were actually read).

This patch series tries to fix continuous reading (spinand driver side).
Unfortunately these fixes can't resolve "spinand driver spoofing" case.
Spi controller drivers might need fixes as well.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Link: https://github.com/openwrt/openwrt/pull/20295
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-10-09 16:37:25 +02:00
Petr Štetiar 8a8bfcc7fe ppp: fix PKG_MIRROR_HASH
Current PKG_MIRROR_HASH is wrong, but it went unnoticed, because the
tarball is being fetched from @OPENWRT project mirrors. Can be
reproduced with:

 make package/ppp/{download,check} FIXUP=1 DL_DIR=/tmp PKG_MIRROR_HASH=''

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Link: https://github.com/openwrt/openwrt/pull/20322
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-10-09 13:37:58 +02:00
Petr Štetiar 7d4edb21b6 ebtables: fix PKG_MIRROR_HASH
Current PKG_MIRROR_HASH is wrong, but it went unnoticed, because the
tarball is being fetched from @OPENWRT project mirrors. Can be
reproduced with:

 make package/ebtables/{download,check} FIXUP=1 DL_DIR=/tmp PKG_MIRROR_HASH=''

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Link: https://github.com/openwrt/openwrt/pull/20322
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-10-09 13:37:58 +02:00
Petr Štetiar 8c030a3b13 tools: xxhash: fix PKG_MIRROR_HASH
Current PKG_MIRROR_HASH is wrong, but it went unnoticed, because the
tarball is being fetched from @OPENWRT project mirrors. After
042996b46b revert the correct hash can be reproduced with:

 make tools/xxhash/{download,check} FIXUP=1 DL_DIR=/tmp PKG_MIRROR_HASH=''

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Link: https://github.com/openwrt/openwrt/pull/20322
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-10-09 13:37:58 +02:00
Shubham Vishwakarma 5d2994a73e qualcommax: ipq50xx: Add support for Yuncore AX850
Specifications:
SOC: Qualcomm IPQ5018 (64-bit dual-core ARM Cortex-A53 @ 1.0Ghz)
Flash: SPI NOR 8MB (Winbond W25Q64DW) + NAND 128MB (Winbond W25N01GWZEIG)
Memory: 512MB DDR3L
Standard: 802.11ax/ac/b/g/n
2.4G Frequency: 2.4GHz - 2.484GHz
2.4G Wi-Fi standard: 802.11b/g/n/ax
5G Frequency: 5.150GHz~5.850GHz
5G Wi-Fi Standard: 802.11 a/n/ac/ax
Buttons: 1 * Reset button, press 10 seconds to revert to default setting
2.4G Antenna: 2*2.4GHz/5.8GHz dual band antenna: 4dBi
5G Antenna: 2*5.8G antenna: 4dBi
Data Rate: 2.4GHz: 574Mbps, 5GHz:4800Mbps
Power: PoE 802.3at,DC2.0 12V/2A
Max Power Consumption: < 22W
LED Light: WAN, LAN, tricolor LED(sys-red, 2.4G-green, 5.8G-blue)

BACKUP YOUR STOCK FIRMWARE:
- Put openwrt-*-initramfs-uImage.itb to your
  TFTP server and rename it to initramfs.bin
- Enable serial console and enter to u-boot cli
  and exec these commands:
    ```
    tftpboot <your_tftp_server_ip>:initramfs.bin
    bootm
    ```
- Once boot completed and you get the openwrt shell
  execute below commands:
    ```
    device=ax850
    mkdir -p /tmp/fw_backup; cd /tmp/fw_backup
    rootfs=$(cat /proc/mtd | grep \"rootfs\" | cut -d: -f1)
    rootfs_1=$(cat /proc/mtd | grep \"rootfs_1\" | cut -d: -f1)
    dd if=/dev/${rootfs} of=rootfs_${rootfs} bs=1M
    dd if=/dev/${rootfs_1} of=rootfs_1_${rootfs_1} bs=1M
    cp /sys/firmware/fdt fdt.dtb
    md5sum * > md5sum
    tar -cvzf /tmp/${device}.tar.gz .
    sum=$(md5sum /tmp/${device}.tar.gz | cut -d' ' -f1)
    mv /tmp/${device}.tar.gz /tmp/${device}_${sum}.tar.gz
    echo "stock fw backup saved to: /tmp/${device}_${sum}.tar.gz"
    ```
- Upload/save your backup to a safe place.

STOCK FIRMWARE RECOVERY:
- Boot initramfs image
- Upload your backed-up stock fw tarball to the device
  using scp or download it from the device using wget.
- Enter device ssh cli or tty and exec:
    ```
    cd /tmp && wget <your_web_server_ip>/${stock_fw_backup}.tar.gz`
    tar -xpzf ${stock_fw_backup}.tar.gz
    rootfs=$(cat /proc/mtd | grep \"rootfs\" | cut -d: -f1)
    rootfs_1=$(cat /proc/mtd | grep \"rootfs_1\" | cut -d: -f1)
    ubiformat /dev/${rootfs} -y -f /tmp/rootfs_${rootfs}
    ubiformat /dev/${rootfs_1} -y -f /tmp/rootfs_1_${rootfs_1}
    reboot
    ```

INSTALLATION:
1. initramfs method
- Put openwrt-*-initramfs-uImage.itb to your
  TFTP server and rename it to initramfs.bin
- Enable serial console and enter to u-boot cli
  and exec these commands:
    ```
    tftpboot <your_tftp_server_ip>:initramfs.bin
    bootm
    ```
- Once boot completed and you get the openwrt shell
  execute below commands:
    ```
    cd /tmp && wget <your_web_server_ip>/factory.ubi`
    export rootfs=$(cat /proc/mtd | grep rootfs | cut -d: -f1)
    export rootfs_1=$(cat /proc/mtd | grep rootfs_1 | cut -d: -f1)
    ubiformat /dev/${rootfs} -y -f factory.ubi
    ubiformat /dev/${rootfs_1} -y -f factory.ubi
    reboot
    ```

2. u-boot factory.ubi image method
- Put factory.ubi to your TFTP server and
  enter u-boot cli and exec these commands:
    ```
    tftpboot <your_tftp_server_ip>:factory.ubi
    #After downloading is finished:
    flash rootfs
    flash rootfs_1
    reset
    ```

Signed-off-by: Shubham Vishwakarma <shubhamvis98@fossfrog.in>
Link: https://github.com/openwrt/openwrt/pull/19712
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-10-09 13:36:37 +02:00
Paul Spooren 084697eb62 package: do not sign individual APK packages
APK, unlike OPKG, can sign individual packages and not just indexes.
Since OpenWrt uses a distributed build infrastructure and only the build
master owns the private keys, signing of individual buildworkers doesn't
work. Right now, each buildworker creates a temporary build key to sign
packages, then transmits the package index to the buildmaster for a
signature.

As a result, all individual packages contain a nonsensical signature,
making them harder to reproduce. This commit removes the individual
package signing.

Since APK requires signatures per default, explicitly allow installation
of unsigned packages during the build process.

The config option here is for historical reasons misleading,
SIGNED_PACKAGES refers to the package index, not the individual
packages.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2025-10-09 12:52:43 +02:00
Felix Fietkau ad6df8a3c8 ucode: add patches that make it easier to deal with non-blocking fds
This allows creating pipes for subprocesses to use as stdin/out/err
and polling them from a uloop process.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-10-09 09:57:30 +02:00
Felix Fietkau 7418c2d89b ucode: fix reusing the current environment in uloop.process()
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-10-08 19:50:29 +02:00
Rosen Penev 987b1484a6 mediatek: fix wrong reset_gpio
Should be reset-gpio. Also added GPIO_ACTIVE_HIGH for clarity.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20116
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-10-08 14:26:25 +02:00
Rosen Penev a4ace63b7c ipq40xx: clkreq-gpio to clkreg-gpios
The former is deprecated. Fixes dtc warning.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20116
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-10-08 14:26:24 +02:00
Rosen Penev c09211d7cf ipq40xx: wake-gpio to wake-gpios
The former is deprecated. Fixes dtc warning.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20116
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-10-08 14:26:24 +02:00
Rosen Penev c72a6fa339 treewide: perst-gpio to perst-gpios
The former is deprecated. Fixes dtc warning.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20116
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-10-08 14:26:24 +02:00
Rosen Penev 1ab12d5d8c treewide: enable-gpio to enable-gpios
The former is deprecated. Fixes dtc warning.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20116
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-10-08 14:26:24 +02:00
Rosen Penev c186d17fa5 treewide: replace numbers with GPIO_ACTIVE
The latter is more descriptive in terms of what's going on.

Mostly found with

git grep gpios\  | grep 0\>
git grep gpios\  | grep 1\>

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20116
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-10-08 14:26:24 +02:00