Commit Graph

62664 Commits

Author SHA1 Message Date
Hauke Mehrtens
dd04edfba2 OpenWrt v24.10.0-rc3: adjust config defaults
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-12-21 01:51:30 +01:00
Marco von Rosenberg
8667ca841b generic: fix BCM54612E suspend/resume backport patch
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
This backport patch inserted suspend/resume callbacks
for the wrong PHY driver.
The fixed patch is needed for Huawei AP5030DN
to initialize its second PHY.

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

Fixes: 06cdc07f8c ("ath79: add support for Huawei AP5030DN")
Signed-off-by: Marco von Rosenberg <marcovr@selfnet.de>
Link: https://github.com/openwrt/openwrt/pull/17312
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit d7f638bc69)
2024-12-20 19:36:33 +01:00
David Bauer
5289460fd0 wifi-scripts: don't fail on unset PSK
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
Don't fail wireless interface bringup on empty PSK set. This is a valid
configuration, resulting in a PSK network which can't be connected to.
It does not fail the bringup of the hostapd process.

Keep failing the interface setup in case a password with invalid length
is used.

This is also beneficial when intending to configure a PPSK network. It
allows to create a network where no PPSK is yet set.

Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 17a71f0c15)
2024-12-20 01:20:00 +01:00
Isaac de Wolff
9f76cda378 lantiq: grow kernel partition Zyxel P-2812HNU-F1
Some checks failed
Build all core packages / Build all core packages for selected target (push) Waiting to run
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
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
Link: https://github.com/openwrt/openwrt/pull/17300
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 0d21cc8a92)
2024-12-19 11:30:45 +01:00
Andrew MacIntyre
5415fb06d2 lantiq/xrx200: move 8M flash devices to a small flash subtarget
Images for xrx200 8M flash are either not building due to image
size (TD-W8970, TD-W8980) or building such that the available
free space in the overlayfs is too little to be useful.

To keep images for these devices buildable, move them into a
small flash variant of the xrx200 subtarget.  As these devices
are NOR flash only, remove NAND and UBI references from the
kernel config to gain some additional image size reduction.

The apparent 8M flash devices Arcadyan VGV7510KW22-brn,
Arcadyan VGV7519-brn and Lantiq Easy80920-nor seem to exist in
order to create special "factory" installation images for these
devices (which actually have larger flash: 16MB for the
Arcardyan devices; 64MB for the Lantiq device).  As a
considerable amount of surgery would appear to be required to
the uboot-lantiq package structure to separate the "factory"
from the "sysupgrade" device recipes for these devices they
remain in the xrx200 target - if factory images aren't now
created, 23.05.x factory images should suffice for initial
installation.

Tested on: Netgear DM200, TP-Link TD-W8980,
           AVM Fritz7490 (xrx200 subtarget: image build only)

Fixes: https://github.com/openwrt/openwrt/issues/16761
Signed-off-by: Andrew MacIntyre <andymac@pcug.org.au>
Link: https://github.com/openwrt/openwrt/pull/17113
(cherry picked from commit e63326e26a)
Link: https://github.com/openwrt/openwrt/pull/17303
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-12-19 11:25:30 +01:00
John Audia
21549dbf7b kernel: bump 6.6 to 6.6.66
Update patch set for new release and add required kernel option
CONFIG_ZRAM_TRACK_ENTRY_ACTIME to generic config

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

Manually rebased:
	bcm27xx/patches-6.6/950-0092-MMC-added-alternative-MMC-driver.patch
	bcm53xx/patches-6.6/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
	starfive/patches-6.6/1000-serial-8250_dw-Add-starfive-jh7100-hsuart-compatible.patch

Removed upstreamed:
	bcm27xx/patches-6.6/950-0029-vc4_hdmi-Avoid-log-spam-for-audio-start-failure.patch[1]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.66&id=e0388a95736abd1f5f5a94221dd1ac24eacbd4d7

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

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/17271
(cherry picked from commit 28f534d953)
Link: https://github.com/openwrt/openwrt/pull/17302
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-12-19 11:22:12 +01:00
Florian Maurer
5a715cdbcd hostapd: fix call to hostapd reload
access to undeclared variable radio In [anonymous function](), file /usr/share/hostap/hostapd.uc, line 830, byte 45:

Signed-off-by: Florian Maurer <f.maurer@outlook.de>
(cherry picked from commit 31e45f62ca)
2024-12-19 09:02:51 +01:00
Felix Fietkau
e40367fa99 hostapd: fix passing radio parameter in wpa_supplicant calls
Fixes accessing PHY status in AP+STA configurations

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 8943430b9f)
2024-12-19 09:02:36 +01:00
Felix Fietkau
f0ff244c69 firewall4: update to Git HEAD (2024-12-18)
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
e00958884416 fw4: do not add physical devices for soft offload
dfbcc1cd127c fw4: skip not existing netdev names in flowtable device list
18fc0ead19fa init: use the reload data trigger to reload firewall on procd data changes

Fixes: https://github.com/openwrt/openwrt/issues/13410
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 47c75a25cd)
2024-12-18 12:47:50 +01:00
Felix Fietkau
cc69be0c13 unetd: update to Git HEAD (2024-12-17)
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
93461ca4c827 unet-cli: only apply defaults on create
3e5766783d5d unet-tool: add support for confirming password
074d3659ca4a unet-cli: confirm password when creating new seed based key
bf3488a3807a unet-cli: add add/set-local-host command
9eb57c528461 unet-cli: add support for setting interface zone
a0a2d80f3459 ubus: add firewall rules for network port/pex_port via procd

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit f077e058fd)
2024-12-17 22:00:37 +01:00
Felix Fietkau
6642ee73bc procd: add support for reload triggers on data change
This can be useful to reload the firewall when procd firewall data changes

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 49d92d3e93)
2024-12-17 22:00:37 +01:00
Felix Fietkau
f760f74209 procd: do not overwrite service data by default
Allows a running servie to manage its own data if untouched by the init script

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 8c5826b140)
2024-12-17 22:00:37 +01:00
Felix Fietkau
5dca1d6a41 procd: update to Git HEAD (2024-12-17)
2e206dbe77ec service: add support for triggers on service/instance data changes
735b48728fca service: remove leftover lines from previous commit
32469644a029 service: allow incremental changes to service properties
fd01fb852302 service: fix double free bug when dealing with data

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 3d900bd055)
2024-12-17 22:00:37 +01:00
John Crispin
e109caeec4 procd: update to latest HEAD
e2f05de state: set_stdio: chdir back to / in case of failure
30542c9 inittab: Disable implicit controlling TTY.

Signed-off-by: John Crispin <john@phrozen.org>
(cherry picked from commit 2bcc49aef9)
2024-12-17 22:00:37 +01:00
Felix Fietkau
a964e96289 netifd: update to Git HEAD (2024-12-17)
058a099f5bc5 interface: fix memleak and reload issue for the zone attribute
ea01ed41f321 interface: remove unnecessary NULL checks before free()

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 53e312e193)
2024-12-17 21:58:55 +01:00
Felix Fietkau
acf52fed43 unetd: add firewall input rule for global port
Ensure that peers can be exchanged over any interface

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit f8a16524c4)
2024-12-17 21:58:55 +01:00
Felix Fietkau
25268f724b unetd: update to Git HEAD (2024-12-16)
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
d22d7db581d5 bpf_skb_utils.h: add missing include to fix build against newer kernel headers
bbd3e0eb1419 host: fix peer routes on a node acting as gateway
b17164751fc7 unet-tool: add support for generating keys from salt + seed passphrase
041e05870c20 unet-tool: add support for dumping pubkey from signed file
b58920d420cb unet-tool: add support for extracting network data from signed bin file
f335f5b40b4e unet-cli: add support for generating key from seed
8b1f1d099352 unet-cli: add support for importing networks from signed data
188ba05eadf2 unet-cli: add missing command line help for import
8f15fc306a40 unet-cli: fix add-ssh-host with seed keys
486bc3b86dc2 pex-msg: enable broadcast for global PEX socket
e4a24cdfbc1c unet-cli: fix defaults on create

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit af1740a28b)
2024-12-16 13:04:21 +01:00
Rosen Penev
6435025f9c ath79: fix tl-wa eth1 mac
This is using mac-base and so a 0 needs to be added.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17274
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 0634ebed9f)
2024-12-16 11:07:11 +01:00
John Audia
6d0d4ce72f kernel: generic: tg3: Fix DMA allocations on 57766 devices
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
At the request of rsalvaterra, add this patch to fix an issue
affecting tg3 ethernet interfaces[1].

1. https://github.com/openwrt/openwrt/pull/17271#issuecomment-2543836518

Tested-by: Rui Salvaterra <rsalvaterra@gmail.com>
Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/17282
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit a3c484c3b9)
2024-12-16 01:10:42 +01:00
Shiji Yang
28602452df ath79: fix ath9k calibration data size for AR9132
For ath9k NICs older than AR9287, The eeprom size is 0xeb8.

Fixes: https://github.com/openwrt/openwrt/issues/17196
Fixes: 74f2df9dbc ("ath79: mtd-cal-data removals")
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/17261
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 96eb12e961)
2024-12-16 01:10:36 +01:00
Andreas Böhler
28bde50c1d ath79: add support for KuWFi N650 CPE
Some checks failed
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
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

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
Link: https://github.com/openwrt/openwrt/pull/17247
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit dde510cf97)
2024-12-15 01:46:49 +01:00
John Audia
efcb0ec713 kernel: bump 6.6 to 6.6.65
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.65

Update to checksum only/no patches required a rebase.
Per the changelog, this is a trivial upstream bump with only 4
commits, 2 of which being reverts.

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

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/17217
Signed-off-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 15e173bf7e)
2024-12-15 01:43:51 +01:00
John Audia
9af0e94fa6 kernel: bump 6.6 to 6.6.64
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.64

Manually rebased:
	generic/hack-6.6/780-usb-net-MeigLink_modem_support.patch
	bcm27xx/patches-6.6/950-0585-drm-vc4-Introduce-generation-number-enum.patch
	bcm27xx/patches-6.6/950-0610-drm-vc4-hvs-Support-BCM2712-HVS.patch
	bcm27xx/patches-6.6/950-0829-vc4-hvs-Add-support-for-D0-register-changes.patch

Removed upstreamed:
	bcm27xx/patches-6.6/950-0597-drm-vc4-hdmi-Avoid-hang-with-debug-registers-when-su.patch[1]
	bcm27xx/patches-6.6/950-0599-drm-vc4-Fix-dlist-debug-not-resetting-the-next-entry.patch[2]
	bcm27xx/patches-6.6/950-0600-drm-vc4-Remove-incorrect-limit-from-hvs_dlist-debugf.patch[3]
	bcm27xx/patches-6.6/950-0708-drm-vc4-Correct-logic-on-stopping-an-HVS-channel.patch[4]
	ramips/patches-6.6/002-01-v6.13-clk-ralink-mtmips-fix-clock-plan-for-Ralink-SoC-RT38.patch[5]
	ramips/patches-6.6/002-02-v6.13-clk-ralink-mtmips-fix-clocks-probe-order-in-oldest-r.patch[6]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.64&id=223ee2567a55e4f80315c768d2969e6a3b9fb23d
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.64&id=8182b5ca19c6f173b6498d1c6d3e4b034b76bbde
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.64&id=52c1716f65a558174e381360bd88f18dae4be85c
4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.64&id=9728b508b01a5eeeac79ceb676364c674dd951ac
5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.64&id=f85a1d06afbcc57ac44176db8f9d7a934979952c
6. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.64&id=fbb13732c6ffa9d58cedafabcd5ce8fd7ef8ae5a

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

Co-authored-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/17217
Signed-off-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 5158e28769)
2024-12-15 01:43:39 +01:00
Shiji Yang
bf284ed4af ramips: fix 2.4G wmac eeprom offset for TL-WR902AC v4
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
The eeprom data offset on 2.4GHz wmac is wrong. It is obvious that
this is a copy & paste issue.

Suggested-by: @cgm999 on https://github.com/openwrt/openwrt/issues/13969
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/17263
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 5a24850de1)
2024-12-14 20:34:55 +01:00
David Bauer
aa1241e979 wifi-scripts: fix failing mesh setup with missing wpa_supplicant
Some checks failed
Build all core packages / Build all core packages for selected target (push) Has been cancelled
The initialization of mesh interfaces currently fail when wpa_supplicant
is not installed. This is due to the script calling the wpa_supplicant
feature indicator without verifying wpa_supplicant is installed at all.

To avoid failing, first check if wpa_supplicant is installed before
determining the available featureset.

Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 1be18c6daa)
2024-12-12 16:41:10 +01:00
Andris PE
28de3ffefa 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>
(cherry picked from commit 207bfee855)
2024-12-10 01:22:05 +01:00
Paul Donald
6c664135f9 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>
(cherry picked from commit f4492b6b1c)
Link: https://github.com/openwrt/openwrt/pull/17110
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-12-10 01:19:13 +01:00
Mikhail Zhilkin
620aa80064 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
(cherry picked from commit ee8df790ca)
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17129
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-12-10 01:08:03 +01:00
Mikhail Zhilkin
24bddf68bd 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
(cherry picked from commit 77cc4b7127)
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17129
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-12-10 01:08:03 +01:00
Mikhail Zhilkin
d79a70542b 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
(cherry picked from commit 2ea9ede7a8)
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17129
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-12-10 01:08:03 +01:00
Hauke Mehrtens
d48e499fc1 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: 0ef9274721 ("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>
(cherry picked from commit f8b93e2d12)
2024-12-10 01:06:10 +01:00
Ondřej Niesner
b9df2d79b6 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: a55ab9e134 ("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>
(cherry picked from commit a498a84393)
2024-12-10 01:06:10 +01:00
Eric Long
5afd3daeba 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>
(cherry picked from commit 3d8d81883f)
2024-12-10 01:06:10 +01:00
Marty Jones
1eba94e67b 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>
(cherry picked from commit ac8d30a645)
2024-12-10 01:06:10 +01:00
Marty Jones
8a4ce69eea 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>
(cherry picked from commit 36f6d6ddcd)
2024-12-10 01:06:10 +01:00
Marty Jones
2b45e93113 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>
(cherry picked from commit c48a48e658)
2024-12-10 01:06:10 +01:00
Marty Jones
4bfe5ccd11 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>
(cherry picked from commit 24c8f06807)
2024-12-10 01:06:10 +01:00
Robert Marko
863d1a634e 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>
(cherry picked from commit 1b6f7ec679)
2024-12-08 09:59:16 +01:00
Bohdan Chubuk
45f9f15512
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
(cherry picked from commit 1269a836ed)
Link: https://github.com/openwrt/openwrt/pull/17188
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-12-06 15:12:46 +01:00
Bohdan Chubuk
f483de4767
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
(cherry picked from commit 5348e2e81a)
Link: https://github.com/openwrt/openwrt/pull/17188
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-12-06 15:12:42 +01:00
Hauke Mehrtens
c995dd97c7 OpenWrt v24.10.0-rc2: revert to branch defaults
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-12-03 22:24:36 +01:00
Hauke Mehrtens
66e76aa94f OpenWrt v24.10.0-rc2: adjust config defaults
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-12-03 22:24:32 +01:00
Christian Marangi
ea17e958b9
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>
(cherry picked from commit 53ee2e8c03)
2024-12-03 12:41:08 +01:00
Hauke Mehrtens
5601274444 OpenWrt v24.10.0-rc1: revert to branch defaults
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-12-02 00:22:14 +01:00
Hauke Mehrtens
41714984df OpenWrt v24.10.0-rc1: adjust config defaults
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-12-02 00:22:08 +01:00
INAGAKI Hiroshi
d276b4c91a Revert "ath79: elecom,wab: use nvmem"
This reverts commit 70e41d0205.

"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
(cherry picked from commit af611bce44)
Link: https://github.com/openwrt/openwrt/pull/17117
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-11-29 18:25:36 +01:00
Petr Štetiar
c981096416
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>
(cherry picked from commit 08f12283c7)
2024-11-29 11:29:42 +00:00
Petr Štetiar
de8a1a1e3a
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: faf4b3e0f7 ("mediatek: filogic: add support for Cudy WR3000S v1")
Link: https://github.com/openwrt/openwrt/pull/17096
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 30ae0b3f1e)
2024-11-29 11:29:06 +00:00
Petr Štetiar
17bdccb4a5
apk: mark package as broken to hide it by default
During the last OpenWrt developer meeting 2024-11-26 it was decided,
that 24.10 will be the last release using opkg package manager and thus
apk won't be supported, so make it explicit and mark apk package manager
as broken.

References: https://openwrt.org/meetings/20241126#release_2410
Link: https://github.com/openwrt/openwrt/pull/17097
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2024-11-28 18:49:43 +00:00
Hauke Mehrtens
2c3d036fe7
config: Mark USE_APK broken
This will hide the USE_APK setting in OpenWrt 24.10 by default.

APK is not stable yet and we do not want to support it in OpenWrt 24.10 branch.

References: https://openwrt.org/meetings/20241126#release_2410
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Petr Štetiar <ynezz@true.cz> [meeting notes ref, config]
Link: https://github.com/openwrt/openwrt/pull/17097
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2024-11-28 18:49:41 +00:00