Skip to content

t3gemstone/toolchains

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

T3 Foundation

T3 Gemstone Toolchains

T3 Foundation License Built with Devbox

What is it?

This project includes all the necessary work for cross compiling projects on x86-64 hosts to run on AArch64 T3 Gemstone boards.

Normally projects can be compiled natively by copying them into the board and then using the tools available in there. But because host computers are much powerful than embedded boards we can utilize our host computer by using a cross compilation toolchain.

All details related to the project can be found at https://docs.t3gemstone.org/en. Below, only a summary of how to perform the installation is provided.

1. Install Docker and jetify-devbox on the host computer.
user@host:$ ./setup.sh
2. After the installation is successful, activate the jetify-devbox shell to automatically install tools such as taskfile, etc.
user@host:$ devbox shell
3. Download the toolchain.

Toolchain includes tools that are needed for cross compiling projects such as gcc, g++, ld, etc.

📦 devbox:sdk> task fetch
4. Create sysroot for the cross compiler.

This step creates a minimal system based on Debian or Ubuntu using debos tool. You can change the packages that should be included in the sysroot by modifying rootfs.yml. After creating rootfs, folders needed for cross compilation are copied into ./build/{distro}/sysroot folder and any broken symlinks are fixed.

📦 devbox:sdk> task distro:create
📦 devbox:sdk> task distro:sysroot
5. Compile example project using the toolchain.
📦 devbox:sdk> task example
5. Run compiled binary.

After completing Step 5, a binary called hello should be created and then copied into the distro rootfs created earlier.

You can run this binary on your host PC with the help of chroot and qemu-user-static tools.

📦 devbox:sdk> task distro:chroot
root@ubuntu-jammy:$ hello
> Hello, world!

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •