1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-06-26 09:37:29 +02:00
Commit Graph

55709 Commits

Author SHA1 Message Date
Rafał Miłecki
797177ad85 kernel: update U-Boot nvmem driver to v6.2 release version
Backport queued patches that
1. Fix CRC32 calculation for redundant images
2. Fix CRC32 on big-endian
3. Fix parting images with Broadcom header

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-11-12 11:42:05 +01:00
Felix Fietkau
2403428c75 mt76: update to the latest version
8cc34bdc9ef0 wifi: mt76: mt7921: set MT_DRV_AMSDU_OFFLOAD for USB/SDIO
2182de50a37c wifi: mt76: fix receiving LLC packets on mt7615/mt7915
269df4b01f27 wifi: mt76: fix rx checksum offload on mt7615/mt7915/mt7921
fa4ace8e3b58 ieee80211: add EHT 1K aggregation definitions
176df35e7e80 wifi: mt76: mt7915: improve accuracy of time_busy calculation
94b335fa88e1 wifi: mt76: mt7915: add ack signal support
3365c129f73c wifi: mt76: mt7915: enable use_cts_prot support
ad9bd2ba361e wifi: mt76: mt7615: enable use_cts_prot support
68bdcccb0aa7 wifi: mt76: mt7915: fix reporting of TX AGGR histogram
242fece4323f wifi: mt76: mt7921: fix reporting of TX AGGR histogram
75003c69a9bd wifi: mt76: mt7615: rely on mt7615_phy in mt7615_mac_reset_counters
65c70a32f1cf wifi: mt76: move aggr_stats array in mt76_phy
b1ddf8bec058 wifi: mt76: mt7915: rework mt7915_dma_reset()
1ad31c3f76f4 wifi: mt76: mt7915: enable full system reset support
6b0668de7a53 wifi: mt76: mt7915: add full system reset into debugfs
a5e48378d2a6 wifi: mt76: mt7915: enable coredump support
1e9060420c92 wifi: mt76: mt7915: fix incorrect tx path number configuration
0263711ba362 wifi: mt76: mt7915: fix antenna selection with bad eeprom.
869815e5ef86 wifi: mt76: mt7915: Fix chainmask calculation on mt7915 DBDC
fc410557b7e1 wifi: mt76: mt7915: Fix VHT beamforming capabilities with DBDC
daa30a31cf70 wifi: mt76: mt7915: don't claim 160MHz support with mt7915 DBDC
80bcecdbc2ff wifi: mt76: connac: update nss calculation in txs
465219c1f56c wifi: mt76: do not run mt76u_status_worker if the device is not running
c7db15903e5c wifi: mt76: connac: add mt76_connac_mcu_uni_set_chctx
7a2b1a13b1b0 wifi: mt76: mt7921: add chanctx parameter to mt76_connac_mcu_uni_add_bss signature
dece6921e606 wifi: mt76: mt7921: add unified ROC cmd/event support
d4da182389b6 wifi: mt76: mt7921: drop ieee80211_[start, stop]_queues in driver
0c3ef988d8dc wifi: mt76: connac: accept hw scan request at a time
c477225fd10e mt7615: update cr4 firmware to 20190415154149
413a4bf39513 mt76: mt7915: fix unused-but-set variable
f5034abea899 mt76: mt7915: fix format string
a9ac73ed8275 wifi: mt76: mt7615: increase eeprom size for mt7663
4a27f23fc4f2 linux-firmware: update firmware for MT7921 WiFi device

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-11-11 20:05:27 +01:00
Rafał Miłecki
ce296b1aeb bcm4908: refresh kernel 5.15 config
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-11-11 17:21:55 +01:00
Rafał Miłecki
66b6414a20 bcm4908: prepare support for kernel 5.15
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-11-11 17:21:55 +01:00
Rafał Miłecki
45ac906c64 bcm4908: update DTS files with the latest changes
The most affecting change is move of files from bcm4908/ to the bcmbca/.
That required updating few paths.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-11-11 15:37:57 +01:00
Daniel Golle
047d471317
procd: update to git HEAD
24f6bc4 jail: correctly check for null pointer
 93b2c2d jail: ignore missing .dynamic sect
 039b88f sysupgrade: print errno on failure

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-11-10 21:35:38 +00:00
Daniel Golle
e586de8dbf
ath79: add support for Teltonika RUT300
Add support for the Teltonika RUT300 rugged industrial Ethernet router

Hardware
--------
SoC:    Qualcomm Atheros QCA9531
RAM:    64M DDR2 (EtronTech EM68B16CWQK-25IH)
FLASH:  16M SPI-NOR (Winbond W25Q128)
ETH:    4x 100M LAN (QCA9533 internal AR8229 switch, eth0)
        1x 100M WAN (QCA9533 internal PHY, eth1)
UART:   115200 8n1, same debug port as other Teltonika devices
USB:    1 single USB 2.0 host port
BUTTON: Reset
LED:    1x green power LED (always on)
        5x yellow Ethernet port LED (controlled by Linux)
        WAN port LED is used as boot status and upgrade indicator as
        the power LED cannot be controlled in software.

Use the *-factory.bin file to intially flash the device using the
vendor firmware's Web-UI.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-11-10 21:35:34 +00:00
Felix Fietkau
04b8ad60fd kernel: more fixes for mtk_eth_soc performance optimization
- fix features sync between netdevs
- fix crash in dsa_switch_rcv

Fixes: ceb1451c10 ("kernel: add mediatek soc ethernet performance improvements")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-11-10 22:27:18 +01:00
Felix Fietkau
161b22d103 mac80211: fix mesh airtime link metric estimation
fix reading the per-packet rate on devices with firmware rate control

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-11-10 14:47:07 +01:00
Rafał Miłecki
8a4537d2a9 fstools: update to git HEAD
3affe9e block: try multiple NTFS filesystem implementations

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-11-10 14:09:07 +01:00
Felix Fietkau
7bd314a577 kernel: fix vlan parsing issue in mediatek ethernet driver
Check the vlan rx offload flag
Sync features across netdevs

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-11-10 13:20:57 +01:00
Felix Fietkau
ddf736e543 hostapd: remove invalid dtim_period option processing
dtim_period is a bss property, not a device one.
It is already handled properly in mac80211.sh

Fixes: 30c64825c7 ("hostapd: add dtim_period, local_pwr_constraint, spectrum_mgmt_required")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-11-10 13:09:18 +01:00
Rafał Miłecki
e4770db163 kernel: support "linux,rootfs" DT property for splitting rootfs
OpenWrt's support for splitting rootfs (to create an extra "rootfs_data"
partition) is limited to partitions called "rootfs". Upstream kernel
allows any name partition to be rootfs if it has "linux,rootfs" property
set. Add split support to such partitions in OpenWrt code.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-11-10 12:47:22 +01:00
Rafał Miłecki
8cdafa149e bcm53xx: update DTS files with the latest changes
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-11-10 09:51:25 +01:00
Weiping Yang
9945d05171 ipq40xx: add support for GL.iNet GL-A1300
Specifications:
SOC:		Qualcomm IPQ4018 (DAKOTA) ARM Quad-Core
RAM:		256 MiB
FLASH1:		4 MiB NOR
FLASH2:		128 MiB NAND
ETH:		Qualcomm QCA8075
WLAN1:		Qualcomm Atheros QCA4018 2.4GHz 802.11b/g/n 2x2
WLAN2:		Qualcomm Atheros QCA4018 5G 802.11n/ac W2 2x2
USB:		1 x USB 3.0 port
Button:		1 x Reset button
Switch:		1 x Mode switch
LED:		1 x Blue LED + 1 x White LED

Install via uboot tftp or uboot web failsafe.

By uboot tftp:
(IPQ40xx) # tftpboot 0x84000000 openwrt-ipq40xx-generic-glinet_gl-a1300-squashfs-nand-factory.ubi
(IPQ40xx) # nand erase 0 0x8000000
(IPQ40xx) # nand write 0x84000000 0 $filesize

By uboot web failsafe:
Push the reset button for 10 seconds util the power led flash faster,
then use broswer to access http://192.168.1.1

Afterwards upgrade can use sysupgrade image.

Signed-off-by: Weiping Yang <weiping.yang@gl-inet.com>
2022-11-09 23:34:37 +01:00
Edward Chow
79107116d1 ath79: calibrate TL-WDR4900 v2 with nvmem-cells
Driver for both soc (2.4GHz Wifi) and pci (5 GHz) now pull the calibration
data from the nvmem subsystem.

This allows us to move the userspace caldata extraction for the pci-e ath9k
supported wifi into the device-tree definition of the device.

wmac's nodes are also changed over to use nvmem-cells over OpenWrt's
custom mtd-cal-data property.

Signed-off-by: Edward Chow <equu@openmail.cc>
2022-11-09 22:55:33 +01:00
Shiji Yang
8d4c22a956 ath79: add missing clock name strings in SoC dtsi
For all SoC in the ath79 target, the PLL controller provides 3 main
clocks "cpu", "ddr" and "ahb" through the input clock "ref".

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2022-11-09 22:55:33 +01:00
Shiji Yang
520c90854c ath79: move reference clock node to SoC dtsi
AR7161, AR724x, AR9132 and QCA95xx only support fixed frequency external
crystal oscillator, so move reference clock node to SoC dtsi files.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2022-11-09 22:55:33 +01:00
Christian Marangi
901366ad66
Revert "build: fix for sourcing target image config a when target is being replaced"
This reverts commit ce1346a8fc.

Seems to cause buildbot compilation to fail and require more testing.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-11-09 22:28:53 +01:00
Prasun Maiti
ce1346a8fc build: fix for sourcing target image config a when target is being replaced
Sourcing of image/Config.in will not happen
When a target is installed from target/linux/feeds/

Signed-off-by: Prasun Maiti <prasunmaiti87@gmail.com>
2022-11-09 20:47:43 +01:00
Felix Fietkau
a06e023b4e mac80211: remove old legacy legacy drivers
Get rid of drivers that are either limited to 802.11b/g or don't even support
cfg80211/mac80211. Most of these are either limited to boards that we don't even
support anymore because of firmware size, or were only used for custom hacks by
a really small number of users in the past.
Let's get rid of those to reduce the maintenance effort and the number of useless
packages

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-11-09 20:44:28 +01:00
Felix Fietkau
f753316f4a mediatek: filogic: enable maxlinear PHY support, refresh config
Needed for the 7986 RFB1 board

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-11-09 20:43:55 +01:00
Felix Fietkau
5faff99c7b mediatek: filogic: fix mt7986a ethernet devicetree entries
Add all ports, rename DSA ports to start at lan1

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-11-09 20:43:51 +01:00
Felix Fietkau
4f1e54801e mediatek: drop the use of device tree overlays on mt7986a-rfb board
The boot loader does not support it. Instead make NAND the default image for
this board

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-11-09 20:43:45 +01:00
Felix Fietkau
b8bf27e4cb scripts/mkits.sh: fix portability issue
BSD wc can output more whitespaces, which breaks the cut usage.
Replace the cut invocation with awk, which is more portable.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-11-09 20:43:41 +01:00
Andrew Powers-Holmes
94d0cb9d2e mt76: add firmware package for mt7916
Add kernel package 'mt7916-firmware' with firmware files for MT7916E devices.

These share the same driver as the MT7915 chipset, but use their own firmware.

Tested using a pair of AsiaRF AW7916-NPD cards.

Signed-off-by: Andrew Powers-Holmes <aholmes@omnom.net>
2022-11-09 20:43:32 +01:00
Felix Fietkau
ceb1451c10 kernel: add mediatek soc ethernet performance improvements
- implement multiqueue via qdma hardware shaper to deal with ports with different speeds
- implement hardware DSA untagging
- add NETIF_F_ALL_TSO to reduce unnecessary segmentation

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-11-09 18:18:27 +01:00
Nick Hainke
2426dbb734
mac80211: subsys: add tags to upstreamed patches
Some patches were already upstreamed.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-11-09 17:10:03 +01:00
Nick Hainke
b2272c6194
mac80211: rt2x00: add tags to upstreamed patches
Some patches are already upstreamed.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-11-09 17:09:30 +01:00
Nick Hainke
f472a2fb15
mac80211: brcm: add tag to upstreamed patch
Add tag to upstreamed patch.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-11-09 17:08:49 +01:00
Nick Hainke
6f5e1df597
mac80211: ath9k: add tag to upstreamed patch
Add tag to upstreamed patch.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-11-09 17:08:12 +01:00
Nick Hainke
c47f8dacb8
mac80211: ath10k: add tags for upstreamed patches
Add tags to already upstreamed patches.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-11-09 17:07:42 +01:00
Edward Matijevic
2964e5024c
ipq806x: kernel ramoops storage for C2600/AD7200
Define the kernel crash log storage ramoops/pstore feature
for C2600/AD7200 and add kmod-ramoops to default.

Tested with C2600 only.

Signed-off-by: Edward Matijevic <motolav@gmail.com>
2022-11-09 17:07:15 +01:00
David Bauer
10ba380ec3 ramips: define loadaddr for U6 Lite DTB
The Ubiquiti UniFi 6 Lite does not correctly align the FDT by always
setting fdt_high to 0xffffffff when invoking the bootubnt command.

Work around this issue by loading the DTB to a valid,aligned address, so
the bootloader does not have to relocate the FDT automatically.

Note: The device does read the kernel before invoking bootm on the FIT
image to 0x86000000.

Signed-off-by: David Bauer <mail@david-bauer.net>
2022-11-08 12:16:43 +01:00
David Bauer
a208f0a9be mkits: support definition of DTB loadaddr
Support defining a per-device loadaddress for the DTB. This is required
for devices which to not align the DTB from the bootloader correctly.

Signed-off-by: David Bauer <mail@david-bauer.net>
2022-11-08 12:16:36 +01:00
Rafał Miłecki
b066ad7d9a kernel: improve description of NTFS kernel packages
This helps choosing the right NTFS driver from two available options.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-11-08 09:14:20 +01:00
Rafał Miłecki
d33e49857e kernel: backport support for "linux,rootfs" in DT
This DT property allows marking flash partition that Linux should use as
a root device. It's useful for devices that don't use U-Boot and cmdline
parser for partitioning. It may be used with "fixed-partitions" or some
dynamic partitioning based on flash content.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-11-08 09:12:16 +01:00
Rafał Miłecki
6a64eb2664 kernel: split out mtd hack for CONFIG_FIT_PARTITION + rootfs
This is some hack on top of our old hack. Use separated patch for it so
it's easier to understand and actually possible to describe. We should
ideally get rid of this (and we actually did with kernels 5.15+).

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-11-08 09:12:05 +01:00
Michael Lyle
961e01fc67 ramips: gl-mt1300: downclock SPI to 50MHz
The SPI max frequency was set to 80MHz, considerably higher than the
vendor clocks it in their firmware (10MHz).  Multiple users reported
jffs2 corruption/instability in GitHub issue #10461.

My unit has a W25Q256; datasheet specifies maximum SPI frequency for
read command of 50MHz.

Thanks to @DragonBlueP for suggesting to eliminate m25p,fast-read;
and @MPannen1979 for identifying the problem.

Fixes: #10461
Signed-off-by: Michael Lyle <mlyle@lyle.org>
2022-11-07 12:54:31 +01:00
Sungbo Eo
02aa7a2bb9 ramips: fix TP-Link RE200 v3/v4 LEDs
Set power LED to gpio 43 instead of 44 for v3 and v4.
Set red wifi LED to gpio 40 (was assigned to `red:wifi5g`).

Tested by the author of the initial v3 and v4 commit.

Reported-by: Richard Fröhning <misanthropos@gmx.de>
Tested-by: Richard Fröhning <misanthropos@gmx.de>
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
Signed-off-by: Jan-Niklas Burfeind <git@aiyionpri.me>
2022-11-07 12:33:42 +01:00
Kevin Darbyshire-Bryant
41691ce9ac dnsmasq: remove backported CVE patch
Patch no longer applies/required since bump to v2.87

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2022-11-06 23:04:27 +00:00
Kevin Darbyshire-Bryant
d7f378796f dnsmasq: Support nftables nftsets
Add build option for nftables sets. By default disable iptables ipset
support.  By default enable nftable nftset support since this is what
fw4 uses.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>

dnsmasq: nftset: serve from ipset config

Use existing ipset configs as source for nftsets to be compatible with
existing configs. As the OS can either have iptables XOR nftables
support, it's fine to provide both to dnsmasq. dnsmasq will silently
fail for the present one. Depending on the dnsmasq compile time options,
the ipsets or nftsets option will not be added to the dnsmasq config
file.

dnsmasq will try to add the IP addresses to all sets, regardless of the
IP version defined for the set. Adding an IPv6 to an IPv4 set and vice
versa will silently fail.

Signed-off-by: Mathias Kresin <dev@kresin.me>

dnsmasq: support populating nftsets in addition to ipsets

Tell dnsmasq to populate nftsets instead of ipsets, if firewall4 is present in
the system. Keep the same configuration syntax in /etc/config/dhcp, for
compatibility purposes.

Huge thanks to Jo-Philipp Wich for basically writing the function.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>

dnsmasq: obtain nftset ip family from nft

Unfortunately dnsmasq nft is noisy if an attempt to add a mismatched ip address
family to an nft set is made.

Heuristic to guess which ip family a nft set might belong by inferring
from the set name.

In order of preference:

If setname ends with standalone '4' or '6' use that, else
if setname has '4' or '6' delimited by '-' or '_' use that (eg
foo-4-bar) else
If setname begins with '4' or '6' standalone use that.

By standalone I mean not as part of a larger number eg. 24

If the above fails then use the existing nft set query mechanism and if
that fails, well you're stuffed!

With-thanks-to: Jo-Philipp Wich <jo@mein.io> who improved my regexp
knowledge.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>

dnsmasq: specify firewall table for nftset

Permit ipsets to specify an nftables table for the set.  New config
parameter is 'table'.  If not specified the default of 'fw4' is used.

config ipset
	list name 'BK_4,BK_6'
	option table 'dscpclassify'
	option table_family 'ip'
	option family '4'
	list domain 'ms-acdc.office.com'
	list domain 'windowsupdate.com'
	list domain 'update.microsoft.com'
	list domain 'graph.microsoft.com'
	list domain '1drv.ms'
	list domain '1drv.com'

The table family can also be specified, usually 'ip' or 'ip6' else the
default 'inet' capable of both ipv4 & ipv6 is used.

If the table family is not specified then finally a family option is
available to specify either '4' or '6' for ipv4 or ipv6 respectively.

This is all in addition to the existing heuristic that will look in the
nftset name for an ip family clue, or in total desperation, query the
value from the nftset itself.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2022-11-06 19:47:13 +00:00
Mathias Kresin
7cdf74e163 dnsmasq: add uci-defaults script for ipset migration
When running sysupgrade from an existing configuration, move existing
ipset definitions to a dedicated config section. Later on, it will allow
to serve ipset as well as nftable sets from the same configuration.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2022-11-06 19:47:13 +00:00
Kevin Darbyshire-Bryant
bf27d977f0 dnsmasq: bump to 2.87
Bump dnsmasq to 2.87 & refresh patches

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2022-11-06 19:47:13 +00:00
Kuan-Yi Li
f795ecc0dd sdk: use git-src-full to allow Git versioning
$(AUTORELEASE) uses Git log to determine releases and package timestamps.

Base feed is shallow cloned by default in generated SDK, resulting in
an incomplete Git log and therefore different local package versions than
offered upstream.

This patch complements commit 7fae1e5677 by setting the base feed to use
`src-git-full` to solve that.

Signed-off-by: Kuan-Yi Li <kyli@abysm.org>
2022-11-06 17:08:23 +01:00
Alan Luck
aca8bb5cc3 ath79: expand rootfs for DIR-825-B1 with unused space
Expand currently unused flash space to roofs for DIR-825-B1 by using the same
flash space as the old ar71xx big image without moving the caldata.

With some testing this partition is use by the OEM firmware
but if changed is regenerated which allows reverting to OEM firmware

Signed-off-by: Alan Luck <luckyhome2008@gmail.com>
2022-11-06 01:03:16 +01:00
Korey Caro
12cee86989 ath79: add support to TrendNet TEW-673GRU
Add support for the TrendNet TEW-673GRU to ath79.
This device was supported in 19.07.9 but was deprecated with ar71xx.
This is mostly a copy of D-Link DIR-825 B1.
Updates have been completed to enable factory.bin and sysupgrade.bin both.
Code improvements to DTS file and makefile.

Architecture   |  MIPS
Vendor         |  Qualcomm Atheros
bootloader     |  U-Boot
System-On-Chip |  AR7161 rev 2 (MIPS 24Kc V7.4)
CPU/Speed      |  24Kc V7.4 680 MHz
Flash-Chip     |  Macronix MX25L6405D
Flash size     |  8192 KiB
RAM Chip:      |  ProMOS V58C2256164SCI5 × 2
RAM size       |  64 MiB
Wireless       |  2 x Atheros AR922X 2.4GHz/5.0GHz 802.11abgn
Ethernet       |  RealTek RTL8366S Gigabit w/ port based vlan support
USB            |  Yes 2 x 2.0

Initial Flashing Process:
	1) Download 22.03 tew-673gru factory bin
	2) Flash 22.03 using TrendNet GUI

OpenWRT Upgrade Process
	3) Download 22.03 tew-673gru sysupgrade.bin
	4) Flash 22.03 using OpenWRT GUI

Signed-off-by: Korey Caro <korey.caro@gmail.com>
2022-11-06 00:51:58 +01:00
Hauke Mehrtens
6645a019f8 CI: packages.yml: Fix usage of pre-build tools
Activate CONFIG_AUTOREMOVE to match the settings used to build the
pre-build tools. This has to match the pre-build tools to not rebuild
them.

This prevents the tools being rebuild in packages.yml.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-11-06 00:08:09 +01:00
Linos Giannopoulos
78110c3b5f ramips: add support for TP-Link MR600 V2(EU)
MR600 V2(EU) is an LTE router that also supports 4G+ band aggregation
etc. and can reportedly achieve higher bandwidth with it.

- Specifications:

* SoC: Mediatek MT7621DAT 880MHz
* RAM: 128MB DDR3
* Flash: 16MB SPI NOR flash (GD25Q128C)
* LTE Modem: Qualcomm MDM9240
* WiFi 5GHz: Mediatek MT7613BEN
* WiFi 2.4GHz: Mediatek MT7603EN
* Ethernet: MT7530, 4x 1000Base-T.
* UART: Serial console (115200 8n1), J1(GND:3)
* Buttons: Reset, WPS.
* LED: Power, WAN, LTE, WiFi 2GHz and 5GHz, LAN, Signal1, Signal2,
  Signal3

- MAC Addresses:

OEM firmware configuration:
54:af:97:xx:xx:7b : 2.4G
54:af:97:xx:xx:7a : 5G
54:af:97:xx:xx:7c : LTE
54:af:97:xx:xx:7b : LAN (label)
54:af:97:xx:xx:7c : WAN

- Installation:

1. Download the OpenWrt initramfs-image.

Place it into a TFTP server root directory and rename it to openwrt.img
Configure the TFTP server to listen at 192.168.0.5/24.

3. Connect to the serial console.

Attach power and interrupt the boot procedure when prompted (type `tpl`).

Credentials are admin / 1234

4. Configure U-Boot for booting OpenWrt from ram

 $ tftpboot
 $ bootm

5. Transfer the OpenWrt sysupgrade image to the device.

- LTE:

In order to setup the wwan0 interface:
1. Add a `qmi` proto interface under `/etc/config/network`, e.g.:
```
config interface 'wwan0'
        option device '/dev/cdc-wdm0'
        option proto 'qmi'
        option pincode 'XXXX'
        option apn 'your_isp_apn'
```

2. Add `wwan0` interface to the `wan` firewall zone
3. `/etc/init.d/network restart`

Signed-off-by: Linos Giannopoulos <linosgian00@gmail.com>
2022-11-05 23:13:16 +01:00
Shiji Yang
f7f9203854 ramips: add support for SIM SIMAX1800T and Haier HAR-20S2U1
SIM AX18T and Haier HAR-20S2U1 Wi-Fi6 AX1800 routers are designed based
on Tenbay WR1800K. They have the same hardware circuits and u-boot.
SIM AX18T has three carrier customized models: SIMAX1800M (China Mobile),
SIMAX1800T (China Telecom) and SIMAX1800U (China Unicom). All of these
models run the same firmware.

Specifications:
 SOC:      MT7621 + MT7905 + MT7975
 ROM:      128 MiB
 RAM:      256 MiB
 LED:      status *3 R/G/B
 Button:   reset *1 + wps/mesh *1
 Ethernet:      lan *3 + wan *1 (10/100/1000Mbps)
 TTL Baudrate:  115200
 TFTP Server:   192.168.1.254
 TFTP IP:       192.168.1.28 or 192.168.1.160 (when envs is broken)

MAC Address:
 use        address               source
 label      30:xx:xx:xx:xx:62     wan
 lan        30:xx:xx:xx:xx:65     factory.0x8004
 wan        30:xx:xx:xx:xx:62     factory.0x8004 -3
 wlan2g     30:xx:xx:xx:xx:64     factory.0x0004
 wlan5g     32:xx:xx:xx:xx:64     factory.0x0004 set 7th bit

TFTP Installation (initramfs image only & recommend):
1. Set local tftp server IP: 192.168.1.254 and NetMask: 255.255.255.0
2. Rename initramfs-kernel.bin to "factory.bin" and put it in the root
   directory of the tftp server. (tftpd64 is a good choice for Windows)
3. Start the TFTP server, plug in the power supply, and wait for the
   system to boot.
4. Backup "firmware" partition and rename it to "firmware.bin", we need
   it to back to stock firmware.
5. Use "fw_printenv" command to list envs.
   If "firmware_select=2" is observed then set u-boot enviroment:
   /# fw_setenv firmware_select 1
6. Apply sysupgrade.bin in OpenWrt LuCI.

Web UI Installation:
1. Apply update by uploading initramfs-factory.bin to the web UI.
2. Use "fw_printenv" command to list envs.
   If "firmware_select=2" is observed then set u-boot enviroment:
   /# fw_setenv firmware_select 1
3. Apply squashfs-sysupgrade.bin in OpenWrt LuCI.

Recovery to stock firmware:
a. Upload "firmware.bin" to OpenWrt /tmp, then execute:
   /# mtd -r write /tmp/firmware.bin firmware
b. We can also write factory image "UploadBrush-bin.img" to firmware
   partition to recovery. Upload image file to /tmp, then execute:
   /# mtd erase firmware
   /# mtd -r write /tmp/UploadBrush-bin.img firmware

How to extract stock firmware image:
  Download stock firmware, then use openssl:
  openssl aes-256-cbc -d -salt -in [Downloaded_Firmware] \
  -out "firmware.tar.tgz" -k QiLunSmartWL

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2022-11-05 22:38:01 +01:00