Skip to content

Latest commit

 

History

History
71 lines (49 loc) · 2.42 KB

README.md

File metadata and controls

71 lines (49 loc) · 2.42 KB

🛠️ Aarch64 Static Cross-Compilation Toolchain

This repository hosts an aarch64 MUSL-based cross-compilation toolchain designed to produce statically linked binaries for commonly needed tools

🚀 Usage

The latest release will always have all binaries built by a github-action. If you want to extend, or build locally, follow these simple steps:

  1. Check out the repository
  2. Build the base builder Docker image:
docker build -t aarch64_musl_cross:v1.0 . -f .cfg/Dockerfile

Note: Using aarch64_musl_cross:v1.0 as the tag is crucial!

  1. Build the tools:
  • To build all tools:
./build.sh
  • To build a specific tool:
./build.sh <foldername>

📜 Script usage

This repository hosts a utility script that lets you list and download all binaries from the latest release. Ideally all downloaded binaries never touch the disk but only live in memory. As a fallback /tmp directory will be used. Either copy the script manually or source it from this repository:

source <(curl -SsfL https://raw.githubusercontent.com/tiiuae/aarch64_bin_builder/main/static.sh)
# or
source <(wget -qO- https://raw.githubusercontent.com/tiiuae/aarch64_bin_builder/main/static.sh)
# or
source <(python3 -c "import urllib.request; print(urllib.request.urlopen('https://raw.githubusercontent.com/tiiuae/aarch64_bin_builder/main/static.sh').read().decode())")

With this you have access to:

# list all available binaries
static ls
# download the request binary
static dl <bin>
# download multiple binaries at once
static dl <bin_a> <bin_b>
# download binaries based on fuzzy matching
# To download all avilable binaries starting with "foo":
static dl foo

Disclaimer

The binaries are packed with UPX to drastically reduce their footprint, allowing for faster download speeds and usage on memory/disk bottlenecked devices. That said, the build process is transparent and open source, so if you distrust the binary, please read the code or compile locally.

Contributing 🤝

Contributions are welcome! Please feel free to submit a pull request or open an issue for any bugs, feature requests, or improvements.

License 📜

This project is licensed under the Apache License. See the LICENSE file for details.