git
, to conveniently download the OpenWrt source code, and
build tools
to do the cross-compilation process:
apt-get update sudo apt-get install git-core build-essential libssl-dev libncurses5-dev unzipSome feeds might not available over git but only via
subversion
(short:
svn
) or
mercurial
. If you want to obtain their source-code, you need to install svn and mercurial as well:
sudo apt-get install subversion mercurial
make
and
build-essential
git(7)
svn
and
subversion documentation (multiple languages)
git
(
see Downloading Sources for more options!):
git clone git:git.openwrt.org/openwrt.git
this creates a directory 'openwrt', which is the OpenWrt Buildroot build-directory
the OpenWrt toolchain "OpenWrt Buildroot" is includedhtml
cd openwrt && ./scripts/feeds update -a && ./scripts/feeds install -a
make defconfig make prereq make menuconfig
There you will need to select what you want to compile.git
After the cross-compilation process the ''trunk''-directory contained 244,451 files with a total size of 3.2GiB!shell
其它版本號地址:http://git.openwrt.org/bash
dl文件夾下載:http://downloads.openwrt.org.cn/sources/ide
我在第一次編譯OpenWRT時,出現例如如下錯誤提示:svn
gconvert.c:66:2: error: #error GNU libiconv not in use but included iconv.h is from libiconv
我在網上找解決方式,結果一致地都是說,又一次 ./configure 一下:post
./configure --enable-iconv=no --with-libiconv=gnu make
可問題的關鍵是:OpenWRT的trunk路徑下沒見有個 configure 呀!ui
後來,通過細緻推敲,發現是在編glib時沒經過。this
$ find -name "gconvert.c" ./build_dir/host/pkg-config-0.28/glib/glib/gconvert.c
那我就直接進到 ./build_dir/host/pkg-config-0.28/glib/ 路徑下。發現該路徑下有 configure 文件。url
那我說直接在該路徑下編譯 glib
$ cd build_dir/host/pkg-config-0.28/glib/ ./configure --enable-iconv=no --with-libiconv=gnu make
這樣。glib 就順利經過了編譯。
再回到 OpenWRT的trunk路徑下,繼續 make.