Enable CONFIG_MTD_UBI_NVMEM and CONFIG_UIMAGE_FIT_BLK in the Linux 6.18
kernel configuration for the an7583 target to add support for NVMEM cells
on UBI volumes and block-backed UIMAGE FIT parsing. This is required for
upcoming Nokia XG-040G-MF (UBI) support.
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24654
Signed-off-by: Robert Marko <robimarko@gmail.com>
It was already possible to run as a VM guest before,
but only QEMU's e1000e was available for networking.
The VM guest can now be attached to a pre-created TAP interface,
or to the "passt" userspace networking stack for rootless operation.
1) Install qemu-system-loongarch64 and edk2-loongarch64.
2) Extract the disk image:
zcat bin/targets/loongarch64/generic/openwrt-*-ext4-combined-efi.img.gz > disk.img
3a) Start with TAP interface:
sudo ip tuntap add mode tap name vm0
sudo ip link set up vm0
qemu-system-loongarch64 -M virt -cpu la464 -smp 2 -m 1G -nographic \
-bios /usr/share/edk2/loongarch64/QEMU_EFI.fd \
-device ahci,id=ahci0 -device ide-hd,drive=d0,bus=ahci0.0 \
-drive if=none,id=d0,file=disk.img,format=raw \
-nic tap,ifname=vm0,script=no,downscript=no
ping ff02::1%vm0
3b) Start with passt userspace network:
qemu-system-loongarch64 -M virt -cpu la464 -smp 2 -m 1G -nographic \
-bios /usr/share/edk2/loongarch64/QEMU_EFI.fd \
-device ahci,id=ahci0 -device ide-hd,drive=d0,bus=ahci0.0 \
-drive if=none,id=d0,file=disk.img,format=raw \
-nic passt
With userspace networking, the VM isn't reachable from the outside by default.
You will have to set up port forwardings or another mechanism.
Signed-off-by: Lars Gierth <larsg@systemli.org>
Link: https://github.com/openwrt/openwrt/pull/24460
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
- ACPI_EC is now needed for LOONGSON_LAPTOP
- BLK_MQ_PCI removed in 6.16
- PROC_PID_CPUSET is for cgroups-v1 and not needed
- FIRMWARE_EDID is now x86-only
- MDIO_DEVICE and MDIO_DEVRES removed in 6.16
- PANIC_ON_OOPS_VALUE removed in 6.18
- SCHED_DEBUG removed in 6.15
- SGL_ALLOC is covered by target/linux/generic/config-6.18
- TOOLS_SUPPORT_RELR is filtered by target/linux/generic/config-filter
Signed-off-by: Lars Gierth <larsg@systemli.org>
Link: https://github.com/openwrt/openwrt/pull/24460
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
The 2026-07-09 update changed the type of the first parameter of
hostapd_setup_bss() from int to bool. Before the update, add_bss
passed -1. The value -1 selected the setup path for a secondary BSS
and told hostapd to adopt an existing netdev. Converted to bool, -1
becomes true. As a result, hostapd does not do the setup of a
secondary BSS. The new BSS uses the driver state of the first BSS.
Pass false so the non-first block runs again. In this path,
use_existing is true, and hostapd adopts a netdev that already
exists.
Fixes: 345404476a ("hostapd: update to 2026-07-09")
Signed-off-by: Chad Monroe <chad@monroe.io>
Link: https://github.com/openwrt/openwrt/pull/24651
Signed-off-by: Nick Hainke <vincent@systemli.org>
Commit 224a967ba1 ("ramips: mt7530: compile swconfig code
conditionally") used IS_ENABLED(CONFIG_SWCONFIG) to guard
swconfig-specific code.
When CONFIG_ALL_KMODS=y is selected, kmod-swconfig's KCONFIG
override forces CONFIG_SWCONFIG=m during the kernel config merge.
An explicit CONFIG_SWCONFIG=y is protected from being downgraded by
the kmod override, but an absent/unset symbol is not, so the
override's =m wins instead.
IS_ENABLED() evaluates to 1 both for built-in (=y) and module (=m),
so the swconfig code is still compiled into the built-in mt7530
driver even though register_switch() lives in the external
swconfig.ko module and is not available during vmlinux linking,
resulting in:
drivers/net/ethernet/ralink/mt7530.c: undefined reference to `register_switch'
Switch to IS_REACHABLE(CONFIG_SWCONFIG) which returns true only when
the symbol is actually reachable from the current compilation unit.
This correctly handles the case where mt7530 is built-in and
swconfig is a module, while still allowing both to be built as
modules. Also update the diagnostic message in the fallback branch,
since it is now also reached when swconfig is built as an
unreachable module, not only when support is absent entirely.
Fixes: 224a967ba1 ("ramips: mt7530: compile swconfig code conditionally")
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/24728
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
The ipTIME A8004T requires GPIO19 and GPIO8 for PCIe reset control.
GPIO8 is assigned to UART3 by default, so configure the pin state
to make it available as a GPIO and add both GPIOs to the PCIe
reset-gpios property.
This fixes PCIe initialization after warm reboot.
Signed-off-by: Myeongjae SONG <devparlair@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/24534
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
platform_do_upgrade() assigns file_type and never reads it. The call also uses
the argument order from before 715634e6d1, so it returns "unknown" rather than
the real type and would mislead anyone who started using it.
No functional change.
Signed-off-by: Semih Baskan <strst.gs@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24531
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
The check that decides whether the new rootfs is a UBI image passes one argument
where 715634e6d1 now expects two. Without the extraction command the subshell
runs nothing, the magic comes back empty and the check fails. sysupgrade then
falls back to writing the whole image over the firmware partition, which cannot
carry sysupgrade.tgz into the new rootfs_data volume. After the reboot the
settings are gone, as if -n had been passed, and the UBI erase counters go with
them.
Affects bcm53xx NAND devices flashed with a trx based image, from 24.10.0-rc1
onwards.
The fix lives in the firmware doing the flashing, so upgrading from an affected
build loses the config one last time. Every upgrade from a fixed build onwards
keeps it.
Build tested on main with kernel 6.18, Asus RT-N18U, three consecutive
sysupgrades, config preserved every time.
Fixes: 715634e6d1 ("base-files: upgrade: nand: use "cmd" argument for extracting command")
Link: https://github.com/openwrt/openwrt/issues/21024
Link: https://github.com/openwrt/openwrt/issues/21655
Signed-off-by: Semih Baskan <strst.gs@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24531
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
The HeYangTek HYF1GQ4UDACAE is a 1 Gbit (128 MiB) SLC SPI-NAND with
2048 + 64 byte pages and on-die 4-bit / 512-byte ECC (JEDEC ID 0xc9),
found among others on some Keenetic KN-3411 (Buddy 6) units.
The driver is accepted upstream and sits in the MTD tree heading for
Linux 7.3, so it goes to backport-6.18 as the upstream commit
a837468386 ("mtd: spinand: add support for HeYangTek HYF1GQ4UDACAE").
The Etron and Dosilicon spinand patches are refreshed because the
backport applies before them and touches the same spinand-objs line.
Other SPI-NAND patches in the MediaTek, Airoha, EcoNet and Qualcommax
targets are refreshed for the shifted core offsets.
Signed-off-by: Aleksei Sviridkin <f@lex.la>
Link: https://github.com/openwrt/openwrt/pull/23742
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Backport the upstream patch for realtek clocksource driver that
changes register access to instead use __raw_readl and __raw_writel
to not cause unnecessary byteswaps with SWAP_IO_SPACE enabled.
Signed-off-by: Rustam Adilov <adilov@tutamail.com>
Link: https://github.com/openwrt/openwrt/pull/24170
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Remove stray/redundant lines from the shared kernel config fragments,
in both config-6.18 and config-6.12:
- CONFIG_COMMON_CLK_RP1_SDIO is listed twice (the second copy has a
double space before "is not set", which is why dedup tooling never
caught it).
- CONFIG_WS2812_PIO_RP1, CONFIG_PWM_PIO_RP1, and CONFIG_RP1_PIO are
each the KCONFIG of a kmod package in modules/other.mk, so
gen_kconfig_overrides() already emits "# ... is not set" for all
three whenever their package is unselected, independently of these
fragments.
No functional change.
Signed-off-by: Joshua Covington <joshuacov@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24645
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
KernelPackage/bcm27xx-sound lives under SOUND_MENU and provides
onboard audio support, but the package definition itself was
misplaced in other.mk. Move it to sound.mk alongside the other
audio-related kernel packages. No functional change.
Signed-off-by: Joshua Covington <joshuacov@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24645
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Add a KernelPackage for CONFIG_SERIAL_RP1_PIO_UART, a software UART
implemented on the RP1 PIO block with DMA-driven TX/RX and a PIO
interrupt for break detection. Only 8N1 with no hardware flow control
is supported.
The package follows the same pattern as the other RP1 PIO consumers
(kmod-pwm-pio-rp1, kmod-ws2812-pio-rp1): it depends on kmod-rp1-pio
and is only available on bcm2712. Guard on 6.18, since the driver is
not available on 6.12.
Signed-off-by: Joshua Covington <joshuacov@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24645
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
USB3 port events are dropped whenever the controller has only one roothub.
The check that guards them treats a missing shared hcd as proof the hcd was
removed, which stopped being true with upstream commit 4736ebd7fcaf ("usb:
host: xhci-plat: omit shared hcd if either root hub has no ports"). A
controller whose USB2 root hub has no ports gets a single roothub and never
has a shared one, so every SuperSpeed event is thrown away and nothing
enumerates even though the port reports the device:
0x006a1203 Powered Connected Enabled Link:U0 PortSpeed:4
Broadcom Northstar is such a controller. USB3 works there up to 5.15 and
stops from 5.19 onwards.
Tested on an Asus RT-N18U with kernel 6.18, seven SuperSpeed enumerations,
USB2 unaffected on both ports.
Link: https://github.com/openwrt/openwrt/issues/19592
Signed-off-by: Semih Baskan <strst.gs@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24547
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Remove upstreamed patch.
Remove HOST_CONFIGURE_VARS. These are not needed any more.
ac_cv_search_setfilecon was removed completely and the others are guarded
by if test "$with_selinux" != no; then now.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24572
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
While at it, replace the SPI MAC address read patch with a rebased
series from the Digilent u-boot repository. It should be noted that
this feature is still not upstreamed. Refresh patches as required.
As most of the zynq boards are merged into xilinx_zynq_virt, add
UBOOT_CONFIG to the respective boards in the Makefile.
Compile-tested: all Zynq boards
Runtime-tested: Antminer S9
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
ASUS RT-N65U is a 2.4/5 GHz band 11n (Wi-Fi 4) router, based on RT3883.
Specification:
- CPU1: Ralink RT3883 @ 500MHz, WiSoC 5GHz
- CPU2: Ralink RT3352 @ 400MHz, WiSoC 2.4GHz
- RAM1: 128MB
- RAM2: 16MB
- Flash: Macronix MX25L12805D (16MB)
- WLAN: Ralink RT3883 (5GHz 3T3R), Ralink RT3352 (2.4GHz 2T2R)
- Switch: Realtek RTL8367RB
- 4x 10/100/1000 Mbps Ethernet
- 1x 10/100/1000 Mbps WAN
- USB: ASMedia ASM1042 USB 3.0 Controller
- PMU: UTC UZ1086L-ADJ
- 6x LED, 2x button
Installation (TFTP):
1. Power off the router.
2. Press and hold the Reset button.
3. Power on the router.
4. Wait 5 seconds, then release the Reset button.
5. Connect your PC to the router with Ethernet cable.
6. Configure a static IP address in the `192.168.1.0/24` subnet (except `192.168.1.1`).
7. Configure your TFTP client to use binary (octet) transfer mode.
8. Upload the firmware image (OpenWrt, stock, or Padavan) to `192.168.1.1`.
The TFTP server accepts any filename.
9. Wait for the firmware flashing process to complete.
WARNING: Flashing the stock firmware after using Padavan may brick
your router due to configuration partition incompatibility.
MAC address layout:
- Wi-Fi 2.4GHz & WAN: label MAC
- Wi-Fi 5GHz & LAN: label MAC + 4
MTD layout:
```
mtd0: 00030000 00010000 "u-boot"
mtd1: 00010000 00010000 "config"
mtd2: 00010000 00010000 "factory"
mtd3: 00fb0000 00010000 "firmware"
mtd4: 001ee3b3 00010000 "kernel"
mtd5: 00dc1c4d 00010000 "rootfs"
mtd6: 00960000 00010000 "rootfs_data"
```
Known issues:
- The RT3352 2.4 GHz iNIC is unsupported because it requires a
proprietary firmware blob and kernel support
- The Wi-Fi LEDs cannot be disabled independently because they share
the LED power rail controlled by GPIO10
This work is based on the earlier draft support by Andrej Valek.
Tested by 4PDA users
Signed-off-by: Andrej Valek <andy@skyrain.eu>
Signed-off-by: Andrey Trishin <zatrit@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24343
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The board has one USB 2.0 and one USB 3.0 port, both powered from a
5V rail switched by GPIO 30. The device tree already carried the whole
USB description commented out, waiting for SoC support.
Uncomment the 3.3V/5V regulators, the usbport LED triggers and the xHCI
node, enable the USB PHY, and add the LED trigger and regulator kmods to
the image.
Signed-off-by: Vitaliy Sochnev <sochnev.v.74@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24609
Signed-off-by: Robert Marko <robimarko@gmail.com>
The AN7583 has a single xHCI controller, the same block as on AN7581 and
the MediaTek SoCs. Build the host controller and its glue driver into the
kernel instead of shipping them as modules: the module route needs a
subtarget dependency in KernelPackage/usb3 plus kmod-usb3 in the
DEVICE_PACKAGES of every board that has USB ports, which is a roundabout
way of getting two drivers loaded.
Boards without USB ports carry the code as well, but they are not size
constrained.
Suggested-by: Robert Marko <robert.marko@sartura.hr>
Signed-off-by: Vitaliy Sochnev <sochnev.v.74@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24609
Signed-off-by: Robert Marko <robimarko@gmail.com>
Add the xHCI controller and the USB PHY node. The single controller
exposes two USB 2.0 ports and one USB 3.0 port, all served by one PHY
block: two U2 subnodes at offset 0x0/0x1000 and one U3 subnode that
needs the SCU to switch the shared serdes between USB and HSGMII.
Both nodes are left disabled, boards enable them as needed.
Signed-off-by: Vitaliy Sochnev <sochnev.v.74@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24609
Signed-off-by: Robert Marko <robimarko@gmail.com>
The AN7581 USB PHY driver can't be reused on AN7583: the SoC has a
single USB PHY block driving two U2 ports and one U3 port, and both the
PLL init sequence and the U3 calibration differ.
Add the AN7583 USB PHY driver from Christian Marangi, with the PCIe PHY
part dropped (the AN7583 PCIe serdes has no DT node yet) and five bugs
fixed: an uninitialized "ret" passed to dev_err_probe(); a NULL check on
syscon_regmap_lookup_by_phandle(), which returns an ERR_PTR on failure;
a missing per-instance offset in u2_set_mode(), which made it write the
first U2 port's register regardless of the PHY it was called on; an
off-by-one bound in parse_subnode() allowing a write past the end of
priv->phys[]; and a discarded return value in phy_init(), which
swallowed the U3 calibration failure reported by u3_init().
Enable the driver on the an7583 subtarget. The an7581 subtarget keeps
its own PHY_AIROHA_USB driver untouched.
Signed-off-by: Vitaliy Sochnev <sochnev.v.74@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24609
Signed-off-by: Robert Marko <robimarko@gmail.com>
The airoha,an7583-usb-phy compatible added by the USB PHY driver had no
matching binding document. The AN7581 equivalent ships one as a separate
patch (220-05), which is also where the AIROHA_USB2_MONCLK_SEL* defines
used by an7583.dtsi come from.
The AN7583 binding is not simply "same as AN7581": the SoC has a single
PHY block with four named reg regions, per-port child nodes carrying
#phy-cells, and airoha,scu on the USB 3.0 child rather than on the PHY
node itself.
The AIROHA_USB2_MONCLK_SEL* defines are reused from the AN7581 binding
header, as the values are identical on AN7583.
Signed-off-by: Vitaliy Sochnev <sochnev.v.74@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24609
Signed-off-by: Robert Marko <robimarko@gmail.com>
Skip the DSL configuration since AVM 5490 and 5491 support fiber instead
of DSL. The DSL configuration overwrites the WAN port configuration.
Fixes: 48b2df5a41 ("lantiq: add support for AVM Fritzbox 5490/5491")
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/24652
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The fiber port on the AVM 5490/5491 is only partially working. Frames are sent
correctly. Most received frames are dropped due to an invalid FCS. It turns out
that delays are needed between the MAC and the PHY. This commit enables RGMII
delays on the PHY side. Traffic now flows in both directions.
Fiber port topology:
SWITCH<-----RGMII----->PHY<-----SGMII----->SFP/SFF cage
Tested on the AVM 5490. On the other end is a network card with a 1000Base-BX10
SFP module (HiKivision HK-SFP-1.25G-20-1550).
The fiber port on the AVM5491 should also work. The AVM 5490 and 5491 share the
same PCB and are almost identical. The only difference is that the AVM5491 has
a standard SFP cage with an external GPON module, while the 5490 has a soldered
1000Base-BX SFF module.
Fixes: 48b2df5a41 ("lantiq: add support for AVM Fritzbox 5490/5491")
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/24652
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The ucode socket module exports no SOL_TCP so setopt() was called
with level 0 and silently failed. This left inter-node connections
without the 5 second user timeout. A peer that stopped reading
could then stall a blocking channel write forever, deadlocking
every unetmsgd in the mesh along with their local clients.
Use IPPROTO_TCP and warn when setopt fails.
Signed-off-by: Chad Monroe <chad@monroe.io>
Link: https://github.com/openwrt/openwrt/pull/24595
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>