The home of Retro Imager, a user-friendly tool for creating bootable media for retro handheld gaming devices.
Find a file
Floris Bos f682c3a7dd Image customization: search all mountpoints for config.txt
Search all mountpoints associated with the target drive for
FAT partition that has config.txt

Ref: #171
2021-03-22 13:21:56 +01:00
debian Linux only: allow NVMe destination drives 2021-02-26 14:54:25 +01:00
dependencies Shift+Ctrl+X for advanced users that likes to customize the image 2021-01-17 17:43:17 +01:00
fonts Qt/QML edition 2020-03-04 16:55:40 +01:00
i18n Merge pull request #170 from jose1711/sk_translat 2021-03-21 13:29:55 +01:00
icons Add new PNG icons 2020-12-09 14:54:54 +01:00
linux Linux only: allow NVMe destination drives 2021-02-26 14:54:25 +01:00
mac Mac: open preferences for user if Imager is not allowed access 2020-07-21 15:04:38 +02:00
windows Windows: show progress in taskbar 2020-12-09 14:23:40 +01:00
.gitignore update Chinese translation file rpi-imager_zh_cn.ts 2020-08-04 11:31:41 +08:00
acceleratedcryptographichash.cpp Use accelerated hashing for verification 2020-05-23 17:50:59 +02:00
acceleratedcryptographichash.h Mac: use system hash functions 2020-09-29 19:56:12 +02:00
CMakeLists.txt Windows: improve file system mounting for customization 2021-03-21 16:25:32 +01:00
config.h Telemetry: use POST 2020-12-08 13:36:02 +01:00
countries.txt Shift+Ctrl+X for advanced users that likes to customize the image 2021-01-17 17:43:17 +01:00
downloadextractthread.cpp Fix handling of .iso files 2021-01-26 22:17:56 +01:00
downloadextractthread.h Do not use libcurl for reading local files 2020-06-01 19:43:51 +02:00
downloadstatstelemetry.cpp Telemetry: use POST 2020-12-08 13:36:02 +01:00
downloadstatstelemetry.h Telemetry: use POST 2020-12-08 13:36:02 +01:00
downloadthread.cpp Image customization: search all mountpoints for config.txt 2021-03-22 13:21:56 +01:00
downloadthread.h Windows: improve file system mounting for customization 2021-03-21 16:25:32 +01:00
driveformatthread.cpp Shift+Ctrl+X for advanced users that likes to customize the image 2021-01-17 17:43:17 +01:00
driveformatthread.h Qt/QML edition 2020-03-04 16:55:40 +01:00
drivelistitem.cpp Improve drive listing 2020-07-03 21:16:49 +02:00
drivelistitem.h Improve drive listing 2020-07-03 21:16:49 +02:00
drivelistmodel.cpp Filter out root mount even if not filtering out system drives 2021-02-26 14:53:12 +01:00
drivelistmodel.h Improve drive listing 2020-07-03 21:16:49 +02:00
drivelistmodelpollthread.cpp Enumerate drives in seperate thread 2020-07-02 23:31:20 +02:00
drivelistmodelpollthread.h Enumerate drives in seperate thread 2020-07-02 23:31:20 +02:00
imagewriter.cpp Fix Windows progress on images >2GB 2021-01-30 23:18:26 +01:00
imagewriter.h Shift+Ctrl+X option screen: allow persisting settings 2021-01-20 13:04:18 +01:00
license.txt Shift+Ctrl+X for advanced users that likes to customize the image 2021-01-17 17:43:17 +01:00
localfileextractthread.cpp Improve status reporting 2020-11-19 18:10:05 +01:00
localfileextractthread.h Do not use libcurl for reading local files 2020-06-01 19:43:51 +02:00
main.cpp Revert "Linux: disable high dpi scaling on incorrect EDID" 2021-03-06 11:39:58 +01:00
main.qml Linux embedded: quit (reboot) when finished 2021-03-06 11:40:46 +01:00
MsgPopup.qml Linux embedded: quit (reboot) when finished 2021-03-06 11:40:46 +01:00
nan.h Qt/QML edition 2020-03-04 16:55:40 +01:00
networkaccessmanagerfactory.cpp Qt/QML edition 2020-03-04 16:55:40 +01:00
networkaccessmanagerfactory.h Qt/QML edition 2020-03-04 16:55:40 +01:00
OptionsPopup.qml Shift+Ctrl+X option screen: allow persisting settings 2021-01-20 13:04:18 +01:00
powersaveblocker.cpp Qt/QML edition 2020-03-04 16:55:40 +01:00
powersaveblocker.h Qt/QML edition 2020-03-04 16:55:40 +01:00
qml.qrc Shift+Ctrl+X option screen: allow persisting settings 2021-01-20 13:04:18 +01:00
qtquickcontrols2.conf Qt/QML edition 2020-03-04 16:55:40 +01:00
README.md Remove download count retention period from README 2021-03-12 11:35:35 +00:00
timezones.txt Shift+Ctrl+X for advanced users that likes to customize the image 2021-01-17 17:43:17 +01:00
UseSavedSettingsPopup.qml Shift+Ctrl+X option screen: allow persisting settings 2021-01-20 13:04:18 +01:00

rpi-imager

Raspberry Pi Imaging Utility

  • Download the latest version for Windows, macOS and Ubuntu from the Raspberry Pi downloads page.
  • To install on Raspberry Pi OS, use sudo apt update && sudo apt install rpi-imager.

License

The main code of the Imaging Utility is made available under the terms of the Apache license. See license.txt and files in "dependencies" folder for more information about the various open source licenses that apply to the third-party dependencies used such as Qt, libarchive, drivelist, mountutils and libcurl.

How to rebuild

Debian/Ubuntu Linux

Get dependencies

Install the build dependencies:

sudo apt install --no-install-recommends build-essential devscripts debhelper cmake git libarchive-dev libcurl4-openssl-dev \
    qtbase5-dev qtbase5-dev-tools qtdeclarative5-dev libqt5svg5-dev qttools5-dev qt5-default libssl-dev \
    qml-module-qtquick2 qml-module-qtquick-controls2 qml-module-qtquick-layouts qml-module-qtquick-templates2 qml-module-qtquick-window2 qml-module-qtgraphicaleffects

Get the source

git clone --depth 1 https://github.com/raspberrypi/rpi-imager

Build the Debian package

cd rpi-imager
debuild -uc -us

debuild will compile everything, create a .deb package and put it in the parent directory. Can install it with apt:

cd ..
sudo apt install ./rpi-imager*.deb

It should create an icon in the start menu under "Utilities" or "Accessories". The imaging utility will normally be run as regular user, and will call udisks2 over DBus to perform privileged operations like opening the disk device for writing. If udisks2 is not functional on your Linux distribution, you can alternatively start it as "root" with sudo and similar tools.

Fedora/RHEL/CentOS Linux

Get dependencies

Install the build dependencies:

sudo yum install git gcc gcc-c++ make cmake libarchive-devel libcurl-devel openssl-devel qt5-qtbase-devel qt5-qtquickcontrols2-devel qt5-qtsvg-devel qt5-linguist

Get the source

git clone --depth 1 https://github.com/raspberrypi/rpi-imager

Build and install the software

cd rpi-imager
cmake .
make
sudo make install

Windows

Get dependencies

  • Get the Qt online installer from: https://www.qt.io/download-open-source During installation, choose a Qt 5.x with Mingw32 32-bit toolchain and CMake.

  • If using the official Qt distribution that does NOT have schannel (Windows native SSL library) support, compile OpenSSL libraries ( https://wiki.qt.io/Compiling_OpenSSL_with_MinGW ) and copy the libssl/crypto DLLs to C:\qt\5.x\mingw73_32\bin

  • For building installer get Nullsoft scriptable install system: https://nsis.sourceforge.io/Download

  • It is assumed you already have a proper code signing certificate, and signtool.exe from the Windows SDK installed. If NOT and are you only compiling for your own personal use, comment out all lines mentioning signtool from CMakelists.txt and the .nsi installer script.

Building

Building can be done manually using the command-line, using "cmake", "make", etc., but if you are not that familar with setting up a proper Windows build environment (setting paths, etc.), it is easiest to use the Qt creator GUI instead.

  • Download source .zip from github and extract it to a folder on disk
  • Open CMakeLists.txt in Qt creator.
  • For builds you distribute to others, make sure you choose "Release" in the toolchain settings and not the debug flavour.
  • Menu "Build" -> "Build all"
  • Result will be in ../build_rpi-imager_someversion
  • Go to the BUILD folder, right click on the .nsi script "Compile NSIS script", to create installer.

Note: the CMake integration in Qt Creator is a bit flaky at times. If you made any custom changes to the CMakeLists.txt file and it subsequently gets in an endless loop where it never finishes the "configures" stage while re-processing the file, delete "build_rpi-imager_someversion" directory and try again.

Mac OS X

Get dependencies

  • Get the Qt online installer from: https://www.qt.io/download-open-source During installation, choose a Qt 5.x edition and CMake.
  • For creating a .DMG for distribution you can use an utility like: https://github.com/sindresorhus/create-dmg
  • It is assumed you have an Apple developer subscription, and already have a "Developer ID" code signing certificate for distribution outside the Mac Store. (Privileged apps are not allowed in the Mac store)

Building

  • Download source .zip from github and extract it to a folder on disk
  • Start Qt Creator (may need to start "finder" navigate to home folder using the "Go" menu, and find Qt folder to start it manually as it may not have created icon in Applications), and open CMakeLists.txt
  • Menu "Build" -> "Build all"
  • Result will be in ../build_rpi-imager_someversion
  • For distribution to others: code sign the .app, create a DMG, code sign the DMG, submit it for notarization to Apple and staple the notarization ticket to the DMG.

E.g.:

cd build-rpi-imager-Desktop_Qt_5_14_1_clang_64bit-Release/
codesign --deep --force --verify --verbose --sign "YOUR KEYID" --options runtime rpi-imager.app
mv rpi-imager.app "Raspberry Pi Imager.app"
create-dmg Raspberry\ Pi\ Imager.app
mv Raspberry\ Pi\ Imager\ .dmg imager.dmg
xcrun altool --notarize-app -t osx -f imager.dmg --primary-bundle-id="org.raspberrypi.imagingutility" -u YOUR-EMAIL-ADDRESS -p YOUR-APP-SPECIFIC-APPLE-PASSWORD -itc_provider TEAM-ID-IF-APPLICABLE
xcrun stapler staple imager.dmg

Other notes

Debugging

On Linux and Mac the application will print debug messages to console by default if started from console. On Windows start the application with the command-line option --debug to let it open a console window.

Custom repository

If the application is started with "--repo [your own URL]" it will use a custom image repository. So can simply create another 'start menu shortcut' to the application with that parameter to use the application with your own images.

Telemetry

In order to understand which images and operating systems are most popular and re-organise the application accordingly, when using the default image repository, the URL, operating system name and category (if present) of a selected image are sent to https://rpi-imager-stats.raspberrypi.org by downloadstatstelemetry.cpp.

This web service is hosted by Heroku and only stores an incrementing counter using a Redis Sorted Set for each URL, operating system name and category per day in the eu-west-1 region and does not associate any personal data with those counts. This allows us to query the number of downloads over time and nothing else.

The last 1,500 requests to the service are logged for one week before expiring as this is the minimum log retention period for Heroku.

On Windows, you can opt out of telemetry by disabling it in the Registry:

reg add "HKCU\Software\Raspberry Pi\Imager" /v telemetry /t REG_DWORD /d 0

On Linux, run rpi-imager --disable-telemetry or add the following to ~/.config/Raspberry Pi/Imager.conf:

[General]
telemetry=false

On macOS, disable it by editing the property list for the application:

defaults write org.raspberrypi.Imager.plist telemetry -bool NO