This commit is contained in:
Mike Trudeau
2026-02-13 20:30:52 +00:00
parent 71ffec0d88
commit 5b106896a1
127 changed files with 35217 additions and 0 deletions

2
build/.gitignore vendored Normal file
View File

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

9
build/Dockerfile.dapper Normal file
View File

@@ -0,0 +1,9 @@
FROM ubuntu:20.10 AS sdcc
RUN apt-get update \
&& apt-get install -y vim make sdcc \
&& apt-get autoclean
ENV DAPPER_SOURCE /source
ENV DAPPER_OUTPUT ./build/bin
WORKDIR ${DAPPER_SOURCE}
ENTRYPOINT ["./build/scripts/entry.sh"]
CMD ["help"]

25
build/Makefile Normal file
View File

@@ -0,0 +1,25 @@
SDCC_TARGETS := $(shell find scripts/sdcc -type f|cut -c9-)
$(PWD)/bin:
@mkdir -p $(PWD)/bin
$(PWD)/bin/.dapper: $(PWD)/bin
@echo Downloading dapper
@curl -sL https://releases.rancher.com/dapper/v0.5.4/dapper-`uname -s`-`uname -m` > $(PWD)/bin/.dapper.tmp
@@chmod +x $(PWD)/bin/.dapper.tmp
@$(PWD)/bin/.dapper.tmp -v
@mv $(PWD)/bin/.dapper.tmp $(PWD)/bin/.dapper
$(SDCC_TARGETS): $(PWD)/bin/.dapper
@echo "Building $@"
cd ../ && DOCKER_BUILDKIT=1 $(PWD)/bin/.dapper --target sdcc -f build/Dockerfile.dapper build/scripts/$@
.PHONY: help
.DEFAULT_GOAL := help
help:
@$(PWD)/scripts/help.sh
clean:
@rm -rf $(PWD)/bin $(PWD)/Dockerfile.dapper[0-9]*
@docker rmi toaster:master

13
build/scripts/entry.sh 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}

2
build/scripts/help.sh Executable file
View File

@@ -0,0 +1,2 @@
#!/bin/bash
echo help

View File

@@ -0,0 +1,13 @@
#!/bin/bash
set -e
FOLDER=ebake1
CORE=n76e003
make -C ${DAPPER_SOURCE}/fw/${CORE}/${FOLDER}
cp ${DAPPER_SOURCE}/fw/${CORE}/${FOLDER}/${FOLDER}.ihx ${DAPPER_OUTPUT}/${CORE}-${FOLDER}.ihx
ls -al ${DAPPER_OUTPUT}/${CORE}-${FOLDER}.ihx
tail -10 ${DAPPER_SOURCE}/fw/${CORE}/${FOLDER}/${FOLDER}.mem
#ls -la ${DAPPER_SOURCE}/fw/${CORE}/${FOLDER}/
#cp ${DAPPER_SOURCE}/fw/${CORE}/${FOLDER}/test2.[ml]* ${DAPPER_OUTPUT}/

View File

@@ -0,0 +1,13 @@
#!/bin/bash
set -e
FOLDER=test1
CORE=n76e003
make -C ${DAPPER_SOURCE}/fw/${CORE}/${FOLDER}
cp ${DAPPER_SOURCE}/fw/${CORE}/${FOLDER}/${FOLDER}.ihx ${DAPPER_OUTPUT}/${CORE}-${FOLDER}.ihx
ls -al ${DAPPER_OUTPUT}/${CORE}-${FOLDER}.ihx
tail -10 ${DAPPER_SOURCE}/fw/${CORE}/${FOLDER}/${FOLDER}.mem
#ls -la ${DAPPER_SOURCE}/fw/${CORE}/${FOLDER}/
#cp ${DAPPER_SOURCE}/fw/${CORE}/${FOLDER}/test2.[ml]* ${DAPPER_OUTPUT}/

View File

@@ -0,0 +1,9 @@
#!/bin/bash
set -e
FOLDER=ebake1
CORE=stm8s
make -C ${DAPPER_SOURCE}/fw/${CORE}/${FOLDER}
cp ${DAPPER_SOURCE}/fw/${CORE}/${FOLDER}/${FOLDER}.ihx ${DAPPER_OUTPUT}/${CORE}-${FOLDER}.ihx
ls -al ${DAPPER_OUTPUT}/${CORE}-${FOLDER}.ihx

View File

@@ -0,0 +1,9 @@
#!/bin/bash
set -e
FOLDER=test1
CORE=stm8s
make -C ${DAPPER_SOURCE}/fw/${CORE}/${FOLDER}
cp ${DAPPER_SOURCE}/fw/${CORE}/${FOLDER}/${FOLDER}.ihx ${DAPPER_OUTPUT}/${CORE}-${FOLDER}.ihx
ls -al ${DAPPER_OUTPUT}/${CORE}-${FOLDER}.ihx