aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--Env.yml1
-rw-r--r--Makefile22
-rw-r--r--scripts/IronOS.Dockerfile1
-rwxr-xr-xscripts/ci/buildAll.sh21
-rw-r--r--scripts/ci/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2.md51
-rw-r--r--scripts/ci/nuclei_riscv_newlibc_prebuilt_linux64_2020.08.tar.bz2.md51
-rwxr-xr-xscripts/deploy.sh3
8 files changed, 23 insertions, 29 deletions
diff --git a/.gitignore b/.gitignore
index 811223af..c8e8df7f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -186,6 +186,7 @@ fabric.properties
# Binaries
source/Hexfile/
source/Objects/
+BUILDS/
# Autogenerated
source/Core/Gen/
@@ -214,4 +215,3 @@ Logo GUI/TS100 Logo Editor/TS100 Logo Editor/bin/
# Tests/linters/sanitizers
source/check-style.log
-
diff --git a/Env.yml b/Env.yml
index c7625b34..695cd122 100644
--- a/Env.yml
+++ b/Env.yml
@@ -9,5 +9,4 @@ services:
dockerfile: scripts/IronOS.Dockerfile
command: /bin/sh
volumes:
- - ./scripts/ci:/build/ci:Z
- ./:/build/ironos:Z
diff --git a/Makefile b/Makefile
index 3f9f7498..3c664950 100644
--- a/Makefile
+++ b/Makefile
@@ -27,6 +27,14 @@ ifndef MKDOCS
MKDOCS:=mkdocs
endif
+# build output related directories
+ifdef OUT
+OUT_DIR=$(OUT)
+else
+OUT_DIR=$(CURDIR)/BUILDS
+endif
+OUT_HEX=$(CURDIR)/source/Hexfile
+
### global static variables
@@ -105,7 +113,7 @@ docker-shell: docker-check $(DOCKER_DEPS)
# former build.sh
docker-build: docker-check $(DOCKER_DEPS)
- $(DOCKER_CMD) /bin/bash /build/ci/buildAll.sh
+ $(DOCKER_CMD) make build-all
# delete container
docker-clean: docker-check
@@ -157,6 +165,17 @@ tests: test-md test-sh test-py test-ccpp
@echo "All tests & checks have been completed successfully."
@echo ""
+# former scripts/ci/buildAll.sh - all in one to build all firmware & place the produced binaries into one output directory
+build-all:
+ @mkdir -p $(OUT_DIR)
+ @chmod 0777 $(OUT_DIR)
+ cd source && bash ./build.sh
+ @echo "All Firmware built"
+ @cp -r $(OUT_HEX)/*.bin $(OUT_DIR)
+ @cp -r $(OUT_HEX)/*.hex $(OUT_DIR)
+ @cp -r $(OUT_HEX)/*.dfu $(OUT_DIR)
+ @echo "Resulting output directory: $(OUT_DIR)"
+
# pass-through target for Makefile inside source/ dir
%:
$(MAKE) -C source/ $@
@@ -166,6 +185,7 @@ clean-build:
$(MAKE) -C source/ clean-all
rm -Rf site
rm -Rf scripts/ci/artefacts
+ rm -Rf $(OUT_DIR)
# global clean-up target
clean-full: clean-build docker-clean
diff --git a/scripts/IronOS.Dockerfile b/scripts/IronOS.Dockerfile
index 93cb5464..1543e1b0 100644
--- a/scripts/IronOS.Dockerfile
+++ b/scripts/IronOS.Dockerfile
@@ -33,4 +33,3 @@ RUN python3 -m pip install ${PIP_PKGS}
RUN git config --global --add safe.directory /build/ironos
COPY . /build/ironos
-COPY ./scripts/ci /build/ci
diff --git a/scripts/ci/buildAll.sh b/scripts/ci/buildAll.sh
deleted file mode 100755
index f5fcf067..00000000
--- a/scripts/ci/buildAll.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-set -e
-set -u
-
-# Init vars
-dir_ci="/build/ci"
-dir_ironos="/build/ironos"
-dir_source="${dir_ironos}/source"
-
-# Prepare output dir
-dir_artefacts="${dir_ci}/artefacts"
-mkdir -p "${dir_artefacts}"
-
-# Build firmware
-cd "${dir_source}"
-bash ./build.sh || exit 1
-echo "All Firmware built"
-
-# Copy out all the final resulting files we would like to store for the next op
-cp -r "${dir_source}"/Hexfile/*.bin "${dir_artefacts}"
-cp -r "${dir_source}"/Hexfile/*.hex "${dir_artefacts}"
diff --git a/scripts/ci/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2.md5 b/scripts/ci/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2.md5
deleted file mode 100644
index ebc9ecaf..00000000
--- a/scripts/ci/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2.md5
+++ /dev/null
@@ -1 +0,0 @@
-8312c4c91799885f222f663fc81f9a31 gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
diff --git a/scripts/ci/nuclei_riscv_newlibc_prebuilt_linux64_2020.08.tar.bz2.md5 b/scripts/ci/nuclei_riscv_newlibc_prebuilt_linux64_2020.08.tar.bz2.md5
deleted file mode 100644
index 2f4f5e33..00000000
--- a/scripts/ci/nuclei_riscv_newlibc_prebuilt_linux64_2020.08.tar.bz2.md5
+++ /dev/null
@@ -1 +0,0 @@
-add5b6a9b12987d0e72f55a4d2cd0f3b nuclei_riscv_newlibc_prebuilt_linux64_2020.08.tar.bz2
diff --git a/scripts/deploy.sh b/scripts/deploy.sh
index 97fd0c74..28057788 100755
--- a/scripts/deploy.sh
+++ b/scripts/deploy.sh
@@ -191,7 +191,7 @@ fi;
if [ -z "${cmd}" ] || [ "${cmd}" = "shell" ]; then
docker_cmd="run --rm builder"
elif [ "${cmd}" = "build" ]; then
- docker_cmd="run --rm builder /bin/bash /build/ci/buildAll.sh"
+ docker_cmd="run --rm builder make build-all OUT=${OUT}"
elif [ "${cmd}" = "clean" ]; then
docker rmi ironos-builder:latest
exit "${?}"
@@ -211,4 +211,3 @@ echo -e "\t* type \"${0} clean\" to delete created container (but not cached dat
echo -e "\n====>>>> ${docker_bin} ${docker_file} ${docker_cmd}\n"
eval "${docker_bin} ${docker_file} ${docker_cmd}"
exit "${?}"
-