The current code assumes that the rootfs_data UBI volume is on the same MTD
partition as the rootfs.
Unfortunately, this does not work on the Aruba AP-325 (and variants), since
the bootloader enforces a particular UBI volume layout.
Therefore, this adds a separate variable to set the rootfs_data partition,
and updates all existing devices with a non-default rootfs partition to also
specify the new variable.
Signed-off-by: Lukas Stockner <lukas@lukasstockner.de>
Link: https://github.com/openwrt/openwrt/pull/20738
Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit bf770bc4e3)
Signed-off-by: Florian Maurer <f.maurer@outlook.de>
Link: https://github.com/openwrt/openwrt/pull/24437
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The FM25G01B/FM25G02B datasheets specify a single dummy byte for the
0xEB Quad I/O read-from-cache, but the generic read_cache_variants set
issues two. The extra dummy byte shifts the data phase and returns
corrupted data with no ECC error, breaking boot on NC-1812/KN-1812.
Use a dedicated read-from-cache variant set with ndummy=1 for 0xEB.
Both the FM25G{01,02}B support (d5a5c9eb2ee9) and this fix
(8211f2d74b35) were merged into the mtd tree (nand/next). Backport both
patches to backport-6.12 using the actual upstream commits, so they
apply to the OpenWrt kernel tree and upstream nand/next as is.
FM25G01B datasheet: https://www.fmsh.com/nvm/FM25G01B_ds_eng.pdf
FM25G02B datasheet: https://www.fmsh.com/nvm/FM25G02B_ds_eng.pdf
Signed-off-by: Aleksandr Mineev <sanderrrs@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24007
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
(cherry picked from commit 6b98618527)
[Adapted to the SPI-NAND read-from-cache op API used before the
SPINAND_PAGE_READ_FROM_CACHE_1S_4S_4S_OP-style rename: kernel 6.12
still uses SPINAND_PAGE_READ_FROM_CACHE_QUADIO_OP/_X4_OP/_DUALIO_OP/
_X2_OP/_OP instead.]
Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24781
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit adds support for FudanMicro FM25G01B and FM25G02B SPI NAND
chips. This is required to:
1. Fix bootloop on new revision of Keenetic KN-1812 and Netcraze NC-1812
(with FudanMicro FM25G02B SPI NAND)
2. Add Nokia XG-040G-MD support (device has either SkyHigh or FudanMicro
SPI NAND).
Fixes: https://github.com/openwrt/openwrt/issues/23855
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23864
(cherry picked from commit 7edb29d241)
[Adapted to the SPI-NAND read-from-cache op API used before the
SPINAND_PAGE_READ_FROM_CACHE_1S_4S_4S_OP-style rename: kernel 6.12
still uses SPINAND_PAGE_READ_FROM_CACHE_QUADIO_OP/_X4_OP/_DUALIO_OP/
_X2_OP/_OP instead. Re-imported as the mainline commit d5a5c9eb2ee9
under backport-6.12/436, rather than the mailing-list-form patch
that 7edb29d originally added under pending-6.18/401.]
Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24781
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
hw_mode property is only present in device configuration section,
not the interface section, so testing for config.hw_mode in
iface.parse_encryption is wrong. Test for (dev_config.band == 60g)
instead, this will cause GCMP to be properly selected instead of
CCMP unless set explicitly, and while at that will cover both hostapd
and wpa_supplicant cases.
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24586
(cherry picked from commit 00045786e6)
Link: https://github.com/openwrt/openwrt/pull/24762
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
setup_sta() called parse_encryption() without the device config, so the
sae-compat branch dereferenced a null dev_config.band and threw, aborting
the whole radio setup. Pass the device config through.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 97e8911c9b)
Link: https://github.com/openwrt/openwrt/pull/24762
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Globitel BT-R320 boots the sysupgrade FIT from the eMMC production
partition with root=/dev/fit0.
The device tree did not describe the production GPT partition and
/chosen/rootdisk did not point at the FIT container. fitblk then had no
rootdisk match and the board stopped at:
Waiting for root device /dev/fit0...
Describe the eMMC GPT partitions, set /chosen/rootdisk to production,
and use the FIT sysupgrade path.
Fixes: a3105d3f95 ("mediatek: filogic: add support for Globitel BT-R320")
Signed-off-by: Bogdan K <zikwarface134@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23895
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
(cherry picked from commit a6e1135d6d)
Link: https://github.com/openwrt/openwrt/pull/24078
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
The ipTIME A8004T requires GPIO19 and GPIO8 for PCIe reset control.
GPIO8 is assigned to UART3 by default, so configure the pin state
to make it available as a GPIO and add both GPIOs to the PCIe
reset-gpios property.
This fixes PCIe initialization after warm reboot.
Signed-off-by: Myeongjae SONG <devparlair@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/24534
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
(cherry-picked from 8eb204ad81)
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Hardware:
- SoC: MediaTek MT7981B
- CPU: 2x 1.3 GHz Cortex-A53
- Flash: 256 MiB ESMT F50L2G41XA
- RAM: DDR3, 512 MiB
- WLAN: 2.4 GHz, 5 GHz (MediaTek MT7976CN, 802.11ax)
- 1x WAN MT7531 (JXD 2531Z) 10/100/1000 Mbps
- 4x LAN 2x MT7530 (JXD 2529S) 10/100/1000 Mbps
- USB 3.0 port
- Buttons: Reset, WPS
- 8x LEDs: 2x Red, 6x Blue
- Serial console: no need to solder. 115200 8n1
- Power: 12 VDC, 1.5 A
The DTS inherits WBR3000UAX because WR3000U is almost the same.
The only difference is size of NAND and factory UBI length.
+---------+-------------------+-----------+
| | MAC | Algorithm |
+---------+-------------------+-----------+
| WAN | D4:0D:AB:xx:xx:x1 | label+1 |
| LAN | D4:0D:AB:xx:xx:x0 | label |
| WLAN 2g | D4:0D:AB:xx:xx:x0 | label |
| WLAN 5g | D6:0D:AB:xx:xx:x1 | label+1 |
+---------+-------------------+-----------+
There are 2 ways to install OpenWrt:
- via an intermediate RSA-signed vendor's image or
- via UART && TFTPd
Migration to OpenWrt via OEM firmware:
- Download the migration image from
https://drive.google.com/drive/folders/1BKVarlwlNxf7uJUtRhuMGUqeCa5KpMnj
(The folder is Cudy's official "Cudy Intermediary OpenWrt Firmware" resource)
- Upload the migration image via OEM web interface
- After flashing, OpenWrt is accessible via http://192.168.1.1
- Flash the official OpenWrt image
Install using UART & TFTP:
- Connect to UART.
- Connect to LAN and set your IP to 192.168.1.88/24.
- Configure a TFTP server to serve
openwrt-mediatek-filogic-cudy_wr3000u-v1-initramfs-kernel.bin file
and run the TFTP server.
- Press reset and power-on the router. Hold the reset button for 5 seconds
- TFTP error: 'File not found' appears and MTK console becomes available
- Enter the following commands in the console:
setenv bootfile openwrt-mediatek-filogic-cudy_wr3000u-v1-initramfs-kernel.bin
tftpboot
bootm
- After booting to initramfs, via http://192.168.1.1 flash
openwrt-mediatek-filogic-cudy_wr3000u-v1-squashfs-sysupgrade.bin
- After flashing, OpenWrt is accessible via http://192.168.1.1
If you fail to flash the device,
you can use TFTP to flash back to the original firmware:
- Download the original firmware from
https://www.cudy.com/pages/download-center/wr3000u-256mb-1-0
- Connect to LAN and set your IP to 192.168.1.88/24.
Configure a TFTP server and an recovery.bin firmware file
- With the router off, press the RESET button.
While the router is turning on,
the button should continue to be pressed for at least 5 seconds
- After 1-2 minutes the original firmware is available on http://192.168.10.1
Signed-off-by: Dmitry Mostovoy <stavultras@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24447
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit b9d7b448c2)
Link: https://github.com/openwrt/openwrt/pull/24537
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
The stock layout of the WL-WNT100X3 splits the SPI-NAND into
bl2/u-boot-env/factory/fip/ubi/hw and the sysupgrade image is a
sysupgrade-tar that has to be unpacked into the "ubi" partition.
The board was however added to the default_do_upgrade() case, which
writes the image to ${PART_NAME:-image}, i.e. to the "firmware" MTD
partition that does not exist on this device:
find_mtd_index firmware -> []
mtd: Could not open mtd device: firmware
mtd fails, do_stage2 exits before flashing anything and the board
reboots into the old firmware without a visible error, so every
OpenWrt-to-OpenWrt sysupgrade looks like a silent no-op. Only the
initial installation works, since that one is performed by the sysupgrade
of the vendor firmware.
Drop the entry so the board falls through to the generic
nand_do_upgrade() case with CI_UBIPART defaulting to "ubi", like the
identically partitioned WL-WN586X3B.
The WL-WNT100X3 (OpenWrt U-Boot layout) variant uses fit_do_upgrade()
and is not affected.
Fixes: 829d432ecd ("mediatek: add support for Wavlink WL-WNT100X3")
Signed-off-by: Fil Dunsky <filipp.dunsky@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24684
(cherry picked from commit 17d131669f)
Link: https://github.com/openwrt/openwrt/pull/24686
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Now that multi serdes patch are accepted upstream, reorder the current
patch in the 1xx numbering and add the kernel version tag.
Also replace the downstream patch with the exact version merged upstream.
Downstream PCS implementation is updated with a new revision for the
ethernet code.
Update any patch affected by these changes.
Link: https://github.com/openwrt/openwrt/pull/23849
(cherry picked from commit 3ed5f08733)
[ fix conflict error ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
- Introduce HW-GRO support in order to allow bridging HW-GRO interfaces
- Enable LRO for queues (7-0)
- Rework LAN/WAN dynamic switching according to upstream requests:
now in order to set GDM3/GDM4 as WAN it is necessary to enable Qdisc
offloading without any dedicated ethool command.
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://github.com/openwrt/openwrt/pull/23828
(cherry picked from commit 2c122bdd74)
[ fix conflict error ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Add hardware TCP Large Receive Offload (LRO) support to the airoha_eth
driver, leveraging the EN7581/AN7583 SoC's 8 dedicated LRO hardware queues
mapped to RX queues 24–31. LRO hw offloading does not support
Scatter-Gather (SG) so it is required to increase the page_pool allocation
order to 2 for RX queues 24–31 (LRO queues).
Performance comparison between GRO and hw LRO has been carried out using
a 10Gbps NIC:
GRO: ~2.7 Gbps
LRO: ~8.1 Gbps
Tested-by: Madhur Agrawal <madhur.agrawal@airoha.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://github.com/openwrt/openwrt/pull/23530
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit d22ceb8d24)
Backport GDM2 loopback fixup for Ethernet driver. This should be the last
patch before introduction of Multi-Serdes support series.
(cherry picked from commit 5b25d4235d)
[ fix conflict error ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
EN7581 or AN7583 SoCs support connecting multiple external SerDes (e.g.
Ethernet or USB SerDes) to GDM3 or GDM4 ports via a hw arbiter that
manages the traffic in a TDM manner. As a result multiple net_devices can
connect to the same GDM{3,4} port and there is a theoretical "1:n"
relation between GDM ports and net_devices.
┌─────────────────────────────────┐
│ │ ┌──────┐
│ P1 GDM1 ├────►MT7530│
│ │ └──────┘
│ │ ETH0 (DSA conduit)
│ │
│ PSE/FE │
│ │
│ │
│ │ ┌─────┐
│ P0 CDM1 ├────►QDMA0│
│ P4 P9 GDM4 │ └─────┘
└──┬─────────────────────────┬────┘
│ │
┌──▼──┐ ┌────▼────┐
│ PPE │ │ ARB │
└─────┘ └─┬─────┬─┘
│ │
┌──▼──┐┌─▼───┐
│ ETH ││ USB │
└─────┘└─────┘
ETH1 ETH2
This series introduces support for multiple net_devices connected to the
same Frame Engine (FE) GDM port (GDM3 or GDM4) via an external hw
arbiter. Please note GDM1 or GDM2 does not support the connection with
the external arbiter.
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://github.com/openwrt/openwrt/pull/23481
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit e1915674ab)
Airoha reported some additional bug and fixes were pushed for the ethernet
driver. Backport the additional patch merged upstream and refresh all
affected patch.
(cherry picked from commit dda777dd44)
Link: https://github.com/openwrt/openwrt/pull/24211
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This is required to add available dns servers in ifstatus output,
required by downstream tools to receive information of the configured
DNS server on the wwan interface.
This has no effect on the dns server selection, as peerdns has the
desired effect within netifd.
Signed-off-by: Florian Maurer <f.maurer@outlook.de>
(cherry picked from commit 03e0a608e0)
This is required to add available dns servers in ifstatus output,
required by downstream tools to receive information of the configured
DNS server on the wwan interface.
This has no effect on the dns server selection, as peerdns has the
desired effect within netifd.
Signed-off-by: Florian Maurer <f.maurer@outlook.de>
(cherry picked from commit 6c13eef46c)