The Arduino Yun is a 2 part device, half a conventional Arduino micro controller and half an embedded Linux using OpenWRT/Linino with Ethernet and Wifi connectivity.
Because there is an operating system as well as application code on the Linux side there is a need to keep that code up-to date. This guide compares the different techniques and discusses when best to use each one.
The Linux portion is made up of the software components, the boot loader (U-Boot), the Kernel and the Applications/Configuration. Reflashing the Yun will update all of these so you will loose your configuration and applications. For the applications it is possible to upgrade those independently using the package manager OPKM.
Ensure that you've copied your applications and configuration or have a way of recovering those before continuing with these processes. Note that you may need to update packages using OPKM following a reflashing.
There are various versions of the instructions for updating the flash, many of these are specific to particular companies or projects. However there are generic instructions on the Arduino site. Arduino - YunSysupgrade
IMPORTANT! |
---|
Do not power off the Yun whilst doing a reflashing process!
It will take about 3 to 5 minutes so ensure that you have time and power to complete the process. Powering off the Yun in a middle of a reflashing process may result in a device that won't boot. |
Getting images
The Yun will support several different images including OpenWRT, you can even build your own images. For starting up or recovering a Yun you are probably best with the official Arduino image, an alternative that I've found to work is the Linino image.
http://www.arduino.cc/en/Main/Software
http://wiki.linino.org/doku.php
SD Card and Web UI
This is the standard approach, you copy the image file to the SD card and use the UI to load it. It's a fairly straight forward process with the only "gotcha" being that the Wifi is reset hence you need to connect to the Arduino's access point as if you'd just started from scratch.
SSH and sysupgrade
Using the console and sysupgrade is a good approach if you are comfortable with using the shell. It would also be a good approach if you had many devices to upgrade as it could be automated. You can also use the WGET command to download the image directly onto the Yun which is a good approach if you don't have another technique for getting images onto the SD Card. The Linino site suggests that you can preserve your configuration files with this approach but I've not tried that.
Linino Wiki - Upgrade using SysUpgrade
U-Boot and TFTP
WARNING! |
---|
Following this guide will VOID the WARRANTY of your Yún |
The instructions at the top of the Arduino page tell you not to do this step unless you are really certain. I've not actually managed to find out what that warranty consists of so I'm not sure what you are giving away.
However I'd recommend trying the other approaches first as this technique is a little fiddly. The key thing about this process is that it will work even if your Yun does not boot up properly. I had to try this approach as I'd unthinkingly pulled the power in the middle of a reflashing step.
This approach requires 3 different images. It's worth doing these as a set because there may be incompatibilities between the different components. I ended up at one point with a board that would boot partially and then report lots of errors.
You must use the WIRED Ethernet connector for this approach.
You also need to setup a TFTP server, I found a simple one for windows that I could use. It's worth downloading a client too so you can test your server. Note that you might need to adjust your firewall settings to be able to use the server.
Top Comments