52740 Commits

Author SHA1 Message Date
Sander Vanheule
a7c0c9bb7e ramips: mt7621: add TP-Link EAP235-Wall support
The TP-Link EAP235-Wall is a wall-mounted, PoE-powered AC1200 access
point with four gigabit ethernet ports.

When connecting to the device's serial port, it is strongly advised to
use an isolated UART adapter. This prevents linking different power
domains created by the PoE power supply, which may damage your devices.

The device's U-Boot supports saving modified environments with
`saveenv`. However, there is no u-boot-env partition, and saving
modifications will cause the partition table to be overwritten. This is
not an issue for running OpenWrt, but will prevent the vendor FW from
functioning properly.

Device specifications:
* SoC: MT7621DAT
* RAM: 128MiB
* Flash: 16MiB SPI-NOR
* Wireless 2.4GHz (MT7603EN): b/g/n, 2x2
* Wireless 5GHz (MT7613BEN): a/n/ac, 2x2
* Ethernet: 4× GbE
  * Back side: ETH0, PoE PD port
  * Bottom side: ETH1, ETH2, ETH3
* Single white device LED
* LED button, reset button (available for failsafe)
* PoE pass-through on port ETH3 (enabled with GPIO)

Datasheet of the flash chip specifies a maximum frequency of 33MHz, but
that didn't work. 20MHz gives no errors with reading (flash dump) or
writing (sysupgrade).

Device mac addresses:
Stock firmware uses the same MAC address for ethernet (on device label)
and 2.4GHz wireless. The 5GHz wireless address is incremented by one.
This address is stored in the 'info' ('default-mac') partition at an
offset of 8 bytes.
From OEM ifconfig:
    eth     a4:2b:b0:...:88
    ra0     a4:2b:b0:...:88
    rai0    a4:2b:b0:...:89

Flashing instructions:
* Enable SSH in the web interface, and SSH into the target device
* run `cliclientd stopcs`, this should return "success"
* upload the factory image via the web interface

Debricking:
U-boot can be interrupted during boot, serial console is 57600 baud, 8n1
This allows installing a sysupgrade image, or fixing the device in
another way.
* Access serial header from the side of the board, close to ETH3,
  pin-out is (1:TX, 2:RX, 3:GND, 4:3.3V), with pin 1 closest to ETH3.
* Interrupt bootloader by holding '4' during boot, which drops the
  bootloader into its shell
* Change default 'serverip' and 'ipaddr' variables (optional)
* Download initramfs with `tftpboot`, and boot image with `bootm`
    # tftpboot 84000000 openwrt-initramfs.bin
    # bootm

Revert to stock:
Using the tplink-safeloader utility from the firmware-utils package,
TP-Link's firmware image can be converted to an OpenWrt-compatible
sysupgrade image:
  $ ./staging_dir/host/bin/tplink-safeloader -B EAP235-WALL-V1 \
      -z EAP235-WALLv1_XXX_up_signed.bin -o eap235-sysupgrade.bin

This can then be flashed using the OpenWrt sysupgrade interface. The
image will appear to be incompatible and must be force flashed, without
keeping the current configuration.

Known issues:
- DFS support is incomplete (known issue with MT7613)
- MT7613 radio may stop responding when idling, reboot required.
  This was an issue with the ddc75ff704 version of mt76, but appears to
  have improved/disappeared with bc3963764d.
  Error notice example:
  [ 7099.554067] mt7615e 0000:02:00.0: Message 73 (seq 1) timeout

Hardware was kindly provided for porting by Stijn Segers.

Tested-by: Stijn Segers <foss@volatilesystems.org>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
(cherry picked from commit 1e75909a35a2b361cdfdfcf18a26ad61271b174e)
2021-02-19 20:09:28 +01:00
Stijn Segers
425c4c89b0 ramips: remove factory image for TP-Link Archer C20 v1
Similarly to the Archer C2 v1, the Archer C20 v1 will brick when one
tries to flash an OpenWrt factory image through the TP-Link web UI.
The wiki page contains an explicit warning about this [1].

Disable the factory image altogether since it serves no purpose.

[1] https://openwrt.org/toh/tp-link/tp-link_archer_c20_v1#installation

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
(cherry picked from commit 0265cba40ad4f2b8ff4473ada123c35b53ffd97a)
2021-02-19 20:09:28 +01:00
Chuck
2908424223
autocore: optimize the performance of obtaining CPU usage
Preformance Test (on NanoPi R2s, repeat 1000 times):

old command

cpu_usage=$(expr 100 - $(cat /tmp/top_tmp | grep 'CPU:' | awk -F '%' '{print$4}' | awk -F ' ' '{print$2}'))

```
real    0m 14.25s
user    0m 7.96s
sys     0m 20.33s
```

new command

cpu_usage=$(cat /tmp/top_tmp | awk '/^CPU/ { printf("%d%%", 100 - $8) }')

```
real    0m 6.91s
user    0m 4.29s
sys     0m 6.06s
```

Signed-off-by: Chuck <fanck0605@qq.com>
[adjusted for our own tree]
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-20 00:23:40 +08:00
Chuck
6ada9d5252
autocore: optimize the performance of obtaining CPU temperature
Preformance Test (on NanoPi R2s, repeat 1000 times):

old command:

temp="$(awk "BEGIN{printf (\"%.1f\n\",$(cat /sys/class/thermal/thermal_zone0/temp)/1000) }")°C"

```
real    0m 9.20s
user    0m 3.29s
sys     0m 6.24s
```

new command:

temp="$(awk '{ printf("%.1f °C", $0 / 1000) }' /sys/class/thermal/thermal_zone0/temp)"

```
real    0m 5.57s
user    0m 1.78s
sys     0m 3.97s
```

Signed-off-by: Chuck <fanck0605@qq.com>
[adjusted for our own tree]
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-20 00:06:58 +08:00
AmadeusGhost
83755a6551
rtl8821cu: fix build on x86 platform
Fix: #286
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-19 23:49:12 +08:00
fliaping
88cef45701
ddns-scripts_dnspod: fix updating records for dual-stack domain
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-19 23:44:03 +08:00
CN_SZTL
3d094c7562
luci-app-argon-config: add ACL dependency annotations
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-19 23:06:48 +08:00
CN_SZTL
b5fc0085a6
luci-app-turboacc: fix ACL dependencies
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-19 23:01:56 +08:00
CN_SZTL
371eb31ee0
luci-app-cpufreq: add ACL dependency annotations
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-19 23:01:32 +08:00
Álvaro Fernández Rojas
c74df745fd bcm63xx: update ethernet kernel panics fix
Use new patch from Sieng Piaw Liew.

Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry-picked from commit 31a06f8fcc)
2021-02-19 13:19:59 +01:00
CN_SZTL
f75476b5ea
xray-plugin: add new package
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-19 20:02:36 +08:00
Álvaro Fernández Rojas
6a4dcb4719 cypress-firmware: fix PKG_SOURCE_URL
Download link has been moved.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry-picked from commit 7febba3e50)
2021-02-19 11:09:28 +01:00
xiaorouji
ce10c8d633
luci-app-passwall: sync with upstream source
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-19 17:27:29 +08:00
CN_SZTL
75d3358592
luci-app-wrtbwmon: rollback to old version
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-19 17:21:36 +08:00
CN_SZTL
7e6311d483
Merge Official Source
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-19 17:14:56 +08:00
Álvaro Fernández Rojas
a7c4d94342 bcm27xx: add diag LEDs
We can now use the power LED for diag in more devices thanks to the latest
patches from the RPi foundation.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry-picked from commit 5bab472a11)
2021-02-19 08:11:07 +01:00
Álvaro Fernández Rojas
9e2acdbccd bcm27xx: bcm2708: add missing RPi B DTS file
RPI 1B DTS has been splitted into 2 files:
 - bcm2708-rpi-b.dts: Newest (rev2) RPI 1B
 - bcm2708-rpi-b-rev1.dts: Old (rev1) RPI 1B

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry-picked from commit 0aaa2cce1c)
2021-02-19 08:10:32 +01:00
Álvaro Fernández Rojas
1c22b7a1f2 bcm27xx: add support for RPI CM4 and RPI 400
Support added to bcm2709 (32 bits) and bcm2711 (64 bits).

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry-picked from commit 8ad61118fd)
2021-02-19 07:19:46 +01:00
Álvaro Fernández Rojas
2e3983e387 bcm27xx-userland: update to latest version
Adds some fixes and removes upstreamed patch.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry-picked from commit 1d3a9b1c00)
2021-02-19 07:18:56 +01:00
Álvaro Fernández Rojas
be423be931 bcm27xx-gpu-fw: update to latest version
This is needed to add support for CM4 and RPI 400.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry-picked from commit f41e653da9)
2021-02-19 07:18:23 +01:00
Álvaro Fernández Rojas
62b7f5931c bcm27xx: import latest patches from the RPi foundation
bcm2708: boot tested on RPi B+ v1.2
bcm2709: boot tested on RPi 3B v1.2 and RPi 4B v1.1 4G
bcm2710: boot tested on RPi 3B v1.2
bcm2711: boot tested on RPi 4B v1.1 4G

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry-picked from commit f07e572f64)
2021-02-19 07:17:21 +01:00
John Audia
76d1168d0d kernel: bump 5.4 to 5.4.99
Ran update_kernel.sh in a fresh clone without any existing toolchains.
No manual changes needed.

Build system: x86_64
Build-tested: bcm27xx/bcm2711

Signed-off-by: John Audia <graysky@archlinux.us>
(cherry-picked from commit 5d3a6fd970)
2021-02-19 07:15:59 +01:00
CN_SZTL
3e0086871e
Merge Official Source
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-19 03:27:56 +08:00
CN_SZTL
a1a16274cb
Revert "package: libs: ncurses/readline use PKG_ABI_VERSION"
This reverts commit f2ee0fb37683ca18ed33d2b0031e539363030ea2.

Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-19 03:27:49 +08:00
Felix Fietkau
cbe4beb442 build: fix ABI version for PROVIDES symbols
GetABISuffix does not work for intra-package ABI version of provided symbols,
since ABIV_$(provided) is not set.
Fix ABI version by using $(ABIV_$(1)) directly

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 0db9d118657d)
2021-02-18 19:58:53 +01:00
CN_SZTL
090ee20a04
Revert "sunxi: add support for FriendlyARM NanoPi R1S H5"
This reverts commit 4102e5c3e9b7aa6f8668a96418628f9701b108ff.

Acked-by: AmadeusGhost <amadeus@project-openwrt.eu.org>
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-19 00:34:54 +08:00
CN_SZTL
c1282d2709
tinyfecVPN: switch git source
As github tarball doesn't include the files of submodules,
so switch to git source to fetch them.

Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-19 00:15:10 +08:00
CN_SZTL
257fa9bfdc
Merge Official Source
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-18 23:25:46 +08:00
AmadeusGhost
d0a55216ec
rtl_wifi: bump to latest git HEAD
Refresh all patches.

Signed-off-by: AmadeusGhost <amadeus@project-openwrt.eu.org>
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-18 23:07:44 +08:00
AmadeusGhost
c989a87e4e
rtl8188eu: add package (not tested)
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-18 23:07:43 +08:00
ElonH
7cd0fe465c
rtl8192: add missing ipv6 header
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-18 23:07:43 +08:00
CN_SZTL
2778bff9de
naiveproxy: backport patch to fix building on OpenWrt x86 platform
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-18 22:53:27 +08:00
AmadeusGhost
08ba2cb772
sunxi: add support for FriendlyARM NanoPi R1S H5
Specification:
  CPU: Allwinner H5, Quad-core Cortex-A53
  DDR3 RAM: 512MB
  Network: 10/100/1000M Ethernet x 2
  WiFi: RTL8189ETV, 802.11b/g/n 1T1R
  USB Host: Type-A x 1
  MicroSD Slot x 1
  MicroUSB: for power input
  Debug Serial Port: 3Pin pin-header
  LED: WAN, LAN, SYS
  KEY: Reset
  Power Supply: DC 5V/2A

Signed-off-by: AmadeusGhost <amadeus@jmu.edu.cn>
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-18 22:27:42 +08:00
CN_SZTL
a206f8a90f
luci-app-wrtbwmon: update Copyright info
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-18 20:16:38 +08:00
CN_SZTL
7d207fd4fe
luci-app-wrtbwmon: sync with upstream source
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-18 20:11:02 +08:00
Mattraks
c7a2362ef7
luci-app-ssr-plus: bug fixes
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-18 19:31:52 +08:00
ShanStone
6c6f6049eb
luci-app-passwall: sync with upstream source
Co-authored-by: xiaorouji <60100640+xiaorouji@users.noreply.github.com>
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-18 19:29:15 +08:00
CN_SZTL
70557e367e
autocore-arm: fix LuCI version display
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-18 19:15:31 +08:00
David Bauer
194e85e7db mediatek: add support for Ubiquiti UniFi 6 LR
Hardware
--------

MediaTek MT7622
512MB DDR3 RAM
64M SPI-NOR Flash (Winbond W25Q512JV)
MediaTek MT7622 802.11bgn 4T4R WMAC
MediaTek MT7915 802.11ax 4T4R
Marvell AQR1112 100/1000/2500 NBase-T PHY
Holtek HT32F52241 LED controller
Reset Switch

UART
----

CPU UART0 at the pinout next to the Holtek MCU.

Pinout (first pin next to SoC / MCU)

0 3V3
1 RX
2 TX
3 GND

Settings are 115200 8N1.

Opening the case
----------------

Opening the case is not a nice task, as itis glued together. Insert a
flat knife between the front and back casing below the ethernet port.
Open up a gap this way and insert a flat scredriver, remove the knife.

Work your way around the casing by applying force to seperate the front
and back casing. This losens the glue and opens the plastic clips. Be
gentle, as these clips are very cheap and break quickly.

Installation
------------

1. Connect to the booted device at 192.168.1.20 using username/password
   "ubnt".

2. Transfer the OpenWrt sysupgrade image to the device using SCP.

3. Check the mtd partition number for bs / kernel0 / kernel1

   $ cat /proc/mtd

4. Set the bootselect flag to boot from kernel0

   $ dd if=/dev/zero bs=1 count=1 of=/dev/mtdblock6

5. Write the OpenWrt sysupgrade image to both kernel0 as well as kernel1

   $ dd if=openwrt.bin of=/dev/mtdblock8
   $ dd if=openwrt.bin of=/dev/mtdblock9

6. Reboot the device. It should boot into OpenWrt.

Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 634c13c186646aff2badb51a43b248825d0fe5a0)
2021-02-18 12:14:34 +01:00
David Bauer
ee6349fbe5 mediatek: add Ubiquiti LED driver
Add a driver for controlling the RGB LED via Ubiquitis own "LEDBAR" LED
controller based on the Holtek HT32F52241 MCU.

This driver is initially used by the Ubiquiti UniFi 6 LR, however
judging from FCC pictures the MCU is also found on the U6-Mesh as well
as the U6-Extender.

Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit c9137e2ddf97ede1db399dc38acff26feb48ba7e)
2021-02-18 12:14:25 +01:00
CN_SZTL
6dc22d68e8
autocore: fix LuCI version display
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-18 19:14:24 +08:00
AmadeusGhost
b585740e27
gotop: update to 4.1.1
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-18 19:08:28 +08:00
AmadeusGhost
4cd8956d70
filebrowser: update to 2.11.0
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-18 19:08:23 +08:00
AmadeusGhost
84c77d84c3
bpytop: update to 1.0.62
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-18 19:08:19 +08:00
CN_SZTL
ce304b746a
include/version: set default distribution name to ImmortalWrt
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-18 19:07:45 +08:00
CN_SZTL
16e89bfbfd
image: rename distribution to ImmortalWrt
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-18 17:49:40 +08:00
CN_SZTL
5d323c38bd
Merge Official Source
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-18 17:16:51 +08:00
Mathias Kresin
0011c7ad12 lantiq: fritz7320: enable USB power supply
The USB ports if a FRIZZ!Box 7320 do not supply power to connected
devices.

Add the GPIOs enabling USB power as regulator, to enable USB power
supply as soon as the USB driver is loaded.

Fixes FS#3624

Signed-off-by: Mathias Kresin <dev@kresin.me>
(cherry picked from commit 6e4e97b2256327bb380ee2a83da9a1ddf657e395)
2021-02-18 00:14:51 +01:00
CN_SZTL
d731735344
r8125: bump to 9.005.01
Enabled RSS support for performance.

Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-17 22:16:08 +08:00
CN_SZTL
4d52077251
Merge Official Source
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-17 19:06:23 +08:00