[OpenWRT] Build your own image on Ubuntu 10.03

I'm a huge geek when it comes down to OpenWRT.
I love the style of small little router boards with not much power consumption and still big impact and power.
I have been registred on OpenWRT Forums since 2006, and thats also the time I'm already working on it and doing (weird) stuff with it.
And actually I just plainly love that small debian derived linux.

And thats why most of you would be wondering why I never downloaded the build enviroment and build an image myself.
Actually, I have to face the same question. Because, In fact, its very easy to build an image from source to your own like.

I was thinking about writing an long big blog entry about this topic, but actually, its awesomly well documented within the OpenWRT Wiki, so I just give you the link and encourage you on building your own images: http://wiki.openwrt.org/doc/howto/build

But for all who want it short for Ubuntu 10.03, here are my notes:

install req:
apt-get install build-essential asciidoc autoconf binutils bison bzip2 \
flex gawk gettext libncurses5-dev libz-dev patch unzip zlib1g-dev subversion

download stable:
mkdir OpenWrt/
cd OpenWrt/
svn co svn://svn.openwrt.org/openwrt/branches/backfire

download and install feeds:
Before downloading feeds (additional predefined package build recipies for OpenWrt) you
can check which sources you want to include. Just edit feeds.conf.default in your base directory.
Then start the download with
./scripts/feeds update -a
install with
./scripts/feeds install -a

Building Process

1. Updating sources via Subversion
## Here, backfire is the directory name of the current release branch you're tracking
cd OpenWrt/backfire/
svn up

2. Updating package feeds
./scripts/feeds update -a
./scripts/feeds install -a

3. Creating a default configuration (if necessary)
make defconfig

4. Configuring the image(s) to build
make menuconfig

5. Building the image
make

copy images:
cd bin/
ls */

cleaning up
make clean

cleaing everything, erasing build images:
make distclean

If you need own files compiled into the image, put them to: OpenWrt/backfire/files

How to disable failsafe:

Edit "package/base-files/files/lib/preinit/30_failsafe_wait"
- FAILSAFE=
- pi_failsafe_net_message=true
- preinit_net_echo "Please press button now to enter failsafe"
- pi_failsafe_net_message=false
- fs_wait_for_key f 'to enter failsafe mode' $fs_failsafe_wait_timeout && FAILSAFE=true && export FAILSAFE
+ FAILSAFE=false
+ #pi_failsafe_net_message=true
+ #preinit_net_echo "Please press button now to enter failsafe"
+ #pi_failsafe_net_message=false
+ #fs_wait_for_key f 'to enter failsafe mode' $fs_failsafe_wait_timeout && FAILSAFE=true && export FAILSAFE

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.