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>
Tianling Shen [Sat, 23 Sep 2023 07:02:32 +0000 (15:02 +0800)]
uboot-mediatek: add support for CMCC RAX3000M
The OEM U-Boot uses dual boot and signature verification which does not
support by OpenWrt. So add a custom U-Boot build for OpenWrt.
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit
fddd735dd54ded7d26df156eaa8d1cc53e668efb)
Tianling Shen [Sat, 23 Sep 2023 07:00:41 +0000 (15:00 +0800)]
arm-trusted-firmware-mediatek: add emmc/spim-nand ddr4 build for mt7981
They will be used on CMCC RAX3000M.
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit
7d8ffe941dd06a5625f6608516a86938260b01fc)
Mikhail Zhilkin [Sun, 29 Oct 2023 14:51:32 +0000 (14:51 +0000)]
treewide: fix MERCUSYS brand spelling
This commit fixes MERCUSYS brand spelling. The proper name is capitalized.
Link: https://www.mercusys.com/
Link: https://github.com/torvalds/linux/blob/master/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c#L7779
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
(cherry picked from commit
45a50a06fb3f39ea70936dd967a74e6e96f0cd89)
Hauke Mehrtens [Sun, 5 Nov 2023 22:05:24 +0000 (23:05 +0100)]
mbedtls: Activate secp521r1 curve by default
Activate the secp521r1 ecliptic curve by default. This curve is allowed
by the CA/Browser forum, see
https://cabforum.org/wp-content/uploads/CA-Browser-Forum-BR-v2.0.1-redlined.pdf#page=110
This increases the size of libmbedtls12_2.28.5-1_aarch64_generic.ipk by
about 400 bytes:
Without:
252,696 libmbedtls12_2.28.5-1_aarch64_generic.ipk
With:
253,088 libmbedtls12_2.28.5-2_aarch64_generic.ipk
Fixes: #13774
Acked-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit
3c17cdbc369d89ff6a7911c3acff2e493778f6c1)
Petr Štetiar [Mon, 6 Nov 2023 08:52:24 +0000 (08:52 +0000)]
image: fix image generation within ImageBuilder
Changes introduced in commit
d604a07225c5 ("build: add CycloneDX SBOM
JSON support") broke ImageBuilder:
Cannot open '/openwrt-imagebuilder-ath79-generic.Linux-x86_64/tmp/.packageinfo': No such file or directory
So lets fix it by wrapping the BOM generation behind condition of IB
feature check.
Fixes: #13881
Fixes: d604a07225c5 ("build: add CycloneDX SBOM JSON support")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit
c4259a658673cc1a02ed17bfa8e94de17de00ad2)
Koen Vandeputte [Wed, 5 Jul 2023 11:56:16 +0000 (13:56 +0200)]
libnl: add support for cli
Some packages (like wavemon >= 0.9.4) depend on libnl-cli. Add support
for this part of the lib. libnl-cli itself depends on libnl-genl and
libnl-nf. On MIPS, this component adds 81kB.
Signed-off-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
(punctuation correction and reorganisation of commit message)
Signed-off-by: Nick Hainke <vincent@systemli.org>
(cherry picked from commit
4bdd1c1a135b5c816a01055f3cc9fc158bbc840a)
David Bauer [Fri, 3 Nov 2023 21:05:04 +0000 (22:05 +0100)]
mediatek: add label-mac for GL.iNet GL-MT3000
The MAC-address of gmac0 matches the one printed on the bottom label.
Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit
ae500e62e2938e112ae1fc6aa7389e8c7b784b13)
Kevin Darbyshire-Bryant [Tue, 24 Oct 2023 16:21:27 +0000 (17:21 +0100)]
odhcpd: Bump to latest commits
d8118f6 config: make sure timer is not on the timeouts list before freeing
4bbc6e7 add hostsfile output in addition to statefile
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
(cherry picked from commit
0221b860321ca2dd2bdc6339c01aa9adb3ddb34e)
Nicolò Veronese [Mon, 2 Oct 2023 20:17:09 +0000 (22:17 +0200)]
uboot-mediatek: fix global pll clock override on mtk_spim
With patch 101-03-spi-mtk_spim-get-spi-clk-rate-only-once.patch
a new system to calculate the SPI clocks has been added.
Unfortunately, the do_div macro overrides the global
priv->pll_clk_rate field. This will cause to have a reduced
clock rate on each subsequent SPI call.
Signed-off-by: Valerio 'ftp21' Mancini <ftp21@ftp21.eu>
Signed-off-by: Nicolò Veronese <nicveronese@gmail.com>
(cherry picked from commit
8849ccb9957e69d85c93ad4b58400573a181ad18)
Sandro Jäckel [Wed, 1 Nov 2023 15:49:20 +0000 (16:49 +0100)]
build: fix pkg-config detection when inside of a nix-shell
The output of command_all when inside a nix-shell looks like the below
where /usr does not match:
➜ scripts/command_all.sh pkg-config
/nix/store/ifr6srqgpvygd5vp14748d109ri31isv-pkg-config-wrapper-0.29.2/bin/pkg-config
Signed-off-by: Sandro Jäckel <sandro.jaeckel@gmail.com>
(cherry picked from commit
86ca7199dfb132042ce3110acef23d74f4ef14a7)
Petr Štetiar [Thu, 19 Oct 2023 04:09:25 +0000 (04:09 +0000)]
ci: add workflow for automated GitHub release
Implement a GitHub Actions workflow for automated project releases.
The workflow triggers on Git tags, ensuring that a GitHub release is
created whenever a new tag is pushed.
That new release is going to be created in draft and pre-release mode
and needs to be manually promoted to the proper release, once its
decided, that its good enough and prepared.
This is a start of a streamlined and consistent release process for
GitHub, reducing manual intervention.
Acked-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit
280d9dd75874ef4c4e2407366eda987cda8efd25)
Petr Štetiar [Fri, 27 Oct 2023 07:37:52 +0000 (07:37 +0000)]
hostapd: fix broken WPS on broadcom-wl and ath11k
Upgrading wpa_supplicant from 2.9 to 2.10 breaks broadcom-wl/ath11k
based adapters. The reason for it is hostapd tries to install additional
IEs for scanning while the driver does not support this.
The kernel indicates the maximum number of bytes for additional scan IEs
using the NL80211_ATTR_MAX_SCAN_IE_LEN attribute. Save this value and
only add additional scan IEs in case the driver can accommodate these
additional IEs.
Bug: http://lists.infradead.org/pipermail/hostap/2022-January/040178.html
Bug-Debian: https://bugs.debian.org/
1004524
Bug-ArchLinux: https://bugs.archlinux.org/task/73495
Upstream-Status: Changes Requested [https://patchwork.ozlabs.org/project/hostap/patch/
20220130192200.10883-1-mail@david-bauer.net]
Reported-by: Étienne Morice <neon.emorice@mail.com>
Tested-by: Étienne Morice <neon.emorice@mail.com>
Signed-off-by: David Bauer <mail@david-bauer.net>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit
6dca88aa4acd60229147628cb920d05a1136666d)
Petr Štetiar [Tue, 24 Oct 2023 08:27:13 +0000 (08:27 +0000)]
build: add CycloneDX SBOM JSON support
CycloneDX is an open source standard developed by the OWASP foundation.
It supports a wide range of development ecosystems, a comprehensive set
of use cases, and focuses on automation, ease of adoption, and
progressive enhancement of SBOMs (Software Bill Of Materials) throughout
build pipelines.
So lets add support for CycloneDX SBOM for packages and images
manifests.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit
d604a07225c5c82b942cd3374cc113ad676a2519)
Petr Štetiar [Thu, 26 Oct 2023 16:11:47 +0000 (16:11 +0000)]
package-dumpinfo,metadata: add ABI version information to package index
There is no standard for ABI versioning, so its not possible to find out
from `libext2fs2`, `libiwinfo20230701` or `libss2` package names if
thats just package name or package name with ABI version included. To
help with the decision, lets make ABI version aviable in package index.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit
649655f427932fe79b96a41f883c8054b1806191)
Petr Štetiar [Wed, 19 Oct 2022 13:46:45 +0000 (15:46 +0200)]
package-metadata: add CPE information to JSON package manifests
Common Platform Enumeration (CPE) is a structured naming scheme for
information technology systems, software, and packages.
In order for the information to be processed further, it should also be
available in JSON package manifests.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit
8562c65ff8aae3899cdb190319709500b7651492)
Petr Štetiar [Wed, 19 Oct 2022 13:43:37 +0000 (15:43 +0200)]
package-dumpinfo: add CPE information to package index
Common Platform Enumeration (CPE) is a structured naming scheme for
information technology systems, software, and packages.
In order for the information to be processed further, it should also be
available in package index files.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit
33b3fea70245068030ef64b6d7c5b344d08ba9d8)
Felix Fietkau [Fri, 1 Sep 2023 12:00:47 +0000 (14:00 +0200)]
firewall4: update to the latest version
23a434d0d15d tests: fix expected test output
840ccdeeabce fw4: avoid emitting invalid rule jump targets
20da9933fd7e fw4: fix another instance of invalid rule jump targets
598d9fbb5179 fw4: remove special cases around hw flow offloading
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit
7049ea9e95b0aec461f585523b773e68db3ae304)
Jo-Philipp Wich [Thu, 2 Nov 2023 09:36:05 +0000 (10:36 +0100)]
ucode: update to latest Git HEAD
cfb24ea build: avoid redefining _FORTIFY_SOURCE
448c763 lib: enforce consistent `index()` behavior with empty needle argument
cdc0203 nl80211: fix maybe uninitialized variable
a69b5c8 vm: fix unused result warning
ea046bd build: enable source fortification by default
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit
262554f12cbcc4e3bea2440ce1e696ce8791e732)
Felix Fietkau [Sat, 28 Oct 2023 12:58:46 +0000 (14:58 +0200)]
ucode: fix build on macos
Remove ABI version, since its format is not accepted by the linker.
Enable rpath to avoid clash with system libraries
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit
5eb8a21ba5fe5e87c03f0361d1db989189be9c6d)
Jo-Philipp Wich [Thu, 26 Oct 2023 22:15:58 +0000 (00:15 +0200)]
ucode: update to latest Git HEAD
- Introduces signal handling facilities
- Fixes potentially incorrect object equality tests
- Introduces debug library
- Introduces log library
- ABI version bump due to changed VM structure layout
- Revised packaging
Changelog:
07c0317 jsdoc: switch to own custom theme
6ca08b0 jsdoc: properly handle indented documentation blocks
2a67f22 lib: add/improve documentation for require(), loadfile(), loadstring()
9993ccb uci: fix potential memory leaks in `configs()`
f56394f ci: re-trigger workflows on pull request pushes
1c18993 lib: various documentation fixes
d25dcb1 uci: add module documentation
4a8ece2 docs: use CSS and local JavaScript fixups to improve formatting
8f21cfa lib: introduce log library
8a3aefe build: auto-enable module depending on present libraries
6a01adc build: convert CMakeLists.txt into lowercase
8700665 ci: don't skip pull request workflows for `master` branch
0184d23 include: fix execvpe compat function on macOS
8b23884 uloop: rename environ variable to avoid clashing with system macro on macOS
7c209d7 types: ensure double serializatiion with decimal places
d150425 rtnl: update the link attr TODOs
d394174 rtnl: add IFLA_TARGET_NETNSID for operating in other namespaces
1227733 lib: fix documented return value for `splice()`
c9982de docs: add struct module documentation
7dde493 docs: add missing headline to debug module documentation
8f852ea types: improve comparison reliability of binary strings
6940c28 lib: introduce debug library
be07107 treewide: consolidate platform specific code in platform.c
2593270 uloop: interrupt on VM signals
97a5292 lib: add `signal()` stdlib function
1dbbb6a main: enable signal dispatching in the standalone cli interpreter
1623245 types: treat signal handler array as GC root
29b1c0d vm: introduce basic signal handling infrastructure
093684d fs: explicitly compare isatty() result
4f4f38f types: don't rely on implicit type conversion in ucv_compare()
4bee0ef docs: disable GitHub Jekyll post processing
5efb7a0 docs: further rework
33bc7bf docs: fix markup quirks
9d5e420 docs: add information about memory management and operator precedence
f1190ef docs: various improvements
f0cc841 fs: use `fseeko()` and `ftello()`
cba0c3c fs: complete function documentation coverage
f9260f7 github: drop superfluous CNAME file
c85bc74 Create CNAME
5309294 lib: add JSDoc documentation
b0f2f90 fs: add JSDoc documentation
fe086da math: add JSDoc documentation
70f9348 docs: add initial JSDoc infrastructure
24f1a56 source: fix source offset accounting
9df9160 lexer: don't count EOF token as newline
b9d8f06 ci: switch to official openwrt/gh-action-sdk
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit
eacc885816fb46bf4054b0c3dd2cd1513322ad09)
Rafał Miłecki [Thu, 2 Nov 2023 08:08:54 +0000 (09:08 +0100)]
bcm53xx: add the latest fix version of brcm_nvram
It was just sent for upstream.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit
943bd3c9f6244c928cd168302d638a6a218fd4e6)
Rafał Miłecki [Tue, 31 Oct 2023 16:09:45 +0000 (17:09 +0100)]
kernel: fix mtd/NVMEM regression affecting U-Boot env NVMEM driver
Fixes: 20736013e910 ("kernel: backport nvmem v6.6 fixes and v6.7 changes")
Fixes: https://github.com/openwrt/openwrt/issues/13831
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit
c997634c017294cb38cf6f9a0112860c7e736a53)
Rafał Miłecki [Sat, 28 Oct 2023 12:07:40 +0000 (14:07 +0200)]
kernel: backport nvmem v6.6 fixes and v6.7 changes
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit
b5956700702b5649ec70bfa0d115af5b439ce6d1)
Rafał Miłecki [Wed, 30 Aug 2023 22:28:58 +0000 (00:28 +0200)]
kernel: backport v6.6 nvmem changes
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit
52c365f055f62eb820cc42b0a1cfd037c68b01d0)
Rafał Miłecki [Thu, 13 Jul 2023 17:39:42 +0000 (19:39 +0200)]
kernel: nvmem: fix "fixed-layout" & support "mac-base"
DT binding for MAC cells in fixed layout was upstream approved and
accepted. Add support for it. This can replace quite some of our
downstream hacks.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit
61f674df4f0ce2b1c53b0b7f6b0c1d03d99838c0)
Hauke Mehrtens [Wed, 1 Nov 2023 21:10:46 +0000 (22:10 +0100)]
urngd: update to version 2023-11-01
Fix compilation with glibc
44365eb Deactivate _FORTIFY_SOURCE in jitterentropy-base.c
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit
d62726b1e44f785d543e4625b19ca1f628adda6c)
Jianhui Zhao [Fri, 20 Oct 2023 03:59:34 +0000 (11:59 +0800)]
uboot-mediatek: fix determine the size of an uImage.FIT using 'imsz' or 'imszb'.
It must read the entire image for previous code of 'imsz' or 'imszb'.
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
Suggested-by: Chuanhong Guo <gch981213@gmail.com>
(cherry picked from commit
3bbc1d5fba1d700917138334a48c16bafdf48de9)
Daniel Golle [Tue, 12 Sep 2023 23:57:49 +0000 (00:57 +0100)]
mediatek: add build for MT7981 RFB
Add build for the MTK3943 reference board for MT7981B+MT7976C.
**Hardware specification:**
- SoC: MediaTek MT7981B 2x A53
- Flash: various options
- RAM: 256MB DDR3
- Ethernet: 4 x 10/100/1000 Mbps via MT7531AE switch
EITHER 1 x 10/100/1000 Mbps built-in PHY
OR 1 x 10/100/1000/2500 Mbps MaxLinear GPY211C
- Switch: MediaTek MT7531AE
- WiFi: MediaTek MT7976C
- Button: RST, WPS
**Flash instructions for SPIM-NAND:**
- write *mt7981-rfb-spim-nand-preloader.bin to 'BL2' partition
- write *mt7981-rfb-spim-nand-bl31-uboot.fip to 'FIP' partition
- erase 'ubi' partition
- reset board
- create ubootenv and ubootenv2 UBI volumes in U-Boot
- edit environment and set bootcmd, e.g.
setenv bootconf 'config-1#mt7981-rfb-spim-nand#mt7981-rfb-mxl-2p5g-phy-eth1'
setenv bootcmd 'ubi read $loadaddr fit; bootm $loadaddr#$bootconf'
- load initramfs image via TFTP:
setenv serverip 192.168.1.254
setenv ipaddr 192.168.1.1
setenv bootfile openwrt-mediatek-filogic-mediatek_mt7981-rfb-initramfs.itb
saveenv ; saveenv
tftpboot
bootm $loadaddr#$bootconf
- Now use sysupgrade to write OpenWrt firmware to flash.
SNFI-NAND, SPIM-NOR and eMMC all work very similar, a bootable SD card image
is also being generated. However, as the board I've been provided only comes
with SPIM-NAND all other boot media are untested.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit
ce7209bd21661e3daa4a7f2f58dafdff990da19f)
Daniel Golle [Tue, 12 Sep 2023 23:57:23 +0000 (00:57 +0100)]
uboot-mediatek: add build for mt7981 rfb
Improve and package builds for various boot media configurations of the
MediaTek MT7981 reference board.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit
8428bed15d9b5a71a634c7f5639de31a09795bec)
Daniel Golle [Mon, 18 Sep 2023 15:40:30 +0000 (16:40 +0100)]
arm-trusted-firmware-mediatek: fix copy&paste error in Makefile
When adding builds for MT7981 the related Makefile sections for MT7986
have apparently been copied, but in one instance the rename from 7986 to
7981 has been omitted. Fix that now.
Fixes: 602cb4f325 ("arm-trusted-firmware-mediatek: add build for MT7981 DDR3")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit
be6e257fe6a248425fd390e9a2037a8432e644ea)
Daniel Golle [Mon, 11 Sep 2023 21:49:59 +0000 (22:49 +0100)]
kernel: serial: 8250_mtk: track busclk state to avoid bus error
UARTs not used as boot console are currently broken on some MediaTek
targets due to register access depending on the bus clock being enabled.
Add patch to make sure this dependency is always met.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit
9f62abbb60b849c710cc7e40498d661827e8f852)
David Bauer [Tue, 24 Oct 2023 01:07:48 +0000 (03:07 +0200)]
hostapd: fix OWE association with mbedtls
The code for hostapd-mbedtls did not work when used for OWE association.
When handling association requests, the buffer offsets and length
assumptions were incorrect, leading to never calculating the y point,
thus denying association.
Also when crafting the association response, the buffer contained the
trailing key-type.
Fix up both issues to adhere to the specification and make
hostapd-mbedtls work with the OWE security type.
Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit
39341f422f895a37b405b753c3630b1bdc9b8c6e)
Mikhail Zhilkin [Sun, 29 Oct 2023 19:10:23 +0000 (19:10 +0000)]
ramips: enable wireless LEDs activity blinking for TP-Link EC330-G5u v1
This commit enables wireless LEDs activity blinking for TP-Link EC330-G5u
v1 router.
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
(cherry picked from commit
7666940efea27c7d16bb0e329bb5dd7117fb5807)
Felix Fietkau [Mon, 30 Oct 2023 17:32:24 +0000 (18:32 +0100)]
hostapd: do not trim trailing whitespace, except for newline
Fixes adding SSID or key with trailing whitespace
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit
a2d8226c4f45555f49542d6f047b70d44f23f7ec)
Shiji Yang [Fri, 14 Jul 2023 15:09:55 +0000 (23:09 +0800)]
ath79: increase the rfkill debounce interval for TP-Link Archer C7 v2
Due to circuit issue or silicon defect, sometimes the WiFi switch button
of the Archer C7 v2 can be accidentally triggered multiple times in one
second. This will cause WiFi to be unexpectedly shut down and trigger
'irq 23: nobody cared'[1] warning. Increasing the key debounce interval
to 1000 ms can fix this issue. This patch also add the missing rfkill
key label.
[1] Warning Log:
```
[87765.218511] irq 23: nobody cared (try booting with the "irqpoll" option)
[87765.225331] CPU: 0 PID: 317 Comm: irq/23-keys Not tainted 5.15.118 #0
...
[87765.486246] handlers:
[87765.488543] [<
85257547>] 0x800c29a0 threaded [<
5c6328a2>] 0x80ffe0b8 [gpio_button_hotplug@
4cf73d00+0x1a00]
[87765.498364] Disabling IRQ #23
```
Fixes: https://github.com/openwrt/openwrt/issues/13010
Fixes: https://github.com/openwrt/openwrt/issues/12167
Fixes: https://github.com/openwrt/openwrt/issues/11191
Fixes: https://github.com/openwrt/openwrt/issues/7835
Tested-by: Hans Hasert
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
(cherry picked from commit
e32f70e7066c3110694851eced3301f50019693b)
Shiji Yang [Tue, 26 Sep 2023 12:12:45 +0000 (20:12 +0800)]
ramips: fix Gigabit Ethernet port of the HiWiFi HC5861
HiWiFi HC5861 has a GbE port which connected to the RTL8211E PHY
chip. This patch adds the missing Realtek PHY driver package and
sets the correct external PHYs base address to make it work again.
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
(cherry picked from commit
f025135f16e2b3e9398cfd87585d055a1ca31975)
Anari Jalakas [Sat, 14 Oct 2023 12:18:34 +0000 (15:18 +0300)]
iptables: opt-out of lto usage
This fixes building with USE_LTO enabled.
<artificial>:(.text+0xc22): relocation R_MIPS16_26 against `libxt_DNAT_init' cannot be used when making a shared object; recompile with -fPIC
./openwrt/staging_dir/toolchain-mips_24kc_gcc-12.3.0_musl/lib/gcc/mips-openwrt-linux-musl/12.3.0/../../../../mips-openwrt-linux-musl/bin/ld.bfd: non-dynamic relocations refer to dynamic symbol printf
./openwrt/staging_dir/toolchain-mips_24kc_gcc-12.3.0_musl/lib/gcc/mips-openwrt-linux-musl/12.3.0/../../../../mips-openwrt-linux-musl/bin/ld.bfd: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status
Signed-off-by: Anari Jalakas <anari.jalakas@gmail.com>
(cherry picked from commit
5dbdf3bb3af27993977aaaa72dca07d9251c1919)