Skip to main content

Building in Fedora 44

This guide covers building the Betaflight firmware and configurator on Fedora 44.

Clone Betaflight Repository and Install Toolchain​

Install build dependencies (clang and libblocksruntime-devel are needed for unit tests via make test):

$ sudo dnf check-update
$ sudo dnf install git clang libblocksruntime-devel
$ sudo dnf group install "C Development Tools and Libraries"

Clone the repository, install the ARM toolchain, and build:

$ git clone https://github.com/betaflight/betaflight.git
$ cd betaflight
$ make arm_sdk_install
$ make configs
$ make MATEKH743

Updating and Rebuilding Firmware​

$ cd betaflight
$ git pull
$ make clean
$ make configs
$ make MATEKH743

Building the Betaflight Configurator​

Install Node.js 24 using nvm:

$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
$ source ~/.bashrc
$ nvm install 24

Alternatively, if you prefer system packages:

$ sudo dnf install nodejs24-bin

Install system dependencies, clone, and build:

$ sudo dnf install libatomic rpm-build dpkg
$ git clone https://github.com/betaflight/betaflight-configurator.git
$ cd betaflight-configurator
$ npm install
$ npm run dev

This starts the development server at http://localhost:8080/.

Note: check the .nvmrc file for the currently required Node.js version.

Installing Chromium​

The Betaflight Configurator requires a Chromium-based browser for WebSerial API support (Firefox does not support WebSerial). Install Chromium via dnf:

$ sudo dnf install chromium

Open http://localhost:8080/ in Chromium to use the configurator's development build with serial device access.

Serial Permissions​

If ModemManager is installed, remove it to prevent it from interfering with flight controller connections:

$ sudo dnf remove ModemManager

Add yourself to the dialout group:

$ sudo usermod -aG dialout $(whoami)

Create the udev rules file for DFU and USB-to-serial device access. Save and reboot after adding the following contents:

$ sudo nano /etc/udev/rules.d/45-stdfu-permissions.rules

# Notify ModemManager this device should be ignored
ACTION!="add|change|move", GOTO="mm_usb_device_blacklist_end"
SUBSYSTEM!="usb", GOTO="mm_usb_device_blacklist_end"
ENV{DEVTYPE}!="usb_device", GOTO="mm_usb_device_blacklist_end"

# STM32 DFU
ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", ENV{ID_MM_DEVICE_IGNORE}="1"
# GD32 DFU
ATTRS{idVendor}=="28e9", ATTRS{idProduct}=="0189", ENV{ID_MM_DEVICE_IGNORE}="1"
# AT32 DFU
ATTRS{idVendor}=="2e3c", ATTRS{idProduct}=="df11", ENV{ID_MM_DEVICE_IGNORE}="1"
# APM32 DFU
ATTRS{idVendor}=="314b", ATTRS{idProduct}=="0106", ENV{ID_MM_DEVICE_IGNORE}="1"
# X32 DFU
ATTRS{idVendor}=="3997", ATTRS{idProduct}=="df11", ENV{ID_MM_DEVICE_IGNORE}="1"
# RP2350 (Raspberry Pi Pico) Bootloader
ATTRS{idVendor}=="2e8a", ATTRS{idProduct}=="000f", ENV{ID_MM_DEVICE_IGNORE}="1"

# USB-to-Serial
# FTDI FT232R
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ENV{ID_MM_DEVICE_IGNORE}="1"
# FTDI FT2232H (also ESP-Prog)
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", ENV{ID_MM_DEVICE_IGNORE}="1"
# FTDI FT4232H
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6011", ENV{ID_MM_DEVICE_IGNORE}="1"
# FTDI FT232H
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6014", ENV{ID_MM_DEVICE_IGNORE}="1"
# FTDI FT230X/FT231X
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015", ENV{ID_MM_DEVICE_IGNORE}="1"
# Silicon Labs CP210x
ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", ENV{ID_MM_DEVICE_IGNORE}="1"
# Silicon Labs CP210x
ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea61", ENV{ID_MM_DEVICE_IGNORE}="1"
# Silicon Labs CP210x
ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea62", ENV{ID_MM_DEVICE_IGNORE}="1"
# Silicon Labs CP2105
ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea70", ENV{ID_MM_DEVICE_IGNORE}="1"
# Silicon Labs CP2108
ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea71", ENV{ID_MM_DEVICE_IGNORE}="1"
# WCH CH341
ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="5523", ENV{ID_MM_DEVICE_IGNORE}="1"
# WCH CH340 (variant)
ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7522", ENV{ID_MM_DEVICE_IGNORE}="1"
# WCH CH340
ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", ENV{ID_MM_DEVICE_IGNORE}="1"
# WCH CH340S
ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7584", ENV{ID_MM_DEVICE_IGNORE}="1"
# WCH CH343
ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="55d3", ENV{ID_MM_DEVICE_IGNORE}="1"
# WCH CH9102
ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="55d4", ENV{ID_MM_DEVICE_IGNORE}="1"
# Prolific PL2303
ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", ENV{ID_MM_DEVICE_IGNORE}="1"
# Prolific PL2303GC
ATTRS{idVendor}=="067b", ATTRS{idProduct}=="23a3", ENV{ID_MM_DEVICE_IGNORE}="1"
# Microchip MCP2221
ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="00dd", ENV{ID_MM_DEVICE_IGNORE}="1"
# Microchip MCP2200
ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="00df", ENV{ID_MM_DEVICE_IGNORE}="1"
# Espressif ESP32-S3/C3 USB-Serial/JTAG
ATTRS{idVendor}=="303a", ATTRS{idProduct}=="1001", ENV{ID_MM_DEVICE_IGNORE}="1"

LABEL="mm_usb_device_blacklist_end"

# STM32 DFU Access
SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", TAG+="uaccess"
# GD32 DFU Access
SUBSYSTEM=="usb", ATTRS{idVendor}=="28e9", ATTRS{idProduct}=="0189", TAG+="uaccess"
# AT32 DFU Access
SUBSYSTEM=="usb", ATTRS{idVendor}=="2e3c", ATTRS{idProduct}=="df11", TAG+="uaccess"
# APM32 DFU Access
SUBSYSTEM=="usb", ATTRS{idVendor}=="314b", ATTRS{idProduct}=="0106", TAG+="uaccess"
# X32 DFU Access
SUBSYSTEM=="usb", ATTRS{idVendor}=="3997", ATTRS{idProduct}=="df11", TAG+="uaccess"
# RP2350 (Raspberry Pi Pico) Bootloader Access
SUBSYSTEM=="usb", ATTRS{idVendor}=="2e8a", ATTRS{idProduct}=="000f", TAG+="uaccess"

# USB-to-Serial Access
# FTDI FT232R
SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", TAG+="uaccess"
# FTDI FT2232H (also ESP-Prog)
SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", TAG+="uaccess"
# FTDI FT4232H
SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6011", TAG+="uaccess"
# FTDI FT232H
SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6014", TAG+="uaccess"
# FTDI FT230X/FT231X
SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015", TAG+="uaccess"
# Silicon Labs CP210x
SUBSYSTEM=="usb", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", TAG+="uaccess"
# Silicon Labs CP210x
SUBSYSTEM=="usb", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea61", TAG+="uaccess"
# Silicon Labs CP210x
SUBSYSTEM=="usb", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea62", TAG+="uaccess"
# Silicon Labs CP2105
SUBSYSTEM=="usb", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea70", TAG+="uaccess"
# Silicon Labs CP2108
SUBSYSTEM=="usb", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea71", TAG+="uaccess"
# WCH CH341
SUBSYSTEM=="usb", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="5523", TAG+="uaccess"
# WCH CH340 (variant)
SUBSYSTEM=="usb", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7522", TAG+="uaccess"
# WCH CH340
SUBSYSTEM=="usb", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", TAG+="uaccess"
# WCH CH340S
SUBSYSTEM=="usb", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7584", TAG+="uaccess"
# WCH CH343
SUBSYSTEM=="usb", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="55d3", TAG+="uaccess"
# WCH CH9102
SUBSYSTEM=="usb", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="55d4", TAG+="uaccess"
# Prolific PL2303
SUBSYSTEM=="usb", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", TAG+="uaccess"
# Prolific PL2303GC
SUBSYSTEM=="usb", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="23a3", TAG+="uaccess"
# Microchip MCP2221
SUBSYSTEM=="usb", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="00dd", TAG+="uaccess"
# Microchip MCP2200
SUBSYSTEM=="usb", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="00df", TAG+="uaccess"
# Espressif ESP32-S3/C3 USB-Serial/JTAG
SUBSYSTEM=="usb", ATTRS{idVendor}=="303a", ATTRS{idProduct}=="1001", TAG+="uaccess"

Using Devcontainers​

Both the betaflight and betaflight-configurator repositories include .devcontainer/ configurations that follow the open Development Container Specification. These provide a fully configured build environment out of the box.

Devcontainers work with any editor or tool that supports the spec:

  • VS Code — via the Dev Containers extension
  • devpod — an open-source wrapper supporting CLion, IntelliJ, WebStorm, Zed, Cursor, and many more
  • Docker / Podman — directly from the command line, no IDE required

Install Podman (Fedora's default container runtime) if not already present:

$ sudo dnf install podman

For full details see the Building with Docker guide.

Using Toolbox Containers​

Toolbox provides isolated development containers on Fedora that share your home directory. This is useful for keeping build dependencies separate from your host system.

Create a Fedora 44 toolbox:

$ toolbox create betaflight
$ toolbox enter betaflight

Inside the toolbox, follow the build instructions above. Serial device access from inside toolbox containers requires the host udev rules to be configured as described in the Serial Permissions section above.

For firmware-only builds, a dedicated toolbox keeps the ARM toolchain isolated:

$ toolbox create --image registry.fedoraproject.org/fedora-toolbox:44 bf-firmware
$ toolbox enter bf-firmware
$ sudo dnf install git clang libblocksruntime-devel
$ sudo dnf group install "C Development Tools and Libraries"