Correct the order of the arguments.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/21109
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This fixes the following build error:
```
../src/apk.c: In function 'parse_options':
../src/apk.c:584:4: error: a label can only be part of a statement and a declaration is not a statement
584 | char *arg = opt_parse_arg(&st);
| ^~~~
```
Upstream MR: https://gitlab.alpinelinux.org/alpine/apk-tools/-/merge_requests/376
Fixes: b91ebdabbb ("apk: bump to 3.0.1")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Hardware specification:
SoC: MediaTek MT7981B
Flash: ESMT F50L1G41LB 128MB
RAM: ESMT M15T2G16128A DDR3 256MB
Ethernet: 3x 1G
Button: Reset, WPS
MAC addresses
LAN: Label MAC (stored in Factory partition offset 0x1fef20)
WAN: LAN + 1
WiFi: LAN
Official LED layout, from left to right:
[power] [internet] [wps] [wifi] [lan3/2/1] [wan]
Redefinition for OpenWrt:
[power]: used for led-boot, led-failsafe, and led-running
[internet]: used for WAN RX/TX indication
[wps]: used for led-upgrade
[wifi] and [lan3/2/1]: unchanged
[wan]: used for WAN link indication
Installing OpenWrt:
- Setup a tftp server on your PC. Copy
xxx-preloader.bin, xxx-bl31-uboot.fip and
xxx-initramfs.itb to tftp root directory.
- Connect to the router via ssh or telnet,
username: useradmin, password is the web
login password of the router.
- Backup all critical flash partitions with
the following commands where x.x.x.x is
the IP of your PC.
IP=x.x.x.x
cd /dev
for d in /sys/class/mtd/mtd?; do
if [ "$(cat $d/name)" = "BL2" ]; then
tftp -l $(basename $d) -r bl2.img -p $IP
elif [ "$(cat $d/name)" = "FIP" ]; then
tftp -l $(basename $d) -r fip.bin -p $IP
elif [ "$(cat $d/name)" = "Factory" ]; then
tftp -l $(basename $d) -r factory.bin -p $IP
fi
done
for d in /sys/devices/virtual/ubi/ubi0/ubi0_*; do
[ "$(cat $d/name)" != "customer" ] && continue
tftp -l $(basename $d) -r customer -p $IP
break
done
- Flash with the following commands:
cd /tmp
tftp -r xxx-preloader.bin -g x.x.x.x
tftp -r xxx-bl31-uboot.fip -g x.x.x.x
mtd write xxx-preloader.bin spi0.0
mtd write xxx-bl31-uboot.fip FIP
mtd erase ubi
- Set a static ip(192.168.1.254) for your PC.
And then reboot the router. It will run
initramfs image automatically.
- After openwrt boots up, perform sysupgrade
via web UI.
Reverting to the vendor firmware:
- Setup a tftp server on your PC with ip
address 192.168.1.254. And make sure
bl2.img, fip.bin, factory.bin and customer
are located in tftp root directory.
- Power off the router.
- Press and hold WPS key, then power on
the router.
- Release WPS key, when internet/wifi/wps
leds are blinking.
- Wait until internet/wifi/wps leds light
up, power off the router.
- Press and hold reset key, power up the
router, release reset key 15s later.
- Connect to http://192.168.1.1, now you
can upload vendor .bin firmware.
Uboot netconsole:
Uboot netconsole can be enabled by WPS
or reset key.
- Setup a linux PC with ip 192.168.1.254.
Open a new terminal and execute
'stty -isig -echo cbreak; nc -lup 6666'
- Press and hold WPS(or reset) key, then
power on the router.
- Release key once internet/wifi/wps leds
are all on.
NOTE: don't hold the key more than 5s
after internet/wifi/wps leds on, or it
will try to revert to vendor firmware.
- 5s later, uboot bootmenu will show on
the terminal.
Signed-off-by: Zhiwei Cao <bfdeh@126.com>
Link: https://github.com/openwrt/openwrt/pull/18631
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Reorder device names alphabetically and group together the same configs.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/21052
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This function is defined but unused. There is no reason to keep it.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/21052
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Add pending fix for wrong resource_size() usage that cause firmware
crash on load on ath11k.
Refresh all affected patch by this.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Recently finalized 3 branch bumped to 3.0.1
dropped patches
-010-libressl4.patch; integrated at source
-999-small-scripts-tar.patch; integrated at source
refreshed remaining patches
DEPRECATION: Option 'compressed-help' is deprecated - removed.
DEPRECATION: Option 'zstd' value 'false' is replaced by 'disabled'
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21093
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Choose the minimal release build which excludes a number of
unused applets, not used on user devices.
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21093
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Currently its only possible to disable port forwarding only for specific
keys, via the OpenSSH-style restriction in `authorized_keys` file.
In some use cases it might be feasible to disable such features globally
on service level, so lets add new LocalPortForward and RemotePortForward
config knobs.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Link: https://github.com/openwrt/openwrt/pull/21071
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
The issue described in the patch can not be reproduced in the latest
6.18 ath10k-ct driver. It should have been fixed by the upstream.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/21089
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This will allow del_client with ban_time on a broadcast address
to also ban all clients temporarily.
Signed-off-by: Rany Hany <rany_hany@riseup.net>
Link: https://github.com/openwrt/openwrt/pull/18670
Signed-off-by: Robert Marko <robimarko@gmail.com>
Similar to the hostapd control interface, treat ff:ff:ff:ff:ff:ff
as a stand in for "all clients".
Signed-off-by: Rany Hany <rany_hany@riseup.net>
Link: https://github.com/openwrt/openwrt/pull/18670
Signed-off-by: Robert Marko <robimarko@gmail.com>
Switch ath10k-ct kernel version base to 6.18 to align with backports
package based on 6.18 kernel version.
Link: https://github.com/openwrt/openwrt/pull/20964
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Backport upstream patch fixing support for 6.18 due to kernel upstream
commit b74947b4f6ff ("wifi: cfg80211/mac80211: Add support to get radio
index")
Link: https://github.com/openwrt/openwrt/pull/20964
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Drop all upstreamed patch and refresh all affected patch.
Minor changes were needed to the
350-mac80211-allow-scanning-while-on-radar-channel due to changes in
6.18.
Also some changes were needed to downstream patch due to upstream commit
b74947b4f6ff ("wifi: cfg80211/mac80211: Add support to get radio index")
Link: https://github.com/openwrt/openwrt/pull/20964
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
libunwind fails to compile because the include for the WORDSIZE
definition was missing when compiling with musl libc.
This lead to unw_word_t being defined as 64 bit long instead
of the correct 32 bit.
Signed-off-by: David Bauer <mail@david-bauer.net>
f19dd37fb467 odhcp6c: accept EUI64 and random for interface ID
e955729c781f formal: fix workflow permissions
9557d3e245aa vscode: set tabs to 8 whitespaces by default
98dfd156f399 src: fix shadowed local variables
f98b6ec823...f19dd37fb4
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
This is about as simple as it gets, it's able to start up and put
the onboard switch into dumb switch mode and then send untagged
frames which become available on every switch port.
It is out-of-tree to allow for rapid development and it is being
proposed now because even in this state it brings a lot of value
to the EcoNet platform and it is a fairly complex ethernet system
so it will take some time before the driver is in a state that
may be considered for upstreaming.
Signed-off-by: Caleb James DeLisle <cjd@cjdns.fr>
Link: https://github.com/openwrt/openwrt/pull/20685
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Fix wrong output using '%d' format when byte count parameter is not
given.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/21013
Signed-off-by: Robert Marko <robimarko@gmail.com>
cdedfd891bdf nss-dp: fix hardware STP state sync with the kernel
19c51af0c5be nss-dp: switchdev: improve FDB cleanup for roaming
Signed-off-by: Robert Marko <robimarko@gmail.com>
a284e7751fa7 file: bump sz_size to 64 bits
ffb9961c1f8b file: provide user name and group name lookups for stat listings
Signed-off-by: Robert Marko <robimarko@gmail.com>
Fixes compile errors caused by static const arrays;
The lantiq firmware is const now.
ATTRIBUTE_GROUPS() does not take const.
Fixes: 5b263f3360 ("treewide: add const to static arrays")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Microchip EV23X71A is a LAN9696 based EVB.
Specifications:
* CPU: Microchip LAN9696 switch SoC
* DRAM: 1GB DDR4
* Storage:
* 2MB QSPI NOR
* 4GB eMMC
* Networking:
* 24 x 10/100/1000 RJ45 via LAN8814 Quad PHY-s over QSGMII
* 4 x 100/1000/2500/5000/10000 SFP+ ports
* 1 x 10/100/1000 management RJ45 via LAN8840 PHY over RGMII (U-Boot too)
* USB: 1 x USB2.0 Type-A
* Management via USB-C (MCP2200):
* UART @ 115200 baud
* GPIO-s for bootstrap, reset and clock selection
* DIP switch for boostrap configuration
* LED-s:
* 2 per networking port (Green and Yellow)
* Green status LED
* Yellow reset LED
* Hard reset button
* Power:
* 12V DC barrel jack
* 48/56V DC screw terminal
* Selectable via toggle switch
* PTP support:
* Sync-E DPLL ZL30732B to generate the board required clocks
* Two SMAs for PTP and two for Station clock inputs and outputs
* Two ITU-T G.8275-compliant RS-422 interfaces for PTP applications
* External PoE:
* Option for PoE add-on, like EV14Y36A (IEEE 802.3af/at/bt Type 4
standard com-pliant)
* Option for external CPU control via SPI and PCIe
Installation instructions:
1. Connect to UART via the USB-C port
2. Connect the management port
3. Boot and interrupt U-Boot
4. TFTP the OpenWrt initramfs image and boot it
5. SCP the OpenWrt eMMC GPT image to a running OpenWrt initramfs to /tmp
openwrt-microchipsw-lan969x-microchip_ev23x71a-squashfs-emmc-gpt.img.gz
And decompress it via:
gzip -d /tmp/openwrt-microchipsw-lan969x-microchip_ev23x71a-squashfs-emmc-gpt.img.gz
6. Wipe eMMC with:
dd if=/dev/zero of=/dev/mmcblk0 bs=1M
7. Flash OpenWrt eMMC image with:
dd if=/tmp/openwrt-microchipsw-lan969x-microchip_ev23x71a-squashfs-emmc-gpt.img
of=/dev/mmcblk0
After a restart OpenWrt will boot, and then regular sysupgrade can be used
for upgrades.
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Unneeded semicolon
WARNING comparing pointer to 0
WARNING: NULL check before some freeing functions is not needed.
WARNING: casting value returned by memory allocation function to (u32 *)
ERROR: allocation function on line 378 returns NULL not ERR_PTR on failure
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19932
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Fix the cipher implementation to avoid treating empty input as finalizer.
This issue is fixed in the openssl 3.6 branch, but the fix approach from
that branch is not suitable for 3.5, since the code is completely different.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
The Zyxel NWA210AX is a wall- and ceiling-mountable access point (AP).
Hardware specifications:
- SoC: Qualcomm IPQ8071A
- RAM: 1 GB (Samsung K4A8G165WC-BCTD)
- Flash: 8 MB (Winbond W25Q64DW), 256 MB (Winbond W29N02GZ)
- Ethernet: 1x 2.5 Gbps RJ45 port (QCA8081), 1x 1 Gbps RJ45 port (AR8033)
- WiFi: 2.4 GHz 802.11ax/b/g/n (QCN5024), 5 GHz 802.11 ac/ax/n (QCN5054)
- Power: DC 12V/PoE 802.3at
- Button: Reset
- LEDs: Multicolour red/green/blue/white via LP5562
Installation/flashing instructions:
1. In OEM web interface navigate to gear icon → System → SSH and enable SSH.
2. Log in via SSH (username/password are the same as for the web interface).
3. Run "debug dual-image show".
4. Verify that output is "Current Image num: 1".
5. If this is not the case (i.e. if the output is "Current Image num: 0"):
a. Either flash a fresh version of factory firmware, or
b. run "debug dual-image set boot-image image1" and then run "reboot".
6. Log in via SSH again and verify that output is "Current Image num: 1".
7. Rename "openwrt-qualcommax-ipq807x-zyxel_nwa210ax-squashfs-factory.bin" to
"openwrt.bin" to avoid upload errors in the OEM web interface.
8. Reopen OEM web interface, navigate to wrench icon → File Manager →
Firmware Package and upload the bin file. Once the upgrade process is
finished and OpenWrt has booted, the LED will light up green.
Switching between OpenWrt and OEM firmware:
- OpenWrt → Zyxel via ssh command "zyxel-bootconfig-ipq807x set image1".
- Zyxel → OpenWrt via ssh command "debug dual-image set boot-image image0".
This commit is based on the work of Pascal Beleiu <pascal@beleiu.de>:
93ca21f3 (qualcommax: ipq807x: add support for Zyxel NWA210AX, 2025-03-17)
Signed-off-by: Eric Schäfer <eric@es86.de>
Link: https://github.com/openwrt/openwrt/pull/19828
Signed-off-by: Robert Marko <robimarko@gmail.com>
This adds support for beacon_prot and spp_amsdu in hostapd and
beacon_prot in wpa_supplicant (spp_amsdu is not relevant there).
Both options are disabled by default unless set in the config.
Signed-off-by: Rany Hany <rany_hany@riseup.net>
Link: https://github.com/openwrt/openwrt/pull/20793
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
In the past PR[1] to add SAE wifi-station support, a commenter[2] requested
that the mac option be changed into a list. After trying to migrate my old
RADIUS setup I found myself wanting this change as well as it would simplify
my config. This patch does precisely that. Old configs that specify
`option mac ....` still work without any issues.
This change was done for both PSK and SAE. The schema was updated as well.
[1]: https://github.com/openwrt/openwrt/pull/17145
[2]: https://github.com/openwrt/openwrt/pull/17145#issuecomment-2523507953
Signed-off-by: Rany Hany <rany_hany@riseup.net>
Link: https://github.com/openwrt/openwrt/pull/17650
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Adds support for Turris MOX, a modular router extendable by board modules (MOX B-G).
You can explore the idea behind the modules at: https://mox-configurator.turris.cz/
More information about Turris MOX can be found here: https://docs.turris.cz/hw/mox/intro/
Also works with Turris Shield (Turris MOX A and C with a simplified OS UI).
Specifications:
-----------------------
MOX A
- SoC: Marvell Armada 3720
- RAM: 512/1024 MB, DDR3
- Memory:
- 8 MB SPI NOR Flash for U-Boot and rescue system
- SD card slot
- 1x RJ-45, 1Gbps
- 1x USB 3.0
- 1x activity LED
- 1x reset button
- SDIO header
- misc pin header (UART, GPIO, JTAG, ...)
MOX B, G
- 1x mPCIe slot
- 1x SIM slot
MOX C
- 4x RJ-45, 1Gbps
MOX D
- SFP, 2.5Gbps
MOX E
- 8x RJ-45, 1Gbps
MOX F
- 4x USB 3.0
Module support:
-----------------------
Additional packages are needed for some modules.
MOX A (core)
- works as is
MOX B, G (mPCIe, mPCIe passthrough)
- works as is
MOX C, E (4x, 8x RJ-45)
- kmod-dsa
- kmod-dsa-mv88e6xxx
MOX D (SFP)
- kmod-sfp
- kmod-phy-marvell-10g
MOX F (4x USB 3.0)
- works as is
Wi-Fi 5, 3x3 card (WLE900VX)
- kmod-ath10k
- ath10k-board-qca988x
- ath10k-firmware-qca988x
Wi-Fi 6, DBDC, 2x2 card (MT7915DAN)
- kmod-mt7915e
- kmod-mt7915-firmware
Interface naming:
-----------------------
- MOX A's RJ-45 is assigned to `eth0`.
- MOX C, E (4x, 8x RJ-45) are assigned to `lan<number>@eth1`
- If MOX D (SFP) is connected directly to MOX A, the resulting interface
is `eth1`. If it's connected through MOX E (8x RJ-45), the resulting
interface is `sfp@eth1`.
Quirks:
-----------------------
- MOX is sensitive to the order of connected modules. Verify that the
confguration is valid at: https://mox-configurator.turris.cz/
- `CONFIG_MOXTET` and `CONFIG_GPIO_MOXTET` need to be enabled in kernel
config. Moxtet is a bus protocol needed to discover and configure MOX
modules. It must be compiled into the kernel for the modules to work.
Though it's very small so it won't bloat up the kernel image.
Flashing instructions:
-----------------------
1. Download `openwrt-*-ext4-sdcard.img.gz` and `gunzip` it.
2. Insert an SD card and flash the image to it using dd:
dd if=openwrt-*-ext4-sdcard.img.gz of=/dev/mmcblk0 bs=4096 conv=fsync
3. Plug the SD card into MOX.
Troubleshooting:
-----------------------
- https://docs.turris.cz/hw/serial/#turris-mox
- https://docs.turris.cz/hw/mox/rescue-modes/
Signed-off-by: Tomáš Macholda <tomas.macholda@nic.cz>
Link: https://github.com/openwrt/openwrt/pull/20356
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This is useful as there are cases where no network is configured
or the configured network is isolated (APs are blocked from
communicating with each other over it). In both cases, it would make
sense to set ft_iface to another interface dedicated to FT over DS
traffic.
Signed-off-by: Rany Hany <rany_hany@riseup.net>
Link: https://github.com/openwrt/openwrt/pull/20797
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Add ar9344_nec_aterm_fe profile for NEC Aterm WF1200HP and WF1200HP2
based on Atheros AR9344, but using internal FE switch instead of
external GbE switch.
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20611
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The Quectel RG255C modem used in the Teltonika RUT976 does not support
the 'Get Serving System' QMI command, returning "Invalid QMI command".
Without this change, the script would fail even though the connection
could be established successfully.
This patch skips the registration state check if the command is not
supported and relies on subsequent checks instead.
Signed-off-by: Til Kaiser <mail@tk154.de>
Link: https://github.com/openwrt/openwrt/pull/20933
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>