Wednesday, July 15, 2009

[zz] Building OpenWrt Kamikaze from source

Assuming you are using Ubuntu 6.06.1 LTS (on a physical system or in the VMware Player)


1. install packages required by the OpenWrt Kamikaze buildsystem

aptitude install build-essential binutils flex bison autoconf gettext texinfo sharutils subversion libncurses5-dev ncurses-term zlib1g-dev

2. checkout and prepare Kamikaze and the packages

Code:

cd ~
svn co https://svn.openwrt.org/openwrt/trunk/
svn co https://svn.openwrt.org/openwrt/packages/ ~/trunk/feeds/packages/
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

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')

make world

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


Targets for 'make'

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

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

world
build everything

tools/install toolchain/install
only build the tools and the toolchain

clean
cleans the packages (NOT the tools and toolchain)

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

package/-{clean,compile}
rebuild a single package

package/index
updates $(TOPDIR)/bin/packages/Packages

V=99
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 then
copy the kernel config to target/linux//config so that it is preserved over "make clean" call.


Also look at the OpenWrt Kamikaze documentation at
- http://nbd.name/openwrt.html#x1-250002.1 or
- http://nbd.name/openwrt.pdf

Some more useful URLs:
- Free VMware Player (enough for most users, no need for the VMware Server)
- Download VMDK and VMX files for VMware Player
- Ubuntu (for the Ubuntu ISO image)
- Free VMware Server (also includes the VMware Tools)

Last edited by forum2006 (2007-05-06 18:24:28)

0 comments:

Post a Comment