Saturday, 8 January 2011

Building openWRT

I have got a little bifferboard single board computer which I intend to use to run pywws to send data from our weather station to the weather underground site on the internet.

The bifferboard comes installed with a very small linux distribution called openWRT.   It has a very small python installed, but no python USB support.

I have struggled a bit to work out how the openWRT package system works - the official wiki is a bit confused about what the current version is called (kamikaze or backfire).  It implies you can add packages by downloading them from svn, but this didn't seem to do anything.
I found a useful forum post here, which seems to be the best set of instructions.
You can do

./scripts/feeds update -a
This downloads the list of packages, but does not do anything else.
To get the buildroot system to compile it for you you need to 'install' it using:
./scripts/feeds install python 
./scripts/feeds install pyusb
You can then do "make menuconfig" and python and pyusb are shown to be compiled as packages "".
'make' actually compiles it.
I'll update this when I work out how to add these to the firmware image...

2 comments:

Anonymous said...

To get the full package set I usually just do:

svn co svn://svn.openwrt.org/openwrt/trunk/
cd trunk
make package/symlinks

And then:
make menuconfig
to choose the packages. I'm not sure if it's documented anywhere, but adding the packages as [*] compiles them and puts them in the firmware, adding as [m] compiles them only so they can be installed to the running firmware later.

Graham Jones said...

Ah - I think it was the make package/symlinks that I was missing - I'll try that next time - just experimenting with OpenEmbedded instead at the moment to see if I can get the hang of that.