admin管理员组

文章数量:1636960

说明

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/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>
 *
 *  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

本文标签: 路由器MW305RMercuryOpenWRTLEDE