There are situations in which the recommended upgrade procedure does not or cannot work. Typically, this is because there is something wrong with the existing Linux installation. Changing the default configuration and installing packages that take up too much space may cause the installation to become unstable.
This procedure uses U-Boot, something similar to the BIOS on a PC. U-Boot is a very small program executed right after you power on a Yún. With U-Boot you can restore a Yún to its factory settings. To reflash the Yún from the U-Boot prompt, you will download 3 different image files and write their contents on the flash memory of the Yún, erasing all previously stored information. It's a bit like formatting a computer's hard drive.
This should be considered an advanced topic, pay heed to the warnings throughout. These notes are for reference only. You should read and understand this document before trying anything mentioned below.
If you are in doubt about any of these steps, DO NOT follow this guide and send an email to support@arduino.cc
WARNING
Following this guide will VOID the WARRANTY of your Yún
Download the base images zip file. Extract the three files (uboot, kernel, rootfs).
For U-Boot to download the 3 files from your computer to the Yún, you first need to setup a TFTP server on your computer.
Show Windows instructionsShow Windows instructions
Show OS X instructionsShow OS X instructions
Show instructionsShow instructions
Show instructionsShow instructions
Connect your Yún to your computer with a USB cable. Then connect the Yún to your router or your computer with a wired Ethernet cable. This is crucial: you cannot reflash via wifi.
Open the Arduino IDE and upload the YunSerialTerminal example to your Yún.
You'll need to do the next step quickly. Open the Serial Monitor from the Arduino IDE, press the YUN RST
button (the white one near the LEDs), and press the Enter button a couple of times on your keyboard. If you're fast enough, you'll get something like the following in the Serial Monitor :
The ar7240>
is U-Boot prompt.
If you don't hit enter at the right time, and don't enter U-Boot, press the YUN RST
button once more and retry until you get U-Boot prompt.
Once inside U-Boot, you need to tell it your computer's IP address and the IP address for the Yún. Find the IP for your computer, and choose a unique address for the the Yún. If you're on a home network, you probably won't have any issues assigning something in the appropriate range (if you're in a network full of computers, you first need to ensure the IP address you'll assign to the Yún is not already used by someone else).
For example, your computer's IP address is 192.168.0.231, and you want to assign the Yún the address of 192.168.0.146. First set the IP of your computer in the Serial Monitor :
Reflashing U-Boot is a last option. These commands are only a reference.
In the Serial Monitor, type
If it takes a long time to see the prompt ar7240>
again, it means that you have used the wrong IP address for the Yún or your computer, your TFTP server is not running, or the Ethernet cable between the computer and Yún is not properly connected. Check these variables, and start over by pressing the YUN RST
button.
If the U-Boot prompt does appear (it should be quite quick), type the following commands, pressing Enter after each line :
In the Serial Monitor, type
ar7240>
again, it means that you have used the wrong IP address for the Yún or your computer, your TFTP server is not running, or the Ethernet cable between the computer and Yún is not properly connected. Check these variables, and start over by pressing the YUN RST
button.
If the U-Boot prompt does appear, type the following commands, pressing Enter after each line :
In the Serial Monitor, type
ar7240>
again, it means that you have used the wrong IP address for the Yún or your computer, your TFTP server is not running, or the Ethernet cable between the computer and Yún is not properly connected. Check these variables, and start over by pressing the YUN RST
button.
If the U-Boot prompt does appear, type the following commands, pressing Enter after each line :
After completing the above steps, if the U-Boot prompt appears, type the following command in the Serial monitor, followed by Enter :
OpenWrt-Yun will now start its boot process. Wait a couple of minutes (first boot is always slightly slower) and enjoy your freshly reflashed Yún.