前言
背景是我从网上淘到hame mpr-A2一样的设备,发现其中使用了breed web控制台,可以刷机,该设备拥有一个rj45网口,一个usb接口以及有wifi功能,而且该设备有openwrt现成的工程文件,我的目标是在原有固件当中加入usb-serial驱动及minicom,这样,配合我手机上的ssh终端,可以实现通过无线连接交换机及路由器等设备的console进行调试,首先openwrt编译环境搭建略过
下载源码
由于lede与openwrt合并,目前可由github下载源码
git clone git://github.com/openwrt/openwrt.git
配置menuconfig,编辑固件
下载后进入openwrt文件夹大体如下
bin feeds.conf.default Makefile tmp
BSDmakefile include package toolchain
build_dir key-build README tools
config key-build.pub rules.mk version
Config.in key-build.ucert scripts version.date
dl key-build.ucert.revoke staging_dir
feeds LICENSE target
由于源码本身没有LUCI,故需要使用feeds添加;
第一坑:
由于源码下载链接发生改变,需要修改feeds.conf.default文件源,我的方法是将原有源注释掉,在网上复制的新源
src-git packages https://github.com/openwrt/packages.git
src-git luci https://github.com/openwrt/luci.git
src-git routing https://github.com/openwrt-routing/packages.git