https://github.com/valkmit/aws-graviton2-on-intel Skip to content Sign up * Why GitHub? Features - + Mobile - + Actions - + Codespaces - + Packages - + Security - + Code review - + Issues - + Integrations - + GitHub Sponsors - + Customer stories- * Team * Enterprise * Explore + Explore GitHub - Learn and contribute + Topics - + Collections - + Trending - + Learning Lab - + Open source guides - Connect with others + The ReadME Project - + Events - + Community forum - + GitHub Education - + GitHub Stars program - * Marketplace * Pricing Plans - + Compare plans - + Contact Sales - + Education - [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} valkmit / aws-graviton2-on-intel * Notifications * Star 18 * Fork 0 Runs AWS graviton2 images on intel, with native-speed compile times 18 stars 0 forks Star Notifications * Code * Issues 0 * Pull requests 0 * Actions * Projects 0 * Wiki * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Wiki * Security * Insights master Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags 1 branch 0 tags Code * Clone HTTPS GitHub CLI [https://github.com/v] Use Git or checkout with SVN using the web URL. [gh repo clone valkmi] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Go back Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Go back Launching Xcode If nothing happens, download Xcode and try again. Go back Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @valkmit valkmit update docker repo url to public one ... c8f1d09 Aug 31, 2021 update docker repo url to public one c8f1d09 Git stats * 5 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time qemu @ 13a4670 initial commit Sep 1, 2021 .dockerignore initial commit Sep 1, 2021 .gitignore initial commit Sep 1, 2021 .gitmodules initial commit Sep 1, 2021 Dockerfile initial commit Sep 1, 2021 README.md update docker repo url to public one Sep 1, 2021 build.sh actually download and build rootfs Sep 1, 2021 buildroot-graviton2-config initial commit Sep 1, 2021 qemu-build-install.sh initial commit Sep 1, 2021 toolchain-build-install.sh initial commit Sep 1, 2021 View code Prebuilt images available on Docker Hub What is this? Usage Justification Isn't a Docker container configured with binfmt-misc superior? Credits README.md Prebuilt images available on Docker Hub https://hub.docker.com/r/valkmit/aws-graviton2-on-intel What is this? An Arm filesystem based off an AWS Graviton 2 system. All binaries are emulated under Qemu, EXCEPT for a custom toolchain built with Buildroot. The toolchain is run natively, allowing for up to 20x faster compile times than when emulated. # file $(which bash) /usr/bin/bash: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 3.7.0, BuildID[sha1]=03b374959d488851f8b6ef51a6a16e55eaedea98, stripped # file $(realpath $(which aarch64-linux-gcc)) /x86_64/host/bin/toolchain-wrapper: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 3.2.0, BuildID[sha1]=9c88d4609953b73d518a95e44ebc93d642a8174e, stripped Usage If you wish to build the Docker image from source, you must run ./ build.sh. At a minimum, you must provide the rootfs as a .tar.gz with -r. The script will download buildroot if it is not provided with -b. For a prebuilt image, please visit the corresponding Docker hub page (link provided above). The only requirement to build is Docker - both Qemu and the toolchain are built in Docker containers based on Debian 10. All of the native cross compile tools are available prefixed with aarch64-linux. For example, aarch64-linux-gcc, or aarch64-linux-g++. To observe how the toolchain is configured, you may view buildroot-graviton2-config. Spin up an image quickly to play around with the compilers: docker run -it --rm valkmit/aws-graviton2-on-intel Justification When compiling for a target architecture different from the host architecture, developers have roughly two options 1. Set up a cross toolchain, which has fast performance, but makes it very difficult to automatically satisfy complex dependencies. For a sufficiently large project, this could mean compiling dozens of projects by hand using the newly built cross toolchain 2. Emulate the target system, which makes dependency satisfaction easier, since a native package manager can be used, but slows down compile times - the compiler has to be emulated, too! This project is designed to give developers the best of both worlds - the ease of using the target system's package manager (in this case, Yum configured with all of Amazon's aarch64 repos) - and the speed of native compilers. Long story short, a native cross-compiler is transplanted onto the Gravon2 Arm filesystem. This project could probably be extended for other systems, too. Isn't a Docker container configured with binfmt-misc superior? Normally, yes. However, binfmt-misc currently doesn't have namespace support (though this is in the pipeline!) This means that if you choose to go the binfmt-misc route, you must run a privileged container. This project does not require a privileged Docker container. The lack of requirement of privileged container means that you may use this on public build systems that do not have Arm support, and expect much better performance. Credits Lots of back and forth with gh:MelloJello About Runs AWS graviton2 images on intel, with native-speed compile times Resources Readme Releases No releases published Packages 0 No packages published Languages * Shell 98.1% * Dockerfile 1.9% * (c) 2021 GitHub, Inc. * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.