给水星MAC2600R路由器刷openwrt24.10固件


风景悦人
原创
发布时间: 2026-04-23 12:01:50 | 阅读数 0收藏数 0评论数 0
封面
这次给水星MAC2600R更新一下系统,系统是开源的openwrt 24.10.记录下来,以备以后自己忘记的时候,可以翻出来看看。

准备工作:

材料:

串口TTL线

1

拆机接串口

接串口主要是调试方便,如果你不想自己编译,也可以不接。

拆开外壳,拿下主板,在R19和R21处,加焊上0欧姆电阻,或直接连接焊上。

然后连上串口线。

2

刷pd-boot

先备份原厂编程器固件或eeprom。切记!

方法1:简单粗暴高效,直接烙铁把芯片焊下来,用编程器刷,我就是这么干的。

方法2:有点繁琐,但是不用拆芯片,我是用STC的串口助手,设置上自动发送数据slp,一直发送,然后开机,就会进入uboot模式,然后用命令:cat /proc/mtd 查看分区列表。用命令刷入,参考:免拆闪存 TTL WDR8620 MAC2600R刷入breed及刷padavan教程-Padavan-恩山无线论坛 - Powered by Discuz!这个帖子。

3

下载openwrt源码

先git源码包,我开始用的是23.05版本,后来用用的24.10,操作差不多。

用命令:git clone https://github.com/openwrt/openwrt 下载源码

用命令:cd openwrt 进入源码包

用命令:git checkout openwrt-24.10 下载

用命令:./scripts/feeds update -a 更新feeds软件包

用命令:./scripts/feeds install -a 安装feeds软件包

4

添加DTS文件

cd到 openwrt/target/linux/ramips/dts/ 下,

用命令:vim mt7621_mercury_mac2600r 新建文件,粘贴下面的DTS文件:

// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;


#include "mt7621.dtsi"


#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>


/ {
compatible = "mercury,mac2600r", "mediatek,mt7621-soc";
model = "Mercury MAC2600R";


aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};


chosen {
bootargs = "console=ttyS0,115200";
};


leds {
compatible = "gpio-leds";


led_power: power {
label = "green:power";
gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
};
};


keys {
compatible = "gpio-keys";


reset {
label = "reset";
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
};


&spi0 {
status = "okay";


flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <80000000>;


partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;


partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};


partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};


factory: partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
};


partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0xfa0000>;
};


partition@ff0000 {
label = "config";
reg = <0xff0000 0x10000>;
};
};
};
};











&pcie {
status = "okay";
};


&pcie0 {
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x0>;
nvmem-cells = <&base_mac>;
nvmem-cell-names = "mac-address";
mac-address-increment = <2>;



ieee80211-freq-limit = <2400000 2500000>;
};
};


&pcie1 {
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x8000>;
nvmem-cells = <&base_mac>;
nvmem-cell-names = "mac-address";
mac-address-increment = <3>;




ieee80211-freq-limit = <5000000 6000000>;
};
};



&ethernet {
pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
};


&gmac0 {
nvmem-cells = <&base_mac>;
nvmem-cell-names = "mac-address";
};





&switch0 {
ports {
port@0 {
status = "okay";
label = "wan";
nvmem-cells = <&base_mac>;
nvmem-cell-names = "mac-address";
mac-address-increment = <1>;
};
port@1 {
status = "okay";
label = "lan1";
};
port@2 {
status = "okay";
label = "lan2";
};
port@3 {
status = "okay";
label = "lan3";
};
port@4 {
status = "okay";
label = "lan4";
};
// 端口6是CPU端口,连接GMAC0,必须有
port@6 {
status = "okay";
label = "cpu";
ethernet = <&gmac0>;
reg = <6>;
phy-mode = "trgmii";

fixed-link {
speed = <1000>;
full-duplex;
};
};
};
};


&state_default {
gpio {
groups = "i2c", "uart3";
function = "gpio";
};
};


&factory {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;

base_mac: macaddr@e000 {
reg = <0xe000 0x6>;
};
};










5

添加配置内容到.mk文件

打开文件:openwrt/target/linux/ramips/image/mt7621.mk

在末尾添加配置信息:


6

配置选项

用命令:make menuconfig 打开配置面板按图选择。最后记得保存。

最后用命令:make -j5 V=s 开始编译。

编译好的文件在:openwrt/bin/targets/ramips/mt7621/下面。复制到你的宿主机上方便刷机。

7

刷机

按住你板子上的reset键不放,上电,停个三四秒的时间松开,或从串口上看进程更方便。从浏览器上输入:192.168.1.1到刷机页面直接选你的固件,更新。

阅读记录0
点赞0
收藏0
禁止 本文未经作者允许授权,禁止转载
猜你喜欢
评论/提问(已发布 0 条)
评论 评论
收藏 收藏
分享 分享
pdf下载 下载
pdf下载 举报