AXL SDK
Version |
0.1.0 |
License |
Apache-2.0 |
C header |
|
Website |
|
Downloads |
|
Build |
|
AXL
AXL (AximCode Library) is a GLib-inspired C library for UEFI, plus an SDK for building UEFI applications and drivers without EDK2.
AXL Library (
libaxl.a) — the library itself: data structures, file I/O, networking (TCP, UDP, HTTP, TLS), graphics, event loop, logging, and more. UTF-8 everywhere, standard C types,axl_snake_caseAPI.AXL SDK — packages the library with headers, a CRT0 entry point, and
axl-cc(a compiler wrapper). Build.efibinaries with a single command — no EDK2 source tree, no gnu-efi, just clang or GCC.
#include <axl.h>
int main(int argc, char **argv) {
axl_printf("Hello from %s\n", argv[0]);
AXL_AUTOPTR(AxlString) s = axl_string_new("AXL ");
axl_string_append_printf(s, "v%d", 1);
axl_printf("%s\n", axl_string_str(s));
return 0;
}
$ axl-cc hello.c -o hello.efi # 11KB binary, zero external deps
Include <axl.h> for the full API, or individual headers for specific
modules (e.g., <axl/axl-mem.h>, <axl/axl-net.h>).
AXL Library API
Category |
Functions |
GLib equivalent |
|---|---|---|
Memory |
|
|
Auto-cleanup |
|
|
Strings |
|
|
String builder |
|
|
String search |
|
|
Printf |
|
|
File I/O |
|
POSIX-style |
File ops |
|
|
Directories |
|
|
Hash table |
|
|
Dynamic array |
|
|
Linked lists |
|
|
Queue |
|
|
JSON |
|
json-glib |
Cache |
|
— |
Config + CLI |
|
|
Event loop |
|
|
Deferred work |
|
— |
Logging |
|
|
HTTP client |
|
libsoup |
HTTP server |
|
libsoup |
TCP sockets |
|
|
UDP sockets |
|
— |
TLS (optional) |
|
— (mbedTLS) |
Graphics |
|
— (UEFI GOP) |
Task pool |
|
— (UEFI MP) |
Environment |
|
|
System |
|
— (UEFI-specific) |
SMBIOS |
|
— (UEFI-specific) |
Utilities |
|
|
Quick start
Requirements
GCC + binutils for the host toolchain, plus
gcc-aarch64-linux-gnu+binutils-aarch64-linux-gnuif you want to cross-build aa64 UEFI binaries.No EDK2, no gnu-efi, no external UEFI SDK.
Install the SDK
Binary packages are published on each release. Each package bundles both x64 and aa64 UEFI target libs.
Debian / Ubuntu:
curl -LO https://github.com/aximcode/axl-sdk-releases/releases/latest/download/axl-sdk.deb
sudo apt install ./axl-sdk.deb
Fedora / RHEL:
curl -LO https://github.com/aximcode/axl-sdk-releases/releases/latest/download/axl-sdk.rpm
sudo dnf install ./axl-sdk.rpm
Packages ship with mbedtls compiled in, so apps that use
https:// URLs link and run without extra setup. Apps that
don’t reference TLS don’t incur any binary-size cost — the
linker only pulls in mbedtls .o files when actually used. Users
who want an even smaller libaxl.a can rebuild from source
with AXL_TLS=0.
Windows (WSL): install the Debian or RHEL package inside
Ubuntu / Debian / Fedora WSL — the .deb / .rpm paths above
work unchanged. axl-cc runs in the WSL shell; point your
Windows editor at the WSL filesystem (\\wsl$\Ubuntu\...) and
the resulting .efi is a real PE32+ that boots on any UEFI
system. This is the path we recommend — no separate packaging,
no parallel toolchain to maintain.
Windows (native MSYS2 / MinGW-w64): no binary package yet.
Build from source under an MSYS2 UCRT64 shell with
pacman -S mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-binutils
installed, then make as on Linux. Cross-aa64 needs an
aarch64 ELF cross-toolchain (e.g. an aarch64-*-gcc from
MSYS2 or from Arm’s GNU toolchain archives); point at it with
make ARCH=aa64 CROSS=<prefix>-.
macOS: no binary package yet. Install cross-toolchains via the messense tap:
brew tap messense/macos-cross-toolchains
brew install x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu
git clone https://github.com/aximcode/axl-sdk-releases.git
cd axl-sdk-releases
make CROSS=x86_64-unknown-linux-gnu- # x64
make ARCH=aa64 CROSS=aarch64-unknown-linux-gnu- # aa64
Native Apple Clang can’t produce the ELF intermediates AXL
needs (we run gcc → ld -T linker.lds → objcopy --target pei-*);
a GNU cross-toolchain is required. The linux-gnu triple is
fine — libaxl.a is built -ffreestanding -nostdlib, so none
of the glibc baggage gets linked into your .efi.
Pin a specific version: use the versioned URL pattern
https://github.com/aximcode/axl-sdk-releases/releases/download/v<version>/<file>.
Each release publishes a SHA256SUMS alongside the packages.
Build from source: git clone https://github.com/aximcode/axl-sdk-releases.git
(checkout a v* tag for a specific release), or download the
Source code (tar.gz) archive linked on each
release page,
then run ./scripts/install.sh --prefix /opt/axl-sdk for the
same FHS layout under /opt/axl-sdk/.
Pre-built UEFI tools (USB-stick use)
For quick UEFI-shell troubleshooting without installing the SDK,
download a flat tarball of the tool .efi binaries:
# x86_64
curl -LO https://github.com/aximcode/axl-sdk-releases/releases/latest/download/axl-sdk-tools-x64.tar.gz
# AArch64
curl -LO https://github.com/aximcode/axl-sdk-releases/releases/latest/download/axl-sdk-tools-aa64.tar.gz
Extract to a FAT-formatted USB stick, boot to the UEFI Shell, run
a tool with --help. Includes mkrd, hexdump, fetch, find,
grep, sysinfo, netinfo, ipmi, rfbrowse. Built with TLS
so fetch handles HTTPS and rfbrowse (Redfish) works.
Build an app
axl-cc hello.c -o hello.efi
Cross-build for AARCH64
axl-cc --arch aa64 hello.c -o hello-aa64.efi
CMake
find_package(axl REQUIRED)
axl_add_app(hello hello.c)
Build a driver
axl-cc --type driver mydriver.c -o mydriver.efi
Run tests
# Unit tests (776 tests)
./test/integration/test-axl.sh
# Tool tests (hexdump, grep, find, sysinfo, etc.)
./test/integration/test-tools.sh
# HTTP integration tests
./test/integration/test-http.sh
# UDP integration tests
./test/integration/test-udp.sh
# HTTPS integration tests (requires AXL_TLS=1 build)
./test/integration/test-https.sh
# All architectures (x64 + aa64)
./test/integration/test-all.sh
Documentation
API Reference — auto-generated from headers (Sphinx + Breathe)
Coding Style — naming conventions, formatting
Porting Guide — how to port EDK2 apps to axl-cc
Design — architecture, phases
Roadmap — phase tracker
Architecture
AXL Library
include/axl/— public headers.axl_snake_casefunctions,AxlPascalCasetypes, standard C types, UTF-8 strings.src/— module implementations. Each directory has aREADME.mdwith overview, examples, and usage guidance: mem, data (str, string, hash, array, list, queue, json, cache), io, log, util (args, config, path, env, sys, driver), loop (event loop, defer, signal), task (arena, task pool, buf pool, async), net (tcp, udp, http, tls), gfx.Backend (
src/backend/) — platform abstraction over UEFI firmware services. Single native implementation.
AXL SDK
axl-cc— compiler wrapper. Invokes clang + lld-link (or GCC) with the right flags, includes, and libraries.axl-crt0— UEFI entry point stub. BridgesEFI_HANDLE+EFI_SYSTEM_TABLEtoint main(int argc, char **argv).axl.cmake— CMake integration viaaxl_add_app().include/uefi/— auto-generated UEFI type definitions from the UEFI spec HTML. No dependency on EDK2 headers.
Optional: TLS
TLS support uses mbedTLS
(v3.6.3) as a git submodule. Build with AXL_TLS=1 to enable
HTTPS server/client and self-signed certificate generation.
Built with AXL
Real projects that use this SDK as their only UEFI dependency:
aximcode/axl-webfs — bidirectional file transfer and remote filesystem access for UEFI. Ships a CLI app (
serve,mount,umount) and a resident DXE driver (axl-webfs-dxe.efi) that exposes a workstation directory as a UEFI volume (fsN:) — live-edit files on your laptop, run them immediately in the UEFI shell. Built entirely withaxl-cc, no EDK2.aximcode/uefi-devkit — build orchestrator + bootable USB image that bundles the axl-sdk tools (
sysinfo,netinfo,grep,find,hexdump,fetch,ipmi,rfbrowse) plus a crash handler into a multi-arch (x64+aa64) troubleshooting stick.
If you’ve built something with AXL and want it listed here, open a PR.
Status
AXL is under active development. The core library is stable with 776 unit tests + 16 tool tests + 17 HTTP integration tests + 3 UDP tests + 5 HTTPS tests. Apps and drivers build with just clang (or GCC) — no EDK2 or external UEFI SDK needed.
License
Licensed under the Apache License, Version 2.0. See NOTICE for copyright and THIRD_PARTY.md for attribution of vendored components.
Contributions are welcome — see CONTRIBUTING.md for the DCO sign-off requirement and the contributor-license grant that keeps commercial-licensing options open for the project.
Modules
- AxlMem – Memory Allocation
- AxlFormat – Printf Engine
- AxlStr – String Utilities
- AxlString – String Builder
- AxlIO – Stream I/O
- AxlLog – Logging
- AxlData – Data Structures
- AxlJson – JSON
- AxlCache – TTL Cache
- AxlRadixTree – Radix Tree
- AxlRingBuf – Ring Buffer
- AxlConfig – Configuration
- AxlPath – Path Manipulation
- AxlLoop – Event Loop
- AxlTask – Task Pool and Arena
- Event Primitives – AxlEvent, AxlCancellable, AxlWait
- AxlRuntime – CRT0-owned runtime glue
- AxlNet – Networking
- AxlTls – TLS Support
- AxlSys – System Utilities
- AxlGfx – Graphics
- AxlSmbus – SMBus / I2C block access
- AxlIpmi – Local BMC access
Guides
Reference