Getting started with Flipper zero on gentoo linux

Sat, Apr 29, 2023 2-minute read

I recently received my flipper zero:

Unboxing step 1 Unboxing step 2 Unboxing step 3

The build instructions for qFlipper(the GUI to update flipper firmware) are a bit lacking, so here are the steps I had to follow when building on gentoo.

One of the unstated dependencies for qFlipper is a tool called linuxdeploy available here: https://github.com/linuxdeploy/linuxdeploy

Unfortunately, linuxdeploy uses cmake as its build toolchain so there’s many chances for something to go wrong. The instructions below are what worked for me:

1
2
3
4
5
6
7
git clone --recursive git@github.com:linuxdeploy/linuxdeploy.git
cd linuxdeploy
edit src/core/appdir.cpp and replace "copyright.h" with "copyright/copyright.h"
mkdir build
cd build
cmake ..
make && make install

Note that the –recursive flag for git clone is necessary or you will be missing files required for compilation. Also the “make install” may require sudo depending on your permissions for /usr/local/bin

Note also, in the context of gentoo you will need libpng and libjpeg-turbo to have been compiled with support for static libraries by specifying the static-libs USE flag. The copyright.h fix above was described here: https://github.com/linuxdeploy/linuxdeploy/issues/212

Now we need linuxdeploy’s appimage plugin and the appimagetool binary.

1
2
3
4
5
6
git clone --recursive git@github.com:linuxdeploy/linuxdeploy-plugin-appimage.git 
cd linuxdeploy-plugin-appimage
mkdir build
cd build
cmake ..
make && make install

The appimagetool binary is built from the AppImageKit repo which is an utter mess to compile (for example this issue) , so I just grabbed a release from here: https://github.com/AppImage/AppImageKit/releases Specifically https://github.com/AppImage/AppImageKit/releases/download/13/appimagetool-x86_64.AppImage

then I made it executable and put it in my path:

1
2
chmod +x appimagetool-x86_64.AppImage
sudo cp appimagetool-x86_64.AppImage /usr/local/bin/appimagetool

Once you’ve installed linuxdeploy and its dependencies, it’s finally time to build the qFlipper GUI, which has a dependency on nanopb. First clone the qFlipper repo from here: https://github.com/flipperdevices/qFlipper

1
2
3
git clone --recursive git@github.com:flipperdevices/qFlipper.git
./build_linux.sh
sh setup_rules.sh

The –recursive flag should pull in the nanopb dependency. setup_rules.sh will install the necessary udev rules to let you run the qFlipper GUI without being root. Note that in gentoo you will also need the qtserialport package to be installed.

Now to finally start the UI:

1
./build/qFlipper
which should give you this screen:

qFlipper startup screen after you click the update button, the progress bar will move forward: qFlipper startup screen and then eventually tell you to follow the progress on the screen of the flipper device itself which will look like: qFlipper radio update qFlipper writing flash and then when the update finishes successfully: qFlipper update success