在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. IIS7添加mp4 MINE类型报错:无法写入配置文件

    解决方法: 方法一: 可能是由于文件为只读属性,所以修改网站文件访问权限,把此文件夹或者文件的写入权限给了这个用户. 方法二: 可能由于网站目录所在的分区是fat32格式,所以要把网站目录放在NTFS ...

  2. mac上设置sudo不要密码

    觉得每次sudo都需要设置密码太过麻烦,于是折腾了一番,谁知走了一番弯路记录下来. 以下是网上找到的步骤 chmod u+w /etc/sudoers  给当前用户增加写权限 vi /etc/sudo ...

  3. ef code first 您没有所需权限

    在进行数据库更新操作时,update-database -force,反复提示没有改表或者没有所需权限,昨晚折腾了4个小时没有搞定,太晚了,今天Google了一下,这方面的错误,提到的都很少,在一篇文 ...

  4. mysql bit类型数据库中无法显示

    表an_bit bit类型字段id select bin(id+0) from an_bit显示二进制 select id+0 from an_bit显示十进制 http://blog.csdn.ne ...

  5. vsftp建立虚拟用户不同目录分配不同权限操作步骤详解

    vsftpd服务器同时支持匿名用户.本地用户和虚拟用户三类用户账号,使用虚拟用户账号可以提供集中管理的FTP根目录,方便了管理员的管理,同时将用于FTP登录的用户名.密码与系统用户账号区别开,进一步增 ...

  6. ACdream 1007

    input T           <=10 n k            n<=1000         k<=10^18 a1,a2,...an                | ...

  7. Spring 配置文件XML -- <beans>中属性概述

    beans : xml文件的根节点. xmlns : XML NameSpace的缩写,因为XML文件的标签名称都是自定义的,自己写的和其他人定义的标签很有可能会重复命名,而功能却不一样,所以需要加上 ...

  8. 为Array 添加indexOf

    为array赋予属性 if (!Array.prototype.indexOf) { Array.prototype.indexOf = function (elt /*, from*/) { var ...

  9. box2d 已知bug

    1.动态刚体与一个与静态刚体重叠的小的感应刚体在contactBegin时,有些时候无法侦测到

  10. zoj 3204 Connect them

    最小生成树,我用的是并查集+贪心的写法. #include<stdio.h> #include<string.h> #include<math.h> #includ ...