Roland Reinl [Fri, 3 Nov 2023 10:22:02 +0000 (11:22 +0100)]
ramips: add support for D-Link COVR-X1860 A1
The COVR-X1860 are MT7621-based AX1800 devices (similar to DAP-X1860, but
with two Ethernet ports and external power supply) that are sold in sets
of two (COVR-X1862) and three (COVR-X1863).
Specification:
- MT7621
- MT7915 + MT7975 2x2 802.11ax (DBDC)
- 256MB RAM
- 128 MB flash
- 3 LEDs (red, orange, white), routed to one indicator in the top of the device
- 2 buttons (WPS in the back and Reset at the bottom of the device)
MAC addresses:
- LAN MAC (printed on the device) is stored in config2 partition as ASCII (entry factory_mac=xx:xx:xx:xx:xx:xx)
- WAN MAC: LAN MAC + 3
- 2.4G MAC: LAN MAC + 1
- 5G MAC: LAN MAC + 2
The pins for the serial console are already labeled on the board (VCC, TX, RX, GND). Serial settings: 3.3V, 115200,8n1
Flashing via OEM Web Interface:
- Download openwrt-ramips-mt7621-dlink_covr-x1860-a1-squashfs-factory.bin via the OEM web interface firmware update
- The configuration wizard can be skipped by directly going to http://192.168.0.1/UpdateFirmware_Simple.html
Flashing via Recovery Web Interface:
- Set your IP address to 192.168.0.10, subnetmask 255.255.255.0
- Press the reset button while powering on the deivce
- Keep the reset button pressed until the status LED blinks red
- Open a Chromium based browser and goto http://192.168.0.1
- Download openwrt-ramips-mt7621-dlink_covr-x1860-a1-squashfs-recovery.bin
Revert back to stock using the Recovery Web Interface:
- Set your IP address to 192.168.0.10, subnetmask 255.255.255.25
- Press the reset button while powering on the deivce
- Keep the reset button pressed until the status LED blinks red
- Open a Chromium based browser and goto http://192.168.0.1
- Flash a decrypted firmware image from D-Link. Decrypting an firmware image is described below.
Decrypting a D-Link firmware image:
- Download https://github.com/openwrt/firmware-utils/blob/master/src/dlink-sge-image.c and https://raw.githubusercontent.com/openwrt/firmware-utils/master/src/dlink-sge-image.h
- Compile a binary from the downloaded file, e.g. gcc dlink-sge-image.c -lcrypto -o dlink-sge-image
- Run ./dlink-sge-image COVR-X1860 <OriginalFirmware> <OutputFile> -d
- Example for firmware 102b01: ./dlink-sge-image COVR-X1860 COVR-X1860_RevA_Firmware_102b01.bin COVR-X1860_RevA_Firmware_102b01_Decrypted.bin -d
The pull request is based on the discussion in https://forum.openwrt.org/t/add-support-for-d-link-covr-x1860
Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
Signed-off-by: Roland Reinl <reinlroland+github@gmail.com>
(cherry picked from commit
0a18259e4aa361cd9e5848c038be4b9f4e3bfcc6)
Signed-off-by: Florian Maurer <f.maurer@outlook.de>
Alan Luck [Tue, 7 Nov 2023 22:10:35 +0000 (09:10 +1100)]
ramips: add encrypted SGE factory image for D-Link devices
creates SGE encrypted factory images
to use via the D-Link web interface
rename the old factory unencrypted images to recovery
for use in the recovery console when recovery is needed
adjusted to not touch unrelated devices
Signed-off-by: Alan Luck <luckyhome2008@gmail.com>
(cherry picked and adjusted from commit
4c0dc68f466588bb2ef60b29a4d8052b34112ca6)
Signed-off-by: Florian Maurer <f.maurer@outlook.de>
John Audia [Sat, 23 Dec 2023 11:52:06 +0000 (06:52 -0500)]
kernel: bump 5.15 to 5.15.145
Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.145
No patches needed a rebase.
23.05 backport:
Rebased patch mediatek/100-dts-update-mt7622-rfb1.patch due to
changes introduced in commit
e37aa926447f ("arm64: dts: mediatek:
mt7622: fix memory node warning check") in version v5.15.143 and we
jumped over from v5.15.139 directly to v5.15.145.
Build system: x86_64
Build-tested: ramips/tplink_archer-a6-v3
Run-tested: ramips/tplink_archer-a6-v3
23.05 backport:
Stijn:
Compile-tested: ath79/generic, ipq40xx/generic, mvebu/cortexa72, ramips/mt{7621,7620,76x8}, realtek/rtl{838x,930x}, 86/64.
Run-tested: cortexa72 (RB5009UG+S+IN), mt7621 (EAP615-Wall v1), rtl838x (GS1900-10HP, GS1900-8HP, GS108T v3).
Petr:
Compile-tested: ipq807x, mvebu/cortexa9
Run-tested: turris-omnia, prpl-haze
Tested-by: Stijn Segers <foss@volatilesystems.org> [23.05 testing]
Signed-off-by: John Audia <therealgraysky@proton.me>
Signed-off-by: Petr Štetiar <ynezz@true.cz> [23.05 refresh]
(cherry picked from commit
8de4cc77a6d5c25e48566d0203f159287ac7f3fe)
Sander Vanheule [Sun, 7 Jan 2024 11:54:06 +0000 (12:54 +0100)]
firmware-utils: move patch to maintaince branch
Patch "firmware-utils: ptgen: add SiFive GPT partition support" was
included as a separate change in 23.05. Now that we have a maintenance
branch for firmware-utils, the patch can be backported there and
included with other changes.
Signed-off-by: Sander Vanheule <sander@svanheule.net>
Sander Vanheule [Sun, 7 Jan 2024 11:12:05 +0000 (12:12 +0100)]
firmware-utils: bump to latest openwrt-23.05
Contains two backported device suppport updates:
-
9afd8f42bd23 "tplink-safeloader: bump EAP615-Wall compat_level"
-
8cad449bdb5c "add dlink-sge-image for D-Link devices by SGE"
Signed-off-by: Sander Vanheule <sander@svanheule.net>
David Bentham [Sat, 6 Jan 2024 11:58:08 +0000 (11:58 +0000)]
ramips: correct the PCIe port number for Unielec u7621-01
MT7621 gets a new PCIe driver in the 5.15+ kernel. Allocating wrong PCIe
port will cause the PCIe NIC to not work properly. This commit fixes
the wrong port numbers on Unielec u7621-01.
According to the bootlog, MT7612E (5 GHz) is connected to pcie2, and
MT7603E (2 GHz) is connected to pcie1:
[ 1.294844] mt7621-pci
1e140000.pcie: pcie0 no card, disable it (RST & CLK)
[ 1.308635] mt7621-pci
1e140000.pcie: PCIE1 enabled
[ 1.318277] mt7621-pci
1e140000.pcie: PCIE2 enabled
Also correct the led activity for the MT7603e - not used on the MT7612e
Signed-off-by: David Bentham <db260179@gmail.com>
(cherry picked from commit
39e55bdbe27a09579658178796a9b732e126e703)
Signed-off-by: David Bentham <db260179@gmail.com>
Tianling Shen [Mon, 25 Dec 2023 03:23:58 +0000 (11:23 +0800)]
rockchip: configure eth pad driver strength for orangepi r1 plus lts
The default strength is not enough to provide stable connection
under 3.3v LDO voltage.
Fixes: 3f3586a06d27 ("rockchip: add Orange Pi R1 Plus LTS support")
Fixes: #13117
Fixes: #13759
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit
3645ac8a10d9abb1451343beaf7d65b53eeecffd)
[rebased onto openwrt-23.05 branch]
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Michael Pratt [Wed, 6 Dec 2023 19:29:26 +0000 (14:29 -0500)]
ramips: lzma-loader: use default uart for rt305x
The rt305x series SOC have two UART devices,
and the one at bus address 0x500 is disabled by default.
Some boards do not even have a pinout for the first one,
so use the same one that the kernel uses at 0xc00 instead.
This allows the lzma-loader printing to be visible
alongside the kernel log in the same console.
Tested-by: Lech Perczak <lech.perczak@gmail.com> # zte,mf283plus
Signed-off-by: Michael Pratt <mcpratt@pm.me>
(cherry picked from commit
bc00c78b4338779ca1b7cd08411f76218d1f3205)
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Michael Pratt [Wed, 6 Dec 2023 19:12:03 +0000 (14:12 -0500)]
ramips: lzma-loader: use proper register names
Before this was reworked, in the file for mt7621 subtarget
(target/linux/ramips/image/lzma-loader/src/board-mt7621.c)
the "Transmitter shift register empty" bit TEMT was used instead of
the "Transmitter holding register empty" bit THRE,
but after the rework, this value was labeled as the THRE bit instead.
Functionally there is no difference, but this is confusing to read,
as it suggests that the subtargets have different bits for the same
register in UART when in reality they are exactly the same.
One can use either bit, or both, at user's descretion
in order to determine whether the UART TX buffer is ready.
The generic kernel early-printk uses both,
(arch/mips/kernel/early_printk_8250.c)
while the ralink-specific early-printk uses only THRE,
(arch/mips/ralink/early_printk.c).
Define both bits and rewrite macros for readability,
keep the same values, as changing which to use should be tested first.
Ref:
c31319b66 ("ramips: lzma-loader: Refactor loader")
Signed-off-by: Michael Pratt <mcpratt@pm.me>
(cherry picked from commit
2e47913c644c59aa25fbac2bc6c4297956406b82)
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Michael Pratt [Tue, 5 Dec 2023 23:36:42 +0000 (18:36 -0500)]
ramips: lzma-loader: use virtual memory segments for uart base address
The native bus address for UART was entered for rt305x UART_BASE,
but the bootloaders have memory space remapped with the same
virtual memory map the kernel uses for program addressing at boot time.
In UBoot, the remapped address is often defined as TEXT_BASE.
In the kernel, for rt305x this remapped address is RT305X_SYSC_BASE.
(arch/mips/include/asm/mach-ralink/rt305x.h)
Because the ralink I/O busses begin at a low address of 0x10000000,
they are remapped using KSEG0 or KSEG1, which for all 32-bit MIPS SOCs
(arch/mips/include/asm/addrspace.h)
are offsets of 0x80000000 and 0xa0000000 respectively.
This is consistent with the other UART_BASE macros here
and with MIPS memory map documentation.
Before the recent rework of the lzma-loader for ramips,
the original board-$(PLATFORM).c files also did not
use KSEG1ADDR for UART_BASE despite being defined,
which made this mistake easier to occur.
Fix this by defining KSEG1ADDR again and actually use it.
Copy and paste from the kernel's macros for consistency.
Link: https://training.mips.com/basic_mips/PDF/Memory_Map.pdf
Fixes: c31319b66 ("ramips: lzma-loader: Refactor loader")
Reported-by: Lech Perczak <lech.perczak@gmail.com>
Signed-off-by: Michael Pratt <mcpratt@pm.me>
(cherry picked from commit
4c1e9bd8581e01793b26f3bc964975311450ece0)
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Lech Perczak [Fri, 15 Dec 2023 16:25:05 +0000 (17:25 +0100)]
raimps: mtk_eth_soc: drop rst_esw from ESW driver
The ESW core needs to be reset together with FE core, so after the
relevant reset controller lines are moved under FE, drop rst_esw and all
related code, which would not execute anyway, because rst_esw would be
NULL. While at that, ensure that if reset line for EPHY cannot be
claimed, a proper error message is reported.
Fixes: 60fadae62b64 ("ramips: ethernet: ralink: move reset of the esw into the esw instead of fe")
Co-developed-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
[Split out of the bigger commit, provide commit mesage, refactor error
handling]
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
(cherry picked from commit
f393ffcac163926bf9dbbda47c25cc7809952609)
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Maxim Anisimov [Sun, 10 Dec 2023 15:40:39 +0000 (16:40 +0100)]
ramips: dts: mt7628an: reset FE and ESW cores together
Failing to do so will cause the DMA engine to not initialize properly
and fail to forward packets between them, and in some cases will cause
spurious transmission with size exceeding allowed packet size, causing a
kernel panic.
Fixes: 60fadae62b64 ("ramips: ethernet: ralink: move reset of the esw into the esw instead of fe")
Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
[Provide commit description, split into logical changes]
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
(cherry picked from commit
f87b66507e9245e6e02dbc76e2e7b27c9e0bf364)
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Lech Perczak [Mon, 11 Dec 2023 23:25:02 +0000 (00:25 +0100)]
ramips: dts: rt5350: reset FE and ESW cores together
Failing to do so will cause the DMA engine to not initialize properly
and fail to forward packets between them, and in some cases will cause
spurious transmission with size exceeding allowed packet size, causing a
kernel panic.
This is behaviour of downstream driver as well, however I
haven't observed bug reports about this SoC in the wild, so this
commit's purpose is to align this chip with all other SoC's - MT7620
were already using this arrangement.
Fixes: #9284
Fixes: 60fadae62b64 ("ramips: ethernet: ralink: move reset of the esw into the esw instead of fe")
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
(cherry picked from commit
fc92fecfc7ddf19bbfd7d1305a29c666f00543af)
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Lech Perczak [Mon, 11 Dec 2023 23:22:04 +0000 (00:22 +0100)]
ramips: dts: rt3050: reset FE and ESW cores together
Failing to do so will cause the DMA engine to not initialize properly
and fail to forward packets between them, and in some cases will cause
spurious transmission with size exceeding allowed packet size, causing a
kernel panic.
This is behaviour of downstream driver as well, however I
haven't observed bug reports about this SoC in the wild, so this
commit's purpose is to align this chip with all other SoC's - MT7620
were already using this arrangement.
Fixes: 60fadae62b64 ("ramips: ethernet: ralink: move reset of the esw into the esw instead of fe")
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
(cherry picked from commit
c5a399f372535886582f89f3da624ae7465c8ff4)
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Maxim Anisimov [Fri, 8 Dec 2023 05:34:30 +0000 (08:34 +0300)]
ramips: dts: rt3352: reset FE and ESW cores together
Failing to do so will cause the DMA engine to not initialize properly
and fail to forward packets between them, and in some cases will cause
spurious transmission with size exceeding allowed packet size, causing a
kernel panic.
Fixes: 60fadae62b64 ("ramips: ethernet: ralink: move reset of the esw into the esw instead of fe")
Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
[Provide commit description, split into logical changes]
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
(cherry picked from commit
8d75b1de0ff7b9e9e0138f822a5475bb8ad7fedf)
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Maxim Anisimov [Sun, 10 Dec 2023 15:27:32 +0000 (16:27 +0100)]
ramips: mtk_eth_soc: wait longer after FE core reset to settle
Enabling the FE core too early causes the system to hang during boot
uncondtionally, after the reset is released. Increate it to 1-1.2ms
range.
Fixes: 60fadae62b64 ("ramips: ethernet: ralink: move reset of the esw into the esw instead of fe")
Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
[Split previous commit, provide rationale]
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
(cherry picked from commit
7eb0458c1f7e4f681b16d2721cfc3fcb69774c95)
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Lech Perczak [Fri, 15 Dec 2023 16:15:47 +0000 (17:15 +0100)]
ramips: mtk_eth_soc: allow multiple resets
Use devm_reset_control_array_get_exclusive to register multiple
reset lines in FE driver. This is required to reattach ESW reset to FE
driver again, based on device tree bindings.
While at that, remove unused fe_priv.rst_ppe field, and add error
message if getting the reset fails.
Fixes: 60fadae62b64 ("ramips: ethernet: ralink: move reset of the esw into the esw instead of fe")
Co-developed-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
[Split out of the bigger commit, provide commit mesage, refactor error
handling]
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
(cherry picked from commit
3f1be8edee29fe79fc33c88cbd9d647a490410e5)
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Rany Hany [Wed, 3 Jan 2024 16:43:33 +0000 (18:43 +0200)]
mac80211: add missing newline for "min_tx_power"
This prevents min_tx_power from functioning properly in some circumstances.
Add the missing newline.
Signed-off-by: Rany Hany <rany_hany@riseup.net>
(cherry picked from commit
6ca8752a9cadac810f8541ec1be67d02265175aa)
Felix Fietkau [Fri, 5 Jan 2024 11:55:17 +0000 (12:55 +0100)]
kernel: delete stray linux 6.1 patch
Fixes: cc285dc2b6f7 ("generic: net: phy: realtek: add interrupt support for RTL8221B")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Felix Fietkau [Fri, 5 Jan 2024 10:58:15 +0000 (11:58 +0100)]
kernel: fix bridge proxyarp issue with some broken DHCP clients
There are broken devices in the wild that handle duplicate IP address
detection by sending out ARP requests for the IP that they received from a
DHCP server and refuse the address if they get a reply.
When proxyarp is enabled, they would go into a loop of requesting an address
and then NAKing it again.
Fixes: https://github.com/openwrt/openwrt/issues/14309
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit
c1ad78318c3e6421e60dd187477f38ca5f9a5752)
Mikhail Zhilkin [Sat, 9 Dec 2023 17:17:02 +0000 (17:17 +0000)]
mediatek: add support for Routerich AX3000
This PR is continuation of work under "mediatek: add support for Routerich
AX3000" #13703 by the agreement with PR #13703 original author (Maximilian
Weinmann <x1@disroot.org>). All reviews from the previous PR were taken
into into account.
Routerich AX3000 is a wireless WiFi 6 router.
Specification
-------------
- SoC : MediaTek MT7981BA dual-core ARM Cortex-A53 1.3 GHz
- RAM : DDR3 256 MiB (ESMT M15T2G16128A)
- Flash : SPI-NAND 128 MiB (ESMT F50L1G41LB)
- WLAN : MediaTek MT7976CN dual-band WiFi 6
- 2.4 GHz : b/g/n/ax, MIMO 2x2
- 5 GHz : a/n/ac/ax, MIMO 2x2
- Ethernet : 10/100/1000 Mbps x4 (MediaTek MT7531AE)
- USB : 1x 2.0
- UART : through-hole on PCB
- [J500] GND, TX, RX, 3.3V (115200n8)
- Buttons : Mesh, Reset
- LEDs : 1x Power (Blue)
1x WiFi 2.4 GHz (Blue)
1x WiFi 5 GHz (Red)
1x Mesh (Blue)
3x LAN activity (Blue)
1x WAN activity (Blue)
2x WAN no-internet (Red)
- Power : 12 VDC, 1.5 A
Installation
------------
Flash OpenWrt 'sysupgrade.bin' image using stock firmware web-interface
(without keeping settings).
Return to stock
---------------
Install stock firmware image (without keeping settings) using OpenWrt
sysupgrade method.
Recovery
--------
Connect uart, use u-boot menu to flash stock firmware image or boot
OpenWrt initramfs image.
MAC addresses
-------------
+---------+-------------------+-----------+
| | MAC | Algorithm |
+---------+-------------------+-----------+
| WAN | 24:0f:5e:xx:xx:b4 | label |
| LAN | 24:0f:5e:xx:xx:b5 | label+1 |
| WLAN 2g | 24:0f:5e:xx:xx:b6 | label+2 |
| WLAN 5g | 24:0f:5e:xx:xx:b7 | label+3 |
+---------+-------------------+-----------+
The WLAN 2g MAC was found in 'Factory', 0x4
Co-authored-by: Maximilian Weinmann <x1@disroot.org>
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
(cherry picked from commit
485adc9d3c436d31f9713a7d8d84adf266754e26)
[Fix merge conflict in uboot-envtools]
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Mikhail Zhilkin [Sat, 25 Nov 2023 12:14:57 +0000 (12:14 +0000)]
ramips: add support for Rostelecom RT-FE-1A
Rostelecom RT-FE-1A is a wireless WiFi 5 router manufactured by Sercomm
company.
Device specification
--------------------
SoC Type: MediaTek MT7621AT
RAM: 256 MiB
Flash: 128 MiB
Wireless 2.4 GHz (MT7603EN): b/g/n, 2x2
Wireless 5 GHz (MT7615E): a/n/ac, 4x4
Ethernet: 5x GbE (WAN, LAN1, LAN2, LAN3, LAN4)
USB ports: No
Button: 2 buttons (Reset & WPS)
LEDs:
- 1x Power (green, unmanaged)
- 1x Status (green, gpio)
- 1x 2.4G (green, hardware, mt76-phy0)
- 1x 2.4G (blue, gpio)
- 1x 5G (green, hardware, mt76-phy1)
- 1x 5G (blue, gpio)
- 5x Ethernet (green, hardware, 4x LAN & WAN)
Power: 12 VDC, 1.5 A
Connector type: barrel
Bootloader: U-Boot
Installation
-----------------
1. Login to the router web interface (default http://192.168.0.1/)
under "admin" account
2. Navigate to Settings -> Configuration -> Save to Computer
3. Decode the configuration. For example, using cfgtool.py tool (see
related section):
cfgtool.py -u configurationBackup.cfg
4. Open configurationBackup.xml and find the following block:
<OBJECT name="User." type="object" writable="1" encryption="0" >
<OBJECT name="1." type="object" writable="1" encryption="0" >
<PARAMETER name="Password" type="string" value="<some value>" writable="1" encryption="1" password="1" />
</OBJECT>
5. Replace <some value> by a new superadmin password and add a line
which enabling superadmin login after. For example, the block after
the changes:
<OBJECT name="User." type="object" writable="1" encryption="0" >
<OBJECT name="1." type="object" writable="1" encryption="0" >
<PARAMETER name="Password" type="string" value="s0meP@ss" writable="1" encryption="1" password="1" />
<PARAMETER name="Enable" type="boolean" value="1" writable="1" encryption="0"/>
</OBJECT>
6. Encode the configuration. For example, using cfgtool.py tool:
cfgtool.py -p configurationBackup.xml
7. Upload the changed configuration (configurationBackup_changed.cfg) to
the router
8. Login to the router web interface (superadmin:xxxxxxxxxx, where
xxxxxxxxxx is a new password from the p.5)
9. Enable SSH access to the router (Settings -> Access control -> SSH)
10. Connect to the router using SSH shell using superadmin account
11. Run in SSH shell:
sh
12. Make a mtd backup (optional, see related section)
13. Change bootflag to Sercomm1 and reboot:
printf 1 | dd bs=1 seek=7 count=1 of=/dev/mtdblock3
reboot
14. Login to the router web interface under admin account
15. Remove dots from the OpenWrt factory image filename
16. Update firmware via web using OpenWrt factory image
Revert to stock
---------------
Change bootflag to Sercomm1 in OpenWrt CLI and then reboot:
printf 1 | dd bs=1 seek=7 count=1 of=/dev/mtdblock3
mtd backup
----------
1. Set up a tftp server (e.g. tftpd64 for windows)
2. Connect to a router using SSH shell and run the following commands:
cd /tmp
for i in 0 1 2 3 4 5 6 7 8 9; do nanddump -f mtd$i /dev/mtd$i; \
tftp -l mtd$i -p 192.168.0.2; md5sum mtd$i >> mtd.md5; rm mtd$i; done
tftp -l mtd.md5 -p 192.168.0.2
MAC Addresses
-------------
+-----+------------+---------+
| use | address | example |
+-----+------------+---------+
| LAN | label | f4:*:66 |
| WAN | label + 11 | f4:*:71 |
| 2g | label + 2 | f4:*:68 |
| 5g | label + 3 | f4:*:69 |
+-----+------------+---------+
The label MAC address was found in Factory, 0x21000
cfgtool.py
----------
A tool for decoding and encoding Sercomm configs.
Link: https://github.com/r3d5ky/sercomm_cfg_unpacker
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
(cherry picked from commit
f3cdc9f9881796794c06f784a2e4790f5ed75d1f)
Szabolcs Hubai [Wed, 8 Nov 2023 12:50:55 +0000 (13:50 +0100)]
ramips: mt7621: use lzma-loader for Sercomm NA502
This fixes a well known "LZMA ERROR 1" error on Sercomm NA502,
reported on the OpenWrt forum. [1]
[1]: https://forum.openwrt.org/t/176942
Signed-off-by: Szabolcs Hubai <szab.hu@gmail.com>
(cherry picked from commit
d41b8a570f209c352571f209c2c8f2b52b8d27af)
Robert Senderek [Sun, 10 Dec 2023 12:49:10 +0000 (13:49 +0100)]
mediatek: enable mt7981-wo-firmware package by default
Add support for wireless offload package in default configuration for
-Cudy WR3000
-Confiabits MT7981
For some reason those ware missing. I confirm this work for my Cudy WR3000
Signed-off-by: Robert Senderek <robert.senderek@10g.pl>
(cherry picked from commit
b42eea0c2f68ea4903e952287a08511dd0a03072)
Felix Fietkau [Wed, 3 Jan 2024 14:13:32 +0000 (15:13 +0100)]
mac80211: fix a race condition related to enabling fast-xmit
fast-xmit must only be enabled after the sta has been uploaded to the driver,
otherwise it could end up passing the not-yet-uploaded sta via drv_tx calls
to the driver, leading to potential crashes because of uninitialized drv_priv
data.
Add a missing sta->uploaded check and re-check fast xmit after inserting a sta.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit
438a97fab69b41387e25cbec45271e7fe159a330)
Felix Fietkau [Thu, 4 Jan 2024 12:46:34 +0000 (13:46 +0100)]
netifd: update to Git openwrt-23.05 (2024-01-04)
c739dee0a37b system-linux: refresh MAC address on DSA port conduit change
8587c074f1eb interface-ip: fix IPv4 route target masking
33d6c261aacb system-linux: fix bogus debug error messages on adding bridge members
0832e8f04778 wireless: add bridge_isolate option
5ca7a9058e98 bridge: fix reload on bridge vlan changes
be4ffb3b78bc bridge: rework config change pvid handling
923c4370a1d4 system-linux: set master early on apply settings
b9442415c785 system-linux: skip refreshing MAC on master change if custom MAC
b635a09cdadf system-linux: set pending to 0 on ifindex found or error for if_get_master
2bbe49c36224 device: Log error message if device initialization failed
2703f740a23e Revert "system-linux: set pending to 0 on ifindex found or error for if_get_master"
9cb0cb418303 system-linux: fix race condition in netlink socket error handing
c18cc79d5000 device: restore cleared flags on device down
Signed-off-by: Felix Fietkau <nbd@nbd.name>
David Bauer [Thu, 28 Dec 2023 22:16:02 +0000 (23:16 +0100)]
dropbear: increase default receive window size
Increasing the receive window size improves throughout on higher-latency
links such as WAN connections. The current default of 24KB caps out at
around 500 KB/s.
Increasing the receive buffer to 256KB increases the throughput to at
least 11 MB/s.
Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit
f95eecfb21ff08662e022accd30e8254028ff63b)
David Bauer [Tue, 26 Dec 2023 00:17:18 +0000 (01:17 +0100)]
ramips: fix label-mac for Xiaomi RA75
The label-mac of the repeater is the address used on the 2.4 GHz radio,
not the ethernet MAC.
Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit
47818fbc012d7b8ef4129bf702da2d6aae07266e)
Daniel Golle [Mon, 18 Dec 2023 21:22:12 +0000 (21:22 +0000)]
mvebu: fix RTC of IEI-World Puzzle M90x devices
The Puzzle devices come with an I2C-connected Epson RX8130 RTC.
Disable the (dysfunctional) RTC units of the SoC and add driver
kmod-rtc-ds1307 to support the Epson RX8130 instead.
Tested-by: Thomas Huehn <thomas.huehn@hs-nordhausen.de>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit
6d546b3b4cdae3ffcdad71fb6cc414f3a39bc09e)
Luis Mita [Wed, 6 Dec 2023 13:30:10 +0000 (09:30 -0400)]
mediatek: add SPDX header for Confiabits MT7981 DTS
Fixing ambiguous licensing.
Signed-off-by: Luis Mita <luis@luismita.com>
(cherry picked from commit
b1fd4b35bf784a9b5619e17c07389e79af113953)
Luis Mita [Wed, 22 Nov 2023 19:13:04 +0000 (15:13 -0400)]
mediatek: add support for Confiabits MT7981
Confiabits MT7981 is a Wi-Fi 6 router based on MediaTek MT7981.
Specification:
- SoC: MediaTek MT7981B
- CPU: 2x 1.3 GHz Cortex-A53
- Flash: 128 MiB SPI NAND
- RAM: 256 MiB
- WLAN: 2.4 GHz, 5 GHz (MediaTek MT7976CN, 802.11ax)
- Ethernet: 4x 10/100/1000 Mbps MT7531AE (3xLAN, 1xWAN)
- USB 2.0 port
- Buttons: 1 Reset button, 1 Mesh button.
- LEDs: 7x light-blue, 2x warm-white
- Serial console: internal 4-pin header, 115200 8n1
- Power: 12 VDC, 1.5 A
MAC addresses in stock firmware and in this commit:
+---------+-------------------+-----------+
| | MAC | Algorithm |
+---------+-------------------+-----------+
| WAN | 00:0c:43:xx:xx:e1 | label+1 |
| LAN | 00:0c:43:xx:xx:e0 | label |
| WLAN 2g | 00:0c:43:xx:xx:e0 | label |
| WLAN 5g | 02:0c:43:xx:xx:e0 | |
+---------+-------------------+-----------+
The label MAC was found in 'Factory', 0x4
Installation:
The stock firmware is OpenWrt-based. If you can reach LuCI or SSH, just use the sysupgrade image
with the 'Keep settings' option turned off.
Signed-off-by: Luis Mita <luis@luismita.com>
(cherry picked from commit
2af07eb85393689a74d32d6211663a0e5ec02a01)
Michael Trinidad [Wed, 22 Nov 2023 02:46:27 +0000 (21:46 -0500)]
mwlwifi: update to version 10.4.10-
20231120
Upstream PR 416 improvements:
-AMPDU Optimization of priority calculation. (8864/8897)
-8864/8897 fix wpa3
-Add cypher suite to driver capabilities (all chip)
-Alignment of pcie_tx_ctrl* (all chip)
-"feature" normalization for all chips (all chip)
-Add modprobe parameters (all chip)
-fix monitoring (all chip)
-Code separation by chipset (8864/8897 <=> 8997)
-dump_prob decommissioning (8864/8897/8997)
-fix amsdu high ping latency (8864/8897/8997)
-drop debug info in hostcmd_get_hw_spec() (8864/8897)
-Add wcb_base in debug info (8864)
-Rewrite AMSDU packets (8864/8897/8997)
-debug rewrite output mwl_debugfs_sta_read (all chip)
-Improved encryption interoperability (8864/8897/8997)
-factorization encrypted packet test (8864/8897/8997)
-Change 88W8864 firmware to 7.2.9.27 (8864/8897)
-Fix the AMPDU session lifecycle (8864/8897/8997)
-Remove the tx done packets mechanism (8864/8897)
Signed-off-by: Michael Trinidad <trinidude4@hotmail.com>
Daniel Danzberger [Fri, 13 Oct 2023 11:50:49 +0000 (13:50 +0200)]
mt76: Add firmware package for MT7922
Adds the 2 required firmware files for MT7922 chips.
Signed-off-by: Daniel Danzberger <dd@embedd.com>
(cherry picked from commit
9eecf4905375777e2048177dbe4d83fee5da9ee1)
Signed-off-by: Anya Lin <hukk1996@gmail.com>
Pawel Dembicki [Fri, 8 Dec 2023 08:32:41 +0000 (09:32 +0100)]
kirkwood: fix Ctera C200 V1 ubi part name
In
749237967a12 downstream dts was replaced with upstream accepted
patch. But in upstream version last partition was called "rootfs"
instead "ubi". OpenWrt require "ubi" label for ubi rootfs.
This patch restore proper label.
Fixes: 749237967a12 ("kirkwood: Replace dtses with upstream accepted")
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
(cherry picked from commit
9075cfd609e905bc7162574a24a7fb457e65a374)
Eric J. Anderson [Mon, 4 Dec 2023 21:41:47 +0000 (22:41 +0100)]
ath79: make boot-leds service executable
This service was unfunctional due to not having its executable bit
set.
Fixes #13500.
Signed-off-by: Eric J. Anderson <eric.j.ason256@gmail.com>
(cherry picked from commit
807acbce66c34596ac80cad8ea2a3f170f58429c)
Dirk Buchwalder [Fri, 24 Nov 2023 14:56:39 +0000 (15:56 +0100)]
ipq807x: fix edgecore EAP102 lan/wan
We have a report in the forum, that lan/wan is non-functional
on the EAP102 (https://forum.openwrt.org/t/edgecore-eap102/178449)
Fixing that by swapping label and phy-handle of the dp-nodes and
updating the lan/wan bmp.
Note: the original commiter of the device support seems absent for a
long time in the forum and on the OpenWrt github group.
Tested-by: Antonio Della Selva <antonio.dellaselva@uniurb.it>
Signed-off-by: Dirk Buchwalder <buchwalder@posteo.de>
Reviewed-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit
9b598ec8d5585ca81cd472ca1d1b4f93d18dc3d5)
[ fix conflicts errors ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Rafał Miłecki [Mon, 20 Nov 2023 10:46:26 +0000 (11:46 +0100)]
mediatek: filogic: add Acelink EW-7886CAX support
Acelink EW-7886CAX is an MT7986A (AKA Filogic 830) based access point.
It has 512 MiB of RAM, one 2.5 Gbps PoE (802.3at) Ethernet port and
on-SoC Wi-Fi. There is no printed MAC label (on my unit).
My unit came with Mediatek's firmware (based on OpenWrt 21.02)
installed. It was possible to simply upgrade using OpenWrt's sysupgrade
tool.
Another verified upgrade method is using U-Boot (requires UART). During
every boot there is "U-Boot Boot Menu". Selecting option "2. Upgrade
firmware" allows using U-Boot's tftp client to load and flash factory
image.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit
07765f28b7911ca8207b6e7ec94508a5740c4697)
Chukun Pan [Mon, 6 Nov 2023 15:06:05 +0000 (23:06 +0800)]
mediatek: filogic: reorder alphabetically
Reorder scripts and image recipes to keep alphabetical order.
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
(cherry picked from commit
07482d15af5dd79fc38dd0eb23319934fe4d7a7a)
Rani Hod [Wed, 22 Nov 2023 17:38:06 +0000 (19:38 +0200)]
mediatek: fiilogic: device tree `switch@1f` fix
Quite a few `fiilogic` devices use the `mt7531` switch.
Some of them have a DT node that looks like:
```
switch: switch@0 {
compatible = "mediatek,mt7531";
reg = <31>;
...
};
```
This commit changes the DT node name to `switch@1f`.
Signed-off-by: Rani Hod <rani.hod@gmail.com>
(cherry picked from commit
aaeb379023daf9720303884f61748fe362b0a237)
Chen Minqiang [Fri, 25 Aug 2023 22:38:18 +0000 (06:38 +0800)]
mediatek: fix the name of buswidth to bus-width
Fix the issue of dts buswidth cannot be applied properly with spi driver.
Fix the name of buswidth to bus-width in dts in order to fit the format
in linux spi kernel[1] so that spi-tx-bus-width & spi-rx-bus-width can be
parsed properly.
[1] Documentation/devicetree/bindings/spi/spi-controller.yaml
Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
(cherry picked from commit
36746893ac690796bf7aad00a793ff4bf739d066)
Hauke Mehrtens [Sat, 25 Nov 2023 17:06:41 +0000 (18:06 +0100)]
mediatek: filogic: Fix GPIOs for Zbtlink ZBT-Z8102AX
The PGIO configuration should be added for the ZBT-Z8102AX and not the ZBT-Z8103AX
Fixes: c8c2f522625c ("mediatek: add support for Zbtlink ZBT-Z8102AX")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit
d99aed31a0e54f68cb26d2dfe814f51a3df31cc4)
Christian Marangi [Sun, 10 Dec 2023 10:43:45 +0000 (11:43 +0100)]
lua5.3: fix typo calling lua53 instead of lua5.3 for Package Default
Fix typo calling lua53 instead of lua5.3 for Package Default definition.
This cause only missing description of the package and doesn't cause
any build regression.
Fixes: c52ca08d4008 ("lua5.3: build shared library")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit
25e215c14ee6c9f3d54cd1da46a48d9ffe6b254e)
Daniel Golle [Sat, 9 Dec 2023 12:39:53 +0000 (13:39 +0100)]
mediatek: add support for Zbtlink ZBT-Z8102AX
Specifications:
SoC: MediaTek MT7981B
RAM: 1024MiB
Flash: SPI-NAND 128 MiB
Switch: 1 WAN, 4 LAN (Gigabit)
USB: two M.2 slots for 5G modems via USB 3.0 hub, external USB 3.0 port
Buttons: Reset, Mesh
Power: DC 12V 1A
WiFi: MT7976CN
UART: 115200n8
UART Layout:
VCC-RX-TX-GND
Installation:
A. Through OpenWrt Dashboard:
If your router comes with OpenWrt preinstalled (modified by the seller),
you can easily upgrade by going to the dashboard (192.168.1.1) and then
navigate to System -> Backup/Flash firmware, then flash the firmware
B. Through TFTP
Standard installation via UART:
1. Connect USB Serial Adapter to the UART, (NOTE: Don't connect the VCC pin).
2. Power on the router. Make sure that you can access your router via UART.
3. Restart the router then repeatedly press ctrl + c to skip default boot.
4. Type > bootmenu
5. Press '2' to select upgrade firmware
6. Press 'Y' on 'Run image after upgrading?'
7. Press '0' and hit 'enter' to select TFTP client (default)
8. Fill the U-Boot's IP address and TFTP server's IP address.
9. Finally, enter the 'firmware' filename.
Based on patch adding support for similar Zbtlink ZBT-Z8103AX device by
Ian Ishmael C. Oderon.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit
c8c2f522625c8d9eb5acad317e3de7a6b156decf)
Chukun Pan [Fri, 16 Jun 2023 15:16:30 +0000 (23:16 +0800)]
mediatek: filogic: add JCG Q30 PRO support
Hardware specification:
SoC: MediaTek MT7981B 2x A53
Flash: Winbond 128MB
RAM: DDR3 256MB
Ethernet: 4x 10/100/1000 Mbps
Switch: MediaTek MT7531AE
WiFi: MediaTek MT7976C
Button: Reset
Power: DC 12V 1A
Flash instructions:
1. Connect to your PC via the Gigabit port of the router,
set a static ip on the ethernet interface of your PC.
(ip 192.168.1.254, gateway 192.168.1.1)
2. Attach UART, pause at u-boot menu.
3. Select "Upgrade ATF BL2", then use preloader.bin
4. Select "Upgrade ATF FIP", then use bl31-uboot.fip
5. Download the initramfs image, and type "reset",
waiting for tftp recovery to complete.
6. After openwrt boots up, perform sysupgrade.
Note:
1. Since NMBM is disabled, we must back up all partitions.
2. Although we can upgrade new firmware in the stock firmware,
we need the special fit image signature of MediaTek and
dual boot (hack kernel) to make u-boot boot it. So just
abandon these hacks and flash it via the serial port.
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
(cherry picked from commit
626344c9926dcf2db2e10681c19aab0328fee160)
Chukun Pan [Thu, 15 Jun 2023 15:21:40 +0000 (23:21 +0800)]
uboot-mediatek: add JCG Q30 PRO support
The vendor uboot will verify firmware at boot.
So add a custom uboot build for this device.
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
(cherry picked from commit
b42c5272286ee248c698cc2cfac88df1bf51cbe3)
Patryk Kowalczyk [Sat, 16 Sep 2023 01:02:35 +0000 (03:02 +0200)]
filogic: add support for ASUS TUF AX6000
Hardware
========
SOC: MediaTek MT7986
RAM: 512MB DDR3
FLASH: 256MB SPI-NAND
WIFI: Mediatek MT7986 DBDC 802.11ax 2.4/5 GHz 4T4R
ETH: MediaTek MT7530 Switch (LAN)
MaxLinear GPY211C 2.5 N-Base-T PHY (WAN)
MaxLinear GPY211C 2.5 N-Base-T PHY (LAN)
UART: 3V3 115200 8N1 (Do not connect VCC)
USB 3.1
Installation
============
Download the OpenWrt initramfs image. Copy the image to a TFTP server
reachable at 192.168.1.70/24. Rename the image to TUF-AX6000.bin.
Connect to the serial console, interrupt the auto boot process by
pressing '4' when prompted or press '1' and set client IP, server
IP and name of the image.
yOU don't need to open the case or even soldering anything.
use three goldpin wires, remove their plastic cover and connect
them to the console pinout via the case holes.
You can see three holes
From Bottom: RX, TX, Ground - partially covered
Download & Boot the OpenWrt initramfs image.
In case of option '4'
$ setenv ipaddr 192.168.1.1
$ setenv serverip 192.168.1.70
$ tftpboot 0x46000000 TUF-AX6000.bin
$ bootm 0x46000000
In case of option '1'
1: Load System code to SDRAM via TFTP.
Please Input new ones /or Ctrl-C to discard
Input device IP (192.168.1.1) ==:
Input server IP (192.168.1.70) ==:
Input Linux Kernel filename (TUF-AX6000.trx) ==:
Wait for OpenWrt to boot. Transfer the sysupgrade
image to the device using scp and install using sysupgrade.
$ sysupgrade -n <path-to-sysupgrade.bin>
Missing features
================
2.5Gb LAN port LED is ON during boot or when the LAN cable is disconnected
The cover yellow light is not supported. (only blue one)
Signed-off-by: Patryk Kowalczyk <patryk@kowalczyk.ws>
(cherry picked from commit
d522ccecb28f941aadcaf7a50cd6daa861f468a7)
Jo-Philipp Wich [Thu, 7 Dec 2023 22:12:00 +0000 (23:12 +0100)]
ucode: adjust module dependencies
Let ucode-mod-* packages select the ucode interpreter instead of depending
on it to avoid recursive dependency chains in unrelated packages.
Fixes: https://github.com/openwrt/packages/issues/22837
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit
01d1c1ad296cc71f87ea02b01b16a09fe5d933a1)
Mikhail Zhilkin [Sat, 30 Sep 2023 14:07:15 +0000 (14:07 +0000)]
mediatek: fix eeprom loading (Mercusys MR90X v1)
Commit mt76: drop default eeprom file for mt7986-firmware
(
e3aa645b267ca4f08773b5366583e9b0020fc3e9) breaks eeprom loading for
Mercusys MR90X v1. As a result WiFi is not working at all.
This commit adds Mercusus MR90x to the caldata script (it works after the
commit mentioned above). And we can safely drop "81_fix_eeprom" script
as it's no longer required.
Fixes: 5a0bdab24c0f ("mt76: drop default eeprom file for mt7986-firmware")
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
(cherry picked from commit
85b0d7592c454f2e4e02be043a1e433c67df4e41)
[rmilecki: fix commit hash in Fixes]
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Chukun Pan [Thu, 4 May 2023 15:10:03 +0000 (23:10 +0800)]
mt76: drop default eeprom file for mt7986-firmware
The mt76 driver usually reads the eeprom on the mtd partition at dts.
For emmc device we need to use caldata_extract script to read the
eeprom. However, the default eeprom file breaks the caldata script
execution, so remove it.
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
(cherry picked from commit
e3aa645b267ca4f08773b5366583e9b0020fc3e9)
Jianhui Zhao [Sun, 24 Sep 2023 14:15:00 +0000 (22:15 +0800)]
generic: net: phy: realtek: add interrupt support for RTL8221B
This commit introduces interrupt support for RTL8221B.
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
(cherry picked from commit
1db949a632607aa1df2987b7701da0be3e473260)
Jianhui Zhao [Tue, 10 Oct 2023 06:09:38 +0000 (14:09 +0800)]
uboot-mediatek: fix typo in bootmenu for GL-MT6000
Fixes: b530d492a9d9 ("filogic: add support for GL.iNet GL-MT6000")
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
(cherry picked from commit
4536fb4c5c7b3564dae301529bb0ac4a3ce914b8)
[rmilecki: fix commit hash in Fixes]
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Chukun Pan [Fri, 17 Nov 2023 15:27:03 +0000 (23:27 +0800)]
mediatek: filogic: remove kmod-usb2 for GL-MT6000
The usb driver requires kmod-usb3, not kmod-usb2.
Remove the useless kmod-usb2 from default package.
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
(cherry picked from commit
b74ae695967942849b9f68c68d05217e1420dc1d)
Jianhui Zhao [Sun, 24 Sep 2023 14:34:12 +0000 (22:34 +0800)]
filogic: add support for GL.iNet GL-MT6000
Hardware specification:
* SoC: MediaTek MT7986A 4x A53
* Flash: 8GB EMMC
* RAM: 1GB DDR4
* Ethernet:
* 2x2.5G RJ45 port (RTL8221B)
* 4x1G RJ45 ports (MT7531AE)
* WLAN:
* 2.4GHz: MT7976GN 4T4R
* 5GHz: MT7976AN 4T4R
* Button: Reset
* LED: 1 x dual color LED
* USB: 1 x USB 3.0
* Power: DC 12V 4A
* UART: 3V3 115200 8N1 (Pinout: GND TX RX VCC)
* JTAG: 9 PIN
If you want to use u-boot from OpenWrt, you can upgrade it safely.
* bl2: openwrt-mediatek-filogic-glinet_gl-mt6000-preloader.bin
* fip: openwrt-mediatek-filogic-glinet_gl-mt6000-bl31-uboot.fip
`openwrt-mediatek-filogic-glinet_gl-mt6000-squashfs-factory.bin` is used in OpenWrt's u-boot.
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
(cherry picked from commit
fe10f9743935d6986e80e7cb082469e6bc5a03f0)
Elbert Mai [Sun, 17 Sep 2023 14:59:48 +0000 (07:59 -0700)]
mediatek: filogic: add support for Ubiquiti UniFi 6 Plus (U6+)
Ubiquiti U6+ is a dual-band WiFi 6 PoE access point.
It is a drop-in upgrade of the U6 lite.
Specifications
---
- SoC: MediaTek MT7981A dual-core ARM Cortex-A53 1.3 GHz
- RAM: 256 MB DDR3-2133 RAM
- Flash: 16 MB SPI NOR and 4 GB eMMC
- LAN: 1x Gigabit Ethernet with 802.3af/at support
- WLAN: MediaTek MT7976C 2x2 MIMO dual-band WiFi 6
- LEDs: 1x blue and 1x white
- Buttons: 1x reset button
Installation
---
1. Power device using a PoE injector or switch
2. Connect via Ethernet to the device with static IP 192.168.1.2
3. SSH into the device with password: ubnt
$ ssh ubnt@192.168.1.20
4. Unlock kernel partitions for writing
$ echo
5edfacbf > /proc/ubnthal/.uf
5. Confirm correct partitions
$ grep PARTNAME /sys/block/mmcblk0/mmcblk0p6/uevent
PARTNAME=kernel0
$ grep PARTNAME /sys/block/mmcblk0/mmcblk0p7/uevent
PARTNAME=kernel1
$ grep PARTNAME /sys/block/mmcblk0/mmcblk0p8/uevent
PARTNAME=bs
6. Set and confirm bootloader environment
$ fw_setenv boot_openwrt "fdt addr \$(fdtcontroladdr); fdt rm /signature; bootubnt"
$ fw_setenv bootcmd_real "run boot_openwrt"
$ fw_printenv
7. Copy sysupgrade image to /tmp/openwrt.bin via scp
8. Copy kernel and rootfs to mmcblk0p6 and mmcblk0p7, respectively
$ tar xf /tmp/openwrt.bin sysupgrade-ubnt_unifi-6-plus/kernel -O | dd of=/dev/mmcblk0p6
$ tar xf /tmp/openwrt.bin sysupgrade-ubnt_unifi-6-plus/root -O | dd of=/dev/mmcblk0p7
9. Ensure device boots from mmcblk0p6
$ echo -ne "\x00\x00\x00\x00\x2b\xe8\x4d\xa3" > /dev/mmcblk0p8
10. Reboot the device
$ reboot
Signed-off-by: Elbert Mai <code@elbertmai.com>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
(cherry picked from commit
75ee5546e9b7cfa5bbfd6f844ab8c5fffd5bb594)
Patricia Lee [Wed, 30 Aug 2023 11:50:54 +0000 (19:50 +0800)]
mediatek: add support for Cetron CT3003
**Hardware specification:**
- SoC: MediaTek MT7981B 2x A53
- Flash: ESMT F50L1G41LB 128MB
- RAM: Nanya NT5CC128M16JR-EK 256MB
- Ethernet: 4 x 10/100/1000 Mbps
- Switch: MediaTek MT7531AE
- WiFi: MediaTek MT7976C
- Button: Reset, Mesh
- Power: DC 12V 1A
- UART: 3.3v, 115200n8
| Layout: |
| :-------- |
| <Antenna> |
| VCC |
| GND |
| Tx |
| Rx |
**Flash instructions:**
1. Rename `openwrt-mediatek-filogic-cetron_ct3003-squashfs-factory.bin` to `factory.bin`.
2. Upload the `factory.bin` using the device's Web interface.
3. Click the upgrade button and wait for the process to finish.
4. Access the OpenWrt interface using the same password.
5. Use the 'Restore' function to reset the firmware to its initial state.
**Notes:**
If you plan to recovery the stock firmware in the future, it's advisable
to connect the device via the serial port and enter failsafe mode to
back up all the MTD partitions before proceeding the steps above.
Signed-off-by: Patricia Lee <patricialee320@gmail.com>
(cherry picked from commit
907e9e0bd3df456b32921893cf6ef1b54117d983)
Bjørn Mork [Tue, 28 Mar 2023 13:04:21 +0000 (15:04 +0200)]
filogic: support Telenor branded ZyXEL EX5700
Telenor quirks
--------------
The operator specific firmware running on the Telenor branded
ZyXEL EX5700 includes U-Boot modifications affecting the OpenWrt
installation.
Notable changes to U-Boot include
- environment is stored in RAM and reset to defaults when power
cycled
- dual partition scheme with "nomimal" or "rescue" systems, falling
back to "rescue" unless the OS signals success in 3 attempts
- several runtime additions to the device-tree
Some of these modifications have side effects requiring workarounds
- U-Boot modifies /chosen/bootargs in an unsafe manner, and will crash
unless this node exists
- U-Boot verifies that the selected rootfs UBI volume exists, and
refuses to boot if it doesn't. The chosen "rootfs" volume must contain
a squashfs signature even for tftp or initramfs booting.
- U-Boot parses the "factoryparams" UBI volume, setting the "ethaddr"
variable to the label mac. But "factoryparams" does not always
exist. Instead there is a "RIP" volume containing all the factory
data. Copying the "RIP" volume to "factoryparams" will fix this
Hardware
--------
SOC: MediaTek MT7986
RAM: 1GB DDR4
FLASH: 512MB SPI-NAND (Mikron xxx)
WIFI: Mediatek MT7986 802.11ax 5 GHz
Mediatek MT7916 DBDC 802.11ax 2.4 + 6 GHz
ETH: MediaTek MT7531 Switch + SoC
3 x builtin 1G phy (lan1, lan2, lan3)
2 x MaxLinear GPY211C 2.5 N-Base-T phy (lan4, wan)
USB: 1 x USB 3.2 Enhanced SuperSpeed port
UART: 3V3 115200 8N1 (Pinout: GND KEY RX TX VCC)
Installation
------------
1. Download the OpenWrt initramfs image. Copy the image to a TFTP server
reachable at 192.168.1.2/24. Rename the image to
C0A80101.img.
2. Connect the TFTP server to lan1, lan2 or lan3. Connect to the serial
console, Interrupt the autoboot process by pressing ESC when prompted.
3. Download and boot the OpenWrt initramfs image.
$ env set uboot_bootcount 0
$ env set firmware nominal
$ tftpboot
$ bootm
4. Wait for OpenWrt to boot. Transfer the sysupgrade image to the device
using scp and install using sysupgrade.
$ sysupgrade -n <path-to-sysupgrade.bin>
Missing features
----------------
- The "lan1", "lan2" and "lan3" port LEDs are driven by the switch but
OpenWrt does not correctly configure the output.
- The "lan4" and "wan" port LEDs are driven by the GPH211C phys and
not configured by OpenWrt.
Signed-off-by: Bjørn Mork <bjorn@mork.no>
(cherry picked from commit
6cc14bf66aa924962b926ea9702b6153ae418a7d)
Shiji Yang [Tue, 31 Oct 2023 10:47:49 +0000 (18:47 +0800)]
base-files: support parse DT LED color and function
The 'label' property in led node has been deprecated and we'd better
to avoid using it. This patch allows us to extract DT OF LED name
from the newly introduced LED properties "color", "function" and
"function-enumerator".
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
(cherry picked from commit
e814acc59948943c776ac319a348f72c0d19f33c)
David Bauer [Mon, 4 Dec 2023 12:54:56 +0000 (13:54 +0100)]
mpc85xx: allow mapping of cpu1 spin-table page
The no-map property was incorrectly added, which kept the system-memory
available on the WS-AP3825 limited to 190MB. We are allowed to map the
page containing the CPU1 spin-table, we are just not allowed to write to
it.
Fixes: 57d7382cb159 ("mpc85xx: increase available RAM on Extreme Networks WS-AP3825i")
Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit
d9271aa5b7ddcef20ebe64d1d80c8ddcd6cd7fb7)
David Bauer [Sun, 3 Dec 2023 07:03:57 +0000 (08:03 +0100)]
mpc85xx: increase available RAM on Extreme Networks WS-AP3825i
The system-mamory size was page-aligned prior to this commit, only
enabling to use 192MB of system memory of the 256 available.
This was due to the system-memory being manually shrinked to reserve the
upper 1MB for the second-core bootpage in the loader as well as the OS.
Fix this properly in the loader and in Linux using reserved-memory
definitions. This enables the device to use 250MB of system memory.
Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit
57d7382cb159dbb15b8e281cad90a65d4c0201f6)
Rafał Miłecki [Tue, 21 Nov 2023 15:30:22 +0000 (16:30 +0100)]
firmware-utils: update to Git HEAD (2023-11-21)
1d42292d8063 tplink-safeloader: Add TP-Link Archer A6 V3.20
3338f5389d72 tplink-safeloader: add TL-WPA8635P v3
17ca5eeb1c10 tplink-safeloader: add TL-WPA8631P v4
f730ad2fa0b4 bcmblob: new tool for reading Broadcom's BLOBs
cb1ddac98124 firmware-utils: fix typo in error message when no OpenSSL library found
916633160dc9 bcmclm: new tool for reading Broadcom's CLM data
a2d49fb1e188 tplink-safeloader: add RU support-list entry for Archer C6U v1
bb12cf5c3fa9 tplink-safeloader: Add support for TP-Link Deco M5 The special_id values are the same for EU and Asian models, and they apply to all models: v1, v2, and v3. They are not sorted as they are currently in the same order as extracted from the official firmware image.
9e2de8515be1 tplink-safeloader: add EAP610 v3 and EAP613 v1
a170683c0e11 firmware-utils: fix use of NULL string progname
89875fc18b57 tplink-safeloader: CPE510: add Canadian support
9e211d2980fe mktplinkfw2: add support to extract bootloader images
c18f662f3c74 mktplinkfw2: add support to pack bootloader
3dc133915f87 mktplinkfw2: show exact exceed bytes when the image is to big
d16ff798d58a tplink-safeloader: WPA8631: add v4 AU, US
0fa1cc51013f zytrx: add LTE5398-M904
635466123429 firmware-utils: ptgen: add SiFive GPT partition support
ba5bc4e1ae9d add dlink-sge-image for D-Link devices by SGE
3b114de29cf7 lxlfw: move code opening LXL to helper function
8e149e480391 lxlfw: move code copying data to helper function
16fa89076122 lxlfw: fix struct lxl_hdr attribute
d770cab82e58 lxlfw: support embedding blobs
eaf2ea28dbe6 lxlfw: support extracting image
12bf1a99bd6e lxlfw: support certificate & signature blobs
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit
b117e7244f9e85cc3e6f6845f81eb60c9c9331e1)
Mikhail Zhilkin [Sun, 12 Nov 2023 07:58:26 +0000 (07:58 +0000)]
ramips: add support for Sercomm CPJ routers
This commit adds support for following wireless routers:
- Rostelecom RT-FL-1 (Serсomm RT-FL-1)
- Rostelecom S1010 (Serсomm S1010.RT)
The devices are almost identical and the only difference is one bit in the
factory image PID (thanks to Maximilian Weinmann <x1@disroot.org>
(@MaxS0niX) for the info and idea to make one PR for two devices at once).
Devices specification
---------------------
SoC: MediaTek MT7620A, MIPS
RAM: 64 MB
Flash: 16 MB SPI NOR
Wireless 2.4: MT7620 (b/g/n, 2x2)
Wireless 5: MT7612EN (a/n/ac, 2x2)
Ethernet: 5xFE (WAN, LAN1-4)
BootLoader: U-Boot
Buttons: 2 (wps, reset)
LEDs: 1 amber and 1 green status GPIO leds
5 green ethernet GPIO leds
1 green GPIO 2.4 GHz WLAN led
1 green PHY 5 GHz WLAN led
1 green unmanaged power led
USB ports: No
Power: 12 VDC, 1 A
Connector: Barrel
OEM easy installation
---------------------
1. Remove all dots from the factory image filename (except the dot
before file extension)
2. Upload and update the firmware via the original web interface
3. Wait until green status led stops blinking (can take several minutes)
4. Login to OpenWrt initramsfs. It's recommended to make a backup of the
mtd partitions at this point.
4. Perform sysupgrade using the following command (or use Luci):
sysupgrade -n sysupgrade.bin
5. Wait until green status les stops blinking (can take several minutes)
6. Mission acomplished
Return to Stock
---------------
Option 1. Restore firmware Slot1 from a backup (firmware2.bin):
cd /tmp
mtd -e Firmware2 write firmware2.bin Firmware2
printf 1 | dd bs=1 seek=$((0x18007)) count=1 of=/dev/mtdblock2
reboot
Option 2. Decrypt, ungzip and split stock firmware image into the parts,
take Slot1 parts (kernel2.bin, rootfs2.bin) and write them:
cd /tmp
mtd -e Kernel2 write kernel2.bin Kernel2
mtd -e RootFS2 write rootfs2.bin RootFS2
printf 1 | dd bs=1 seek=$((0x18007)) count=1 of=/dev/mtdblock2
reboot
More about stock firmware decryption:
Link: https://github.com/Psychotropos/sercomm_fwutils/
Debricking
----------
Use sercomm-recovery tool. You can use "ALL" mtd partition backup as a
recovery image.
Link: https://github.com/danitool/sercomm-recovery
MAC addresses
-------------
+---------+-------------------+-----------+
| | MAC | Algorithm |
+---------+-------------------+-----------+
| label | 48:3e:xx:xx:xx:1e | label |
| LAN | 48:3e:xx:xx:xx:1e | label |
| WAN | 48:3e:xx:xx:xx:28 | label+10 |
| WLAN 2g | 48:3e:xx:xx:xx:20 | label+2 |
| WLAN 5g | 48:3e:xx:xx:xx:24 | label+6 |
+---------+-------------------+-----------+
Co-authored-by: Vadzim Vabishchevich <bestmc2009@gmail.com>
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
(cherry picked from commit
1b091311aafc59db576a51b3d2b5febaac45d522)
[fix rt2800_wmac eeprom load]
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Mikhail Zhilkin [Sun, 12 Nov 2023 07:56:08 +0000 (07:56 +0000)]
ramips: mt7620: drop unnecessary trailing tabs
Let's tidy up a bit (drop unnecessary trailing tabs).
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
(cherry picked from commit
25bab2b8bc1aff2b7e877865c5def74aa63daefe)
Mikhail Zhilkin [Sun, 12 Nov 2023 07:52:45 +0000 (07:52 +0000)]
ramips: sercomm.mk: make common recipe to set a bit in pid
This commit makes a common recipe to set bit in Sercomm factory pid since
this is necessary for several devices (WiFire S1500.nbn, Rostelecom
RT-FL-1) at different offsets.
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
(cherry picked from commit
e900c452112a2309681ed4ee12894f3a18ed650f)
Mikhail Zhilkin [Sun, 12 Nov 2023 07:46:11 +0000 (07:46 +0000)]
scripts: sercomm-pid.py: use uppercase hwid in pid
Sercomm uses uppercase for hexadecimal representation of the device
hardware IDs in factory image PID. This commit brings the sercomm-pid.py
script into compliance with the original Sercomm algorithm.
Example
-------
+--------+-------------+-----------+-------------+
| Device | PID (before | PID | PID (after |
| HWID | the commit) | (Sercomm) | the commit) |
+--------+-------------+-----------+-------------+
| CPJ | 43 50 4a | 43 50 4A | 43 50 4A |
+--------+-------------+-----------+-------------+
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
(cherry picked from commit
28d32244e122051ec88551e831fb9cf34da7cd76)
John Audia [Mon, 20 Nov 2023 13:23:17 +0000 (08:23 -0500)]
kernel: bump 5.15 to 5.15.139
Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.139
Removed upstreamed:
x86/patches-5.15/120-hwrng-geode-fix-accessing-registers.patch[3]
All other patches automatically rebased.
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.139&id=
a5c83c8043d70b9a28d1bd78a2dbbab340f43889
Build system: x86_64
Build-tested: ramips/tplink_archer-a6-v3
Run-tested: ramips/tplink_archer-a6-v3
Signed-off-by: John Audia <therealgraysky@proton.me>
[Refresh on top of OpenWrt 23.05]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit
df167450a5094034bf4c5ad6fbfce502b09662bb)
Rafał Miłecki [Mon, 22 May 2023 08:31:34 +0000 (10:31 +0200)]
firmware-utils: package oseama
It's required by bcm53xx. This allows dropping separated oseama package
and avoids some code duplication.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit
1d9d0ca376c616a2cede9d30f370aa0c2f7984e6)
Rafał Miłecki [Mon, 22 May 2023 08:31:33 +0000 (10:31 +0200)]
firmware-utils: new package replacing otrx
Some of firmware utils may be required on target devices. It's useful
e.g. for dealing with some firmware formats. That is often required
(supporting specific format) to provide an option to revert to original
firmware.
So far we had packaged "otrx" util only for use on Broadcom targets.
Refactor that to package the whole firmware-utils project so we can
package any single util needed.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit
24d6abe2d7cd8b93ee5e390af8d90eda54611dd1)
John Audia [Wed, 8 Nov 2023 20:50:55 +0000 (15:50 -0500)]
kernel: bump 5.15 to 5.15.138
Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.138
Removed upstreamed:
generic/backport-5.15/819-v6.6-0018-nvmem-imx-correct-nregs-for-i.MX6SLL.patch[1]
generic/backport-5.15/819-v6.6-0019-nvmem-imx-correct-nregs-for-i.MX6UL.patch[2]
generic/backport-5.15/819-v6.6-0020-nvmem-imx-correct-nregs-for-i.MX6ULL.patch[3]
All other patches automatically rebased.
1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.138&id=
6e22bf6f00d593b0a7e0b2f418fde89317424671
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.138&id=
6efd498009b987a92f57f3bdae476f0503364fb7
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.138&id=
6e22bf6f00d593b0a7e0b2f418fde89317424671
Build system: x86_64
Build-tested: ramips/tplink_archer-a6-v3
Run-tested: ramips/tplink_archer-a6-v3
Signed-off-by: John Audia <therealgraysky@proton.me>
[Refreshed on top of OpenWrt 23.05]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit
573c8c3d78cdf494156f763c7182c0f16a8d7263)
Christian Marangi [Sun, 12 Nov 2023 18:14:46 +0000 (19:14 +0100)]
scripts/dump-target-info.pl: add new function to DUMP devices
Add new function to dump-targer-info.pl to DUMP devices provided a
matching target/subtarget.
Example:
./scripts/dump-targer-info.pl devices ipq806x/generic
will produce the sorted list of devices defined in the following format:
device_id device_name
Devices may have alternative names, the script will dump each
alternative name in the same line of device_id.
Following the pattern:
device_id "PRIMARY DEVICE NAME" "ALT0 DEVICE NAME" "ALT1 DEVICE NAME" ...
Example:
tplink_ad7200 "TP-Link AD7200 v1/v2" "TP-Link Talon AD7200 v1/v2"
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit
943c153cdd695904b9b7fe44800fc3546644973e)
Hauke Mehrtens [Tue, 14 Nov 2023 23:00:58 +0000 (00:00 +0100)]
OpenWrt v23.05.2: revert to branch defaults
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Hauke Mehrtens [Tue, 14 Nov 2023 23:00:53 +0000 (00:00 +0100)]
OpenWrt v23.05.2: adjust config defaults
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Jo-Philipp Wich [Tue, 14 Nov 2023 13:38:11 +0000 (14:38 +0100)]
netifd: fix IPv4 route target masking
A previous commit supposed to mask out excess host bits in route targets
failed to correctly calculate the mask value, causing it to produce
improper results for certain mask lengths.
Fixes: https://github.com/openwrt/netifd/issues/17
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Petr Štetiar [Thu, 15 Jun 2023 14:11:27 +0000 (16:11 +0200)]
treewide: fix shell errors during dump stage
Fixes following issues:
bash: -c: line 1: `echo
1686820180<LINUX_VERMAGIC> | /staging_dir/host/bin/mkhash md5 | cut -b1-8'
bash: -c: line 1: `echo
1686820180<LINUX_VERMAGIC> | /staging_dir/host/bin/mkhash md5 | sed -E 's/(.{8})(.{4})(.{4})(.{4})(.{10})../\1-\2-\3-\4-\500/''
bash: -c: line 1: syntax error near unexpected token `|'
bash: line 1: *1024*1024: syntax error: operand expected (error token is "*1024*1024")
bash: line 1: (64 + ): syntax error: operand expected (error token is ")")
expr: syntax error: missing argument after '+'
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit
8fc496be860192f8bd1f16913657626014c8863f)
Petr Štetiar [Thu, 15 Jun 2023 14:11:26 +0000 (16:11 +0200)]
scan.mk: do not silence output of dump phase
Make it easier to spot currently hidden issues:
$ make defconfig V=sc
...
Collecting target info: target/linux/airohabash: -c: line 1: syntax error near unexpected token `|'
bash: -c: line 1: `echo
1686815253<LINUX_VERMAGIC> | staging_dir/host/bin/mkhash md5 | cut -b1-8'
bash: -c: line 1: syntax error near unexpected token `|'
bash: -c: line 1: `echo
1686815253<LINUX_VERMAGIC> | staging_dir/host/bin/mkhash md5 | sed -E 's/(.{8})(.{4})(.{4})(.{4})(.{10})../\1-\2-\3-\4-\500/''
...
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit
b522da5b16c7e5952d364b933b921786198f9fe5)
Daniel Golle [Tue, 24 Oct 2023 17:05:28 +0000 (18:05 +0100)]
ramips: add support for MeiG SLT866 4G CPE
Hardware:
- SoC: Mediatek MT7621 (MT7621AT)
- Flash: 32 MiB SPI-NOR (Macronix MX25L25635E)
- RAM: 128 MiB
- Ethernet: Built-in, 2 x 1GbE
- 3G/4G Modem: MEIG SLM828 (currently only supported with ModemManager)
- SLIC: Si32185 (unsupported)
- Power: 12V via barrel connector
- Wifi 2.4GHz: Mediatek MT7603BE 802.11b/g/b
- Wifi 5GHz: Mediatek MT7613BE 802.11ac/n/a
- LEDs: 8x (7 controllable)
- Buttons: 2x (RESET, WPS)
Installing OpenWrt:
- sysupgrade image is compatible with vendor firmware.
Recovery:
- Connect to any of the Ethernet ports, configure local IP:
10.10.10.3/24 (or 192.168.10.19/24, depending on OEM)
- Provide firmware file named 'mt7621.img' on TFTP server.
- Hold down both, RESET and WPS, then power on the board.
- Watch network traffic using tcpdump or wireshark in realtime to
observe progress of device requesting firmware. Once download has
completed, release both buttons and wait until firmware comes up.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit
bc335f296740ac386e1ef09a49f1844419b0ccf9)
Daniel Golle [Sun, 29 Oct 2023 16:01:05 +0000 (16:01 +0000)]
uboot-envtools: add environment config for MeiG SLT866
Add configuration to access U-Boot environment on MeiG SLT866.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit
f8414f1a6fa0b784117353a93d821fa923da1aaf)
Daniel Golle [Thu, 26 Oct 2023 02:50:40 +0000 (03:50 +0100)]
kernel: support reading hex MAC address from NVMEM
In addition to binary and ASCII-formatted MAC addresses, add support
for processing hexadecimal encoded MAC addresses from NVMEM.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit
7db87d7c6846977402899b27881824b3df4f50ab)
Daniel Golle [Thu, 26 Oct 2023 02:46:44 +0000 (03:46 +0100)]
kernel: add support MeigLink SLM828 modem
Another Qualcomm-based USB-connected modem, offering endpoints
0 : rndis_host (link to voip subsystem listening on 169.254.5.100)
1 : rndis_host (?)
2 : option (?)
3 : option (at)
4 : option (at)
5 : option (?)
6 : GobiNet (qmi)
7 : ?
Add support for this modem in rndis_host, option and qmi_wwan driver
which allows the modem to be used with ModemManager.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit
f32baf6a65fbe294b9eb7b93f39b2aea1c3402ae)
Alexey D. Filimonov [Fri, 18 Aug 2023 21:26:59 +0000 (00:26 +0300)]
ramips: cf-ew72-v2: Add support for COMFAST CF-EW72 V2
Add support for COMFAST CF-EW72 V2
Hardware:
- SoC: Mediatek MT7621 (MT7621DAT or MT7621AT)
- Flash: 16 MiB NOR
- RAM: 128 MiB
- Ethernet: Built-in, 2 x 1GbE
- Power: only 802.3af PD on any port, injector supplied in the box
- PoE passthrough: No
- Wifi 2.4GHz: Mediatek MT7603BE 802.11b/g/b
- Wifi 5GHz: Mediatek MT7613BEN 802.11ac/n/a
- LEDs: 8x (only 1 is both visible and controllable, see below)
- Buttons: 1x (RESET)
Installing OpenWrt:
Flashing is done using Mediatek U-Boot System Recovery Mode
- make wired connection with 2 cables like this:
- - PC (LAN) <-> PoE Injector (LAN)
- - PoE Injector (POE) <-> CF-EW72 V2 (LAN). Leave unconnected to CF-EW72 V2 yet.
- configure 192.168.1.(2-254)/24 static ip address on your PC LAN
- press and keep pressed RESET button on device
- power the device by plugging PoE Injector (POE) <-> CF-EW72 V2 (LAN) cable
- wait for about 10 seconds until wifi led stops blinking and release RESET button
- navigate from your PC to http://192.168.1.1 and upload OpenWrt *-factory.bin firmware file
- proceed until router starts blinking with wifi led again (flashing) and stops (rebooting to OpenWrt)
MAC addresses as verified by OEM firmware:
vendor OpenWrt address
LAN lan\eth0 label
WAN wan label + 1
2g phy0 label + 2
5g phy1 label + 3
The label MAC address was found in 0xe000.
LEDs detailed:
The only both visible and controllable indicator is blue:wlan LED.
It is not bound by default to indicate activity of any wireless interfaces.
Place (WAN->ANT) | Num | GPIO | LED name (LuCI) | Note
-----------------|-----|-----------------------------------------------------------------------------------------
power | 1 | | | POWER LED. Not controlled with GPIO.
hidden_led_2 | 2 | 13 | blue:hidden_led_2 | This LED does not have proper hole in shell.
wan | 3 | | | WAN LED. Not controlled with GPIO.
hidden_led_4 | 4 | 16 | blue:hidden_led_4 | This LED does not have proper hole in shell.
lan | 5 | | | LAN LED. Not controlled with GPIO.
noconn_led_6 | 6 | | | Not controlled with GPIO, possibly not connected
wlan | 7 | 15 | blue:wlan | WLAN LED. Wireless indicator.
noconn_led_8 | 8 | | | Not controlled with GPIO, possibly not connected
mt76-phy0 and mt76-phy1 leds also exist in OpenWrt, but do not exist on board.
Signed-off-by: Alexey D. Filimonov <alexey@filimonic.net>
(cherry picked from commit
ff95f859ebf710d2914472a3feeeb0d187d14459)
Usama Nassir [Fri, 19 May 2023 00:35:51 +0000 (03:35 +0300)]
ramips: Add support for ComFast CF-E390AX
Add support for ComFast CF-E390AX. It is a 802.11 wifi6 cieling AP, based on MediaTek MT7261AT.
Specifications:
SoC: MediaTek MT7621AT
RAM: 128 MiB
Flash: 16 MiB NOR (Macronix mx25l12805d)
Wireless: MT7915E (2.4G) 802.11ax/b/g/n MT7915E (5G) 802.11ac/ax/n
Ethernet: 2 x 1Gbs
Button: 1 x "Reset" button
LED: 1x Blue LED + 1x Red LED + 1x green LED
Power: PoE
Manufacturer Page:
http://en.comfast.com.cn/index.php?m=content&c=index&a=show&catid=84&id=75
Flash Layout:
0x000000000000-0x000000030000 : "bootloader"
0x000000030000-0x000000040000 : "config"
0x000000050000-0x000000060000 : "factory"
0x000000090000-0x000001000000 : "firmware"
First install:
1. Set device into http firmware fail safe upload mode by pressing the reset button for 10 seconds while powering
it on. Once the LED stops flashing, safe mode will be running.
2. Set PC IP address to 192.168.1.2
3. Browse to 192.168.1.1 and upload the factory image using the web interface.
Signed-off-by: Usama Nassir <usama.nassir@gmail.com>
(cherry picked from commit
f24c9b9d863c2635e472e83028d28cc8d0a7c7c6)
Hauke Mehrtens [Sun, 12 Nov 2023 20:21:21 +0000 (21:21 +0100)]
OpenWrt v23.05.1: revert to branch defaults
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Hauke Mehrtens [Sun, 12 Nov 2023 20:20:49 +0000 (21:20 +0100)]
OpenWrt v23.05.1: adjust config defaults
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Christian Marangi [Sun, 12 Nov 2023 15:15:07 +0000 (16:15 +0100)]
scripts/getver.sh: prevent asking for negative rev-parse
With the case of asking an invalid version that is too big, getver.sh
might return an invalid output in the form of HEAD~-
2260475641.
This is caused by BASE_REV - GET_REV using a negative number.
Prevent this by checking if BASE_REV - GET_REV actually return 0 or a
positive number and set REV variable accordingly. With the following
change, invalid revision number will result in unknown printed instead
of the invalid HEAD~-NUMBERS output.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit
9e49e0a6c4535d345084cc62c594be5cad23b911)
Christian Marangi [Sun, 12 Nov 2023 13:10:23 +0000 (14:10 +0100)]
iptables: backport patch fixing bug with string module
Backport patch fixing critical bug with string module merged upstream.
Fixes: #13812
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit
3d6b89c5140acb9228ec89bde09b53dafdead070)
Nick Hainke [Fri, 10 Nov 2023 08:01:56 +0000 (09:01 +0100)]
wolfssl: update to 5.6.4
Releae Notes:
https://github.com/wolfSSL/wolfssl/releases/tag/v5.6.4-stable
Remove upstreamed patch:
- 001-fix-detection-of-cut-tool-in-configure.ac.patch
Signed-off-by: Nick Hainke <vincent@systemli.org>
(cherry picked from commit
d83231603c60a1df7d0530c8766f0b71c6553b44)
Felix Fietkau [Fri, 10 Nov 2023 14:37:32 +0000 (15:37 +0100)]
netifd: update to the latest version
eee02ccca8c8 device: add support to configure eee
bb28f6a291d9 wireless: fix sign comparison warning
35facc8306f5 wireless: fix premature removal of hotplug devices due to down state
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit
d45d72a6da004a557a2b39793c84174b33f0500c)
Christian Marangi [Thu, 9 Nov 2023 14:10:03 +0000 (15:10 +0100)]
netifd: update to Git HEAD (2023-11-09)
841b05fbb91e system-linux: fix compilation error if IFLA_DSA_MASTER is not supported
5c9ecc1ff74f system-linux: make system_if_get_master_ifindex static
2dc7f450f3a2 system-linux: add option to configure DSA conduit device
838f815db5ef system-linux: add support for configurable GRO option
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit
1714087442bb61591fe60a375f39b39abd657e25)
Christian Marangi [Fri, 10 Nov 2023 12:46:57 +0000 (13:46 +0100)]
ipq-wifi: update to Git HEAD (2023-11-10)
c9db9d0b3027 ipq8074: add Asus RT-AX89X BDF
33154283e54a ipq8074: update RegDB in new submitted BDF
2b034415ac3d ipq40xx: add YYeTs LE1 BDF
a9c253ebe926 ipq8074: add Netgear WAX620 Board file for Netgear WAX620, extracted from stock (bdwlan.b290) firmware and repacked.
ec0960967999 qca-wireless: ipq40xx: add BDFs for ZTE MF287
57aa1b1562ac ipq8174: Add Linksys MX4200
52a1c2940605 ipq8074: add Netgear WAX630 Board file for Netgear WAX630. Extracted from stock (WAX630_BDF.bin) firmware and repacked.
e7701b85d46d ipq8074: update RegDB in new submitted BDF
cd04ab7f984f qcn9074: update RegDB in new submitted BDF
f70fdf9438ae ipq8074: add Arcadyan AW1000 BDF
21c4d976b1e6 ipq8074: add CMCC RM2-6 BDF
f92fa0a2bdcf ipq8074: add ZTE MF269 BDF
371d4dce9b9a ipq8074: add Yuncore AX880 BDF
0c2e810e71ed qcn9074: fix prpl Foundation Haze BDF for old mac80211 version
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Jo-Philipp Wich [Thu, 9 Nov 2023 11:40:22 +0000 (12:40 +0100)]
ucode: update to Git HEAD (2023-11-07)
0352a33 uloop: support new interval and signal APIs
1468cc4 syntax: don't treat `as` and `from` as reserved keywords
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit
551963662b3c2d4a740a447855da410c0f217152)
Christian Marangi [Thu, 9 Nov 2023 15:07:55 +0000 (16:07 +0100)]
hostapd: refresh patches
Refresh patches for hostapd using make package/hostapd/refresh.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit
05e516b12d4463e40df6d97a03bc6aa621c245f5)
Christian Marangi [Wed, 8 Nov 2023 15:48:57 +0000 (16:48 +0100)]
hostapd: permit 40MHz in 802.1s only also for 2.4GHz g/n with noscan
Currently for 802.1s only, for wifi 2.4GHz in g/n mode, 40MHz is never
permitted.
This is probably due to the complexity of setting periodic check for the
intolerant bit. When noscan option is set, we ignore the presence of the
intoleran bit in near AP, so we can enable 40MHz and ignore any complex
logic for checking.
Fixes: #13112
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit
6c9ac57d58ab0d2c71fb51120a2166b7e0bd7183)
Christian Marangi [Wed, 8 Nov 2023 15:48:05 +0000 (16:48 +0100)]
hostapd: permit also channel 7 for 2.5GHz to be set to HT40PLUS
Also channel 7 for 2.4GHz can be set to HT40PLUS. Permit this and add it
to the list of the channels.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit
b1c7b1bd67ca40289dfb7acd03e12ce43618d548)
Christian Marangi [Wed, 8 Nov 2023 15:46:12 +0000 (16:46 +0100)]
hostapd: fix broke noscan option for mesh
noscan option for mesh was broken and actually never applied.
This is caused by a typo where ssid->noscan value is check instead of
conf->noscan resulting in the logic swapped and broken.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit
1b5ea2e199fcf391f88afd0322de449459399be4)
Christian Marangi [Wed, 8 Nov 2023 15:44:38 +0000 (16:44 +0100)]
mac80211: fix not set noscan option for wpa_supplicant
noscan option was changed to hostapd_noscan but the entry in
wpa_supplicant was never updated resulting in the noscan option actually
never set.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit
1070fbce6e496da2dacf17c6e842a4369c4be71b)
Hauke Mehrtens [Mon, 6 Nov 2023 23:33:38 +0000 (00:33 +0100)]
px5g-wolfssl: Fix permission of private key
Store the private key with read and write permission for the user only
and not with read permissions for everyone. This converts the
write_file() function from fopen() to open() because open allows to
specify the permission mask of the newly created file. It also adds and
fixes some existing error handling.
OpenSSL does this in the same way already.
With this change it looks like this:
root@OpenWrt:/# ls -al /etc/uhttpd.*
-rw-r--r-- 1 root root 749 Nov 6 23:14 /etc/uhttpd.crt
-rw------- 1 root root 121 Nov 6 23:14 /etc/uhttpd.key
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit
6aad5ab0992fefd88ce612bc0484e0115a004572)
Hauke Mehrtens [Sun, 5 Nov 2023 22:05:24 +0000 (23:05 +0100)]
px5g-mbedtls: Fix permission of private key
Store the private key with read and write permission for the user only
and not with read permissions for everyone. This converts the
write_file() function from fopen() to open() because open allows to
specify the permission mask of the newly created file. It also adds and
fixes some existing error handling.
OpenSSL does this in the same way already.
With this change it looks like this:
root@OpenWrt:/# ls -al /etc/uhttpd.crt /etc/uhttpd.key
-rw-r--r-- 1 root root 519 Nov 6 22:58 /etc/uhttpd.crt
-rw------- 1 root root 121 Nov 6 22:58 /etc/uhttpd.key
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit
929c9a58c9a17a3ca8d2a3be0c5dc4ac98e848e2)
Felix Fietkau [Wed, 8 Nov 2023 10:20:41 +0000 (11:20 +0100)]
hostapd: use rtnl to set up interfaces
In wpa_supplicant, set up wlan interfaces before adding them
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit
c2a30b6e01aa756cd7d50c578ab4344c725ecc59)
Felix Fietkau [Wed, 8 Nov 2023 09:45:55 +0000 (10:45 +0100)]
wifi: fix applying mesh parameters when wpa_supplicant is in use
Apply them directly using nl80211 after setting up the interface.
Use the same method in wdev.uc as well
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit
531314260d2e50e984e1671f88662b469dffb16e)
Felix Fietkau [Tue, 7 Nov 2023 12:36:39 +0000 (13:36 +0100)]
netifd: update to the latest version
383753dd65ae device/bridge: support passing extra vlans in the device_set_state call
b6e75eafc1af device: send notifications for device events via ubus
cab415c7aefd bridge: add auth-required bridge members with auth_status=0 if vlan is enabled
827a02f0343c bridge: add support for configuring vlans for auth=1,auth_status=false
40ed7363caf2 device: fix build error on 32 bit systems
516ab774cc16 system-linux: fix race condition on bringing up wireless devices
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit
41d7439af5a40a71a0deb2075fa133b61b0e478a)
Tianling Shen [Sat, 23 Sep 2023 07:04:09 +0000 (15:04 +0800)]
mediatek: add CMCC RAX3000M support
Hardware specification:
SoC: MediaTek MT7981B 2x A53
Flash: 64GB eMMC or 128 MB SPI-NAND
RAM: 512MB
Ethernet: 4x 10/100/1000 Mbps
Switch: MediaTek MT7531AE
WiFi: MediaTek MT7976C
Button: Reset, Mesh
Power: DC 12V 1A
- UART: 3.3v, 115200n8
--------------------------
| Layout |
| ----------------- |
| 4 | GND TX VCC RX | <= |
| ----------------- |
--------------------------
Gain SSH access:
1. Login into web interface, and download the configuration.
2. Enter fakeroot, decompress the configuration:
tar -zxf cfg_export_config_file.conf
3. Edit 'etc/config/dropbear', set 'enable' to '1'.
4. Edit 'etc/shadow', update (remove) root password:
'root::19523:0:99999:7:::'
5. Repack 'etc' directory:
tar -zcf cfg_export_config_file.conf etc/
* If you find an error about 'etc/wireless/mediatek/DBDC_card0.dat',
just ignore it.
6. Upload new configuration via web interface, now you can SSH to RAX3000M.
Check stroage type:
Check the label on the back of the device:
"CH EC CMIIT ID: xxxx" is eMMC version
"CH CMIIT ID: xxxx" is NAND version
eMMC Flash instructions:
1. SSH to RAX3000M, and backup everything, especially 'factory' part.
('data' partition can be ignored, it's useless.)
2. Write new GPT table:
dd if=openwrt-mediatek-filogic-cmcc_rax3000m-emmc-gpt.bin of=/dev/mmcblk0 bs=512 seek=0 count=34 conv=fsync
3. Erase and write new BL2:
echo 0 > /sys/block/mmcblk0boot0/force_ro
dd if=/dev/zero of=/dev/mmcblk0boot0 bs=512 count=8192 conv=fsync
dd if=openwrt-mediatek-filogic-cmcc_rax3000m-emmc-preloader.bin of=/dev/mmcblk0boot0 bs=512 conv=fsync
4. Erase and write new FIP:
dd if=/dev/zero of=/dev/mmcblk0 bs=512 seek=13312 count=8192 conv=fsync
dd if=openwrt-mediatek-filogic-cmcc_rax3000m-emmc-bl31-uboot.fip of=/dev/mmcblk0 bs=512 seek=13312 conv=fsync
5. Set static IP on your PC:
IP 192.168.1.254, GW 192.168.1.1
6. Serve OpenWrt initramfs image using TFTP server.
7. Cut off the power and re-engage, wait for TFTP recovery to complete.
8. After OpenWrt has booted, perform sysupgrade.
9. Additionally, if you want to have eMMC recovery boot feature:
(Don't worry! You will always have TFTP recovery boot feature.)
dd if=openwrt-mediatek-filogic-cmcc_rax3000m-initramfs-recovery.itb of=/dev/mmcblk0p4 bs=512 conv=fsync
NAND Flash instructions:
1. SSH to RAX3000M, and backup everything, especially 'Factory' part.
2. Erase and write new BL2:
mtd erase BL2
mtd write openwrt-mediatek-filogic-cmcc_rax3000m-nand-preloader.bin BL2
3. Erase and write new FIP:
mtd erase FIP
mtd write openwrt-mediatek-filogic-cmcc_rax3000m-nand-bl31-uboot.fip FIP
4. Set static IP on your PC:
IP 192.168.1.254, GW 192.168.1.1
5. Serve OpenWrt initramfs image using TFTP server.
6. Cut off the power and re-engage, wait for TFTP recovery to complete.
7. After OpenWrt has booted, erase UBI volumes:
ubidetach -p /dev/mtd0
ubiformat -y /dev/mtd0
ubiattach -p /dev/mtd0
8. Create new ubootenv volumes:
ubimkvol /dev/ubi0 -n 0 -N ubootenv -s 128KiB
ubimkvol /dev/ubi0 -n 1 -N ubootenv2 -s 128KiB
9. Additionally, if you want to have NAND recovery boot feature:
(Don't worry! You will always have TFTP recovery boot feature.)
ubimkvol /dev/ubi0 -n 2 -N recovery -s 20MiB
ubiupdatevol /dev/ubi0_2 openwrt-mediatek-filogic-cmcc_rax3000m-initramfs-recovery.itb
10. Perform sysupgrade.
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit
423186d7d8b4f23aee91fca4f1774a195eba00d8)
[rebased to 23.05]
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>