The gmac1 is not used and doesn't have any mac address configured. The
gmac0 has the nvmem-cells set and can actually be used to retrieve the
correct mac address.
Fixes: c7c54f3134 ("ramips: add support for Plasma Cloud PAX1800-Lite")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Link: https://github.com/openwrt/openwrt/pull/23441
Signed-off-by: Robert Marko <robimarko@gmail.com>
This allows us to use the full size of nand, which increases ubi size
from 90M to 122.25M.
Flashing instructions:
1. Login into the device and backup all your partitions,
especially `Factory` and 'HW' to be able to come back to stock and use all
Wavlink services.
2. Unlock mtd partitions:
```
apk update && apk add kmod-mtd-rw
insmod mtd-rw i_want_a_brick=1
```
3. Upload new `bl2` and `fip` to the router /tmp and write them:
```
mtd write /tmp/openwrt-mediatek-filogic-wavlink_wl-wnt100x3-ubootmod-preloader.bin bl2
mtd write /tmp/openwrt-mediatek-filogic-wavlink_wl-wnt100x3-ubootmod-bl31-uboot.fip fip
mtd erase ubi
```
4. Set static IP on your PC:
IP 192.168.1.254/24, 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 initramfs has booted, prepare ubi and envs:
```
ubidetach -p /dev/mtd4 && ubiformat /dev/mtd4 -y && ubiattach -p /dev/mtd4 && ubimkvol /dev/ubi0 -n 0 -N ubootenv -s 128KiB && ubimkvol /dev/ubi0 -n 1 -N ubootenv2 -s 128KiB
```
8. Perform sysupgrade.
Signed-off-by: Fil Dunsky <filipp.dunsky@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22753
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Hardware
--------
- SOC: MediaTek MT7981B
- RAM: 512MB DDR3
- FLASH: 128MB SPI-NAND ESMT F50L1G41LB
- NETWORK: 1 x1000M WAN, 1 x 1000M LAN
- WIFI: MediaTek MT7981B 2x2 DBDC 802.11ax 2T2R (2.4/5)
- LEDs: 1x STATUS (blue)
- USB: 1x USB 3.0 (XHCI)
- FAN: 1x 5V FAN
Installation / Upgrade Procedure
-----------------------------
1.Log in to the web management page.
2.Select the country code and time zone, set the Wi-Fi password, and
click Save.
3.Click "More", navigate to "Developer Options", and enable the SSH
function.
4.Log in to the device via an SSH client (default IP is usually
192.168.20.1).
5.Use scp to upload the OpenWrt
image(openwrt-mediatek-filogic-wavlink_wl-wnt100x3-squashfs-sysupgrade.bin)
to the /tmp directory
6.Perform the flash by running the sysupgrade command (use -n to
overwrite the existing configuration)
7.Wait for the device to reboot automatically. Once finished, access the
OpenWrt web interface (LuCI) at the default IP 192.168.1.1.
MAC Addresses
-----------------------------
2.4GHz: 80:3F:5D:xx:xx:93 (Factory 0x4)
LAN : 80:3F:5D:xx:xx:91 (Factory, 0x3fff4)
WAN : 80:3F:5D:xx:xx:92 (Factory, 0x3fffa)
5GHz : 02:3F:5D:xx:xx:93 (derived from 2.4GHz MAC, LAA))
Signed-off-by: Fil Dunsky <filipp.dunsky@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22753
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Add support for TP-Link Festa F65, an AX3000 ceiling mount WiFi 6 AP.
Hardware
--------
SOC : MediaTek MT7981B 2x A53
RAM : ESMT M15T4G16256A 512MiB
Flash : ESMT F50L1G41LB 128 MiB
ETH : 1x 1GbE
WiFi : MT7976
Buttons : Reset
Leds : Blue status led on top
Power : DC 12V 1.2A / PoE
Installation
------------
1. Disassemble the device
2. Solder UART to pins VGRT right of the ethernet port
3. Connect UART console (3.3V)
4. Press Ctrl+b to stop in u-boot shell
5. Use `mtkload` to boot `openwrt-initramfs-kernel.bin` via tftp
6. Flash `openwrt-squashfs-sysupgrade.bin` via sysupgrade
Revert to OEM firmware
----------------------
1. Hold reset button while plugging in power
2. Configure host ethernet to 192.168.0.1/24
3. Go to http://192.168.0.254
4. Upload OEM firmware
MAC Addresses
-------------
LAN : DC:62:79:xx:xx:28 (printed on label)
2.4GHz: DC:62:79:xx:xx:28
5GHz : DC:62:79:xx:xx:29
Signed-off-by: Leonard Anderweit <leonard.anderweit@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22138
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
| Component | Details |
|------------------|-------------------------------------------------|
| **SoC** | MediaTek MT7986A (4× ARM Cortex-A53 @ 2.0 GHz) |
| **RAM** | 512 MB |
| **Flash** | 256 MB NAND |
| **Ethernet** | 5× 10/100/1000 Mbps (1 WAN + 4 LAN) |
| **WLAN 2.4 GHz** | MediaTek MT7976GN — 802.11b/g/n/ax, 4×4 MIMO |
| **WLAN 5 GHz** | MediaTek MT7976AN — 802.11n/ac/ax, 4×4 MIMO |
| **LEDs** | 1× RGB LED (GPIO-controlled) |
| **Button** | 1× Reset |
| **USB** | Yes |
**MAC Addresses:**
| Interface | Source |
|------------|-------------------------------------------------|
| WAN/Label | u-boot-env MTD partition, "mac" (text) |
| LAN | WAN + 1 |
| 2.4 GHz | WAN + 2 |
| 5 GHz | WAN + 3 |
---
**1. Prepare TFTP server**
Set a static IP on the ethernet interface of your computer (e.g. default: ip `192.168.1.2`, gateway `192.168.1.1`).
Download the initramfs image and host it with the TFTP server.
**2. Interrupt boot**
Attach UART and power on the router. When the boot menu appears, select **Failsafe Mode**,
then press `Ctrl-C` to interrupt and enter the U-Boot prompt.
**3. Load and run initramfs image**
```sh
setenv ipaddr 192.168.1.1
setenv serverip 192.168.1.2
tftpboot 0x46000000 openwrt-mediatek-filogic-jiorouter_ax6000-jidu6101-initramfs-kernel.bin
fdt addr $(fdtcontroladdr)
fdt rm /signature
bootm
```
**4. Flash sysupgrade image**
Place the sysupgrade image in `/tmp`, then run:
```sh
sysupgrade /tmp/openwrt-mediatek-filogic-jiorouter_ax6000-jidu6101-squashfs-sysupgrade.bin
```
Alternatively, use the sysupgrade option in LuCI.
Note:
- The raw MTD u-boot-env partition is only used for MAC address storage, while the active U-Boot environment is stored in the UBI volume.
- These devices ship with secure boot enabled and stock U-Boot only accepts vendor-signed FIT images.
- BL2/FIP cannot be replaced, so the stock signature verification path cannot be disabled directly.
- Setting ipaddr='' forces U-Boot to exit the web failsafe path and continue into autoboot.
- The custom bootcmd loads OpenWrt from the UBI volume and removes the /signature node before bootm, allowing unsigned OpenWrt FIT images to boot.
- Stock U-Boot expects its environment in a UBI volume named u-boot-env, so it is created during initial setup.
Signed-off-by: sh3ikh-faisal <sheikhfaisal713@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22201
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The COMFAST CF-XR186 is a WiFi repeater. The original OEM firmware is a
fork of OpenWrt 21.02.
To replace the OEM firmware with OpenWrt, flash the sysupgrade image
through the firmware upgrade option via the OEM firmware's web UI.
The OEM firmware upgrade page does not provide an option to perform a
factory reset, so after the flash completes and the device reboots,
perform a reset by holding in the WPS/Reset button until the WiFi
LED flashes red.
The led-boot, led-failsafe, led-upgrade, and led-running aliases all
point at the red WLAN GPIO LED.
The green and blue WLAN GPIO LEDs are used to indicate activity on the
2.4GHz and 5GHz radios. 01_leds assigns netdev triggers for those LEDs
to phy0-ap0 and phy1-ap0 respectively; if neither AP interface exists
(e.g. station-only repeater setups), both LEDs stay dark even when WiFi
traffic is flowing.
Specifications:
- SoC: MediaTek MT7981B
- RAM: 256MB
- Flash: SPI NAND
- WiFi: 2.4GHz + 5GHz (AX3000, 4x 3dBi antennas)
- Ethernet: 1x 10/100/1000M
- LEDs: power (not controllable), blue Ethernet, blue/green/red WiFi
- Button: WPS/Reset
- Power: 100-240V AC (wall plug)
- UART: 115200 8N1
MAC Addresses:
- LAN : 40:A5:EF:xx:xx:2D (Factory, 0xe000)
- 2.4GHz: 40:A5:EF:xx:xx:2F (Factory, 0x0004)
- 5GHz : 40:A5:EF:xx:xx:30 (Factory, 0x8000)
Signed-off-by: David Berdik <dgberdik@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22471
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
In case OpenWrt is used to build a custom distribution, the default
button handling logic may be undesired.
Add config options to disable default standard button handling code
at build-time.
Signed-off-by: David Bauer <mail@david-bauer.net>
In case OpenWrt is used to build a custom distribution, the default
button handling logic may be undesired.
Add config options to disable default standard button handling code
at build-time.
Signed-off-by: David Bauer <mail@david-bauer.net>
Specificaitons:
- MediaTek MT7621AT SoC
- 256 MB RAM
- 16MB SPI NOR Flash
- 256MB NAND (split in half for firmware fallback)
- 4x 10/100/1000 Mbps Ethernet, with passive PoE support on LAN1
- WLAN : MediaTek dual-band WiFi 5
- 2.4 GHz : b/g/n, MIMO 2x2
- 5 GHz : n/ac, MIMO 2x2
- Quectel EG060K-EA 4G CAT6 modem
- 2.0 USB Type-A HOST port
- 1x Digital input
- 1x Digital output
- 2x SIM slot (can be swapped via GPIO)
GPIO:
- 1 button (Reset)
- 14 LEDs (power, 4x WAN status, Wifi 2G, Wifi 5G, 3G, 4G, 5x RSSI)
- 3 Modem control (power button, reset, sim select)
- 1 Digital input
- 1 Digital output
Installation
------------
Notice: update OEM firmware to 7.19 or later, earlier versions will
fail to flash openwrt factory firmware.
1. Check from which partition the device is currently running from
$ cat /proc/bootconfig/chosen
In case this output reads rutos-b, install a software update from
Teltonika first. After upgrade completion, check this file now reads
rutos-a before continuing.
2. Download the *-squashfs-factory.bin firmware image
3. Flash firmware image via WEB interface
To revert back to OEM firmware:
https://wiki.teltonika-networks.com/view/Bootloader_menu
Mobile connection:
- EG060K-EA:
Execute AT commands:
echo -ne 'AT+QCFG="usbnet",2\r\n' > /dev/ttyUSB2
echo -ne 'AT+CFUN=1,1\r\n' > /dev/ttyUSB2
Use ModemManager to establish mobile connection.
Signed-off-by: Simonas Tamošaitis <simsasss@gmail.com>
Specifications:
- MediaTek MT7621AT SoC
- 256 MB RAM
- 16MB SPI NOR Flash
- 256MB NAND (split in half for firmware fallback)
- 2x 10/100/1000 Mbps Ethernet, with passive PoE support on LAN
- WLAN : MediaTek dual-band WiFi 5
- 2.4 GHz : b/g/n, MIMO 2x2
- 5 GHz : n/ac, MIMO 2x2
- Quectel RG520N-EB 5G R16 modem (RUTM30) or RG500U-EB 5G (RUTM31)
- 1x Digital input
- 1x Digital output
- 2x SIM slot (can be swapped via AT commands)
- eSIM
- TPM
GPIO:
- 1 button (Reset)
- 3 LEDs (power, 2 RGB)
- 3 Modem control (power button, reset, eSIM switch)
- 1 Digital input
- 1 Digital output
- 1 TPM enable
Installation
------------
Notice: update OEM firmware to 7.19 or later, earlier versions will
fail to flash openwrt factory firmware.
1. Check from which partition the device is currently running from
$ cat /proc/bootconfig/chosen
In case this output reads rutos-b, install a software update from
Teltonika first. After upgrade completion, check this file now reads
rutos-a before continuing.
2. Download the *-squashfs-factory.bin firmware image
3. Flash firmware image via WEB interface
To revert back to OEM firmware:
https://wiki.teltonika-networks.com/view/Bootloader_menu
Mobile connection:
- RG520N-EB:
Use "ModemManager" to establish mobile data connection.
- RG500U-EB:
echo -ne 'AT+QNETDEVCTL=1,3,1\r\n' > /dev/ttyUSB2
Create DHCP interface with usb0 device.
Signed-off-by: Simonas Tamošaitis <simsasss@gmail.com>
Specifications:
- MediaTek MT7621AT SoC
- 256 MB RAM
- 16MB SPI NOR Flash
- 256MB NAND (split in half for firmware fallback)
- 5x 10/100/1000 Mbps Ethernet, with passive PoE support on LAN1
- WLAN : MediaTek dual-band WiFi 5
- 2.4 GHz : b/g/n, MIMO 2x2
- 5 GHz : n/ac, MIMO 2x2
- Quectel RG520N-NA 5G R16 modem (RUTM50) or RG500U-EB 5G (RUTM51)
- 2.0 USB Type-A HOST port
- 1x Digital input
- 1x Digital output
- 2x SIM slot (can be swapped via AT commands)
GPIO:
- 1 button (Reset)
- 13 LEDs (power, 4x WAN status, Wifi 2G, Wifi 5G, 3G, 4G, 5G, RSSI
1,2,3)
- 2 Modem control (power button, reset)
- 1 Digital input
- 1 Digital output
Installation
------------
Notice: update OEM firmware to 7.19 or later, earlier versions will
fail to flash openwrt factory firmware.
1. Check from which partition the device is currently running from
$ cat /proc/bootconfig/chosen
In case this output reads rutos-b, install a software update from
Teltonika first. After upgrade completion, check this file now reads
rutos-a before continuing.
2. Download the *-squashfs-factory.bin firmware image
3. Flash firmware image via WEB interface
To revert back to OEM firmware:
https://wiki.teltonika-networks.com/view/Bootloader_menu
Mobile connection:
- RG520N-NA:
Use "ModemManager" to establish mobile data connection.
- RG500U-EB:
echo -ne 'AT+QNETDEVCTL=1,3,1\r\n' > /dev/ttyUSB2
Create DHCP interface with usb0 device.
Signed-off-by: Simonas Tamošaitis <simsasss@gmail.com>
While implementing standalone PCS support for DSA, it was found that making
the MAC driver passing the available_pcs array is limiting and problematic
for memory handling and allocation. To better handle this, change the logic
and make phylink allocate the struct and make the MAC driver implement a
function in phylink_config .fill_available_pcs to fill the PCS array.
Update the Airoha and Mediatek driver to reflect this new implementation.
Link: https://github.com/openwrt/openwrt/pull/23413
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
The ImageBuilder creates by default all filesystems enabled during it's own
build, which are typically squashfs and sometimes ext4.
This commit allows to set ROOTFS_FILESYSTEM to specify which specific
filesystem should be build (instead of all).
Motivation is to reduce the load on sysupgrade servers but also fix corner
cases where a squashfs filesystem results in a working image while the ext4
image fails, resulting in a ImageBuilder failure.
Signed-off-by: Paul Spooren <mail@aparcar.org>
Add support for Xiaomi AX5400 (RA74).
Specifications:
* SoC: Qualcomm IPQ5018 (64-bit dual-core ARM Cortex-A53 @ 1.0Ghz)
* Memory: Etrontech EM6HE16EWAKG 512 MiB DDR3L-933
* Serial Port: 1v8 TTL 115200n8
* Wi-Fi: IPQ5018 (2x2 2.4 Ghz 802.11b/g/n/ax - up to 574 Mbps)
QCN9024 (4x4 5 Ghz 802.11an/ac/ax - up to 4804 Mbps)
* Ethernet: IPQ5018 integrated virtual switch connected to an
external QCA8337 switch (3 LAN Ports 10/100/1000)
* Flash: Gigadevice GD5F1GQ5REYIG (128 MiB)
* LEDs: 1x System Blue (GPIO 24 Active High)
1x System Yellow (GPIO 25 Active High)
1x WAN Link Blue (GPIO 26 Active High)
1x WAN Link Yellow (GPIO 27 Active High)
* Buttons: 1x Reset (GPIO 38 Active Low)
1x WPS (GPIO 28 Active Low)
* MAC address layout: LAN (eth1): 0:art @ offset 0x0
WAN (eth0): 0:art @ offset 0x6
Flash instructions: (use redmi-ax5400 image for the Redmi AX5400)
Download XMIR Patcher: https://github.com/openwrt-xiaomi/xmir-patcher
First flash a ubinized OpenWrt initramfs that will serve as the intermediate step, since
OpenWrt uses unified rootfs in order to fully utilize NAND and provide enough space for
packages, through either of the below two methods:
Installation via XMIR Patcher:
1. Load the initramfs image: openwrt-qualcommax-ipq50xx-xiaomi_redmi-ax5400-initramfs-factory.ubi
Installation via ubiformat method, through SSH:
1. If needed, enable SSH using XMIR Patcher.
2. Copy the file openwrt-qualcommax-ipq50xx-xiaomi_redmi-ax5400-initramfs-factory.ubi to the /tmp directory
3. Open an SSH shell to the router
4. Check which rootfs partition is your router booted in (0 = rootfs | 1 = rootfs_1):
nvram get flag_boot_rootfs
5. Find the rootfs and rootfs_1 mtd indexes respectively:
cat /proc/mtd
Please confirm if mtd18 and mtd19 are the correct indexes from above!
6. Use the command ubiformat to flash the opposite mtd with UBI image:
If nvram get flag_boot_rootfs returned 0:
ubiformat /dev/mtd19 -y -f /tmp/openwrt-qualcommax-ipq50xx-xiaomi_redmi-ax5400-initramfs-factory.ubi && nvram set flag_boot_rootfs=1 && nvram set flag_last_success=1 && nvram commit
otherwise:
ubiformat /dev/mtd18 -y -f /tmp/openwrt-qualcommax-ipq50xx-xiaomi_redmi-ax5400-initramfs-factory.ubi && nvram set flag_boot_rootfs=0 && nvram set flag_last_success=0 && nvram commit
7. Reboot the device by:
reboot
Continue in order to pernamently flash OpenWrt:
1. Upload the sysupgrade image to /tmp/ using SCP:
scp -O <path to image> root@192.168.1.1:/tmp/
2. Open an SSH shell to 192.168.1.1 from a PC within the same subnet
3. Use sysupgrade to flash the sysupgrade image:
sysupgrade -n -v /tmp/openwrt-qualcommax-ipq50xx-xiaomi_redmi-ax5400-squashfs-sysupgrade.bin
Device will reboot with OpenWrt, and then sysupgrade can be used to upgrade the device when desired.
Signed-off-by: George Moussalem <george.moussalem@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/23374
Signed-off-by: Robert Marko <robimarko@gmail.com>
Commit 6cc149f167 (ipq806x: mr42/mr52: use nvmem for caldata, 2026-02-25)
broke wifi on meraki mr42/52 by making caldata inaccessible.
This commit adds UBI nvmem to ipq806x target and corrects art partition address
Signed-off-by: Aleksander Wałęski <olewales@gmail.com>
The name “aes-lib” is used since kernel 7.0. In kernels 6.12 and 6.18,
the name “aes-generic” is used. This change makes it possible to run
comparative selftests of the generic and hardware implementations.
This will help identify any potential differences in the results.
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/23392
Signed-off-by: Robert Marko <robimarko@gmail.com>
OSLEC has been dropped upstream since Linux 6.16.
Reflect that by no longer providing the kernel module package
`kmod-echo` which essentially became an empty stub.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Add support for the RTL9301-based Zyxel XGS1930-28HP, a 28-port Gigabit
PoE+ switch. The XGS1930 is an EOL Zyxel series of RTL9301-based
switches available with 28 or 52 ports, with and without PoE.
Hardware
========
- RTL9301 SoC
- 512 MiB DDR3 RAM
- 32 MiB SPI-NOR flash
- 24x 10/100/1000M RJ45 ports
- 4x 1G/10G SFP+ cages
- PoE:
- 802.3af/at on all 24 RJ45 ports
- 375 W total power budget
- RTL8231 for port LEDs
- Front LEDs: PWR, SYS, CLOUD, LOCATOR, PoE usage bar (5 steps)
- Buttons: 1x "Restore"
- Console: TTL 3.3V, 115200 8N1, 4-pin header
- pinout (front to back): GND RX TX -
- Software chain:
- Bootbase/stripped-down U-Boot
- RAS/ZyNOS
MAC address
===========
Single MAC address derived from the board partition. Applied to all
switch ports.
Disclaimer
==========
PoE is not yet supported.
Flashing OpenWrt overwrites ZyNOS. The Bootbase/U-Boot remains intact
and can be used for recovery.
Installation
============
Simple web upgrade:
1. Take the OpenWrt factory.bin image generated by the build.
2. In the ZyNOS web UI, login and go to Maintenance -> Firmware Upgrade.
3. If the device runs ZyNOS 5.00, untick "Enhanced firmware integrity
check sha256sum". Otherwise the upload check will reject the image.
4. Select and upload the factory.bin image and click upgrade.
5. After flashing has finished, reboot the switch. It will now boot
into OpenWrt.
Initramfs boot
==============
Luckily the switch uses a standard design, thus networking works with
a default hardware profile of RTK U-boot.
1. Connect to the serial console and interrupt the boot process by
spamming '$' during the DRAM test to drop into Bootbase/U-Boot.
2. Bring up the network:
> rtk network on
Use a copper port; the SFP+ cages are likely not usable from the
bootloader.
3. Load the initramfs image via TFTP:
> tftpboot 0x82000000 <server>:<image>
4. Run the image (not bootm, the image has no uImage header):
> go 0x82000000
Return to stock firmware
========================
1. Download the stock firmware for the switch from the Zyxel website
and unzip it; there should be a .bin file with an alphanumeric name.
2. Upload that file to the running OpenWrt instance.
3. Flash it (use -F since the image has no OpenWrt metadata):
> sysupgrade -F <stock-firmware>.bin
4. Wait for sysupgrade to finish and the switch to reboot. ZyNOS should
come up again.
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23389
Signed-off-by: Robert Marko <robimarko@gmail.com>
The XikeStor SKS7300-4X4T is a 10GbE switch with 4x copper ports and
4x SFP slots. It has a built-in console port and is powered by a RTL9303
SoC.
Specifications:
---------------
* Soc: RTL9303
* Flash: 32 MiB SPI flash
* RAM: 512 MiB
* Ethernet: 8x 10/100/1000/2500/5000/10000 Mbps
* Buttons: 1x Reset
* UART: CISCO console ports on the front, 115200, 8n1
* controllable fan, integrated temperature sensor
Not yet enabled:
----------------
* Fan control: it's controlled via simple i2c registers, but no driver
has been written yet.
Installation:
-------------
This device uses an obfuscated bootloader and an obfuscated image. As such,
the installation can only be performed using the console ports.
1. Set the switch to boot from the first image.
2. Attach console cable and hold Ctrl+C while powering on the switch
3. After a few seconds, a very basic U-Boot menu appears. Wait for the user
input to appear, then press "z" to get to the message "Please input auth
code".
4. Type "jiangks" as the password, the RTL9300 prompt appears.
5. Load the OpenWrt initramfs image via TFTP:
> setenv serverip 192.168.0.1
> setenv ipaddr 192.168.0.2
> tftpboot 0x83000000 openwrt.bin
> bootm 0x83000000
6. Once OpenWrt has booted, use the "sysupgrade" image to perform the
actual installation.
7. Reboot the switch and enjoy OpenWrt.
Recovery/return to stock:
-------------------------
Flash an OEM firmware upgrade file via sysupgrade.
Signed-off-by: Andreas Böhler <dev@aboehler.at>
Link: https://github.com/openwrt/openwrt/pull/23305
Signed-off-by: Robert Marko <robimarko@gmail.com>
In rtpcs_probe_serdes_bus(), the code manages the device
tree node reference incorrectly:
- It acquires a node pointer np via of_find_compatible_node(),
which increments the reference count.
- It calls of_mdio_find_bus(np) to locate the bus.
- It calls of_node_put(np), which decrements the reference
count. If this was the last reference, the node is freed.
- It then attempts to check if (!of_device_is_available(np)).
The pointer np is used after its reference has been released.
This can lead to a kernel oops or unpredictable behavior if
the memory has been reclaimed.
Fixes: fe27cce1e ("realtek: add SerDes PCS driver")
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/23391
Signed-off-by: Robert Marko <robimarko@gmail.com>
As soon as devm_register_netdev returns, the network
interface is "live" and the kernel can call rteth_open().
If the interface is brought up immediately (e.g., by a
userspace script), rteth_open will attempt to call
phylink_start(ctrl->phylink), which will crash the
system because ctrl->phylink has not been assigned yet.
Reorder probing sequence.
While we are here sort the variables by length.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/23375
Signed-off-by: Robert Marko <robimarko@gmail.com>
packet->dma is overwritten with a new mapping before
the previous buffer is unmapped. This causes the kernel
to unmap the wrong memory address, leading to memory
leaks and potential corruption.
Additionally set skb pointer to NULL to avoid a free
when the buffer is recycled next time.
Reorder unmapping/mapping sequence.
Fixes: 41300fd88 ("refactor transmit function")
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/23375
Signed-off-by: Robert Marko <robimarko@gmail.com>
The mdio driver currently leaves the phy polling disabled after
setup. The dsa driver takes over and mangles the polling registers
so that they fit its needs. While polling is something in between
mdio (PHY) and dsa (MAC) it should be controlled by the mdio
driver.
Add a final "polling enable" function to the mdio driver so that
the MAC registers are filled automatically. For this
- split valid_ports into phy_ports (attached to PHY) and sds_ports
(attached to SerDes)
- Improve the probing so it can differentiate between a phy and a
sds port. This is resolved by the "phy-handle" attribute.
- Split the for_each_port macro into a phy and sds version.
- After probing enable polling for all phy and sds ports.
With this in place the dsa driver can remove the polling setup
completely.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/23299
Signed-off-by: Robert Marko <robimarko@gmail.com>
Currently, there is no SBOM generation in imagebuilder when the package
system 'apk' is used. This commit adds this feature back. This already
worked for the package system 'opkg'.
Furthermore, generating the SBOM using perl is not reproducible if the
input data has not changed. A different file is always generated. This is
not the case with Python. For this reason, Python is now used to generate
the SBOM for the imagebuilder.
The script has already been prepared so that it can also process the opkg
package system for generating the SBOM.
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit adds additional information to the apk database. This new tags
are required for SBOM generation.
Signed-off-by: Florian Eckert <fe@dev.tdt.de>