openwrt编译环境搭建

来源:互联网 发布:图片php 如何保存 编辑:程序博客网 时间:2024/05/17 21:47

openwrt编译环境搭建

1、编译环境搭建

1)先update    sudo apt-get update      (更新)2)安装编译需要的组件:    sudo apt-get install gcc     sudo apt-get install g++     sudo apt-get install binutils     sudo apt-get install patch     sudo apt-get install bzip2     sudo apt-get install flex     sudo apt-get install bison     sudo apt-get install make     sudo apt-get install autoconf     sudo apt-get install gettext     sudo apt-get install texinfo     sudo apt-get install unzip     sudo apt-get install sharutils     sudo apt-get install subversion     sudo apt-get install libncurses5-dev     sudo apt-get install ncurses-term     sudo apt-get install zlib1g-dev     sudo apt-get install gawk    sudo apt-get install asciidoc    sudo apt-get install libz-dev    sudo apt-get install libssl-dev    sudo apt-get install ocaml-nox    (必须安装libssl-dev,否则会提示Build dependency: Please install the openssl library (with development headers))

2、源码下载

我习惯用git仓库,参考地址:https://dev.openwrt.org/wiki/GetSource1)trunk版本:    trunk (main development tree)    Main repository: ​ChangeLog    git clone git://git.openwrt.org/openwrt.git2)CC版本:    15.05 branch (Chaos Calmer)    Main repository: ​ChangeLog3)BB版本:    14.07 branch (Barrier Breaker)    Main repository: ​ChangeLog    git clone git://git.openwrt.org/14.07/openwrt.git4)AA版本:    12.09 branch (Attitude Adjustment)    Main repository: ​ChangeLog    git clone git://git.openwrt.org/12.09/openwrt.git    Packages feed: ​ChangeLog    git clone git://git.openwrt.org/12.09/packages.git

3、编译

1)更新&安装软件包    Sean@ubuntu:~/openwrt$ ./scripts/feeds update -a (更新软件包)    Sean@ubuntu:~/openwrt$ ./scripts/feeds install -a (安装软件包)    Sean@ubuntu:~/openwrt$ ./scripts/feeds install -a -p luci 2)选择参考板    make menuconfig 进入定制界面(里面可以选择芯片的型号,集成的组件等等,根据实际情况选择)3)开始编译make V=99   (开始编译)或者 make V=s
0 0