ubuntu16.04编译OpenWrt环境搭建( 二 )



ubuntu16.04编译OpenWrt环境搭建

文章插图

4  下载OpenWrt源码:
   经由过程git来下载OpenWrt bleeding edge
   从官方源下载:git clone git://git.openwrt.org/openwrt.git
   git clone git://git.openwrt.org/15.05/openwrt.git , 下载时候比力漫长 , 请耐烦期待 。

ubuntu16.04编译OpenWrt环境搭建

文章插图

5   添加软件扩展包:
  cd openwrt/进入/home/kevinfan/openwrt/openwrt目次 , 可以找到feeds.conf.default文件 , 将feeds.conf.default点窜为feeds.conf , 利用以下号令:
  cp feeds.conf.default feeds.conf
  获得feeds.conf文件

ubuntu16.04编译OpenWrt环境搭建

文章插图

6  更新扩展 , 安装扩展:
./scripts/feeds update -a
./scripts/feeds install -a
系统提醒:
WARNING: No feed for package 'librt' found, maybe it's already part of the standard packages?
WARNING: No feed for package 'libpthread' found, maybe it's already part of the standard packages?
WARNING: No feed for package 'lua' found, maybe it's already part of the standard packages?
WARNING: No feed for package 'libc' found, maybe it's already part of the standard packages?
WARNING: No feed for package 'libssp' found, maybe it's already part of the standard packages?

ubuntu16.04编译OpenWrt环境搭建

文章插图

7    测试下编译情况 , 利用号令:
   make defconfig
 系统提醒:
Build depency: Please install the openssl library (with development headers)
/home/kevinfan/openwrt/openwrt/include/prereq.mk:12: recipe for target 'prereq' failed
Prerequisite check failed. Use FORCE=1 to override.
/home/kevinfan/openwrt/openwrt/include/toplevel.mk:151: recipe for target 'staging_dir/host/.prereq-build' failed
make: *** [staging_dir/host/.prereq-build] Error 1
存候装openssl库

ubuntu16.04编译OpenWrt环境搭建

文章插图

8  进openssl官网:http://www.openssl.org
  下载页面:http://www.openssl.org/source/
  选择最新版本下载 , 用WinSCP上传至Ubuntu系统中 , 这里小编放在Downloads:openssl-1.1.0-pre5.tar.gz

ubuntu16.04编译OpenWrt环境搭建

文章插图

9解压:tar –zxvf openssl-1.1.0-pre5.tar.gz , 解压目次为:openssl-1.1.0-pre5
然后进入到openssl-1.1.0-pre5 , 进行设置装备摆设、编译、安装 。
设置装备摆设   ./configure或./config
编译    make安装make install
若是提醒无权限 , 可以加上sudo在执行 , 接着只要比及编译安装完当作即可 。

ubuntu16.04编译OpenWrt环境搭建

文章插图

10   从头测试下编译情况 , 利用号令:

推荐阅读