This commit is contained in:
Mike Trudeau
2026-02-13 20:33:17 +00:00
parent 008f60446f
commit 2d168f4a3a
64 changed files with 11570 additions and 0 deletions

3
classic/build/.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
Dockerfile.dapper[0-9]*
.dapper
bin/

View File

@@ -0,0 +1,9 @@
FROM golang:alpine3.12
RUN apk --update add make git bash gcc-avr avr-libc
ENV DAPPER_SOURCE /source
ENV DAPPER_OUTPUT ./build/bin
WORKDIR ${DAPPER_SOURCE}
ENTRYPOINT ["./build/scripts/entry"]
CMD ["beeon"]

22
classic/build/Makefile Normal file
View File

@@ -0,0 +1,22 @@
TARGETS := $(shell ls scripts)
.dapper:
@echo Downloading dapper
@curl -sL https://releases.rancher.com/dapper/latest/dapper-`uname -s`-`uname -m` > .dapper.tmp
@@chmod +x .dapper.tmp
@./.dapper.tmp -v
@mv .dapper.tmp .dapper
$(TARGETS): .dapper
cd ../ && $(PWD)/.dapper -f build/Dockerfile.dapper $@
@yes | docker image prune > /dev/null
.PHONY: $(TARGETS)
.DEFAULT_GOAL := beeon
clean:
@rm -rf $(PWD)/bin $(PWD)/.dapper $(PWD)/Dockerfile.dapper[0-9]*
@docker rmi classic:master
shell-bind: .dapper
cd ../ && $(PWD)/.dapper -f build/Dockerfile.dapper -m bind -s

18
classic/build/scripts/beeon Executable file
View File

@@ -0,0 +1,18 @@
#!/bin/bash
set -e
# micronucleus bootloader (v1 hardware)
MN_VERSION=2.04
make -C bl
cp bl/work/micronucleus-${MN_VERSION}/firmware/main.hex ${DAPPER_OUTPUT}/beeon-classic-v1-micronucleus-${MN_VERSION}.hex
ls -la ${DAPPER_OUTPUT}/beeon-classic-v1-micronucleus-${MN_VERSION}.hex
# classic v1 firmware
make -C fw
cp fw/main.hex ${DAPPER_OUTPUT}/beeon-classic-v1.hex
ls -al ${DAPPER_OUTPUT}/beeon-classic-v1.hex
## firmware serial number patcher
make -C sn
cp sn/bin/* ${DAPPER_OUTPUT}/
ls -la ${DAPPER_OUTPUT}/beeon-classic-sn-*

13
classic/build/scripts/entry Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/bash
set -e
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
mkdir -p ${DAPPER_OUTPUT}
if [ -e ${DIR}/$1 ]; then
${DIR}/"$@"
else
exec "$@"
fi
chown -R $DAPPER_UID:$DAPPER_GID ${DAPPER_OUTPUT}