Oops! It appears that you have disabled your Javascript. In order for you to see this page as it is meant to appear, we ask that you please re-enable your Javascript!

編譯 OpenWrt Kamikaze 原始碼



Building OpenWrt Kamikaze from source

1. install packages required by the OpenWrt Kamikaze buildsystem

apt-get install gcc g++ binutils patch bzip2 flex bison make autoconf gettext texinfo unzip sharutils subversion libncurses5-dev zlib1g-dev gawk qemu-img

2. checkout and prepare Kamikaze and the packages

cd ~

svn co https://svn.openwrt.org/openwrt/trunk/

svn co https://svn.openwrt.org/openwrt/packages/ ~/trunk/feeds/packages/

To include all packages, issue the following command:

cd ~/trunk/

make package/symlinks

2.1 Configure Kamikaze (select target system) and the packages (a full build with all packages selected requires about 9GB of free disk space)

make menuconfig

x86 vmware setting (就是編譯firmware是RUN在X86平台上)


Target System: (x86) —>

Subtarget (Generic [2.6]) —>

Target Profile (Generic)  —>

Target Images  —>

– squashfs: n

– jffs2: n

– ex2:y

– Build VMware image files (VMDK). Requires qemu-img: y

Kernel modules  —> Network Devices

– kmod-e1000: y

Administration  —> webif

– webif: y

– webif-theme-xwrt-mini: y


2.2 If you select extra packages it’s a good idea to check if you have all prerequisites installed. Check with:

make prereq

TIP: To find the missing packages search at http://packages.ubuntu.com/

2.3 Finally build Kamikaze (to download all packages at once use ‘make download world’)


3. After the build finished, ready to use images can be found in $(TOPDIR)/bin

Targets for ‘make’


download all source tarballs (from the selected packages and it’s dependencies) at once before starting the build


checks if you have all prerequisites installed on the host-system for building the selected packages


build everything

tools/install toolchain/install

only build the tools and the toolchain


cleans the packages (NOT the tools and toolchain)


cleans up everything expect $(TOPDIR)/.config and $(TOPDIR)/dl/


rebuild a single package


updates $(TOPDIR)/bin/packages/Packages


turns on debugging

make kernel_menuconfig

If you want, you can also modify the kernel config for the selected target system. Simply run “make kernel_menuconfig” and the build system will unpack the kernel sources (if necessary), run menuconfig inside of the kernel tree, and thencopy the kernel config to target/linux/<platform>/config so that it is preserved over “make clean” call.

Maybe this helps.

package is for exactly that – packages. In an OpenWrt firmware, almost everything is an .ipk,

a software package which can be added to the firmware to provide new features or removed to save space.

Note that packages are also maintained outside of the main trunk and can be obtained from subversion using the package feeds system

Checkout the feeds with the extra packages

./scripts/feeds update

Only symlink the packages you like to compile

./scripts/feeds install <pkg_name_1> <pkg_name_2>


./scripts/feeds install nano wget webif vpnc

Collecting package info: done

Collecting target info: done

Installing package ‘nano’

Installing package ‘wget’

Installing package ‘haserl’

Installing package ‘webif’

Installing package ‘libgpg-error’

Installing package ‘libgcrypt’

Installing package ‘vpnc’

Run menuconfig select features and packages

convert the image to an VMware image using qemu-img

qemu-img convert -f raw bin/openwrt-x86-ext2.image -O vmdk bin/openwrt-x86-ext2.vmdk


OpenWrt Documentation


OpenWrt  Development Environment– Directory structure


Kamikaze Configuration






OpenWrt – Building software packages