This is an old revision of the document!
ADI default firmware images:
This zip file should include these files:
Filename | Purpose |
---|---|
boot.dfu | DFU file for First Stage Boot Loader, and U-Boot |
boot.frm | Firmware file for First Stage Boot Loader, U-Boot and it's default environment |
pluto.dfu | DFU file for Pluto Firmware, this would include FPGA Bit File, Linux kernel (all drivers), and ram based file system |
m2k.dfu | DFU file for M2k Firmware, this would include FPGA Bit File, Linux kernel (all drivers), and ram based file system |
pluto.frm | Firmware file for Pluto Firmware, this would include FPGA Bit File, Linux kernel (all drivers), and ram based file system |
m2k.frm | Firmware file for M2k Firmware, this would include FPGA Bit File, Linux kernel (all drivers), and ram based file system |
uboot-env.dfu | DFU file which includes the default U-Boot environment |
This assumes that you have USB plugged into the middle connector, as described at the hardware section and have Windows drivers or Mac drivers installed.
Before you update, check your existing version to understand if you really want to upgrade. There are a few ways to determine the version of firmware on your device.
Use your favourite shell to access iio_attr
, and ask the device:
rgetz@brain:~$ iio_attr -a -C fw_version Using auto-detected IIO context at URI "usb:4.25.5" fw_version: v0.31
The version on this devices is 0.31
SSH to the device. In the splash screen it will tell you…
If you can't remember the username/password, if it is the default, it will be on the mass storage device info.html
page, under “Build Settings”. By default, it is username: root
; password is analog
.
rgetz@brain:~$ ssh root@192.168.2.1 Warning: Permanently added '192.168.2.1' (ECDSA) to the list of known hosts. root@192.168.2.1's password: analog Welcome to: ______ _ _ _________________ | ___ \ | | | / ___| _ \ ___ \ | |_/ / |_ _| |_ ___ \ `--.| | | | |_/ / | __/| | | | | __/ _ \ `--. \ | | | / | | | | |_| | || (_) /\__/ / |/ /| |\ \ \_| |_|\__,_|\__\___/\____/|___/ \_| \_| v0.31 http://wiki.analog.com/university/tools/pluto #
The version on this devices is 0.31
If you are less keyboard prone, then you can check visually, as well.
Open the PlutoSDR
mass storage device or M2K
mass storage device. This will have a file called info.html
. Double clicking on this file should open it in your favourite browser, clicking on the firmware
tag in the top should take you down to a section that looks like this:
The version on this devices is 0.31
All the above methods will work on a the most recent revisions, but there are some additional methods that will only work on rev C or D.
This assumes that you have USB plugged into the far right “power” connector, as described at the hardware section. The 2nd USB connector (the one labeled with the AC adapter logo) is not only power for USB OTG, but also a USB console. This means you can do things without using SSH, although you will need some sort of terminal application for your computer.
If you see don't see anything - that may be normal until you say hello, with the return key. Then you should see either the pluto>
prompt (if you are in U-Boot); or a prompt for username/password (if you are booted into Linux).
then just follow the instructions above.
The easiest way to update the firmware is to use the mass storage device included in the default image. There are times when this might not be possible (when you aren't using the default image, or if you accidentally bricked your device by unplugging it during a firmware upgrade).
There are very legitimate Security Risks about loading random firmware images onto devices like the ADALM-PLUTO or ADALM2000, however, we decided early on that a learning tool must be open and accessible for people to experiment on. Please only use firmware images you have received from trusted locations.
Copy the pluto.frm
or m2k.frm
file onto the mass storage device, and then eject it. If you have a Rev.C Pluto, copy the entire unzipped plutosdr-fw-v0.33.zip
file. LED1 will start blinking rapidly.
LED1
to blink rapidly. This means programming is taking place. Do not remove power (or USB) while the device is blinking rapidly. It does take approximately 4 minutes to properly program the device.
It's exactly the same as the GUI instructions, copy it, and then eject it, then power cycle it. It's a little more tricky since eject
needs the base device (it wants /dev/sdb
not /dev/sdb1
).
analog@imhotep:~/pluto$ cp ./pluto.frm /media/analog/PlutoSDR/ analog@imhotep:~/pluto$ mount | grep PlutoSDR | awk '{print $1}' /dev/sdb1 analog@imhotep:~/pluto$ sudo eject /dev/sdb analog@imhotep:~/pluto$ echo “WAIT 4 minutes for firmware to update!!!! Do not unplug the device.”
Many people remotely deploy their PlutoSDR, (via a USB ↔ Ethernet dongle), and need to maintain their system over the network. To do that get the pluto.frm
file or the boot.frm
file from the release zip file on the device and install that with the update_frm.sh
utility which is found on release since 2018 (v0.29)
rgetz@brain:~/github/plutosdr_scripts$ ssh root@pluto.local root@192.168.1.104's password: analog Welcome to: ______ _ _ _________________ | ___ \ | | | / ___| _ \ ___ \ | |_/ / |_ _| |_ ___ \ `--.| | | | |_/ / | __/| | | | | __/ _ \ `--. \ | | | / | | | | |_| | || (_) /\__/ / |/ /| |\ \ \_| |_|\__,_|\__\___/\____/|___/ \_| \_| v0.33 https://wiki.analog.com/university/tools/pluto # wget https://api.github.com/repos/analogdevicesinc/plutosdr-fw/releases/latest Connecting to api.github.com (140.82.114.5:80) Connecting to api.github.com (140.82.114.5:443) wget: note: TLS certificate validation not implemented saving to 'latest' latest 100% |* * * * * *| 9728 0:00:00 ETA 'latest' saved # grep “browser_download_url.*plutosdr-fw-” latest | cut -d : -f 2,3 | awk '{print $1}' | tr -d \“ https://github.com/analogdevicesinc/plutosdr-fw/releases/download/v0.34/plutosdr-fw-v0.34.zip # wget https://github.com/analogdevicesinc/plutosdr-fw/releases/download/v0.34/plutosdr-fw-v0.34.zip Connecting to github.com (140.82.114.3:443) wget: note: TLS certificate validation not implemented Connecting to objects.githubusercontent.com (185.199.109.133:443) saving to 'plutosdr-fw-v0.34.zip' plutosdr-fw-v0.34.zip 100% |* * * * * * * * *| 19.2M 0:00:00 ETA 'plutosdr-fw-v0.34.zip' saved # unzip -l plutosdr-fw-v0.34.zip Archive: plutosdr-fw-v0.34.zip Length Date Time Name --------- ---------- ----- ---- 10580851 08-20-2021 14:13 pluto.dfu 131088 08-20-2021 14:13 uboot-env.dfu 10580868 08-20-2021 14:13 pluto.frm 469532 08-20-2021 14:13 boot.dfu 601645 08-20-2021 14:13 boot.frm -------- ------- 22363984 5 files # unzip plutosdr-fw-v0.34.zip pluto.frm Archive: plutosdr-fw-v0.34.zip inflating: pluto.frm # update_frm.sh ./pluto.frm 161+1 records in 161+1 records out Done # reboot
USB Device Firmware Upgrade (DFU) is an official USB device class specification of the USB Implementers Forum. It specifies a vendor and device independent way of updating the firmware of a USB device. The concept is to have only one vendor-independent update tool as part of the operating system, which can then (given a particular firmware image) be downloaded into the device. During the firmware upgrade operation (when the Pluto or M2k is in “DFU” mode), the device changes its operating mode (it's no longer an SDR or an instrument, no longer uses it's standard PID/VID, but becomes a flash programmer).
This should only be necessary to recover your device if something accidentally happened during a firmware update (like having loose USB plugs, or bad USB cables, which cause a power cycle during a normal firmware update.)
In general, the preferred firmware upgrade is via the mass storage device. There are 3 ways to enter the DFU mode manually:
The device enters DFU mode in case booting the multi component FIT image (Flattened Image Tree) fails. This may happen due to checksum failure caused by a corrupted previous firmware update.
When the device is in DFU mode, the DONE LED is OFF, while LED1 is constantly ON. The device switches it’s USB PID to 0xB674 (PlutoSDR DFU)
0456
is the Analog Devices Vendor ID (VID), by using using lsusb
, you can check the mode. In normal use mode, the PlutoSDR will show up as Product ID (PID) b673:
analog@imhotep:~$ lsusb | grep 0456 Bus 003 Device 008: ID 0456:b673 Analog Devices, Inc.And in DFU mode:
analog@imhotep:~$ lsusb | grep 0456 Bus 003 Device 009: ID 0456:b674 Analog Devices, Inc.
How to update the firmware using DFU mode? How to rewrite the default uboot environment?
The PlutoSDR/M2K driver package bundles also a dfu utility. There is a windows command console batch script called UPDATE.BAT which eases the update procedure.
Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\tmp>UPDATE.BAT c:\tmp\pluto.dfu dfu-util 0.9 Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. Copyright 2010-2016 Tormod Volden and Stefan Schmidt This program is Free Software and has ABSOLUTELY NO WARRANTY Please report bugs to http://sourceforge.net/p/dfu-util/tickets/ Opening DFU capable USB device... ID 0456:b674 Run-time device DFU version 0110 Claiming USB DFU Interface... Setting Alternate Setting #1 ... Determining device status: state = dfuIDLE, status = 0 dfuIDLE, continuing DFU mode device DFU version 0110 Device returned transfer size 4096 Copying data from PC to DFU device Download [=========================] 100% 8694467 bytes Download done. state(7) = dfuMANIFEST, status(0) = No error condition is present state(2) = dfuIDLE, status(0) = No error condition is present Done! C:\tmp>
sudo dfu-util -a firmware.dfu -D pluto.dfu
pluto.dfu
is your firmware file in the dfu format.
dfu-util
does not come with a default OSX install. You can install it with brew as:
brew install dfu-util
Updating the firmware is the same as Linux:
dfu-util -a firmware.dfu -D pluto.dfu
pluto.dfu
is your firmware file in the dfu format.
If those instructions didn't help - you might get here. Hopefully this will help describe things.
The first thing to try is to make sure the device (Pluto or M2k) is actually in DFU mode. This is accomplished by asking the dfu utilities to list any devices that it finds, their configuration, interface and altsetting.
Although these examples are on a Linux machine, on Windows, it is similar. When you installed the Pluto or M2k Windows Drivers, it put the dfu-utils
on your hard drive (that's why you accepted the GPL when you installed the Windows license). However, for many these are not on path. It's easy to go to this directory, and run things from there. For example:
C:\>cd “c:\Program Files\Analog Devices\PlutoSDR-M2K” C:\Program Files\Analog Devices\PlutoSDR-M2K>dfu-util.exe -l dfu-util 0.9 Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. Copyright 2010-2016 Tormod Volden and Stefan Schmidt This program is Free Software and has ABSOLUTELY NO WARRANTY Please report bugs to http://sourceforge.net/p/dfu-util/tickets/ Found DFU: [0456:b674] ver=0221, devnum=7, cfg=1, intf=0, path="1-1", alt=4, name="spare.dfu", serial="UNKNOWN" Found DFU: [0456:b674] ver=0221, devnum=7, cfg=1, intf=0, path="1-1", alt=3, name="uboot-env.dfu", serial="UNKNOWN" Found DFU: [0456:b674] ver=0221, devnum=7, cfg=1, intf=0, path="1-1", alt=2, name="uboot-extra-env.dfu", serial="UNKNOWN" Found DFU: [0456:b674] ver=0221, devnum=7, cfg=1, intf=0, path="1-1", alt=1, name="firmware.dfu", serial="UNKNOWN" Found DFU: [0456:b674] ver=0221, devnum=7, cfg=1, intf=0, path="1-1", alt=0, name="boot.dfu", serial="UNKNOWN"
Just don't type in the sudo
that is necessary on Linux.
Here it found one device, with 5 “partitions” in the flash map.
rgetz@brain:~/$ sudo dfu-util --list [sudo] password for rgetz: dfu-util 0.9 Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. Copyright 2010-2016 Tormod Volden and Stefan Schmidt This program is Free Software and has ABSOLUTELY NO WARRANTY Please report bugs to http://sourceforge.net/p/dfu-util/tickets/ Found DFU: [0456:b674] ver=0221, devnum=104, cfg=1, intf=0, path="3-1.6.6", alt=4, name="spare.dfu", serial="UNKNOWN" Found DFU: [0456:b674] ver=0221, devnum=104, cfg=1, intf=0, path="3-1.6.6", alt=3, name="uboot-env.dfu", serial="UNKNOWN" Found DFU: [0456:b674] ver=0221, devnum=104, cfg=1, intf=0, path="3-1.6.6", alt=2, name="uboot-extra-env.dfu", serial="UNKNOWN" Found DFU: [0456:b674] ver=0221, devnum=104, cfg=1, intf=0, path="3-1.6.6", alt=1, name="firmware.dfu", serial="UNKNOWN" Found DFU: [0456:b674] ver=0221, devnum=104, cfg=1, intf=0, path="3-1.6.6", alt=0, name="boot.dfu", serial="UNKNOWN" rgetz@brain:~/$
If this doesn't show up, try again. dfu-utils
is known to work better the 2nd time.
When the system boots, it follows this basic process:
boot
section) will load, uboot-env
and uboot-extra-env
sections), firmware
section).dfu-util - a short dfu primer
DFU has lots of options, the ones to remember are:
-l
List the currently attached DFU capable USB devices-a <altsetting>
Specify the Altseting of the DFU Interface-D <file
Write firmware from <file> into device-U <file>
Read firmware from device into <file>-R
Issue USB reset signalling after upload or download has finished.The file releases always include:
boot.dfu
pluto.dfu
uboot-env.dfu
And corruption of those sections can cause problems in the booting process. In order, try writing the:
rgetz@brain:~/$ sudo dfu-util -a firmware.dfu -D ./pluto.dfu dfu-util 0.9 Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. Copyright 2010-2016 Tormod Volden and Stefan Schmidt This program is Free Software and has ABSOLUTELY NO WARRANTY Please report bugs to http://sourceforge.net/p/dfu-util/tickets/ Match vendor ID from file: 0456 Match product ID from file: b673 Opening DFU capable USB device... ID 0456:b674 Run-time device DFU version 0110 Claiming USB DFU Interface... Setting Alternate Setting #1 ... Determining device status: state = dfuIDLE, status = 0 dfuIDLE, continuing DFU mode device DFU version 0110 Device returned transfer size 4096 Copying data from PC to DFU device Download [=========================] 100% 10623523 bytes Download done. state(7) = dfuMANIFEST, status(0) = No error condition is present state(2) = dfuIDLE, status(0) = No error condition is present Done! rgetz@brain:~/$
rgetz@brain:~/$ sudo dfu-util -a boot.dfu -D ./boot.dfu dfu-util 0.9 Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. Copyright 2010-2016 Tormod Volden and Stefan Schmidt This program is Free Software and has ABSOLUTELY NO WARRANTY Please report bugs to http://sourceforge.net/p/dfu-util/tickets/ Match vendor ID from file: 0456 Match product ID from file: b673 Opening DFU capable USB device... ID 0456:b674 Run-time device DFU version 0110 Claiming USB DFU Interface... Setting Alternate Setting #0 ... Determining device status: state = dfuIDLE, status = 0 dfuIDLE, continuing DFU mode device DFU version 0110 Device returned transfer size 4096 Copying data from PC to DFU device Download [=========================] 100% 469388 bytes Download done. state(7) = dfuMANIFEST, status(0) = No error condition is present state(2) = dfuIDLE, status(0) = No error condition is present Done! rgetz@brain:~/$
rgetz@brain:~/$ sudo dfu-util -a uboot-env.dfu -D ./uboot-env.dfu dfu-util 0.9 Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. Copyright 2010-2016 Tormod Volden and Stefan Schmidt This program is Free Software and has ABSOLUTELY NO WARRANTY Please report bugs to http://sourceforge.net/p/dfu-util/tickets/ Match vendor ID from file: 0456 Match product ID from file: b673 Opening DFU capable USB device... ID 0456:b674 Run-time device DFU version 0110 Claiming USB DFU Interface... Setting Alternate Setting #3 ... Determining device status: state = dfuIDLE, status = 0 dfuIDLE, continuing DFU mode device DFU version 0110 Device returned transfer size 4096 Copying data from PC to DFU device Download [=========================] 100% 131072 bytes Download done. state(7) = dfuMANIFEST, status(0) = No error condition is present state(2) = dfuIDLE, status(0) = No error condition is present Done!
uboot-extra-env.dfu
. This is rarely needed to be changed. This is where things like factory calibration and ppm offset are stored. A good idea is just to check it:rgetz@brain:~/ sudo dfu-util -a uboot-extra-env.dfu -U ./uboot-extra-env.dfu dfu-util 0.9 Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. Copyright 2010-2016 Tormod Volden and Stefan Schmidt This program is Free Software and has ABSOLUTELY NO WARRANTY Please report bugs to http://sourceforge.net/p/dfu-util/tickets/ Opening DFU capable USB device... ID 0456:b674 Run-time device DFU version 0110 Claiming USB DFU Interface... Setting Alternate Setting #2 ... Determining device status: state = dfuIDLE, status = 0 dfuIDLE, continuing DFU mode device DFU version 0110 Device returned transfer size 4096 Copying data from DFU device to PC Upload [=========================] 100% 4096 bytes Upload done.This will upload things from the device to your PC. It can be checked with
hexdump
.rgetz@brain:~/Downloads/pluto2$ hexdump -C ./uboot-extra-env.dfu 00000000 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| * 00001000Here we can see this is blank (all
0xFF
), meaning that no custom calibration data is currently used on this device. This is common for early models. If you need to clear it, just make a file that starts with 0xFF
, and write it. Note that this section of flash is protected. Therefore, the flash must be unlocked if you want to overwrite this partition. The U-Boot environment sections are protected with a CRC32, so if something has become corrupt, it will be skipped. Even if this partition is bad and CRC32 passes, only the xo_correction is used and itself will fail gracefully if wrong values provided.-R
option.rgetz@brain:~/ sudo dfu-util -R -a uboot-extra-env.dfu -U ./uboot-extra-env.dfu dfu-util 0.9 Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. Copyright 2010-2016 Tormod Volden and Stefan Schmidt This program is Free Software and has ABSOLUTELY NO WARRANTY Please report bugs to http://sourceforge.net/p/dfu-util/tickets/ Opening DFU capable USB device... ID 0456:b674 Run-time device DFU version 0110 Claiming USB DFU Interface... Setting Alternate Setting #2 ... Determining device status: state = dfuIDLE, status = 0 dfuIDLE, continuing DFU mode device DFU version 0110 Device returned transfer size 4096 Copying data from DFU device to PC Upload [=========================] 100% 4096 bytes Upload done. Resetting USB to switch back to runtime mode
When a new release is made, you can be automatically notified if you are watching the release section on github. To do this, you need to be logged into github with a valid account (and have a valid email where you want notifications to show up). Then just go to the GitHub Scopy site; GitHub M2k Firmware site or GitHub PlutoSDR Firmware site. Scopy has built in notification (it will tell you on startup if a new feature is available, but if you are a lab manager, and still want to be notified - the default github notifications are the best solution).
Click on the “Watch” button in the right hand side, then decide if you want to watch everything, or just releases (under Custom). (Click on the picture if you need it bigger).