在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. Quartz简单实例

    Quartz中提供了两种触发器,分别是CronTrigger和SimpleTrigger. 1. SimpleTrigger 每隔若干毫秒来触发纳入进度的任务. 2. CronTrigger 在特定& ...

  2. OOP的字段

    <?php class Archie{ //字段成员声明格式:修饰符 变量名 [=xxx] public $_name='Archie!'; //public表示共有,类外可以访问 public ...

  3. android的签名

    安装好了android studio,默认是使用期限为一年的签名,并且不可以发布到正式版的apk里. 在使用第三方模块或者服务的时候,经常要求提供签名及其sha1或者MD5信息. 事实上这个签名和及其 ...

  4. python基础---pymsql

    pymsql是Python中操作MySQL的模块,其使用方法和MySQLdb几乎相同. 一.下载安装 pip3 install pymysql 二.使用 1.执行SQL #!/usr/bin/env ...

  5. 通过mvn archetype:generate创建Maven项目模板慢的问题

    通过mvn archetype:generate这种交互方式来创建Maven项目模板的时候,经常会长时间卡在Generating project in Interactive mode这一行提示(图1 ...

  6. crontab格式使用方式

    第1列分钟1-59第2列小时1-23(0表示子夜)第3列日1-31第4列月1-12第5列星期0-6(0表示星期天)第6列要运行的命令 下面是crontab的格式:分 时 日 月 星期 要运行的命令 这 ...

  7. 计算机网络课程优秀备考PPT之第一章概述(一)

    为了记录自己从2016.9~2017.1的<计算机网络>助教生涯,也为了及时梳理和整写笔记! 以上,是<计算机网络>课程的第一章概述.

  8. 《JS权威指南学习总结--6.1原型》

    内容要点: 一.每一个JS对象(null除外)都和另一个对象相关联."另一个"对象就是我们熟知的原型,每一个对象都从原型继承属性. 二.所有通过对象直接量创建的对象都具有同一个原型 ...

  9. PAT 团体程序设计天梯赛-练习集 L1-023. 输出GPLT

    给定一个长度不超过10000的.仅由英文字母构成的字符串.请将字符重新调整顺序,按“GPLTGPLT....”这样的顺序输出,并忽略其它字符.当然,四种字符(不区分大小写)的个数不一定是一样多的,若某 ...

  10. js 上传图片预览

    <script language='javascript'> function show(){ var p=document.getElementById("file1" ...