本帖最后由 cribug 于 2015-7-31 15:30 编辑
然后在虚拟机中搭建编译环境和必要的软件,进行编译,逐条输入下列命令(及时验证是否安装成功):[mw_shl_code=bash,true]sudo apt-get install g++
sudo apt-get install libncurses5-dev
sudo apt-get install zlib1g-dev
sudo apt-get install bison
sudo apt-get install flex
sudo apt-get install unzip
sudo apt-get install autoconf
sudo apt-get install gawk
sudo apt-get install make
sudo apt-get install gettext
sudo apt-get install gcc
sudo apt-get install binutils
sudo apt-get install patch
sudo apt-get install bzip2
sudo apt-get install libz-dev
sudo apt-get install asciidoc
sudo apt-get install subversion
sudo apt-get install sphinxsearch
sudo apt-get install libtool
sudo apt-get install sphinx-common
sudo apt-get install libssl-dev
sudo apt-get install git[/mw_shl_code]
下载OpenWrt源
[mw_shl_code=bash,true]mkdir openwrt
sudo chmod 777 openwrt
cd openwrt
git clone git://git.openwrt.org/openwrt.git[/mw_shl_code]
添加软件扩展包,更新扩展,安装扩展:
[mw_shl_code=bash,true]cd openwrt
cp feeds.conf.default feeds.conf
./scripts/feeds update -a
./scripts/feeds install -a[/mw_shl_code]
测试编译环境
[mw_shl_code=bash,true]make defconfig
make prereq[/mw_shl_code]
到这里就可以开始编译自己的固件了,由于我手头暂时没有板子,所以就选择x86。进入定制界面:[mw_shl_code=bash,true]make menuconfig[/mw_shl_code]
编译源代码,V参数可以自己查查哈
[mw_shl_code=bash,true]make V=99[/mw_shl_code]
接下来就是漫长的等待了,约么着到下班也编译不完,今天还下雨,/(ㄒoㄒ)/~~
|