Add docker container with toolchain and libraries to build aarch64 binary

This commit is contained in:
Michael Smith
2026-02-12 17:01:12 +01:00
parent e3a2bca794
commit 8f8cbc97c7
19 changed files with 3337 additions and 0 deletions

30
docker/Makefile Normal file
View File

@@ -0,0 +1,30 @@
.PHONY: shell
.PHONY: clean
TOOLCHAIN_NAME=rg35xx-toolchain
WORKSPACE_DIR := $(shell pwd)/workspace
CONTAINER_NAME=$(shell docker ps -f "ancestor=$(TOOLCHAIN_NAME)" --format "{{.Names}}")
BOLD=$(shell tput bold)
NORM=$(shell tput sgr0)
.build: Dockerfile
$(info $(BOLD)Building $(TOOLCHAIN_NAME)...$(NORM))
mkdir -p ./workspace
docker build -t $(TOOLCHAIN_NAME) .
touch .build
ifeq ($(CONTAINER_NAME),)
shell: .build
$(info $(BOLD)Starting $(TOOLCHAIN_NAME)...$(NORM))
docker run -it --rm -v "$(WORKSPACE_DIR)":/root/workspace $(TOOLCHAIN_NAME) /bin/bash
else
shell:
$(info $(BOLD)Connecting to running $(TOOLCHAIN_NAME)...$(NORM))
docker exec -it $(CONTAINER_NAME) /bin/bash
endif
clean:
$(info $(BOLD)Removing $(TOOLCHAIN_NAME)...$(NORM))
docker rmi $(TOOLCHAIN_NAME)
rm -f .build