Reasons for using the SDK are:
You can either download an already compiled SDK, or compile it yourself by using the "make menuconfig" command.
You should find bz2-archives ready for download in the corresponding download directory:
After the compilation, you will find it in <build root>/bin/<arch>/
By default the SDK ships with no package definitions.
Makefiles for packages to compile must be checked out from the OpenWrt repository and placed into the
package/ directory first.
svn export command to obtain package definitions.
OpenWrt's Trunk package feed is located at
the Trac browser can be used to find the appropriate subdirectory.
The example below checks out the nano editor from the repository:
| $ svn export svn:svn.openwrt.org/openwrt/packages/utils/nano package/nano
Exported revision 20365.
Many packages require additional dependencies which can be found in the package Makefile:
If there are additional dependencies, those need to be fetched and compiled as well.
After the Makefile is in place, the usual buildroot commands apply:
make package/example/download- download the soures of example
make package/example/prepare- extract the sources, apply patches and download if necessary
make package/example/compile- compile example, prepare and download if necessary
make package/example/clean- clean the sourcecode
make package/index- build a repository index to make the output directory usable as local opkg source
Some packages are built on host:
The common command to recompile a package example and enable verbose output is:
After the compilation is finished, the generated .ipk files are placed in the bin directory.
The output of make might contain
WARNING: your configuration is out of sync. Please run make menuconfig, oldconfig or defconfig!. That warning is misleading and wrong in the SDK case. Since everything is precompiled you cannot run oldconfig (see Why is the SDK configuration out of sync?).
The example below rebuilds nano.
$ svn export svn://svn.openwrt.org/openwrt/packages/utils/nano package/nano A package/nano A package/nano/Makefile Exported revision 20365. $ grep DEPENDS package/nano/Makefile DEPENDS:=+libncurses $ svn export svn://svn.openwrt.org/openwrt/trunk/package/libs/ncurses package/ncurses A package/ncurses A package/ncurses/patches A package/ncurses/patches/100-ncurses-5.6-20080112-urxvt.patch A package/ncurses/patches/900-terminfo.patch A package/ncurses/patches/101-ncurses-5.6-20080628-kbs.patch A package/ncurses/patches/500-cross.patch A package/ncurses/Makefile Exported revision 20365. $ make package/ncurses/compile Collecting package info: done make package/ncurses/compile make -C package/ncurses compile $ make package/nano/compile make package/nano/compile make -C package/ncurses compile make -C package/nano compile $ make package/index make package/index $ ls bin/packages/mipsel/ libncurses_5.7-2_mipsel.ipk nano_2.2.3-1_mipsel.ipk Packages Packages.gz
Some SDK versions have bugs.
Bug: BB SDK for BRCM2708: wants to compile with "ccache_cc" see https://dev.openwrt.org/ticket/13949
Bug: BB SDK for BRCM2708: static compilation broken
Archive : obtain.firmware.sdk.old