migrate
This commit is contained in:
2
build/.gitignore
vendored
Normal file
2
build/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
Dockerfile.dapper[0-9]*
|
||||
bin/
|
||||
9
build/Dockerfile.dapper
Normal file
9
build/Dockerfile.dapper
Normal 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
25
build/Makefile
Normal 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
13
build/scripts/entry.sh
Executable 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
2
build/scripts/help.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
echo help
|
||||
13
build/scripts/sdcc/n76e003-ebake1.ihx
Executable file
13
build/scripts/sdcc/n76e003-ebake1.ihx
Executable 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}/
|
||||
13
build/scripts/sdcc/n76e003-test1.ihx
Executable file
13
build/scripts/sdcc/n76e003-test1.ihx
Executable 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}/
|
||||
9
build/scripts/sdcc/stm8s-ebake1.ihx
Executable file
9
build/scripts/sdcc/stm8s-ebake1.ihx
Executable 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
|
||||
9
build/scripts/sdcc/stm8s-test1.ihx
Executable file
9
build/scripts/sdcc/stm8s-test1.ihx
Executable 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
|
||||
Reference in New Issue
Block a user