raspberrypi / rpi-imager

The home of Raspberry Pi Imager, a user-friendly tool for creating bootable media for Raspberry Pi devices.
https://www.raspberrypi.com/software
Other
1.66k stars 252 forks source link
raspberry-pi raspberry-pi-1 raspberry-pi-2 raspberry-pi-3 raspberry-pi-4b raspberry-pi-5 raspberry-pi-computer raspberry-pi-zero raspberry-pi-zero-2-w raspberry-pi-zero-w raspberry-pi-zero-wh raspberrypi raspberrypi4

Raspberry Pi Imager

Raspberry Pi Imaging Utility

How to use Raspberry Pi Imager

Please see our official documentation.

Contributing

Linux

Get dependencies

sudo apt install --no-install-recommends build-essential cmake git libgnutls28-dev

Get the source

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

Build the AppImage

Modify appimagecraft.yml:

Now, use AppImageCraft to build your AppImage:

cd rpi-imager
export LD_LIBRARY_PATH=${your_Qt6_install_path}/lib
./${your_platform_appimagecraft}.AppImage

Now mark the AppImage as executable, and run it:

chmod +x ./Raspberry_Pi_Imager-*.AppImage
./Raspberry_Pi_Imager-*.AppImage

Windows

Get dependencies

Building

Building Raspberry Pi Imager on Windows is best done with the Qt Creator GUI.

macOS

Get dependencies

Building

Linux embedded (netboot) build

The embedded build runs under a minimalistic Linux distribution compiled by buildroot. To build:

cd rpi-imager/embedded
./build.sh

The result will be in the "output" directory. The files can be copied to a FAT32 formatted SD card, and inserted in a Pi for testing. If you would like to build a (signed) netboot image there are tools for that at: https://github.com/raspberrypi/usbboot/tree/master/tools

Other notes

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 usage of the application (e.g. uptake of Raspberry Pi Imager versions and which images and operating systems are most popular) when using the default image repository, the URL, operating system name and category (if present) of a selected image are sent along with the running version of Raspberry Pi Imager, your operating system, CPU architecture, locale and Raspberry Pi revision (if applicable) to https://rpi-imager-stats.raspberrypi.com 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

License

The main code of the Imaging Utility is made available under the terms of the Apache license. See license.txt and files in "src/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. For the embedded (netboot) build see also "embedded/legal-info" for more information about the extra system software included in that.