Since getting the bifferboard booting and discovering that the opkg python segfaults, I’ve been looking at getting a custom build of OpenWRT (that includes python) built. On the face of it this should be straightforward, but sadly it hasn’t quite turned out that way.

The bifferboard is supported by a small community and there is a lot of information available onine, but some of it is out of date and the board has seen enough development to make some of it irrelevant. Picking the right pieces isn’t as easy as it could be, but after some false starts I’m starting to get there. This is roughly what I’d suggest and is what I’ll do next time…

***I started out looking at the code in but this had issues even building whereas the repository listed below seemed to work better. YMMV

  1. Checkout the code from github.
  2. Get the MAC address from the label on the bifferboard. This will be printed as 00b3f600xxxx.
  3. Go to the ‘bb’ directory where you checked out the repository in step #1.
  4. I’m not interested in QEMU, so won’t bother using the supplied Makefile. Hence cd openwrt
  5. The kernel you build needs to have a kernel command line set or it’ll hang (this was something that took me a while to figure out), so

make kernel_menuconfig
Find the line, Processor type and features --->
Press Enter key to enter the menu
Fine the line [ ] Built-in kernel command line (at the bottom)
Press space so it is marked as [*] (if it’s already got [*] then just leave it)
Go to the line Built-in kernel command string (you may need to press down arrow to find it)
Press Enter key and enter ‘console=uart,io,0x3f8 rootfstype=squashfs,jffs2
Use the right arrow key to highlight Exit and press Enter key to return to main menu
Highlight Exit and press enter again, setting the changed settings as default.

  1. At this point simply build the kernel to make sure all is well.
  2. If it completes OK, you should find the images in the bin/rdc directory. The one I used was
    named openwrt-rdc-jffs2-64k-bifferboard.img

With that done, it’s time to try and get the image installed onto the bifferboard. I’ve installed via the serial cable and network, but the network method seems easiest and is certainly the fastest, so that’s what I’m describing below.

  1. Have the board connected to power and network, but switched off.
  2. Assuming you haven’t changed directory from the above instructions, run this command
    sudo ../tools/ if>MAC address> bin/rdc/openwrt-rdc-jffs2-64k-bifferboard.img<br></br>
    if> is the network interface on your computer, so for me it was wlan0 but could well be eth0 or something totally different if you’re not on linux.
    MAC address> is the MAC address of the board that you recorded in #2 above. (I added the ‘:’ but looking at the code you should be OK just using the number.)
    ***You’ll need to be sudo as the script opens a raw socket and most systems don’t allow regular users to do such things.

  1. Switch on the bifferboard. This needs to be done within 10 seconds of starting the script or things won’t happen. This time limit seemed sensible and wasn’t too hard, but it makes sense to be aware of it before trying for the first time 🙂
  2. If all is well the number will count up and the image will be flashed to the bifferboard!
  3. The board will automatically boot into your new image, so no need to power off/on. (Nice touch).
    If you have a serial cable plugging it it and monitoring the boot is useful, but if you don’t wait around 5 minutes to give it time to complete.

telnet biffer<br></br>

If all is well you’ll be in!

Some things I’ve found useful along the way,

  • to record a serial session via minicom, run minicom -C
  • from time to time I had problems with seeming to work but not sending any data. Not sure what it was, but waiting a few minutes then trying again fixed it
  • after a few different configurations of OpenWRT a make clean && make was needed to get an image that would install

I’m still playing with configurations to get everything working as I want and will try and post more details when I have it working 🙂