|
| 1 | +--- |
| 2 | +title: Upgrading Ev3dev |
| 3 | +subject: System |
| 4 | +--- |
| 5 | + |
| 6 | +{% include icon.html type="warning" %} |
| 7 | +By upgrading ev3dev you are also upgrading the drivers, so there may be changes that break user software. |
| 8 | +You should check the ev3dev [news feed](http://www.ev3dev.org/news/){: .alert-link } for breaking changes before upgrading. |
| 9 | +{: .alert .alert-warning} |
| 10 | + |
| 11 | +There are multiple ways that you can upgrade ev3dev. |
| 12 | + |
| 13 | +# Option 1: Re-flashing your SD card (fastest) |
| 14 | + |
| 15 | +This option will likely be the fastest by far. **By re-flashing your SD card, however, you will lose any files that were stored in your ev3dev installation, including code and installed programs.** |
| 16 | + |
| 17 | +1. Download a recent image file. We haven't done a full release in a while, so |
| 18 | + we recommend that you download the newest [nightly image](https://oss.jfrog.org/list/oss-snapshot-local/org/ev3dev/brickstrap/). |
| 19 | + - Choose a recent day from the list on that page and then download the file |
| 20 | + that matches your platform based on the table below. |
| 21 | + |
| 22 | + Hardware platform | File name |
| 23 | + -----------------------------------|------------- |
| 24 | + LEGO MINDSTORMS EV3 | `nightly-ev3dev-jessie-ev3-generic-####-##-##.img.xz` |
| 25 | + Raspberry Pi Zero / Raspberry Pi 1 | `nightly-ev3dev-jessie-rpi-generic-####-##-##.img.xz` |
| 26 | + Raspberry Pi 2 / Raspberry Pi 3 | `nightly-ev3dev-jessie-rpi2-generic-####-##-##.img.xz` |
| 27 | + BeagleBone | `nightly-ev3dev-jessie-bone-generic-####-##-##.img.xz` |
| 28 | + {: .table .table-striped .table-bordered } |
| 29 | + |
| 30 | +2. Head over to our [Getting Started guide](/docs/getting-started#step-2-copy-the-image-on-to-the-sd-card) |
| 31 | + and follow the "Copy the image to the SD card" step. |
| 32 | + |
| 33 | + |
| 34 | +# Option 2: Upgrading all installed software (slowest) |
| 35 | +**Make sure that you have already configured a network connection and connected to ev3dev via SSH to use this option.** |
| 36 | + |
| 37 | +This option will be the slowest, but it is easy to do and will also make sure that other software is up-to-date. |
| 38 | + |
| 39 | +1. Run the following commands in order, waiting for each command to complete |
| 40 | + before typing the next. Some steps require confirmation to proceed. Press |
| 41 | + 'y' when asked. |
| 42 | + |
| 43 | + sudo apt-get update |
| 44 | + sudo apt-get upgrade |
| 45 | + sudo apt-get dist-upgrade |
| 46 | + |
| 47 | + {% include icon.html type="warning" %} |
| 48 | + The `upgrade` step may take a couple hours to complete, depending on your |
| 49 | + network connection, hardware and the number of outdated packages. |
| 50 | + {: .alert .alert-warning} |
| 51 | + |
| 52 | +2. Reboot by typing `sudo reboot` or by using the "Shutdown..." menu in Brickman |
| 53 | + (if using an EV3, click the "back" button to access it). |
| 54 | + |
| 55 | +# Option 3: Upgrading only the kernel |
| 56 | +**Make sure that you have already configured a network connection and connected to ev3dev via SSH to use this option.** |
| 57 | + |
| 58 | +This will be slower than option one but significantly faster than option two. |
| 59 | +This option will only upgrade core ev3dev packages and not other software. |
| 60 | + |
| 61 | +1. Run the following commands, replacing `linux-image-ev3dev-ev3` as shown below: |
| 62 | + |
| 63 | + sudo apt-get update |
| 64 | + sudo apt-get install linux-image-ev3dev-ev3 |
| 65 | + |
| 66 | + Hardware platform | Package name |
| 67 | + -----------------------------------|------------- |
| 68 | + LEGO MINDSTORMS EV3 | `linux-image-ev3dev-ev3` |
| 69 | + Raspberry Pi Zero / Raspberry Pi 1 | `linux-image-ev3dev-rpi` |
| 70 | + Raspberry Pi 2 / Raspberry Pi 3 | `linux-image-ev3dev-rpi2` |
| 71 | + BeagleBone | `linux-image-ev3dev-bb.org` |
| 72 | + {: .table .table-striped .table-bordered } |
| 73 | + |
| 74 | +2. Reboot if the kernel was updated. |
| 75 | + - If the second command prints |
| 76 | + `linux-image-ev3dev-ev3 is already the newest version.` there was no new |
| 77 | + kernel available, and you are done. |
| 78 | + - If the command does not output that line, you will need to reboot the EV3 |
| 79 | + before the new kernel can be used. Do so through |
| 80 | + Brickman on the EV3 display or by running `sudo reboot`. |
| 81 | + |
| 82 | +# Confirming that the upgrade worked |
| 83 | + |
| 84 | +After the brick has rebooted (assuming you installed a new kernel version), press `About` on the brick's main menu and scroll down to "Kernel" to confirm it |
| 85 | +has a current kernel. |
| 86 | + |
| 87 | +{% include screenshot.html source="/images/brickman/about-kernel-version.png" caption="Brickman's about page" %} |
0 commit comments