openwrt/openwrt.git
17 hours agowifi-scripts: ucode: append global options on STA interfaces
John Crispin [Wed, 11 Dec 2024 11:06:55 +0000 (12:06 +0100)]
wifi-scripts: ucode: append global options on STA interfaces

Signed-off-by: John Crispin <john@phrozen.org>
17 hours agowifi-scripts: ucode: fix parsing of legacy hwmode option
John Crispin [Wed, 11 Dec 2024 11:02:18 +0000 (12:02 +0100)]
wifi-scripts: ucode: fix parsing of legacy hwmode option

Signed-off-by: John Crispin <john@phrozen.org>
17 hours agowifi-scripts: ucode: only set mbssid on ax and be radios
John Crispin [Wed, 11 Dec 2024 10:55:21 +0000 (11:55 +0100)]
wifi-scripts: ucode: only set mbssid on ax and be radios

Signed-off-by: John Crispin <john@phrozen.org>
17 hours agowifi-scripts: ucode: typo fix
John Crispin [Wed, 11 Dec 2024 10:54:34 +0000 (11:54 +0100)]
wifi-scripts: ucode: typo fix

Signed-off-by: John Crispin <john@phrozen.org>
32 hours agolantiq: grow kernel partition Zyxel P-2812HNU-F1
Isaac de Wolff [Sun, 8 Dec 2024 12:52:40 +0000 (13:52 +0100)]
lantiq: grow kernel partition Zyxel P-2812HNU-F1

Change partition table in dts file.
Change DEVICE_COMPAT_VERSION
Enable automatic build.

To take advantage of the bigger kernel partition,
the uboot environment has to be changed:
setenv nboot 'nand read 0x81000000 0x60000 0x500000; bootm 0x81000000'
setenv bootcmd 'run nboot'
saveenv

Of course you need a u-boot capable of handling this.
The u-boot discussed in this forum thread:
https://forum.openwrt.org/t/zyxel-p2812hnu-f1-u-boot/100281
should be able to handle kernels up to an uncompressed size of 16MiB.

Signed-off-by: Isaac de Wolff <idewolff@gmx.com>
Link: https://github.com/openwrt/openwrt/pull/17209
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
32 hours agotools/cmake: update to 3.31.2
Jack Sun [Mon, 9 Dec 2024 08:43:49 +0000 (16:43 +0800)]
tools/cmake: update to 3.31.2
Release notes: https://cmake.org/cmake/help/latest/release/3.31.html

Refresh patches:
- 120-curl-fix-libressl-linking.patch
- 130-bootstrap_parallel_make_flag.patch
- 150-zstd-libarchive.patch
- 160-disable_xcode_generator.patch

Signed-off-by: Jack Sun <sunjiazheng321521@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17056
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
41 hours agoiproute2: update to 6.12.0
Robert Marko [Sat, 7 Dec 2024 16:32:21 +0000 (17:32 +0100)]
iproute2: update to 6.12.0

Release Notes:
https://lore.kernel.org/netdev/20241119092743.6a1bdcb7@hermes.local/T/

Allows us to drop 2 upstreamed patches:
package/network/utils/iproute2/patches/010-bridge-mst-fix-a-musl-build-issue.patch
package/network/utils/iproute2/patches/011-bridge-mst-fix-a-further-musl-build-issue.patch

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Link: https://github.com/openwrt/openwrt/pull/17206
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 days agomediatek: filogic: Migrate wifi configuration device paths
Hauke Mehrtens [Sun, 8 Dec 2024 15:18:52 +0000 (16:18 +0100)]
mediatek: filogic: Migrate wifi configuration device paths

The device path to the devices changed. Migrate the wifi
configurations from the old path to the new one. This is needed to
migrate Wireless configurations from OpenWrt 23.05 to OpenWrt 24.10.

This script is based on these two files:
target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/05-wifi-migrate
target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/ieee80211/05-wifi-migrate

Fixes: 0ef927472148 ("mediatek: filogic: move mt7981 on-SoC blocks to "soc" node in DT")
Fixes: https://github.com/openwrt/openwrt/issues/17174
Link: https://github.com/openwrt/openwrt/pull/17210
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 days agomediatek: filogic: prevent faulty mac address assignment
Ondřej Niesner [Sat, 7 Dec 2024 16:55:29 +0000 (17:55 +0100)]
mediatek: filogic: prevent faulty mac address assignment

The vendor U-Boot on the Cudy WR3000 assign random mac addresses on boot
and set the 'local-mac-address' property which prevents Openwrt from
assigning the correct address from evmem.

This patch removes the alias for ethernet0 so that U-Boot doesn't add
the property.

Related to: a55ab9e1343e ("mediatek: filogic: prevent faulty mac address assignment")
Fixes: https://github.com/openwrt/openwrt/issues/15587
Signed-off-by: Ondřej Niesner <ondra.niesner@seznam.cz>
Link: https://github.com/openwrt/openwrt/pull/17201
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 days agohostapd: fix processing mbssid config option
Felix Fietkau [Mon, 9 Dec 2024 18:19:46 +0000 (19:19 +0100)]
hostapd: fix processing mbssid config option

Do not strip the first character from the field name

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 days agobpftool: turn off libbfd feature in host build
Eric Long [Mon, 25 Nov 2024 13:26:47 +0000 (21:26 +0800)]
bpftool: turn off libbfd feature in host build

libbfd feature is not used when building eBPF program, and it makes bpftool fail to build in a clean environment, since binutils in toolchain have libbfd disabled.

Signed-off-by: Eric Long <i@hack3r.moe>
Link: https://github.com/openwrt/openwrt/pull/17073
Signed-off-by: Robert Marko <robimarko@gmail.com>
3 days agoath79: gl-e750: use nvmem for mac addresses
Rosen Penev [Sun, 16 Jun 2024 19:48:40 +0000 (12:48 -0700)]
ath79: gl-e750: use nvmem for mac addresses

This is a simple conversion to dts.

68ac3f2cddab states that the 5ghz wifi address is calculated from ART 0
+ 2.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17066
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agomediatek/filogic: add Keenetic KN-3811 support
Maxim Anisimov [Wed, 13 Nov 2024 14:17:17 +0000 (17:17 +0300)]
mediatek/filogic: add Keenetic KN-3811 support

Specification:
 * Mediatek MT7981BA
 * 256 MB SPI-NAND
 * 512 MB DDR4 RAM
 * MT7976CN DBDC AX Wi-Fi
 * MediaTek MT7531AE (3x LAN Gigabit ports) + Internal Gbe Phy (1x WAN Gigabit port)
 * 4x LED (power, internet, fn, wifi)
 * 3x buttons (wps, fn, reset)
 * 1x USB 3.0 port

Serial Interface:
 * 3 Pins GND, RX, TX
 * Settings: 115200, 8N1

Notes:
 * The device supports dual boot mode
 * Fn led reassigned to wlan 2.4

Flash instruction:
The only way to flash OpenWrt image is to use tftp recovery mode in U-Boot:

1. Configure PC with static IP 192.168.1.2/24 and tftp server.
2. Rename "openwrt-mediatek-filogic-keenetic_kn-3811-squashfs-factory.bin"
   to "KN-3811_recovery.bin" and place it in tftp server directory.
3. Connect PC with ethernet port, press the reset button, power up
   the device and keep button pressed until status led start blinking.
4. Device will download file from server, write it to flash and reboot.

Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17135
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agobusybox: Save shell history into /tmp
Hannu Nyman [Thu, 5 Dec 2024 20:28:45 +0000 (22:28 +0200)]
busybox: Save shell history into /tmp

Enable the busybox feature to save shell command history.
(.apk size increase 0.5 kB)

To prevent flash wear,
* save history only at the exit from a shell session, and
* set /tmp as the default location for the history file. The history
  is kept on ramdisk until a reboot, when the history is then lost.

If the user wants to save history onto flash, he can change the location
definition in /etc/profile.d/busybox-history-file.sh

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Link: https://github.com/openwrt/openwrt/pull/17179
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agokernel: packages: fix building package/devel/perf with -O3
Pavel Shirov [Sat, 7 Dec 2024 12:29:28 +0000 (15:29 +0300)]
kernel: packages: fix building package/devel/perf with -O3

Add patch to fix failure to build package/devel/perf when
CONFIG_TARGET_OPTIMIZATION has -O3 enabled with this error:

```
In function 'elf_close',
    inlined from 'elf_close' at elf.c:41:6,
    inlined from 'elf_find_func_offset_from_file' at elf.c:267:2:
elf.c:45:9: error: 'elf_fd.elf' may be used uninitialized [-Werror=maybe-uninitialized]
   45 |         elf_end(elf_fd->elf);
      |         ^~~~~~~~~~~~~~~~~~~~
elf.c: In function 'elf_find_func_offset_from_file':
elf.c:260:23: note: 'elf_fd.elf' was declared here
  260 |         struct elf_fd elf_fd;
      |                       ^~~~~~
In function 'elf_close',
    inlined from 'elf_close' at elf.c:41:6,
    inlined from 'elf_find_func_offset_from_file' at elf.c:267:2:
elf.c:46:9: error: 'elf_fd.fd' may be used uninitialized [-Werror=maybe-uninitialized]
   46 |         close(elf_fd->fd);
      |         ^~~~~~~~~~~~~~~~~
elf.c: In function 'elf_find_func_offset_from_file':
elf.c:260:23: note: 'elf_fd.fd' was declared here
  260 |         struct elf_fd elf_fd;
      |                       ^~~~~~
```

Link: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/commit/?id=fab45b962749
Signed-off-by: Pavel Shirov <nstorm.ahoy166@silomails.com>
Link: https://github.com/openwrt/openwrt/pull/17141
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agowifi-scripts: fix channels array property parsing in ucode script
Felix Fietkau [Sun, 8 Dec 2024 14:10:51 +0000 (15:10 +0100)]
wifi-scripts: fix channels array property parsing in ucode script

Since the channels array can contain ranges, its type needs to be string, not number.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 days agowifi-scripts: fix ucode support for referencing wifi devices by phy name
Felix Fietkau [Sun, 8 Dec 2024 12:55:33 +0000 (13:55 +0100)]
wifi-scripts: fix ucode support for referencing wifi devices by phy name

Rename phys according to board.json

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 days agowifi-scripts: fix regression with ucode update
Felix Fietkau [Sun, 8 Dec 2024 12:36:41 +0000 (13:36 +0100)]
wifi-scripts: fix regression with ucode update

nl80211.request with GET_WIPHY for a single wiphy no longer returns an array

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 days agokernel: fallback-sprom: create separate header files
Mieczyslaw Nalewaj [Sun, 1 Dec 2024 18:17:13 +0000 (19:17 +0100)]
kernel: fallback-sprom: create separate header files

Create a separate header files fallback-sprom.h
for BCMA and SSB Fallback SPROM Driver
to add function prototypes to fallback-sprom.c as well.
This prevents missing function prototype errors.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/17138
Signed-off-by: Robert Marko <robimarko@gmail.com>
3 days agoqualcommax: ipq807x: add Netgear DEVICE_VARS
Robert Marko [Sat, 7 Dec 2024 21:08:18 +0000 (22:08 +0100)]
qualcommax: ipq807x: add Netgear DEVICE_VARS

Add NETGEAR_BOARD_ID and NETGEAR_HW_ID to DEVICE_VARS as multiple devices
set them in their recipes, so without them being added to DEVICE_VARS then
simply the value from last recipe that gets evaluated is used and images
are generated with the wrong ID-s.

Link: https://github.com/openwrt/openwrt/pull/17203
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 days agoqualcommax: ipq60xx: add Linksys MR7350 support
Vladyslav Andreichykov [Thu, 7 Mar 2024 09:47:04 +0000 (11:47 +0200)]
qualcommax: ipq60xx: add Linksys MR7350 support

Linksys MR7350 is a 802.11ax Dual-band router/AP.
Specifications:
* CPU: Qualcomm IPQ6000 Quad core Cortex-A53(A73) 1.5GHz
* RAM: 512MB of DDR3
* Storage: 256Mb NAND
* Ethernet: 5x1G RJ45 ports (QCA8075)
* WLAN:
* 2.4GHz: Qualcomm QCN5022 2x2 802.11b/g/n/ax 574 Mbps PHY rate
* 5GHz: Qualcomm QCN5052 2x2@80MHz or  802.11a/b/g/n/ac/ax 1201 Mbps PHY rate
* LED-s:
* RGB system led
* USB blue led

* Buttons: 1x Soft reset 1x WPS
* Power: 12V DC Jack

Installation instructions:
Open Linksys Web UI - http://192.168.1.1/ca or http://10.65.1.1/ca depending on your setup.
Login with your admin password. The default password can be found on a sticker under the device.
To enter into the support mode, click on the “CA” link and the bottom of the page.
Open the “Connectivity” menu and upload the squash-factory image with the “Choose file” button.
Click start. Ignore all the prompts and warnings by click “yes” in all the popups.
The Wifi radios are turned off by default. To configure the router, you will need to connect your computer to the LAN port of the device.
Then you would need to write openwrt to the other partition for it to work
- First Check booted partition:
fw_printenv -n boot_part

- Change the partition:
fw_setenv boot_part 1
or
fw_setenv boot_part 2
depending on the current partition

- Then install Openwrt to the other partition if booted in slot 1:
mtd -r -e alt_kernel -n write openwrt-qualcommax-ipq60xx-linksys_mr7350-squashfs-factory.bin alt_kernel

- If in slot 2:
mtd -r -e kernel -n write openwrt-qualcommax-ipq60xx-linksys_mr7350-squashfs-factory.bin kernel

Co-Authored-by: Chukun Pan <amadeus@jmu.edu.cn>
Co-Authored-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Vladyslav Andreichykov <vladdrako007@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/14807
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 days agoqualcommax: enable userspace regulator for ipq60xx as well
Robert Marko [Sun, 17 Nov 2024 19:41:11 +0000 (20:41 +0100)]
qualcommax: enable userspace regulator for ipq60xx as well

Userspace regulator consumer is rather usefull so enable it for ipq60xx
as well and remove from ipq807x only kernel config.

Link: https://github.com/openwrt/openwrt/pull/14807
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 days agoqualcommax: refresh config
Robert Marko [Sun, 17 Nov 2024 19:40:48 +0000 (20:40 +0100)]
qualcommax: refresh config

Refresh the kernel config via kernel_menuconfig.

Link: https://github.com/openwrt/openwrt/pull/14807
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 days agoucode: update to Git HEAD (2024-12-06)
Robert Marko [Fri, 6 Dec 2024 17:21:20 +0000 (18:21 +0100)]
ucode: update to Git HEAD (2024-12-06)

47b54cf5a4b6 types: introduce `ucv_array_sort_r()` and `ucv_object_sort_r()`
efeb57806552 types, vm: refactor usage of global variables
f9d2faf67de6 vm: reset signals when freeing VM
4e86847d802d lib: utilize `ucv_array_sort_r()` and `ucv_object_sort_r()`
c71444ea301f types: ucv_resource_create(): rename `typename` parameter to `type`
373df7299c79 nl80211: properly support split_wiphy_dump for single phys
9bcd25f54708 lexer: Preserve keyword, regexp flags until processing non-comment tokens
0a7ff4715cb8 main: pretty-print `-p` output by default
4c3d5b469156 struct: Add new buffer API for incremental packing/unpacking
efc4122124cb struct: do not use global variables for caching types

Fixes: https://github.com/jow-/ucode/issues/248
Fixes: https://github.com/jow-/ucode/issues/250
Fixes: https://github.com/efahl/owut/issues/25
Link: https://github.com/openwrt/openwrt/pull/17191
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 days agogeneric: mtd: spinand: add support for FORESEE F35SQA001G
Bohdan Chubuk [Thu, 5 Dec 2024 22:17:56 +0000 (00:17 +0200)]
generic: mtd: spinand: add support for FORESEE F35SQA001G

Add support for FORESEE F35SQA001G SPI NAND.

Similar to F35SQA002G, but differs in capacity.
Datasheet:
  -  https://cdn.ozdisan.com/ETicaret_Dosya/704795_871495.pdf

Tested on Xiaomi AX3000T flashed with OpenWRT.

Signed-off-by: Bohdan Chubuk <chbgdn@gmail.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/16915
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 days agogeneric: mtd: spinand: add support for FORESEE F35SQA002G
Bohdan Chubuk [Sun, 10 Nov 2024 23:57:31 +0000 (01:57 +0200)]
generic: mtd: spinand: add support for FORESEE F35SQA002G

Add support for FORESEE F35SQA002G SPI NAND.
Datasheet:
  https://www.longsys.com/uploads/LM-00006FORESEEF35SQA002GDatasheet_1650183701.pdf

Refresh all affected patch with make target/linux/refresh.

Signed-off-by: Martin Kurbanov <mmkurbanov@salutedevices.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Bohdan Chubuk <chbgdn@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16915
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 days agoqualcommax: ipq60xx: add Qihoo 360V6 support
Chukun Pan [Fri, 21 Jun 2024 15:18:21 +0000 (23:18 +0800)]
qualcommax: ipq60xx: add Qihoo 360V6 support

Specifications:
  SoC:     Qualcomm IPQ6000 1.5GHz
  RAM:     NTCC256M16ER-EK 512MiB
  Flash:   W29N01HZSINA 128MiB
  ETH:     QCA8075 (3x LAN, 1x WAN)
  WLAN1:   2.4GHz 802.11b/g/n/ax 2x2
  WLAN2:   5GHz 802.11a/n/ac/ax 2x2
  Power:   DC 12V 1.5A
  Button:  Reset, Wps
  USB:     1x 2.0

Flash instructions:
  1. Download the initramfs image, rename it to
     initramfs.itb, host it with the tftp server.
  2. Interrupt U-Boot and run these commands:
     tftpboot initramfs.itb
     bootm
  3. After openwrt boots up, use scp or luci web
     to upload sysupgrade.bin to upgrade.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Link: https://github.com/openwrt/openwrt/pull/15940
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 days agoqualcommax: image: cleanup whitespace
Chukun Pan [Wed, 10 Jul 2024 15:18:15 +0000 (23:18 +0800)]
qualcommax: image: cleanup whitespace

Replace whitespaces with tab.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Link: https://github.com/openwrt/openwrt/pull/15940
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 days agoipq-wifi: update to version 2024-11-28
Chukun Pan [Thu, 28 Nov 2024 14:26:10 +0000 (22:26 +0800)]
ipq-wifi: update to version 2024-11-28

Contains following updates:

 * ipq8074: add TP-Link_deco-x80-5g BDF
 * ipq6018: add BDF for Qihoo 360V6

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Link: https://github.com/openwrt/openwrt/pull/15940
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 days agoipq40xx: remove default MAC assignments
Rosen Penev [Mon, 25 Nov 2024 23:09:28 +0000 (15:09 -0800)]
ipq40xx: remove default MAC assignments

1006 and 5006 are defaults that get set based on the calibration data.
There's no need to explicitly specify them.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17128
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 days agoramips: mt76x8: add support for Keenetic KN-3211
Ivan Davydov [Mon, 2 Dec 2024 12:47:08 +0000 (15:47 +0300)]
ramips: mt76x8: add support for Keenetic KN-3211

Keenetic KN-3211 is a 2.4 Ghz band 11n (Wi-Fi 4) Wi-Fi repeater, based on MT7628AN.

Specification:
- System-On-Chip: MT7628AN
- CPU/Speed: 575 MHz
- Flash-Chip: Winbond w25q256
- Flash size: 32768 KiB
- RAM: 64 MiB
- 1x 10/100 Mbps Ethernet
- 2x external, non-detachable antennas
- UART (J1) header on PCB (115200 8n1)
- Wireless No1 (2T2R): SoC Built-in 2.4 GHz 802.11bgn
- 3x LED, 1x button, 1x mode switch

Notes:
- The device supports dual boot mode
- The firmware partitions were concatenated into one
- The status button has been reassigned as the WPS button.

Flash instruction:
This device doesn't support sysupgrade, so the only way to flash OpenWrt image
is to use tftp recovery mode in U-Boot:

1. Configure PC with static IP 192.168.1.2/24 and tftp server.
2. Rename "openwrt-ramips-mt76x8-keenetic_kn-3211-squashfs-factory.bin"
   to "KN-3211_recovery.bin" and place it in tftp server directory.
3. Connect PC with the ethernet port, press the reset button, power up
   the router and keep button pressed until power led starts blinking.
4. Router will download file from server, write it to flash and reboot.

Signed-off-by: Ivan Davydov <lotigara@lotigara.ru>
Link: https://github.com/openwrt/openwrt/pull/17080
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 days agoapk: add dependency on wget provider
Eric Fahlgren [Thu, 5 Dec 2024 15:06:46 +0000 (07:06 -0800)]
apk: add dependency on wget provider

The apk-* packages contain no declared dependencies on a wget provider,
which is required for proper operation.  Let's add it.

Fixes: https://github.com/openwrt/openwrt/issues/17173
Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17176
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 days agobusybox: Fix cron log level to match previous behavior
Hannu Nyman [Sun, 1 Dec 2024 11:07:05 +0000 (13:07 +0200)]
busybox: Fix cron log level to match previous behavior

Change the cron log level in init script from 5 to 7
in order to match previous log behavior and to avoid
log spam every minute.

Busybox cron only uses levels 5,7,8, where 5 is debug and
7 and 8 are normal logging. Use 7 as default.

(Fun note: this is needed because upstream corrected an
ancient bug in their own log level handling and now 5 actually
means something.)

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Link: https://github.com/openwrt/openwrt/pull/17107
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 days agobusybox: update to 1.37.0
Rui Salvaterra [Thu, 28 Nov 2024 18:41:37 +0000 (20:41 +0200)]
busybox: update to 1.37.0

Add a patch to fix non-x86 builds, refresh patches and update/fix the
configuration as described in 98b09ba250 (cited here for future reference).

Config refresh:

Refresh commands, run after busybox is first built once:

cd package/utils/busybox/config/
../convert_menuconfig.pl ../../../../build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/busybox-default/busybox-1.37.0
cd ..
./convert_defaults.pl ../../../build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/busybox-default/busybox-1.37.0/.config > Config-defaults.in

Manual edits needed after config refresh:

* Config-defaults.in: OpenWrt config symbol IPV6 logic applied to
  BUSYBOX_DEFAULT_FEATURE_IPV6

* Config-defaults.in: OpenWrt config TARGET_bcm53xx logic applied to
  BUSYBOX_DEFAULT_TRUNCATE (commit 547f1ec)

* Config-defaults.in: OpenWrt logic applied to
  BUSYBOX_DEFAULT_LOGIN_SESSION_AS_CHILD (commit dc92917)

* Config-defaults.in: correct the default ports that get reset
  BUSYBOX_DEFAULT_FEATURE_HTTPD_PORT_DEFAULT    80
  BUSYBOX_DEFAULT_FEATURE_TELNETD_PORT_DEFAULT  23

* config/editors/Config.in: Add USE_GLIBC dependency to
  BUSYBOX_CONFIG_FEATURE_VI_REGEX_SEARCH (commit f141090)

* config/shell/Config.in: change at "Options common to all shells" the conditional symbol
  SHELL_ASH --> BUSYBOX_CONFIG_SHELL_ASH
  (discussion in http://lists.openwrt.org/pipermail/openwrt-devel/2021-January/033140.html
  Apparently our script does not see the hidden option while
  prepending config options with "BUSYBOX_CONFIG_" which leads to a
  missed dependency when the options are later evaluated.)

* Edit a few Config.in files by adding quotes to sourced items in
  config/Config.in, config/networking/Config.in and config/util-linux/Config.in (commit 1da014fcca)

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
[rebased with the change download line commit]
[corrected version in the refresh example in commit message]
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Link: https://github.com/openwrt/openwrt/pull/17107
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 days agowifi-scripts: fix roaming setup with ucode scripts
Felix Fietkau [Thu, 5 Dec 2024 13:17:32 +0000 (14:17 +0100)]
wifi-scripts: fix roaming setup with ucode scripts

- fix variable references for ft key
- add r0kh and r1kh if ft_generate_local is not set (logic inversion bug)

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 days agofeeds.conf.default: enable video feed by default
Daniel Golle [Thu, 5 Dec 2024 01:32:00 +0000 (01:32 +0000)]
feeds.conf.default: enable video feed by default

As discussed in the previous OpenWrt meeting the easiest way to have
regular builds of packages on the video feed without adding additional
complexity is by enabling the video feed by default.
If that slows down the buildbots beyond being useful we can always
disable it again and find another way to only sporadically build
packages of the video feed.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
7 days agohostapd: enable EAP-pwd support only for the SSL variants
Robert Marko [Wed, 4 Dec 2024 14:09:23 +0000 (15:09 +0100)]
hostapd: enable EAP-pwd support only for the SSL variants

The internal hostapd version cannot be built with EAP-pwd support, so
enable it only for the SSL variants.

Fixes: #17163
Fixes: 6365316fab87 ("hostapd: add ubus support for wired driver")
Link: https://github.com/openwrt/openwrt/pull/17164
Signed-off-by: Robert Marko <robimarko@gmail.com>
7 days agowifi-scripts: add option to set per-device ifname prefix
Felix Fietkau [Wed, 4 Dec 2024 10:59:14 +0000 (11:59 +0100)]
wifi-scripts: add option to set per-device ifname prefix

Simplifies setting ifname to a different pattern for all affected
interfaces.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 days agowifi-scripts: remove leftover legacy (non-netifd) wifi script support
Felix Fietkau [Tue, 19 Nov 2024 13:08:38 +0000 (14:08 +0100)]
wifi-scripts: remove leftover legacy (non-netifd) wifi script support

cfg80211 is the only supported wireless API

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 days agobuild: add locking around dtc call after running mkits.sh
Felix Fietkau [Wed, 4 Dec 2024 12:31:24 +0000 (13:31 +0100)]
build: add locking around dtc call after running mkits.sh

mkits.sh creates a root.*.pagesync file with padding, which is global, and
the generated .its files reference it. Since dtc reads this file, it must
not run at the same time as mkits.sh
Fixes generating itb images with broken rootfs.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 days agoapk: update to Git HEAD (2024-11-30)
Robert Marko [Mon, 2 Dec 2024 18:54:36 +0000 (19:54 +0100)]
apk: update to Git HEAD (2024-11-30)

3da6c104f0f5 database: use APK_DB_LAYER_ROOT in more places
5437e3abada1 audit: add usr/lib/apk to the list of protected paths under --full
de9baf912245 change default db location to /usr, but detect and use /lib if exists
218fdaa1a1a2 context: close root_fd on free
d33294236cb4 database: add support for only-when-modified trigger paths
36935db0ef3b package: fix memfd_create warnings on Linux kernels < 6.7
1c3fc36051a3 blob: add and use apk_blob_trim_{start,end}
af5f9e3f93b0 pkg: fix v3 package size setting to installeddb
9428e34694c8 version: allow --check and --test to work without database
4b4add5326a8 test: fix unit test registration function to be unique
eac18cb200d4 test: add testlib.sh for user tests
20dae205b006 mkpkg: fix creation of package with hardlinks
7bdecdca6a95 pkg: only allow tags in world and some commands
76de228bcc0b commit: show tags of world constrains
9a1b1cf68420 test: use testlib for solver.sh
99fc2a2a5efc test: remove dependency on GNU tar
6927746b9a10 Revert usrmerge/LFS related changes to apk used paths
5d287a9b06e9 apk-tools-3.0.0_pre5
8d93a79fb895 mkpkg: fix hardlink on big-endian system

Link: https://github.com/openwrt/openwrt/pull/17148
Signed-off-by: Robert Marko <robimarko@gmail.com>
8 days agowifi-scripts: various minor fixes to the new ucode scripts
John Crispin [Tue, 3 Dec 2024 13:22:26 +0000 (14:22 +0100)]
wifi-scripts: various minor fixes to the new ucode scripts

* cosmetic clean up
* properly import the digest module
* typo fixes

Signed-off-by: John Crispin <john@phrozen.org>
8 days agobuild: Unconditionally append kmod feed for BuildBot
Christian Marangi [Tue, 3 Dec 2024 10:30:18 +0000 (11:30 +0100)]
build: Unconditionally append kmod feed for BuildBot

Recent changes to BuildBot config moved the kmods to a dedicated
directory and dropped them from the packages dir. This was needed as
both OPKG and APK gets confused if both entry are present.

To fix this, unconditionally append the kmod feed line if
CONFIG_BUILDBOT is enabled.

Fixes: #17146
Link: https://github.com/openwrt/openwrt/pull/17151
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
9 days agomeson: allow using staging python
Daniel Golle [Mon, 2 Dec 2024 01:05:01 +0000 (01:05 +0000)]
meson: allow using staging python

Introduce package flag MESON_USE_STAGING_PYTHON which allows packages
to be built with the OpenWrt-built python3/host instead of relying on the
buildhost's Python distribution.
This is useful for packages using Meson which require additional Python
modules during build.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
9 days agofstools: update to latest HEAD
John Crispin [Tue, 5 Nov 2024 08:40:24 +0000 (09:40 +0100)]
fstools: update to latest HEAD

Rename jffs2reset to factoryreset. Convert all scripts to using the new command
line. Print a deprecation notice when jffs2reset is invoked.

49d36ba jffs2reset: rename to factoryreset
b135064 jffs2reset: print deprecation message

Signed-off-by: John Crispin <john@phrozen.org>
9 days agotarget/metadata: set OpenWrt One as the default menuconfig target/profile
John Crispin [Fri, 29 Nov 2024 08:13:52 +0000 (09:13 +0100)]
target/metadata: set OpenWrt One as the default menuconfig target/profile

Signed-off-by: John Crispin <john@phrozen.org>
9 days agomediatek: filogic: enable CONFIG_LEDS_TRIGGER_PATTERN
John Crispin [Mon, 2 Dec 2024 11:37:52 +0000 (12:37 +0100)]
mediatek: filogic: enable CONFIG_LEDS_TRIGGER_PATTERN

The boot LED on OpenWrt One is PWM driven and sets the pattern trigger as the
default inside its devicetree.

Signed-off-by: John Crispin <john@phrozen.org>
9 days agowifi-scripts: add ucode based scripts
John Crispin [Thu, 17 Oct 2024 13:12:55 +0000 (15:12 +0200)]
wifi-scripts: add ucode based scripts

Add an ucode based re-implementation of the shell script based wifi code.

The new code is jsonschema driven. The code has been refactored into several
files making it easier to follow.

The new scripts are also way faster than the previous sh implementation.

The new code is currently opt-in via WIFI_SCRIPTS_UCODE and defaults to
EXPERIMENTAL.

Signed-off-by: John Crispin <john@phrozen.org>
9 days agowifi-scripts: add ucode based iwinfo
John Crispin [Tue, 22 Oct 2024 07:58:48 +0000 (09:58 +0200)]
wifi-scripts: add ucode based iwinfo

Add an ucode based re-implementation of iwinfo. The tool behaves like the old
one with a few minor output differences. It is now possible to add -j to any
command resulting in JSON output.

The new code is currently opt-in via WIFI_SCRIPTS_UCODE and defaults to
EXPERIMENTAL.

Signed-off-by: John Crispin <john@phrozen.org>
9 days agoucode: update to latest HEAD
John Crispin [Fri, 1 Nov 2024 08:26:15 +0000 (09:26 +0100)]
ucode: update to latest HEAD

b0b5d93 Merge pull request #234 from IdWV/fs
60e7a88 Merge pull request #232 from sebastianertz/lib-digest
1752779 digest: implement compile time option to exclude less common algorithms
c7268a1 ci: include libmd in MacOS CI builds
fcb6f70 lib: introduce digest library
1323a27 Merge pull request #246 from jow-/fix-upvalue-resolve
ed5ce8f types: resolve upvalue values in arrays and objects
a6e0641 vm: resolve upvalues before pushing them onto the stack
ef1baab ci: drop OpenWrt tests for now
63e18ea fs: eliminate the usage of global variables
b1bd7b5 types: add ucv_resource_create() helper
3408edf Merge pull request #244 from nbd168/nl80211
8af77e7 nl80211: add new attributes for multi-radio support
1423ad7 nl80211: cover extended feature and EHT rate info attributes
ee1d6d8 Merge pull request #237 from sebastianertz/math
4b18a9b Merge pull request #213 from jow-/improve-vector-macros
1f022c0 math: removed global variable for thread safety
e5fe6b1 treewide: refactor vector usage code
20307ee utils: improve vector utilities
aa18952 Merge pull request #241 from jow-/socket-local-fanout-decl
79ccd9c socket: provide local definition of `struct fanout_args`
402280d Merge pull request #239 from jow-/safe-insert-during-obj-iteration
07afe96 Merge pull request #240 from jow-/stricter-number-conversion
736d450 types: fix potential use after free on adding keys during iteration
4134e71 vallist: more thoroughly check for trailing garbage after numeric string
9cf53dd Merge pull request #226 from jow-/lexer-improvements
2b2e732 lexer: make api functions public
855854f lexer: emit comment and template statement block tokens
328a50f lexer: improve token position reporting
fa22732 Merge pull request #225 from jow-/compiler-fix-keyword-property-labels-after-spread
6e88c62 Merge pull request #224 from jow-/lib-fs-readline-leak
94d1211 compiler: properly treat property names after spread expressions
67cd123 fs: fix potential memory leak on i/o errors in .read()

Signed-off-by: John Crispin <john@phrozen.org>
9 days agohostapd: expose owe_transition_ifname inside bss_info method
John Crispin [Tue, 5 Nov 2024 08:41:20 +0000 (09:41 +0100)]
hostapd: expose owe_transition_ifname inside bss_info method

This allows iwinfo to match OWE interfaces.

Signed-off-by: John Crispin <john@phrozen.org>
9 days agohostapd: add ubus support for wired driver
John Crispin [Mon, 14 Oct 2024 11:11:38 +0000 (13:11 +0200)]
hostapd: add ubus support for wired driver

Use and alternate ubus object when the config contains "driver=wired". This
commit is in preparation of the ieee8021x-wired daemon.

Signed-off-by: John Crispin <john@phrozen.org>
9 days agohostapd: add radius WISPr rate control AVPs
John Crispin [Fri, 29 Nov 2024 07:40:08 +0000 (08:40 +0100)]
hostapd: add radius WISPr rate control AVPs

This allows a radius server to send AVPs for client rate control inside the
accept message. Further add the ratelimits to the sta-authorized ubus
notification.

Signed-off-by: John Crispin <john@phrozen.org>
9 days agohostapd: enable CONFIG_EAP_PSK
John Crispin [Mon, 2 Dec 2024 09:33:55 +0000 (10:33 +0100)]
hostapd: enable CONFIG_EAP_PSK

Without this option using the eap_server in combination with wifi-station
entries will fail.

Signed-off-by: John Crispin <john@phrozen.org>
9 days agouboot-mediatek: increase USB probe delay on OpenWrt One
John Crispin [Fri, 29 Nov 2024 09:58:06 +0000 (10:58 +0100)]
uboot-mediatek: increase USB probe delay on OpenWrt One

This solves compatibility issues with some pendrives.
Originally reported by "HIDE-r" on the forum.

Signed-off-by: John Crispin <john@phrozen.org>
9 days agobase-files: allow forcing all LEDs to on/off/blink state
John Crispin [Fri, 9 Feb 2024 17:10:12 +0000 (18:10 +0100)]
base-files: allow forcing all LEDs to on/off/blink state

* add a UCI option to disable all LEDs.
* add an init.d parameter to blink all LEDs
* add on/off parameters to init.d

Signed-off-by: John Crispin <john@phrozen.org>
9 days agobuild: remove targetinfo invalidation based on .config
Felix Fietkau [Mon, 2 Dec 2024 11:27:35 +0000 (12:27 +0100)]
build: remove targetinfo invalidation based on .config

Target info no longer depends on config settings

Signed-off-by: Felix Fietkau <nbd@nbd.name>
9 days agorpcd: update to Git HEAD (2024-12-02)
Robert Marko [Mon, 2 Dec 2024 10:26:32 +0000 (11:26 +0100)]
rpcd: update to Git HEAD (2024-12-02)

cc9a471c32e1 rpc-sys: rework packagelist call for apk

Link: https://github.com/openwrt/openwrt/pull/17144
Signed-off-by: Robert Marko <robimarko@gmail.com>
11 days agonetifd: check if /sbin/wifi exists before calling it
Andris PE [Tue, 26 Mar 2024 19:53:06 +0000 (21:53 +0200)]
netifd: check if /sbin/wifi exists before calling it

Avoid harmless error from network script by checking presence of
now-optional wifi support script, most notably confusing users of x86
snapshots.

Fixes: #14964
Signed-off-by: Andris PE <neandris@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/14986
Signed-off-by: Robert Marko <robimarko@gmail.com>
11 days agoath79: remove wmac mac address defaults
Rosen Penev [Sun, 23 Jun 2024 19:25:34 +0000 (12:25 -0700)]
ath79: remove wmac mac address defaults

1002 and 5006 are default addresses as part of the calibration data.
Don't bother specifying them explicitly.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17082
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 days agoath79: add support for KuWFi N650 CPE
Andreas Böhler [Sun, 24 Nov 2024 18:49:20 +0000 (19:49 +0100)]
ath79: add support for KuWFi N650 CPE

The KuWFi N650 is a 5GHz outdoor wireless bridge based on QCA9563.

Specs
=====

CPU: QCA9563, 775MHz
RAM: 128MiB
Flash: 16MiB
Wireless: QCA9888 (5GHz only)
Ethernet: 2x GBit (via QCA8337), 48V passive PoE

Installation
============

From OEM firmware
-----------------

The OEM firmware has telnet enabled by default. If not, it can be enabled
from the firmware web interface. You need a TFTP server on your computer
and the OpenWrt factory image should be available as "n650factory.bin".
It is assumed that your computer has the IP 192.168.1.1 and the N650
192.168.1.20 (default IP address).

1. Connect via Telnet to the device and log in with the default credentials
   "admin:admin"
2. Exploit the limited interface by typing "ps & /bin/sh"
3. Press <ENTER> to start the shell
4. Enter the following commands:

$ cd /tmp
$ tftp -r n650factory.bin -g 192.168.1.1
$ cat << EOF > /tmp/openwrt.sh
#!/bin/sh

IMAGE_NAME="\$1"

if [ ! -e \${IMAGE_NAME} ]; then
  echo "Image file not found: \${IMAGE_NAME}"
  exit 1
fi

. /usr/sbin/common.sh

kill_remaining TERM
sleep 3
kill_remaining KILL

run_ramfs mtd write \${IMAGE_NAME} firmware
sleep 2
reboot -f
EOF

$ chmod +x /tmp/openwrt.sh
$ /tmp/openwrt.sh n650factory.bin

Once the device reboots, it should load OpenWrt.

From UART
---------

UART installation is possible since the serial header is already soldered
on. The pinout is GND - Tx - Rx - VCC from top to bottom (RJ45 ports are
at the bottom). Connect with 115200 8N1.

First, boot OpenWrt from TFTP. Enter the following commands in the U-Boot
shell, assuming your computer has the IP address 192.168.1.1 and a TFTP
server running where the initramfs image is provided as n650.bin:

  setenv ipaddr 192.168.1.20
  setenv serverip 192.168.1.1
  tftpboot 0x84000000 n650.bin
  bootm

Once booted, transfer -loader.bin and -sysupgrade.bin images to the device
at /tmp. Enter the following commands, replacing the filenames:

  mtd write /tmp/loader.bin loader
  sysupgrade /tmp/sysupgrade.bin

Reboot and OpenWrt should load from flash.

Back to Stock
-------------

Back to stock is only possible if you saved a partition backup before
installing OpenWrt. Assuming you have fullbackup.bin covering the whole
flash, you need to prepare the image as follows:

$ dd if=fullbackup.bin of=fwconcat0.bin bs=65536 skip=4 count=212
$ dd if=fullbackup.bin of=loader.bin bs=65536 skip=216 count=1
$ dd if=fullbackup.bin of=fwconcat1.bin bs=65536 skip=217 count=22
$ cat fwconcat0.bin fwconcat1.bin > firmware.bin

Transfer firmware.bin and loader.bin to the OpenWrt device. First, flash
loader.bin to mtd device loader, then force sysupgrade:

$ mtd write loader.bin loader
$ sysupgrade -F firmware.bin

The reason for the two-step process is the way the flash layout is designed
for OpenWrt in contrast to the OEM firmware partition.

Signed-off-by: Andreas Böhler <dev@aboehler.at>
Link: https://github.com/openwrt/openwrt/pull/17089
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 days agomediatek: MERCUSYS MR90X v1: add OpenWrt U-Boot (UBI) layout
Mikhail Zhilkin [Sun, 20 Oct 2024 12:21:33 +0000 (12:21 +0000)]
mediatek: MERCUSYS MR90X v1: add OpenWrt U-Boot (UBI) layout

This commit adds OpenWrt U-Boot (UBI) layout support for MERCUSYS MR90X
v1.

Stock U-Boot UBI size:   50 MiB
OpenWrt U-boot UBI size: 126 MiB

Install
-------
1. Perform steps 1-14 of the OpenWrt installation guide (use OpenWrt
   initramfs-recovery.itb instead of initramfs-kernel.bin at the step 10,
   12 and 14).
Link: https://openwrt.org/toh/mercusys/mr90x_v1#installation
2. Make backups:
```
cat /dev/mtd0 > /tmp/boot.bin
cat /dev/mtd5 > /tmp/tp_data.bin
```
   Copy /tp_data dir content, /tmp/boot.bin and /tmp/tp_data.bin and to
   your PC using scp. You can also backup the remaining partititons. Copy
   backups to a safe place, they are required for the next steps and stock
   firmware recovery.

3. Reboot to OpenWrt initramfs:
```
reboot
```

4. Copy OpenWrt ubi-bl31-uboot.fip, ubi-preloader.bin,
   ubi-squashfs-sysupgrade.itb and MT7986_EEPROM.bin, default-mac (from
   /tp_data backup) to the /tmp folder of the router using scp.

5. Prepare UBI:
```
ubidetach -p /dev/mtd3; ubiformat /dev/mtd3 -y; ubiattach -p /dev/mtd3
ubimkvol /dev/ubi0 -N fip -t static -s 1MiB
ubiupdatevol /dev/ubi0_0 /tmp/ubi-bl31-uboot.fip
ubimkvol /dev/ubi0 -N ubootenv -s 0x1f000
ubimkvol /dev/ubi0 -N ubootenv2 -s 0x1f000
```

6.  Install kmod-mtd-rw and unlock partitions:
```
opkg update && opkg install kmod-mtd-rw
insmod mtd-rw i_want_a_brick=1
mtd unlock boot
mtd unlock bl2
mtd unlock factory
```

7. Prepare "factory" partition:
```
dd if=/dev/zero bs=$((0x8000)) count=1 | tr '\000' '\377' > /tmp/factory.bin
dd if=/tmp/MT7986_EEPROM.bin of=/tmp/factory.bin conv=notrunc
dd if=/tmp/default-mac >> /tmp/factory.bin
```

8. Write "factory" partition:
```
mtd erase factory
mtd write /tmp/factory.bin factory
```

9. Write preloader partition:
```
mtd erase bl2
mtd write /tmp/ubi-preloader.bin bl2
```

10. Write OpenWrt sysupgrade image:
```
sysupgrade -n /tmp/ubi-squashfs-sysupgrade.itb
```

Recovery
--------
1. Place OpenWrt initramfs-recovery.itb image (with original name) on the
   tftp server (IP: 192.168.1.254).
2. Press "reset" button and power on the router. After ~10 sec release the
   button.
3. Use OpenWrt initramfs system for recovery.

BL2 and FIP recovery
--------------------
Use mtk_uartboot and UART connetion if BL2 or FIP in UBI is destroyed:
Link: https://github.com/981213/mtk_uartboot
Link: https://openwrt.org/toh/mercusys/mr90x_v1#serial
Return to stock:
----------------
1. Copy "boot" partition backup (boot.bin) to the /tmp dir of the router
   using scp.

2. Install kmod-mtd-rw:
```
opkg update && opkg install kmod-mtd-rw
```

3. Restore stock U-Boot:
```
   insmod mtd-rw i_want_a_brick=1
   mtd unlock boot
   mtd erase boot
   mtd write /tmp/boot.bin boot
```

4. Erase UBI and reboot:
```
mtd erase ubi
reboot
```

5. Open U-Boot web recovery, upload stock firmware image and start
   upgrade.
Link: http://192.168.1.1
6. Complete steps 1-9 of the OpenWrt installation guide to get root
   rights.
Link: https://openwrt.org/toh/mercusys/mr90x_v1#installation
7. Upload "tp_data" partition backup (tp_data.bin) to the /tmp folder of
   the router using scp.

8. Restore stock calibrations:
```
mtd write /tmp/tp_data.bin tp_data
reboot
```

9. Perform "factory restore" via stock firmware web interface.

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16744
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 days agouboot-mediatek: add MERCUSYS MR90X v1 support
Mikhail Zhilkin [Sun, 20 Oct 2024 12:20:51 +0000 (12:20 +0000)]
uboot-mediatek: add MERCUSYS MR90X v1 support

Add U-Boot replacement loader for the MERCUSYS MR90X. This is required
to increase available flash space in OpenWrt.

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16744
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 days agoarm-trusted-firmware-mediatek: add mt7986-spim-nand-ddr3 build
Mikhail Zhilkin [Sun, 20 Oct 2024 12:20:04 +0000 (12:20 +0000)]
arm-trusted-firmware-mediatek: add mt7986-spim-nand-ddr3 build

This commit adds mt7986-spim-nand-ddr3 build required for MERCUSYS MR90X
v1.

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16744
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 days agoath79: Unify Sophos AP15/AP15C dts files
Christoph Krapp [Sun, 17 Nov 2024 22:01:00 +0000 (23:01 +0100)]
ath79: Unify Sophos AP15/AP15C dts files

The recently added AP15C dts file only differs by the definition of the
reset button. Unify the shared definition into a dtsi to reduce code
duplication.

Signed-off-by: Christoph Krapp <achterin@gmail.com>
Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://github.com/openwrt/openwrt/pull/16998
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 days agomac80211: realtek: add RTL8812au/RTL8821au support
Marty Jones [Sun, 13 Oct 2024 21:15:53 +0000 (17:15 -0400)]
mac80211: realtek: add RTL8812au/RTL8821au support

This adds support for RTL8812au/RTL8821au USB adapters.
Run-tested: x86/64/rockchip
USB adapters tested: Alfa AWUS036ACS, D-Link DWA-171 A1.

Signed-off-by: Marty Jones <mj8263788@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17079
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 days agomac80211: realtek: backport support for RTL8812AU/RTL8821AU
Marty Jones [Mon, 25 Nov 2024 17:58:57 +0000 (12:58 -0500)]
mac80211: realtek: backport support for RTL8812AU/RTL8821AU

Backport support for RTL8812AU/RTL8821AU USB adapters
Manually backported patch:
045-v6.13-wifi-rtw88-Enable-the-new-RTL8821AU-RTL8812AU-driver
Patches from 046 to 051 are pending.

Signed-off-by: Marty Jones <mj8263788@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17079
[Move BPAUTO_WANT_DEV_COREDUMP to original patch]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 days agolinux-firmware: realtek: add RTL8812AU/RTL8821AU firmware
Marty Jones [Mon, 11 Nov 2024 22:17:27 +0000 (17:17 -0500)]
linux-firmware: realtek: add RTL8812AU/RTL8821AU firmware

This adds firmware support for the RTL8812AU/RTL8821AU USB wireless adapters.

Signed-off-by: Marty Jones <mj8263788@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17079
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 days agolinux-firmware: update to 20241110
Marty Jones [Mon, 11 Nov 2024 21:52:43 +0000 (16:52 -0500)]
linux-firmware: update to 20241110

linux-firmware update to 20241110
Move WCN6750 firmware to the device-specific subdir

git log --no-merges --pretty=oneline --abbrev-commit 20241110...20241017

1dbc4cfa rtl_bt: Update RTL8852BT/RTL8852BE-VT BT USB FW to 0x04D7_63F7
8a976e23 cnm: update chips&media wave521c firmware.
3636204f mediatek MT7920: update bluetooth firmware to 20241104091246
6627b025 linux-firmware: update firmware for MT7920 WiFi device
554c4761 copy-firmware.sh: Run check_whence.py only if in a git repo
1486d9aa cirrus: cs35l56: Add firmware for Cirrus CS35L56 for various Dell laptops
c99eeb4d amdgpu: update DMCUB to v9.0.10.0 for DCN351
b6bfff1a rtw89: 8852a: update fw to v0.13.36.2
ddf25515 rtw88: Add firmware v52.14.0 for RTL8812AU
dbb219d7 i915: Update Xe2LPD DMC to v2.23
937e463b linux-firmware: update firmware for mediatek bluetooth chip (MT7925)
62ee1c4b linux-firmware: update firmware for MT7925 WiFi device
a142ad72 WHENCE: Add sof-tolg for mt8195
fe16af92  linux-firmware: Update firmware file for Intel BlazarI core
c69bd749 qcom: Add link for QCS6490 GPU firmware
f4f5689f qcom: update gpu firmwares for qcs615 chipset
a6f3ab98 cirrus: cs35l56: Update firmware for Cirrus Amps for some HP laptops
048795ee ath11k: move WCN6750 firmware to the device-specific subdir
8a7bde2c xe: Update LNL GSC to v104.0.0.1263
e0ee2f91 i915: Update MTL/ARL GSC to v102.1.15.1926
987607d6 amdgpu: DMCUB updates for various AMDGPU ASICs
f9a502ab mediatek: Add sof-tolg for mt8195
1c289f28 i915: Add Xe3LPD DMC
c2379c61 cnm: update chips&media wave521c firmware.
71f8f3e0 linux-firmware: Add firmware for Cirrus CS35L41
65c4b9b7 linux-firmware: Update firmware file for Intel BlazarU core
4f397306 Makefile: error out of 'install' if COPYOPTS is set
2f046411 check_whence.py: skip some validation if git ls-files fails
feb324e3 qcom: Add Audio firmware for X1E80100 CRD/QCPs
3d45353e amdgpu: DMCUB updates forvarious AMDGPU ASICs
c569ca45 brcm: replace NVRAM for Jetson TX1

Signed-off-by: Marty Jones <mj8263788@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17079
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
12 days agoRevert "ath79: elecom,wab: use nvmem"
INAGAKI Hiroshi [Wed, 27 Nov 2024 01:31:35 +0000 (10:31 +0900)]
Revert "ath79: elecom,wab: use nvmem"

This reverts commit 70e41d0205d95386881fa1cdf6ee00f6cca1b3f6.

"ethaddr" is stored into the "u-boot-env" (stock: "Config") partition
and it's quoted with double-quotations, but that format is not supported
by the current NVMEM u-boot-env driver (and mac_pton() function) and the
MAC address won't be parsed to byte array.
This causes random MAC addresses on the adapters, so revert the above
commit.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17116
Signed-off-by: Robert Marko <robimarko@gmail.com>
12 days agoapk: build static
Rosen Penev [Thu, 28 Nov 2024 21:15:29 +0000 (13:15 -0800)]
apk: build static

libapk as a library is used nowhere else and makes no sense to link it
shared. By linking static, we can take advantage of LTO and get the size
reduced further.

Some numbers locally:

Before:

168K staging_dir/target-mips_24kc_musl/root-ath79/usr/bin/apk*
252K staging_dir/target-mips_24kc_musl/root-ath79/usr/lib/libapk.so.2.99.0*

Static:
344K staging_dir/target-mips_24kc_musl/root-ath79/usr/bin/apk*

Static + LTO:
305K staging_dir/target-mips_24kc_musl/root-ath79/usr/bin/apk*

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17109
Signed-off-by: Robert Marko <robimarko@gmail.com>
12 days agoimage: apk: dont fail on removing a package that doesnt exist
Robert Marko [Thu, 28 Nov 2024 18:16:23 +0000 (19:16 +0100)]
image: apk: dont fail on removing a package that doesnt exist

Currently, in case when a package in the device package list is marked with
the "-"" prefix meaning that its supposed to be removed for that device but
it was not actually previously built it will cause the APK to error out it
and thus image generation will also fail.

So, lets do what OPKG build step does and supress the error with the "-"
prefix in make.

Fixes: #17103
Fixes: d788ab376f85 ("build: add APK package build capabilities")
Link: https://github.com/openwrt/openwrt/pull/17106
Signed-off-by: Robert Marko <robimarko@gmail.com>
13 days agomediatek/filogic: add Keenetic KN-3911 support
Maxim Anisimov [Thu, 31 Oct 2024 07:30:08 +0000 (10:30 +0300)]
mediatek/filogic: add Keenetic KN-3911 support

Specification:
 - MT7981 CPU using 2.4GHz and 5GHz WiFi (both AX)
 - 512MB RAM
 - 128MB SPI NAND
 - 2 LEDs (green, orange)
 - 3 buttons (fn, reset, wps)
 - 2 2.5Gbit ethernet ports based on Airoha EN8811H phy

Serial Interface:
 - 3 Pins GND, RX, TX
 - Settings: 115200, 8N1

Notes:
 - The device supports dual boot mode

Flash instruction:
The only way to flash OpenWrt image is to use tftp recovery mode in U-Boot:

1. Configure PC with static IP 192.168.1.2/24 and tftp server.
2. Rename "openwrt-mediatek-filogic-keenetic_kn-3911-squashfs-factory.bin"
   to "KN-3911_recovery.bin" and place it in tftp server directory.
3. Connect PC with ethernet port, press the reset button, power up
   the device and keep button pressed until status led start blinking.
4. Device will download file from server, write it to flash and reboot.

Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16830
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
13 days agomediatek/filogic: enable mtd virtual concat support
Maxim Anisimov [Thu, 31 Oct 2024 09:27:54 +0000 (12:27 +0300)]
mediatek/filogic: enable mtd virtual concat support

This is required for upcoming Keenetic KN-3911 support

Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16830
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
13 days agoramips: move zyimage creation to include/image-commands.mk
Maxim Anisimov [Mon, 3 Jun 2024 15:52:49 +0000 (18:52 +0300)]
ramips: move zyimage creation to include/image-commands.mk

This is required for upcoming Keenetic KN-3911 support

Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16830
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
13 days agomediatek: filogic: Cudy WR3000S v1: fix CRLF line endings
Petr Štetiar [Wed, 27 Nov 2024 08:39:46 +0000 (08:39 +0000)]
mediatek: filogic: Cudy WR3000S v1: fix CRLF line endings

DTS file for this device seems to be using CRLF line endings, so lets
convert them into Unix-style LF.

Fixes: faf4b3e0f7a5 ("mediatek: filogic: add support for Cudy WR3000S v1")
Link: https://github.com/openwrt/openwrt/pull/17096
Signed-off-by: Petr Štetiar <ynezz@true.cz>
13 days agomediatek: filogic: add KTD2026/7 driver to Acer Connect Vero W6m
George Oldfort [Tue, 26 Nov 2024 14:14:56 +0000 (15:14 +0100)]
mediatek: filogic: add KTD2026/7 driver to Acer Connect Vero W6m

This commit adds kmod-leds-ktd202x to the OpenWrt image for the device
"Acer Connect Vero W6m" which is equipped with one KTD2026 controlling the
device's status LED via I2C.

Signed-off-by: George Oldfort <openwrt@10099.de>
Link: https://github.com/openwrt/openwrt/pull/16860
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
13 days agogeneric: backport support for KTD2026/7 rgb(w) led controller
George Oldfort [Tue, 26 Nov 2024 14:04:45 +0000 (15:04 +0100)]
generic: backport support for KTD2026/7 rgb(w) led controller

This commit adds the Linux kernel mainline driver "leds-ktd202x" for the
KinetIC KTD2026 and KTD2027 RGB/RBGW controller with I2C interface that was
introduced in kernel version 6.7, last changed in mainline on 2024-05-31.

At least the Acer Connect Vero W6m (a variant of the Acer Predator Connect
W6 without 2.5G eth1 port, usb3 port, and the 6 on-board gpio RGB LEDs) is
equipped with a KTD2026 (and a single RGB LED attached to it used by the
stock firmware as status LED), and maybe other router devices also are.

Signed-off-by: George Oldfort <openwrt@10099.de>
Link: https://github.com/openwrt/openwrt/pull/16860
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
13 days agoconfig: build: remove experimental warning from USE_APK option
Petr Štetiar [Thu, 28 Nov 2024 18:36:06 +0000 (18:36 +0000)]
config: build: remove experimental warning from USE_APK option

apk package manager is default for some time, so lets remove the
EXPERIMENTAL warning from the related option.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
13 days agotools: ccache update to 4.10.2
Petr Štetiar [Thu, 28 Nov 2024 16:30:07 +0000 (16:30 +0000)]
tools: ccache update to 4.10.2

Fixes since 4.10:

 * Fixed detection of Fmt version 11 and newer.
 * Fixed prefix command lookup from PATH.

Suggested-by: Jen Wolf <jenwolf@protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/17105
Signed-off-by: Petr Štetiar <ynezz@true.cz>
13 days agomeson: honor MESON_ARGS and MESON_HOST_ARGS when calling ninja
Daniel Golle [Wed, 27 Nov 2024 20:37:57 +0000 (21:37 +0100)]
meson: honor MESON_ARGS and MESON_HOST_ARGS when calling ninja

Set MESON_ARGS and MESON_HOST_ARGS when calling ninja for building.
This is required eg. to be able to set PYTHONPATH= not just for the
Meson (==configure) run but also for the build phase itself.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
13 days agogmp: use same source tarball for tools/gmp and package/libs/gmp
Daniel Golle [Wed, 27 Nov 2024 20:43:26 +0000 (21:43 +0100)]
gmp: use same source tarball for tools/gmp and package/libs/gmp

tools/gmp was using the .tar.xz while package/libs/gmp was using the
.tar.gz archive of the GMP release. Use the .tar.gz for both of them.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
13 days agobase-files: fix manger->manager typo
Petr Štetiar [Thu, 28 Nov 2024 08:10:44 +0000 (08:10 +0000)]
base-files: fix manger->manager typo

It was reported, that a small typo sneaked in, so lets fix it.

Reported-by: @dave14305
Fixes: c19c31f7aa6f ("base-files: add migration information for APK")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2 weeks agonetifd: update to Git 768027c5a7640137857f412f554227abd6160cdd (2024-11-27)
Paul Donald [Mon, 25 Nov 2024 14:24:54 +0000 (15:24 +0100)]
netifd: update to Git 768027c5a7640137857f412f554227abd6160cdd (2024-11-27)

86da5cbcdb9d system-linux: do not pull ifindex/flags from netlink messages on rtnl events
cd96f61ba63e proto-shell: fix spurious interface teardowns with host deps
a39fe3a8b150 wireless: add support for adding a list of devices for a wifi-iface
d29cf707478c iprule: add ipproto property
768027c5a764 system-linux: restore reading flags from netlink messages

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17074
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2 weeks agouci: update to Git HEAD (2024-11-26)
Christian Marangi [Wed, 27 Nov 2024 21:20:54 +0000 (22:20 +0100)]
uci: update to Git HEAD (2024-11-26)

10f7996ec294 file: Ignore config file with '.' in name

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2 weeks agobase-files: add migration information for APK
Paul Spooren [Wed, 27 Nov 2024 16:09:30 +0000 (17:09 +0100)]
base-files: add migration information for APK

If the `apk` package manager is installed, show a table of common
commands to deal with the system.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2 weeks agobuild: profiles.json: add kernel version information
Eric Fahlgren [Fri, 22 Nov 2024 17:00:25 +0000 (09:00 -0800)]
build: profiles.json: add kernel version information

Currently downstream tools like ASU lack information about kernel
version to find out the relevant kmod build folder on downloads server.

So lets fix it by providing a new `linux_kernel` JSON array which would
for the start provide Linux kernel version, revision and vermagic
information.

  "linux_kernel": {
     "release": "1",
     "vermagic": "b57450c07d3a786158c3601fc5cee57d",
     "version": "6.6.61"
   },

Fixes: openwrt/openwrt#17036
Fixes: efahl/owut#9
Co-developed-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17042
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2 weeks agomediatek: remove ktd-202x driver filogic image (Aer Vero W6m)
George Oldfort [Tue, 26 Nov 2024 05:42:25 +0000 (06:42 +0100)]
mediatek: remove ktd-202x driver filogic image (Aer Vero W6m)

Image build fails with PR #16861 merged while PR #16860 not merged.

Removing kmod-leds-ktd202x from filogic.mk will fix the build process.

Fixes: 2898d1d1269a ("mediatek: add support for Acer Predator W6d and Acer Vero W6m")
Signed-off-by: George Oldfort <openwrt@10099.de>
Link: https://github.com/openwrt/openwrt/pull/17087
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 weeks agoRevert "target,base-files: unify handling of procd-ujail"
Petr Štetiar [Mon, 25 Nov 2024 21:23:54 +0000 (21:23 +0000)]
Revert "target,base-files: unify handling of procd-ujail"

This reverts commit ac640718aa0ceae55969bb9e7e45d00bb7bc228a as it
removes base-files package when KERNEL_NAMESPACES is deselected, as
base-files depends on procd-ujail which needs KERNEL_NAMESPACES.

Fixes: #17075
Link: https://github.com/openwrt/openwrt/pull/17081
Link: https://github.com/openwrt/openwrt/pull/17081
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2 weeks agoramips: mt7621: support openwrt,netdev-name for renaming interfaces
Robert Marko [Sun, 24 Nov 2024 20:15:08 +0000 (21:15 +0100)]
ramips: mt7621: support openwrt,netdev-name for renaming interfaces

Edgerouter X currently has its eth1 port on the switch missing since there
is a naming conflict currently.

So, as the root cause is mixing kernel support for DSA interfaces having
predictable names set via "label" property vs others having it assigned
dynamically lets avoid the conflict by using our own custom property as
suggested upstream [1].

So, add support via "openwrt,netdev-name" property and use it on ERX.

Fixes: 2a25c6ace8d8 ("ramips: get rid of downstream network device label patch")
Fixes: #15643
Link: https://github.com/openwrt/openwrt/pull/17062
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 weeks agoopenwrt-keyring: apk: use just snapshot key explicitly
Petr Štetiar [Mon, 4 Nov 2024 09:04:04 +0000 (09:04 +0000)]
openwrt-keyring: apk: use just snapshot key explicitly

Currently we're going to ship all the apk keys in the keyring, but the
preference is to ship and use single release/branch specific key so lets
use openwrt-snapshots.pem for apk explicitly as well.

Fixes: 2cea05002489 ("openwrt-keyring: add apk public key for signing of package indexes")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Link: https://github.com/openwrt/openwrt/pull/16852
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 weeks agoRevert "openwrt-keyring: fix missing 24.10 usign key by installing it"
Petr Štetiar [Mon, 4 Nov 2024 09:02:19 +0000 (09:02 +0000)]
Revert "openwrt-keyring: fix missing 24.10 usign key by installing it"

This reverts commit 37784c48e93c663dafc99454c24bebf4e258556f as the
preference is to have single explicit key for each release/branch.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Link: https://github.com/openwrt/openwrt/pull/16852
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 weeks agoqualcommax: ipq60xx: remove source-only flag
Robert Marko [Sun, 24 Nov 2024 22:50:22 +0000 (23:50 +0100)]
qualcommax: ipq60xx: remove source-only flag

Its been a while since we added ipq60xx as source-only, it is now
quite usable so lets remove the source-only flag to start building
official images.

I also plan to merge additional popular boards rather soon.

Link: https://github.com/openwrt/openwrt/pull/17065
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 weeks agokernel: enable pressure interface
John Audia [Sun, 29 Oct 2023 08:32:21 +0000 (04:32 -0400)]
kernel: enable pressure interface

PSI provides a canonical way to see resource pressure increases as
they develop, with pressure metrics for three major resources:
memory, CPU, and IO. PSI stats are like barometers that provide
fair warning of impending resource shortages, enabling users to
take more proactive, granular, and nuanced steps when resources
start becoming scarce.

References:
* https://www.kernel.org/doc/html/latest/accounting/psi.html
* https://lwn.net/Articles/759781/

Build system: x86/64
Build-tested: x86/64/AMD Cezanne, flogic/glinet_gl-mt6000
Run-tested: x86/64/AMD Cezanne, flogic/glinet_gl-mt6000

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/13819
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 weeks agomediatek: Routerich AX3000: add OpenWrt U-Boot layout
Mikhail Zhilkin [Sat, 26 Oct 2024 09:37:14 +0000 (09:37 +0000)]
mediatek: Routerich AX3000: add OpenWrt U-Boot layout

This commit adds OpenWrt U-Boot layout support for Routerich AX3000. The
aims:
1. Get open-source U-Boot;
2. Get maximum available free space in OpenWrt.

Install
-------
1. Copy OpenWrt ubootmod-bl31-uboot.fip, ubootmod-preloader.bin, to the
   /tmp folder of the router using scp.

2. Make mtd partitions backups:
   http://192.168.1.1/cgi-bin/luci/admin/system/flash -> Save mtdblock
   contents

3. Install kmod-mtd-rw:
```
opkg update && opkg install kmod-mtd-rw
```

4. Write FIP and preloader:
```
insmod mtd-rw i_want_a_brick=1
mtd unlock BL2
mtd erase BL2
mtd write /tmp/ubootmod-preloader.bin BL2
mtd unlock FIP
mtd erase FIP
mtd write /tmp/ubootmod-bl31-uboot.fip FIP
```

5. Copy OpenWrt ubootmod-initramfs-recovery.itb to the tftp server root
   with IP 192.168.1.254.

6. Reboot router:
```
reboot
```
U-Boot will automatically download from the tftp server and boot OpenWrt
initramfs system.

7. Copy OpenWrt ubootmod-squashfs-sysupgrade.itb to the /tmp dir of the
   router using scp.

8. Run sysupgrade:
```
sysupgrade -n /tmp/squashfs-sysupgrade.itb
```

Recovery
--------
1. Place OpenWrt initramfs-recovery.itb image (with original name) on the
   tftp server (IP: 192.168.1.254).
2. Press "reset" button and power on the router. After ~10 sec release the
   button.
3. Use OpenWrt initramfs system for recovery.

BL2 and FIP recovery
--------------------
Use mtk_uartboot and UART connection if BL2 or FIP in UBI is destroyed:
Link: https://github.com/981213/mtk_uartboot
Return to stock:
----------------
1. Copy partition backups (BL2.bin and FIP.bin) to the /tmp dir of the
   router using scp.

2. Install kmod-mtd-rw:
```
opkg update && opkg install kmod-mtd-rw
```

3. Restore stock U-Boot and reboot:
```
insmod mtd-rw i_want_a_brick=1
mtd unlock BL2
mtd erase BL2
mtd write /tmp/BL2.bin BL2
mtd unlock FIP
mtd erase FIP
mtd write /tmp/FIP.bin FIP
reboot
```

4. Open U-Boot web recovery, upload stock firmware image and start
   upgrade.
Link: http://192.168.1.1
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16791
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 weeks agouboot-mediatek: add Routerich AX3000 support
Mikhail Zhilkin [Sat, 26 Oct 2024 09:34:43 +0000 (09:34 +0000)]
uboot-mediatek: add Routerich AX3000 support

Add U-Boot replacement loader for Routerich AX3000.

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16791
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 weeks agoramips: dna_valokuitu-plus-ex400: clean-up image creation
Mauri Sandberg [Mon, 28 Oct 2024 20:13:04 +0000 (22:13 +0200)]
ramips: dna_valokuitu-plus-ex400: clean-up image creation

Code cleanup. Simplify and unify how kernel image is passed to
Build/dna-bootfs

Signed-off-by: Mauri Sandberg <maukka@ext.kapsi.fi>
Link: https://github.com/openwrt/openwrt/pull/16811
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 weeks agoramips: mt76x8: disable unused Ralink systick driver
Shiji Yang [Sun, 3 Nov 2024 04:30:21 +0000 (12:30 +0800)]
ramips: mt76x8: disable unused Ralink systick driver

The mt76x8 series SoCs use the MIPS generic systick timer. Sync the
upstream Ralink systick driver changes and disable it for mt76x8
target to reduce the kernel size.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/16844
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 weeks agokernel: usb: kmod-usb-audio: Fix dependency
Hauke Mehrtens [Sun, 24 Nov 2024 13:57:19 +0000 (14:57 +0100)]
kernel: usb: kmod-usb-audio: Fix dependency

Change the dependency on the kmod-media-controller from depends to
select.

Fixes: 109592524663 ("kernel: add kmod-media-controller dependency for kmod-usb-audio")
Link: https://github.com/openwrt/openwrt/pull/17058
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 weeks agostm32: Remove unnecessary kernel options
Hauke Mehrtens [Sun, 24 Nov 2024 13:53:47 +0000 (14:53 +0100)]
stm32: Remove unnecessary kernel options

These options are filtered out since some weeks, remove them also from
the new stm32 target.

Fixes: 851e7f77e424 ("stm32: add new stm32 target")
Link: https://github.com/openwrt/openwrt/pull/17058
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>