在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. mvc前端样式自定义

    1.别忘记加 htmlAttributes @Html.EditorFor(model => model.Quantity, new { htmlAttributes = new { @clas ...

  2. jmeter下载及安装配置

    本文是在win7环境下安装使用jmeter,jmeter可以运行在多平台上Windows和Linux. 前提:使用jmeter工具之前需要安装java.并配置好java的环境变量.(备注:java下载 ...

  3. .net中读取xml文件中节点的所有属性信息

    功能描述: 将数据以xml的格式记录成配置文件,需要获取配置文件中的数据时,则获取对应的配置文件,读取配置文件里对应节点的所有属性. 逻辑实现: 1.将数据配置好在xml文件中. 2.获取xml文件中 ...

  4. 数据结构之线性表的顺序存储结构的实现--C语言版

    #include <stdio.h> #include <stdlib.h> #include <time.h> #define INIT_SIZE 100 #de ...

  5. 一个例子让你了解Java反射机制

    本文来自:blog.csdn.net/ljphhj JAVA反射机制: 通俗地说,反射机制就是可以把一个类,类的成员(函数,属性),当成一个对象来操作,希望读者能理解,也就是说,类,类的成员,我们在运 ...

  6. JAVA 并发编程关键点

    上下文切换 死锁 volatile synchronized 原子操作 happens-before as-if serial 锁的内存 final 线程:daemon start suspend r ...

  7. iOS开发加快审核app

    实现app加快审核的步骤: 1.https://developer.apple.com/contact/进入这个网址点击App Store下的Expediting an App Review进入这个页 ...

  8. 2016 ASC 移动物联网安全高峰论坛 万物互联时代的安全与隐私

    互联网的发展已经迈入了"万物互联"时代.移动设备作为人.物连接的主要入口,让人们享受高效.便利的"互联生活"的同时,也给用户的安全和隐私带来了前所未有的挑战.正 ...

  9. C++静态成员

    类中的静态成员真是个让人爱恨交加的特性.我决定好好总结一下静态类成员的知识点,以便自己在以后面试中,在此类问题上不在被动. 静态类成员包括静态数据成员和静态函数成员两部分. 一 静态数据成员: 类体中 ...

  10. brctl 的使用

    brctl  作用: 用来进行以太网桥接(bridge)的管理 主要用法如下: root@hbg:/# brctl --helpBusyBox v1.22.1 (2016-02-24 11:41:04 ...