An entire fantasy football season has passed since finishing the Trophy of the Future, my “world’s first internet-connected fantasy football trophy,” and my league has a new champion. That means it’s time to revisit the project to tie up some loose ends! More on that will come in time, but first I want to share the solution to the initial problem I encountered.
I wanted to upgrade the Yun to the latest version of OpenWrt because opkg was throwing weird “failed to download” errors. From scanning the Arduino forums, it seemed like updating OpenWrt was the recommended first step (and as it turns out, the update also fixes Heartbleed, so it’s worth doing anyway). The instructions assume you have a MicroSD mounted in your Yun, which I don’t, but it is still possible to do the upgrade without one.
The OpenWrt image clocks in at 16 MB, and by running df -h
I saw that the Yun’s onboard memory had around 20 MB free in the /tmp
directory. I downloaded the latest Yun image from the Arduino website and unzipped it on my Mac, then used scp
to move the file to the Yun:
scp openwrt-ar71xx-generic-yun-16M-squashfs-sysupgrade.bin root@arduino.local:/tmp/
According to Arduino’s upgrade guide, the next step would be to run run-sysupgrade
on the OpenWrt image, but a second problem surfaces here. It turns out that the first thing run-sysupgrade
does is copy the image to /tmp
, which errors because the file already exists. I could move the file to a subdirectory so run-sysupgrade
could copy it back, but the Yun’s onboard memory doesn’t have enough space for that.
The solution here, noted on OpenWrt’s system upgrade page, is to use sysupgrade
– note the lack of run-
in that command’s name. Like this:
sysupgrade /tmp/openwrt-ar71xx-generic-yun-16M-squashfs-sysupgrade.bin
Three minutes later, you have upgraded OpenWrt on your Arduino Yun! All the configurations should be the same, but you will have to reinstall any opkg packages.