stefanrueger / urboot

Small AVR bootloader using urprotocol
GNU General Public License v3.0
55 stars 8 forks source link

add dockerfile for container builds #31

Closed kendallgoto closed 3 months ago

kendallgoto commented 3 months ago

Adds a small Dockerfile definition to create a Linux build environment on non-linux machines + provides documentation in the README to build w/ zero setup.

Tested on aarch64 macOS (using Docker to simulate x86-64 linux for precompiled AVR toolchain) and x86-64 linux.

From the repo root directory:

docker run --platform linux/amd64 -v "$(pwd)/src":/src --rm -it $(docker build -q .) all

is equivalent to make all.

(closes #15)

stefanrueger commented 3 months ago

Thanks for the PR, @kendallgoto! This looks promising. I'd like to invite @mcuee and @MCUdude to test the docker file on different platforms.

mcuee commented 3 months ago

Yes, I will try this out later this week.

@kendallgoto Once this is working, it may be a good idea to create github CI action to build the binaries files.

Edit to add: But I understand that @stefanrueger thinks CI is not a problem. So that can be discussed later. No need to be in this PR.

kendallgoto commented 3 months ago

ci would be nice, though i'm not sure how relevant it would be for this project. maybe just to isolate the baked-in firmware files into a ci release package, otherwise not crucial imo.

my personal use was for setting up a portable way to quickly build custom bootloader hexs rather than rely on a huge table of precompiled hex files with different quirks within my platformio project.

mcuee commented 3 months ago

Yes this PR works fine. Tested under Debian 12 VM. urboot_docker_build.txt

stefanrueger commented 3 months ago

Thanks all round. Merged