Skip to content

How to Compile the Firmware From Source

You Don't Need To

We are pretty addicted to GitHub Actions. Just fork the repo, enable GitHub actions and push, GH will leave you all the binaries already compiled in the actions artifacts.

Set up Windows Subsystem for Linux

If you are using Windows 10 or newer, the best way to build the rusEFI firmware is by setting up Windows Subsystem for Linux, which allows you to run tools built for Linux on your Windows computer.

  1. Install WSL
    Run the following in an elevated powershell:

    Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
    
  2. Download Linux
    Download the appx for Ubuntu 20.04 from here: WSL Install Manual
    Or type the following into powershell:

    cd ubuntu/
    Invoke-WebRequest -Uri <https://aka.ms/wsl-ubuntu-2004> -OutFile Ubuntu.appx -UseBasicParsing
    

    This command will download the file to the currently active directory.

  3. Install Linux

    PS C:\Windows\system32> cd c:/Ubuntu
    PS C:\Ubuntu> Add-AppxPackage Ubuntu_2004.2020.424.0_x64.appx
    

    Open the Start menu and launch Linux
    Wait for it to complete install and ask for username and password

  4. Check WSL default install
    In powershell type:

    wslconfig /l
    

    Make sure the Ubuntu 20.04 is marked as default.

  5. Now just follow the Linux instructions below.

Without WSL

A less fancy toolchain without WSL works as well. There is a forum thread on building the firmware, but be aware that it contains some out-of-date information.

Linux

These instructions apply to Debian and Ubuntu-based Linux distros. If you are running a different distro, you probably know how to adjust them to suit.

  1. Install git

    sudo apt update
    sudo apt install git
    
  2. Clone the repository

    git clone https://github.com/<YOUR GITHUB USERNAME>/rusefi.git
    
  3. Run the setup script

    cd rusefi/firmware
    bash setup_linux_environment.sh
    
  4. Run the compile script

    bash bin/compile.sh
    

    This will give you a list of build targets to choose from. Enter the corresponding number and press enter.