Since my last post, there have been many great improvements to Micah’s Fadecandy project and the “fcserver” application I ported for Atheros-based OpenWRT devices. I didn’t really keep up with things and only just released builds with the newer versions. They’re at the same download URLs, just in release2. https://github.com/nemik/fadecandy-openwrt/releases/tag/release2
To keep this from happening again, it seems like a good idea to show people how to make their own OpenWRT builds with “fcserver” and other things they might want. The buildroot for OpenWRT is simple but can still be a challenge sometimes. That’s why the Vagrant http://www.vagrantup.com/ virtual machine helper is so awesome. It makes using virtual machines very easy on just about every platform. Unfortunately the complete Vagrant box with OpenWRT buid-root is over 2.7GB and is too much for me to host here for download. If anyone wants to help with this, please get in touch. But in the meantime, I’ll show you how to do the same thing yourself.
- Download and install Vagrant for your OS from http://www.vagrantup.com/
- Set up a Debian-Wheezy-based Vagrant box. Download “Debian Wheezy 7.2 amd64 (VirtualBox Guest Additions 4.3.0) (2013/10/19)” from http://www.vagrantbox.es/
- Save this to some directory for this project, call it “openwrt_vagrant”
vagrant box add fadecandy-openwrt debian-7.2.0.boxto add the box
- Download my Vagrantfile from http://nemik.net/x/Vagrantfile into the directory. This is the config for it, it will make the virtual machine run on IP “192.168.44.10”
vagrant init fadecandy-openwrtto initialize the box
- At this point it should be all set up, so let’s start the virtual machine with
- The box should come up successfully, and when it does, SSH into it with
vagrant ssh. You can also do this by doing:
ssh -i ~/.vangrant.d/insecure_private_key email@example.com
- Now we’re inside the Debian system! We should update it with
sudo apt-get updateand then
sudo apt-get upgrade
- The upgrades will require a restart of the box. Exit from it with
exitand then shut down the vagrant machine with
vagrant halt. Then start it up again with
vagrant upand SSH back in like in step 8
- When SSH’d back into the box, let’s install the build dependencies needed for building OpenWRT.
sudo apt-get install subversion build-essential git-core libncurses5-dev zlib1g-dev gawk
- Now let’s get OpenWRT source with
git clone git://git.openwrt.org/openwrt.git
- Go into the new source directory with
- Add my package to the feeds. Edit the “feeds.conf.default” file with vim or nano and add the line “src-git fadecandy git://github.com/nemik/fadecandy-openwrt.git” to the file
- Update and install the packages from the feeds by running
./scripts/feeds update -afollowed by
./scripts/feeds install -a
- It’s now time to set up the OpenWRT build configuration. Run
- In the menu, change your “Target Profile” to the device you’re targeting, like say a TP-Link TL-MR3040
- Turn off the firewall too so we don’t have to open more ports. Go to “Base System” and press space until “firewall” isn’t selected anymore.
- Go to “Utilities” and scroll down to “fcserver”. Press space on the option until it’s a star “*” and then exit from the menu and save it.
- Download some static files to go into the OpenWRT OS from http://nemik.net/x/openwrt-fc-files.tar.gz. Run
wget http://nemik.net/x/openwrt-fc-files.tar.gzand then
tar xzvf openwrt-fc-files.tar.gzThese file set up the default root password, wifi access point, and things like that.
- Now to finally do the build. For this, just run
- That should be it! If this finished successfully, you’ll have a build in “bin/ar71xx/” with the name “openwrt-ar71xx-generic-tl-mr3040-v2-squashfs-sysupgrade.bin” just like the ones I’ve been releasing.