Mercury MW305R v3.0 路由器改造 LEDE(OpenWRT)

本文详细介绍了如何将Mercury MW305R v3.0路由器改造成LEDE(OpenWRT)系统,包括修改硬件、获取源码、添加target profile、更新kernel arch machine、解决ar71xx系列的network配置问题以及处理LED灯的设置步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

说明

1. 改造 Mercury MW305R v3.0(芯片 9533)
2. OpenWRT 版本:LEDE 17
3. 环境:Ubuntu 16.04 x64

第一步:修改硬件

1. 换 RAN 为 64M
2. 换 flash 为 16M
注:本教程主要说明制作镜像部分,具体修改硬件步骤请参考:链接

第二步:获取源码

使用以下命令克隆我当时使用的版本源码:
git clone -b lede-17.01 https://github.com/lede-project/source.git lede

第三步:target profile 添加新路由器

修改文件:/target/linux/ar71xx/image/tp-link.mk
添加以下内容:
define Device/mc-mw305r-v3
  $(Device/tplink-16mlzma)
  DEVICE_TITLE := MERCURY MC-MW305R v3
  BOARDNAME := MC-MW305R-v3
  TPLINK_HWID := 0x30500003
endef
TARGET_DEVICES += mc-mw305r-v3

删除 /tmp 目录,使用以下命令配置:
make menuconfig

在 Target System 里选择 Atheros AR7xxx/AR9xxx,然后在 Target Profile 里找到 MERCURY MC-MW305R v3 并选中。相关配置此时,编译一下,看看有没有错误。
make

make 成功后,/bin/targets/ar71xx/generic/ 目录下面会生成 MW305R 的 factory.bin,但是这时候下载到 flash 还不能启动,因为内核并没有支持 MW305R,继续下面的步骤。

第四步:kernel arch machine 新增路由器

新建文件:/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/linux-4.4.74/arch/mips/ath79/mach-mc-mw305r-v3.c
文件内容:
/*
 *  Mercury MW305R v3
 *
 *  Copyright (C) 2014 Matthias Schiffer <mschiffer@universe-factory.net>
 *
 *  This program is free software; you can redistribute it and/or modify it
 *  under the terms of the GNU General Public License version 2 as published
 *  by the Free Software Foundation.
 */


#include <linux/gpio.h>
#include <linux/platform_device
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值