1 (edited by forum2006 2007-05-06 17:24:28)

Topic: [howto] Building OpenWrt Kamikaze from source

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

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/<package_name>-{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/<platform>/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)

1x ASUS WL-700g Encore (Kamikaze 7.09, BCM947xx//953xx [2.4])
1x ASUS WL-500g Premium with Wistron CM9 WiFi card (Kamikaze 7.09, BCM947xx//953xx [2.4])
1x Linksys WRT54GL v1.1 with 512MB MMC card mod, optimized MMC driver (Kamikaze trunk r9548, BCM947xx//953xx [2.4])
NO support via PM.

Re: [howto] Building OpenWrt Kamikaze from source

Use a local mirror for downloading the source tarballs:

echo "http://local.mirror/path/" > scripts/localmirrors

From now on it first tries to download the tarballs from . If you don't have a local copy it'll be downloaded from the internet.

1x ASUS WL-700g Encore (Kamikaze 7.09, BCM947xx//953xx [2.4])
1x ASUS WL-500g Premium with Wistron CM9 WiFi card (Kamikaze 7.09, BCM947xx//953xx [2.4])
1x Linksys WRT54GL v1.1 with 512MB MMC card mod, optimized MMC driver (Kamikaze trunk r9548, BCM947xx//953xx [2.4])
NO support via PM.

3 (edited by forum2006 2007-01-25 18:21:42)

Re: [howto] Building OpenWrt Kamikaze from source

- Good Kamikaze revisions known to build ok.

1x ASUS WL-700g Encore (Kamikaze 7.09, BCM947xx//953xx [2.4])
1x ASUS WL-500g Premium with Wistron CM9 WiFi card (Kamikaze 7.09, BCM947xx//953xx [2.4])
1x Linksys WRT54GL v1.1 with 512MB MMC card mod, optimized MMC driver (Kamikaze trunk r9548, BCM947xx//953xx [2.4])
NO support via PM.

Re: [howto] Building OpenWrt Kamikaze from source

I tried to build kamikaze from source in a clean OpenVZ debian system. I added the programs from post #1. The build world failed and V=99 showed that python was missing.

Re: [howto] Building OpenWrt Kamikaze from source

I tried to build the kamikaze from source. I followed this post + the docs, used brcm-2.4, it flashed successfully to my Asus WL-500Gp, but it was not possible to reach it via 192.168.1.1 via any of the ports. It actually did boot something partly working - I was able to associate with the OpenWrt SSID, but not to communicate.

The nightly brcm-2.4 build from http://downloads.openwrt.org/snapshots/ (11. 3.) works without problems.

For a start, how do I get the same settings the nightly builds use? I am using KUbuntu 6.10 with recent updates as the build system. I tried to google for the docs, but did not found anything relevant. Thanks.

Re: [howto] Building OpenWrt Kamikaze from source

numo wrote:

For a start, how do I get the same settings the nightly builds use?

Hm.. nevermind, today's build works... I did the config from scratch - I probably messed up something yesterday..

Re: [howto] Building OpenWrt Kamikaze from source

The command make world gave an error during the build of package/busybox. After some searching I found that there was no include and lib map in staging_dir_mipsel/usr (there were two files include and lib; which was obviously wrong). The content of include was libcgi.h so it looks like the copy instruction did go wrong. After replacing these two files with a map with the same name (include and lib) the make went ok.

Re: [howto] Building OpenWrt Kamikaze from source

I'm new to openwrt and have a WL-500G Premium. I've been tinkering this weekend and first installed White Russian, then Kamakazi openwrt-brcm-2.4-squashfs.trx. It worked fine so I decided to roll my own on my ubuntu box with a 2.6 kernel.

I built then installed the openwrt-brcm47xx-2.6-squashfs.trx firmware and notice that I have only 6Mb of space on /jffs where previously I had 14.7Mb additional I think on /tmp. Have I built the wrong target for my hardware or screwed something up?

Jeff

9 (edited by JeffElkins 2007-03-26 01:46:51)

Re: [howto] Building OpenWrt Kamikaze from source

Just to followup, I rebuilt for the 2.4 kernel and it seems to function identically to the image I downloaded. Is a 2.6 kernel not suited for the WL-500gP?  I noticed in the roadmap that the goal was 2.4 on this hardware, but I think I've seen forum posts where folks had built 2.6 kernels.

Thanks,

Jeff

Re: [howto] Building OpenWrt Kamikaze from source

The
svn co https://svn.openwrt.org/openwrt/packages/ ~/trunk/feeds/packages - line is wrong

its unneed after building the toolchain all you need is the make package/symlinks
(You can add extra feeds in developer options -> build options (seperated by a space)
and make package/symlinks automatically checks then out to a directory of

https_svn.openwrt.org_openwrt_packages_ (that form)

You can also add extra source repositories - by adding them space seperated to that

Re: [howto] Building OpenWrt Kamikaze from source

Excelent howto, this should go in the wiki!!

Re: [howto] Building OpenWrt Kamikaze from source

This is an excellent guide! Thanks OP.

I followed this post and was able to compile and build successfully for Simpleshare NAS250.

Target System: Broadcom BCM947xx/953xx [2.6]
Target profile: No WiFi

During make menuconfig, I included the kernel modules kmod-ide-core and kmod-ide-aec62xx as <M>. However, it did not build these packages.

The packages are not in the bin/packages directory.
Also, there are no .o files in the directory - ~/trunk/build_mipsel/linux-2.6-brcm47xx/linux-2.6.19.2/drivers/ide.

It seems these kernel packages were not compiled. Did I miss some settings or configuration?

I will appreciate any help.

Thanks.
- Kali

Kamikaze (Broadcom [2.6]) on Simpleshare NAS250
Kamikaze (Broadcom [2.6]) on Netgear WGT634U
Openwrt  0.9 (Broadcom [2.4]) on Linksys WRT54GL

13 (edited by exobyte 2007-04-23 19:19:42)

Re: [howto] Building OpenWrt Kamikaze from source

This should probably be made into a page on the wiki.

Re: [howto] Building OpenWrt Kamikaze from source

kalibom wrote:

It seems these kernel packages were not compiled. Did I miss some settings or configuration?

Hmm, thought a kernel_menuconfig is enough, but it isn't. After running 'make kernel_menuconfig' and enabling the modules manually and executing 'make target/linux-{clean,install} V=99' there are still no IDE modules sad

Something is fishy here.

1x ASUS WL-700g Encore (Kamikaze 7.09, BCM947xx//953xx [2.4])
1x ASUS WL-500g Premium with Wistron CM9 WiFi card (Kamikaze 7.09, BCM947xx//953xx [2.4])
1x Linksys WRT54GL v1.1 with 512MB MMC card mod, optimized MMC driver (Kamikaze trunk r9548, BCM947xx//953xx [2.4])
NO support via PM.

Re: [howto] Building OpenWrt Kamikaze from source

Yes. In fact, there are no ide kernel modules being built for all 2.6 based devices, except the x86...

Kamikaze (Broadcom [2.6]) on Simpleshare NAS250
Kamikaze (Broadcom [2.6]) on Netgear WGT634U
Openwrt  0.9 (Broadcom [2.4]) on Linksys WRT54GL

Re: [howto] Building OpenWrt Kamikaze from source

try to include them not as module. I think then these modules will be included in your built

There are 10 people who understand binary code

Those who do and those who don't!

Re: [howto] Building OpenWrt Kamikaze from source

forum2006 wrote:

Building OpenWrt Kamikaze from source

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

distclean deletes my download directory... Which is as I'd expect.  Please correct!

Re: [howto] Building OpenWrt Kamikaze from source

bifferos wrote:
forum2006 wrote:

Building OpenWrt Kamikaze from source

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

distclean deletes my download directory... Which is as I'd expect.  Please correct!

... or did you really mean 'expect' instead of 'except'?  smile.

19 (edited by correll 2009-01-23 17:03:44)

Re: [howto] Building OpenWrt Kamikaze from source

After building, you will find all sorts of files in the TOP_DIR/bin directory:

openwrt-atheros-root.jffs2-128k                   
openwrt-atheros-root.jffs2-64k                     
openwrt-atheros-root.squashfs                     
openwrt-atheros-ubnt2-jffs2-128k.bin           
openwrt-atheros-ubnt2-jffs2-64k.bin             
openwrt-atheros-ubnt2-squashfs.bin             
openwrt-atheros-ubnt5-jffs2-128k.bin           
openwrt-atheros-ubnt5-jffs2-64k.bin             
openwrt-atheros-ubnt5-squashfs.bin             
openwrt-atheros-vmlinux.elf                       
openwrt-atheros-vmlinux.gz                         
openwrt-atheros-vmlinux.lzma                     

Only a pair of kernel files (vmlinux) and filesystem (jffs2 or squashfs) are necessary. For jffs2 there is a choice between 64k and 128k memory blocks in which the flash is organized. squashfs helps preserving flash lifetime as the physical space actually being used is wrapping around as opposed to writing the same sector all the time.

ubnt2 and ubnt5 are root file systems specially made for the ubiquity nanostation.

Re: [howto] Building OpenWrt Kamikaze from source

One addition in item 2 in the first post.  After "make package/symlinks", use "./scripts/feeds install" to put packages into the menuconfig selection list, for example,

./scripts/feeds install nano usbutils samba3

to add nano, usbutils (for lsusb), and samba3 to menuconfig.  This will mean that these programs are synced with the correct kernel, which they won't necessarily be if you use "opkg install" to get them.

Re: [howto] Building OpenWrt Kamikaze from source

url has changed, see https://dev.openwrt.org/wiki/GetSource

Re: [howto] Building OpenWrt Kamikaze from source

hey, how we add packages to the source for compile? ty