-
Install
git, to conveniently download the OpenWrt source code, andbuild toolsto do the cross-compilation process:apt-get update sudo apt-get install git-core build-essential libssl-dev libncurses5-dev unzip
Some feeds might not available over git but only viasubversion(short:svn) ormercurial. If you want to obtain their source-code, you need to install svn and mercurial as well:sudo apt-get install subversion mercurial
-
for information about the build tools see
makeand build-essential -
for information about git see
git(7) -
for information about the subversion tool see
svnand subversion documentation (multiple languages)
-
-
Download the OpenWrt bleeding edge(trunk Version) with
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 included -
( optional) Download and install all available "feeds" ( see OpenWrt Feeds for more options!):
cd openwrt && ./scripts/feeds update -a && ./scripts/feeds install -a
-
Make OpenWrt Buildroot check for missing packages on your build-system using one of the following commands:
make defconfig make prereq make menuconfig
There you will need to select what you want to compile.
-
Proceed with build (i.e. cross-compile the downloaded sources to binaries)
After the cross-compilation process the ''trunk''-directory contained 244,451 files with a total size of 3.2GiB!
其它版本號地址:http://git.openwrt.org/
dl文件夾下載:http://downloads.openwrt.org.cn/sources/
我在第一次編譯OpenWRT時,出現例如以下錯誤提示:
gconvert.c:66:2: error: #error GNU libiconv not in use but included iconv.h is from libiconv
我在網上找解決方式,結果一致地都是說,又一次 ./configure 一下:
./configure --enable-iconv=no --with-libiconv=gnu make
可問題的關鍵是:OpenWRT的trunk路徑下沒見有個 configure 呀!
后來,經過細致推敲,發現是在編glib時沒通過。
$ find -name "gconvert.c" ./build_dir/host/pkg-config-0.28/glib/glib/gconvert.c
那我就直接進到 ./build_dir/host/pkg-config-0.28/glib/ 路徑下。發現該路徑下有 configure 文件。
那我說直接在該路徑下編譯 glib
$ cd build_dir/host/pkg-config-0.28/glib/ ./configure --enable-iconv=no --with-libiconv=gnu make
這樣。glib 就順利通過了編譯。
再回到 OpenWRT的trunk路徑下,繼續 make.
