在Centos7上交叉编译生成OpenWrt固件

安装ss-*

获取最新的ss, 当前是

wget https://github.com/shadowsocks/shadowsocks-libev/archive/v2.5.6.tar.gz

解压后 ./configure, make, make install

设置代理

[root@u02 ~]# more /etc/shadowsocks-local.json
{
"server": "milton.somewhere.com",
,
"local_address":"127.0.0.1",
,
"password": "foobar",
,
"method": "aes-256-cfb"
}

启动本地代理

/usr/local/bin/ss-local -c /etc/shadowsocks-local.json -b 

如果要在后台启动

nohup /usr/local/bin/ss-local -c /etc/shadowsocks-local.json -b 0.0.0.0 -l 1080 > /dev/null 2>&1 &

# 检查是否成功启动
netstat -lnp|

# 加入开机自启动
echo " nohup ss-local -c /etc/shadowsocks/config.json /dev/null 2>&1 &" /etc/rc.local

# 查看后台进程
ps aux |grep ss-local

配置为git的代理

git config --global http.proxy 'socks5://127.0.0.1:1080'
or
git config --local http.proxy 'socks5://127.0.0.1:18001' # 检查是否生效 git config --list

Git导出代码

# The development branch (trunk) contains everything from documentation to experimental patches.
git clone git://github.com/openwrt/openwrt.git

# 15.05 branch (Chaos Calmer)
git clone -b chaos_calmer git://github.com/openwrt/openwrt.git

# 14.07 branch (Barrier Breaker)
git clone -b barrier_breaker git://github.com/openwrt/openwrt.git

# 更新代码
git pull

(可选)下载并安装所有可用的"feeds"

cd openwrt
./scripts/feeds update -a
# 中间会出很多warning, 不用管它 ./scripts/feeds install -a

让OpenWrt构建系统检查缺失的package, 这里你需要选择编译的配置和目标

make menuconfig (most likely you would like to use this)
make defconfig

编译

make defconfig
sudo yum install zlib-static patch subversion
make defconfigmake menuconfig
make V=s
make V=99 TARGET_DEVICES=y1

Proceed with build (i.e. cross-compile the downloaded sources to binaries)
\\After the cross-compilation process the trunk-directory contained over 240000 files with a total size of above 3GiB!

编译结果

编译成功后, 生成的文件可以在 <buildroot_dir>/bin 目录找到. The compiled files are additionally classified by the target platform, so e.g. a firmware built for an ar71xx device will be located in <buildroot_dir>/bin/ar71xx directory.
E.g. if your <buildroot_dir> is ~/openwrt/trunk, the binaries are in ~/openwrt/trunk/bin/ar71xx.

注: 构建中需要的库

yum install openssl-devel ncurses-devel
yum install zlib-static patch subversion

Cross compile openwrt的更多相关文章

  1. 产品中 configure/cross compile的一个bug

    在mac机上, 为iPhone版本编译产品. 运行./configure报错如下: configure:22793: error: cannot run test program while cros ...

  2. Cross compile perl

    Alex Suykov had do some work for this purpose, and my compile script is based on her patch. Steps St ...

  3. cross compile vlc 播放器

    上一篇文章介绍了如何交叉编译 FFmpeg ,继续介绍  VLC播放器  交叉编译 . 首先下载 vlc 源码  我用的是 2.2.6  地址 : http://mirrors.neusoft.edu ...

  4. aarch64 cross compile 交叉编译 opencv

    需求 : linux host :  UBUNTU opencv source : opencv 3.3.1.zip CMAKE  :  apt-get install cmake cmake-qt- ...

  5. static cross compile gtk-2.16.6+gtk-directfb+arm-linux (arm-linux-gcc-3.4.4+glib-2.3.5)

    ----------------------------------------------------------------------- In Ubuntu 10.4 Desktop and & ...

  6. [cross compile]cygwin和mingw

    转自:http://blog.csdn.net/embededvc/article/details/6829010 1. MinGW和CygWin/gcc概念 Unix下编译通过的C代码,在win32 ...

  7. cross compile gdbserver

    1. 下载gdb源码,7.12版本,下载地址:ftp://ftp.gnu.org/gnu/gdb.2. 编译gdb:0> cd gdb-7.121> mkdir __install2> ...

  8. Qt5 CMake cross compile

    cmake_minimum_required(VERSION 2.8) if (${ARM}) set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_SYSTEM_PROCES ...

  9. build-qt.sh(Cross compile in Linux for Windows)

    #!/bin/bash set -e MINGW=${MINGW:-${ARCH:-x86_64}-w64-mingw32} PREFIX=${PREFIX:-usr} WORKSPACE=${WOR ...

随机推荐

  1. lucene 多字段查询-MultiFieldQueryParser

    /** * 搜索域加权 */ Map<String, Float> boosts = new HashMap<>(); boosts.put("title" ...

  2. vim menu乱码

    syntax enable syntax on colorscheme desert set nocompatible set filetype=c set number set wrap " ...

  3. vs2008编译FileZilla客户端源码

    vs2008编译FileZilla客户端源码 下载FileZilla客户端源码,下载地址https://download.filezilla-project.org/. FileZilla客户端解决方 ...

  4. liunx下试用yum进行php及opchache扩展安装

    Centos 6.6 环境: php 5.6.29 nginx:1.10.2 1.配置安装包源 # CentOs 6.x rpm -Uvh http://mirror.webtatic.com/yum ...

  5. 在Eclipse中安装testNG插件

    1. 选择菜单:Help->Install New Software,点击Add按钮输入框中输入相应的Name:testNG和Location:http://beust.com/eclipse. ...

  6. Okhttp设置http缓存,在没有网络的情况下加载http缓存里面的内容

    HTTP_CACHE_FILENAME为缓存地址根路径: private final String HTTP_CACHE_FILENAME = "HttpCache"; priva ...

  7. Struts2第一天

    Struts2第一天 整体课程安排:3天知识点+2天练习 第一天:入门(action和result结果集)--一般的请求+响应 第二天:请求数据处理相关(参数接收.类型转换.合法性校验.国际化) 第三 ...

  8. [妙味Ajax]第三课:AJAX跨域解决方案:JSONP

    知识点总结: JSONP(JSON with Padding): 1.script标签 2.用script标签加载资源是没有跨域问题的 在资源加载进来之前定义好一个函数,这个函数接收一个参数(数据), ...

  9. Android启动另一个APP时,注意disable与enable的问题

    在写游戏sdk时候遇到了一个需要在sdk中通过scheme来启动支付宝的免密支付功能,所以需要在设备中通过包名检查一下支付宝是否存在. 此时遇到了一个问题,在三星设备中可以将app给处于disable ...

  10. POJ 1922 Ride to School#贪心

    (- ̄▽ ̄)-* //C跟着a君骑,然后更快的b君来了,C又跟着b君骑, //接着最快的d君来了,C就去跟着d君了, //最后最快的d君到达目的地时,C也就到了 //所以C的到达时间,就是最早到达的那 ...