This is where all the magic of the user interface of MustardOS comes to life.
You will need make, ccache, and a C compiler.
Some dependencies are fetched and built from source on first use (see External
Dependencies), which additionally needs curl or wget, perl, and tar. Optionally,
dialog or whiptail gives build.sh a guided setup, and nasm is needed for ffmpeg's x86 assembly on x86 hosts.
Everything else depends on which target you are building for.
Cross-compiling for ARM devices (normal workflow)
A pre-built aarch64 toolchain is expected at ~/x-tools/aarch64-buildroot-linux-gnu/. Other toolchain roots can be
pointed to by setting the XTOOL
environment variable. The toolchain must include gcc, g++, ar, ld, and strip for the target host tuple.
Native builds for x86 / x86-64
A system gcc and the following development packages are required:
| Package | Purpose |
|---|---|
SDL2 |
Display and input |
SDL2_mixer |
Audio |
SDL2_ttf |
Font rendering |
SDL2_image |
Image loading |
libcurl |
Network requests |
libpng |
PNG support |
On Fedora/RHEL:
sudo dnf install SDL2-devel SDL2_mixer-devel SDL2_ttf-devel SDL2_image-devel libcurl-devel libpng-devel
On Debian/Ubuntu:
sudo apt install libsdl2-dev libsdl2-mixer-dev libsdl2-ttf-dev libsdl2-image-dev libcurl4-openssl-dev libpng-dev
All cross-compile builds go through build.sh, which sets up the toolchain environment and then calls make.
Run it with no arguments for a guided setup that asks for the device, build type and toolchain, then starts the
build. It uses dialog or whiptail when either is installed, and falls back to plain numbered prompts otherwise.
# Guided / Spoon Fed
./build.shPassing arguments skips the questions entirely, so scripted builds are unaffected.
# Standard release build (aarch64 Cortex-A53, the most common target)
BUILD=release ./build.sh make -j$(nproc)
# Verbose build (shows each compiler command and all error output)
DEBUG=1 BUILD=release ./build.sh make -j$(nproc)DEVICE targets
DEVICE |
Use for |
|---|---|
ARM64_A53 |
H700, A133P - default if unset |
ARM64_A53_CRYPTO |
A53 with hardware AES/CRC |
ARM64 |
Generic ARMv8-A |
ARM32 |
Original 35x (ARMv7 hard-float) |
ARM32_A9 |
Cortex-A9 with NEON |
X86_64 |
Generic 64-bit x86 |
RISCV64 |
Generic 64-bit RISC-V |
GENERIC |
Anything else, with ARCH_FLAGS |
The toolchain is detected automatically from $HOME/x-tools (override with XTOOL), picking one whose architecture
matches DEVICE. Set XDIR to a directory name under it to choose a specific toolchain.
# Example: build for generic ARM64
DEVICE=ARM64 BUILD=release ./build.sh make -j$(nproc)BUILD accepts release (production image) or test (development image with test flags). It defaults to test if
unset.
Use DEVICE=NATIVE to build and run directly on the host machine. This is useful for quick iteration and debugging
without hardware.
DEVICE=NATIVE BUILD=release ./build.sh make -j$(nproc)Binaries and shared libraries land in bin/ just like a cross-compiled build.
Builds are incremental. Header dependencies are tracked with -MMD -MP, and the generated dependency files are kept
under .deps/, one directory per component, so a rebuild only touches what actually changed.
# Full rebuild from nothing
./build.sh make cleanChanging DEVICE, BUILD, OPT_LEVEL or DEBUGSYM forces a clean automatically, since objects compiled with
different flags cannot be reused. The current configuration is recorded in .build-config.
Some third party libraries are not kept in this repository. They are fetched from upstream, checksum verified, built
static and installed into external/prefix/$DEVICE by external/build.sh, which the build calls for you. Each library
stamps what it built, so repeat runs cost nothing.
# Rebuild one of them after bumping its pinned version
DEVICE=ARM64_A53 EXT_ARCH_FLAGS="-mcpu=cortex-a53" ./external/build.sh ffmpegLinking them statically means the version shipped in a device rootfs never matters, and their symbols are hidden with
--exclude-libs so libretro cores keep their own copies.
common: Common Libraries and Functionsexternal: Third party dependencies fetched and built from sourcelookup: Friendly name lookup table mainly for arcade contentlvgl: LVGL Embedded Graphics Librarymodule: Frontend menu system modulesplutosvg: Bundled SVG rendering libraryretro: LibRetro core hoststage: Hardware overlay staging system
mubattery: Background battery monitor daemonmucredits: Supporter Creditsmufbset: Customised framebuffer resolution switchermuhotkey: Global Hotkey Systemmulog: System log viewermulookup: Content Name Lookupmuremap: Background input remap daemonmurgb: RGB LED and MCU controller daemonmusplash: Standalone PNG splash screenmuwarn: First Install Disclaimer Messagemuxcharge: Charging Information Screenmuxfrontend: Main Frontend Specific Runnermuxmessage: Information and Progress Screen
muxactivity: Activity Tracker Informationmuxapp: Application Listmuxappcon: Application Control Managermuxarchive: Archive Managermuxassign: Assignable System/Core for Contentmuxbackup: Device Backup Menumuxbtall: Bluetooth Device Listmuxbtcon: Bluetooth Connection Managermuxbtdev: Bluetooth Device Informationmuxchrony: System Clock Informationmuxcoladjust: Content Colour Adjustment Menumuxcolfilter: Content Colour Filter Menumuxcollect: Content Collection Managermuxconfig: Configuration Menumuxconnect: Connectivity Menumuxcontrol: Content Control Scheme Selectormuxcustom: Customisation Menumuxdanger: Dangerous Settingsmuxdevice: Device Settingsmuxdownload: Archive Downloadermuxfont: Font Settingsmuxgov: System Governor Selectormuxhdmi: HDMI Configurationmuxhistory: Content History Menumuxinfo: Information Menumuxinstall: First Time Install Menumuxkiosk: Kiosk Mode Managementmuxlanguage: Language Selectormuxlaunch: Main Menumuxnetadv: Advanced Network Settingsmuxnetinfo: Network Informationmuxnetprofile: Network Profile Managermuxnetscan: Network SSID Scannermuxnetwork: Network Configurationmuxnews: Community Newsmuxoption: Content Explorer Optionsmuxoverlay: Content Overlay Settingsmuxpass: Passcode Screenmuxpasscfg: Passcode Configurationmuxpicker: Customisation Package Selectormuxplore: Content Explorermuxpower: Power Settingsmuxraopt: RetroArch Optionsmuxremap: Button Remappingmuxrgb: RGB LED Settingsmuxrtc: Date and Timemuxsearch: Content Searchmuxshader: Shader Settingsmuxshare: Shared Frontend Module Statemuxshot: Screenshot Viewermuxsort: Sorting Settingsmuxspace: Disk Usage Informationmuxsplash: Simple PNG Based Splash Screenmuxstorage: Storage Migrate/Sync Informationmuxsysinfo: System Informationmuxtag: Content Tag Managermuxtask: Task Toolkitmuxtester: Input Testermuxtext: Basic Text File Viewermuxtheme: Theme Pickermuxthemedown: Custom Theme Downloadmuxthemefilter: Custom Theme Filtermuxthemeopt: Theme Optionsmuxtimezone: Timezone Selectormuxtweakadv: Advanced Settingsmuxtweakgen: General Settingsmuxvisual: Interface Optionsmuxwebserv: Web Services
Embedded graphics library used as the core UI toolkit for all menus and widgets. Includes the TinyTTF font renderer for glyph rasterisation.
- Version: 8.4.0
- License: MIT
- Location:
lvgl/
Compact SVG rendering library written in C. Used to parse and render SVG icons for list and grid view glyphs, with scaling driven by the LVGL custom image decoder pipeline. Bundles PlutoVG, the 2D vector graphics canvas and rasteriser it is built on.
- PlutoSVG Version: 0.0.8
- PlutoVG Version: 1.3.3
- Author: Samuel Ugochukwu
- License: MIT
- Location:
plutosvg/
Single-file C library for parsing JSON. Used throughout the codebase to read language translation files, configuration data, and API responses.
- Author: Josh Baker
- License: MIT
- Location:
common/json/
Minimal C INI file parser. Used for reading and writing .ini configuration files.
- Author: univrsal
- License: BSD 2-Clause
- Location:
common/mini/
Single-file C library for deflate/inflate, zlib-compatible compression, and ZIP archive reading and writing. Used to extract downloaded ZIP archives.
- Version: 11.3.0
- License: MIT (portions also released as public domain / Unlicense)
- Location:
common/miniz/
Extremely fast non-cryptographic hash algorithm. Used to compute file checksums for content verification.
Note: xxHash is non-cryptographic and is not resistant to deliberate collision attacks. It is suited for detecting accidental data corruption (content verification) but must not be used for tamper detection or cryptographic integrity verification.
- Version: 0.8.3
- Author: Yann Collet
- License: BSD 2-Clause
- Location:
common/xxhash/
Single-header C library for TrueType font parsing and glyph rasterisation. Used by the LVGL TinyTTF renderer to load and render custom TTF fonts at runtime.
- Version: 1.26
- Author: Sean Barrett
- License: Public domain
- Location:
common/stb/stb_truetype.h
Single-header C library for rectangle packing. Used by the LVGL TinyTTF renderer to pack glyph bitmaps into atlas textures.
- Version: 1.01
- Author: Sean Barrett
- License: Public domain
- Location:
common/stb/stb_rect_pack.h
Single-header C library for writing PNG, BMP, TGA, JPEG, and HDR image files. Used to capture and save screenshots from the framebuffer.
- Version: 1.16
- Author: Sean Barrett
- License: Public domain
- Location:
common/stb/stb_image_write.h
These are not kept in the repository. external/build.sh downloads a pinned release, verifies its SHA-256, and builds
a trimmed static copy into external/prefix/$DEVICE. Versions and checksums are pinned at the top of each
external/<name>.sh.
Audio and video decoding for theme wallpapers, the screensaver, the boot logo, and content video previews. Built with
--disable-everything plus only the MP4 demuxer and the handful of decoders common/video.c uses.
- Version: 9.0.1
- License: LGPL 2.1 or later
- Build:
external/ffmpeg.sh
Multi-format archive reading. Used read-only by muxretro for content stored in archives. Compression codecs are detected per sysroot, since they are not present everywhere.
- Version: 3.8.9
- License: BSD 2-Clause
- Build:
external/libarchive.sh
TLS, hashing and signature verification for Network Play and achievement accounts. Built statically so the 1.1 and 3.x split across device rootfs images stops mattering.
- Version: 3.5.7 (LTS branch)
- License: Apache 2.0
- Build:
external/openssl.sh
RetroAchievements client, hashing and libretro memory helper. Desktop integration and the RetroAchievements integration DLL sources are excluded.
- Version: 12.4.0
- License: MIT
- Build:
external/rcheevos.sh
Unicode text processing library covering normalisation, collation, and case mapping without external dependencies. Used for locale-aware, Unicode-correct natural sorting of content and file lists.
- Version: 0.3.6
- Author: Francesco Bigiarini
- License: MIT
- Build:
external/mojibake.sh