OpenWRT

OpenWRT is one of my most "beloved" operating systems ever. I am using it since 2006, already. It is very small (>= 4 MB), light weight and therefore an excellent choice for embedded computing or very small appliances. I have used it on several occasions ("prototype") in my blog, but never actually gave a heads up in terms of "What is it?" - So, let’s get rid of that:

OpenWRT is a debian linux derivate especially made for routers. OpenWRT does derive from the famous Linksys WRT series, which were based on Linux. One of the founders found out about that and got Linksys (by pointing out about the caveats of the used Linux GPL License) to the point of releasing the source code (except the wifi drivers). From the point on, OpenWRT was founded and the project began to write an own "router linux". On the course of that adventure, several forks of OpenWRT were founded (i.e. FreeWRT) - but in the end, OpenWRT remained "THE" third hand firmware for your router. Nowadays OpenWRT does support a load of routers out of the box, with famous titles like the Linksys WRT Series or even hardware like the Seagate Dockstar (which was an sort of NAS Appliance for Seagate Hard drives).

But the project did not stop on providing an firmware: With ipkg and later opkg, they also did offer packages to configure your own router experience. By using an simple build system, nearly everyone is able to configure his personal firmware and setup the things he likes. While in the beginning, only router related stuff (like wifi tools or pppoe dialers and such) was available, also big programs like recent mysql, web or file servers are found in the packet manager.

Using this little, flexible OS in cooperation with the GPIO ports of an router, software defined Inputs and Outputs, you can use your router to switch on lights, close your garage door or sound an alarm as soon as some sensors tell your router to do so. Especially with the appearance of the Raspberry Pi and its GPIOs, fast CPU, big RAM and storage, this could be the OS of your choice.

So the next time you think about throwing away your old router, check www.openwrt.org and see whether you can make it do some cool stuff.

You will be surprised.

[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