参考:
https://github.com/Squonk42/OpenWrt-RT5350?ref=commandbarr
http://www.right.com.cn/forum/thread-120311-1-1.html
最新openwrt已经支持RT5350,不需要再打补丁了。(http://www.right.com.cn/forum/forum.php?mod=viewthread&tid=120311)
文章见后面【UBUNTU下Hame MPR-A1 openwrt固件生成】
以841n v3做例子,使用OpenWrt编个带USB脱机下载的固件(引出这个地址,为了让没有动手编译过的人,了解一下别人的编译过程【图文详解】,起到一个抛砖引玉的作用) 【http://www.right.com.cn/forum/forum.php?mod=viewthread&tid=83746】
Patches to compile OpenWrt Linux on Ralink RT5350-based routers.
Note These patches only apply to kernel < 3.8.x. For more recent kernels, please visit our new repository athttps://github.com/kaechele/openwrt!
RT5350-based routers are not yet supported in OpenWrt, not even yet in the bleeding edge trunk.
However, here are some experimental patches to the current OpenWrt trunk repository that should work.
These patches were originally developed for the Hame MPR-A1 router, but they also apply to its numerous clones and more generally to a lot of Ralink RT5350-based routers.
This comes from the fact that the RT5350 is a SoC ("System on Chip") that requires only a few external components to provide a working wireless router. So basically, all these designs are very similar, only differing in the SP Flash chip model or the way to control the USB overcurrent protection switch chip.
In order to build OpenWrt on an RT5350-based router, you need to:
This is achieved using the following code snippet:
mkdir openwrt
cd openwrt
svn co svn://svn.openwrt.org/openwrt/trunk
git clone https://github.com/Squonk42/OpenWrt-RT5350.git
cd trunk
patch -p0 <../OpenWrt-RT5350/openwrt_add_pm25lq032_flash_support.patch
patch -p0 <../OpenWrt-RT5350/openwrt_add_rt5350_wlan_support.patch
patch -p0 <../OpenWrt-RT5350/openwrt_hame_mpr-a1.patch
make menuconfig
In the configuration menu, you need to select the following options:
Then proceed to build:
make -j x
... where "x" is the number of CPU on your PC + 1.
The first time you compile can take hours, since the toolchains is built first. Subsequent builds only take a few minutes.
Then copy the the resulting image to your TFTP server root, so you can Flash it from the router's U-Boot bootloader:
cp bin/ramips/openwrt-ramips-rt305x-mpr-a1-squashfs-sysupgrade.bin /tftpboot/
This patch contains the definition of 3 SPI Flash chip that are commonly used in RT5350-based routers, but that are missing from the default OpenWrt MTD Flash device driver:
This patch is platform independent, as these definitions may also be useful to other non RT5350-based machines.
This patch contains the changes required to add support for the RT5350 to the mac80211 driver.
This patch has been developped bi 123serge123 from the OpenWrt forum (https://forum.openwrt.org/viewtopic.php?pid=186493#p186493), adapted by Heffer from the same forum, then ported to the latest mac80211 2013-01-07 by myself.
https://github.com/Squonk42/OpenWrt-RT5350?ref=commandbarr
This patch contains all the required changes required to define the HAME MPR-A1 profile for OpenWrt.
It is based on previous work by arpunk, arteq, Heffer, p1vo and myself from OpenWrt forum (https://forum.openwrt.org/viewtopic.php?id=37002).
==========================================================
UBUNTU下Hame MPR-A1 openwrt固件生成【http://www.right.com.cn/forum/forum.php?mod=viewthread&tid=120311】
先粘贴一下MPR-A1 的硬件配置 【见http://bbs.mydigit.cn/read.php?tid=421833】
硬件配置:
1)RT5350,MIPS体系的SOC芯片;W9812G6是16MB的DDR RAM;25Q32是4MB的串行FLASH。
2)另外还有EMC5755是电池充电控制器。
3)RJ45座、网口变压器、USB口、按钮、开关、WIFI天线等,都使用了特别小的封装,见细节特写照片。
注意: 截止到2013-07-29, openwrt trunk已经支持了MPR-A1和MPR-A2了, 请大家直接下载官方的openwrt-trunk编译即可,打补丁神马的已经是历史了.
特此更正,以免误人子弟)
搭建开发环境
ubuntu 12.04LTS