From 752648dfc4f6d27dfaa01cadbfde644a79355f25 Mon Sep 17 00:00:00 2001 From: kr rt Date: Wed, 17 Jul 2024 01:21:21 +0300 Subject: [PATCH] first commit --- docker_run.sh | 17 +++++++ dockerfile | 17 +++++++ dslogic_insatll-lib.sh | 52 +++++++++++++++++++++ scipts/gcc-arm/arm-none-edabi-install.sh | 4 ++ tools_vesion_check.sh | 57 ++++++++++++++++++++++++ 5 files changed, 147 insertions(+) create mode 100755 docker_run.sh create mode 100644 dockerfile create mode 100755 dslogic_insatll-lib.sh create mode 100755 scipts/gcc-arm/arm-none-edabi-install.sh create mode 100755 tools_vesion_check.sh diff --git a/docker_run.sh b/docker_run.sh new file mode 100755 index 0000000..4699709 --- /dev/null +++ b/docker_run.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +docker stop my_builder_container my_builder_container +docker rm my_builder_container + +# Сборка образа из Dockerfile +docker build - < dockerfile +echo "image make compiled" + +# Сборка образа с тегом 'builder' +docker build --tag 'builder' . + +# Запуск контейнера на основе образа 'builder' +docker run -d --name my_builder_container builder + +# Вывод списка запущенных контейнеров +docker ps \ No newline at end of file diff --git a/dockerfile b/dockerfile new file mode 100644 index 0000000..34767b0 --- /dev/null +++ b/dockerfile @@ -0,0 +1,17 @@ +# Используем базовый образ Debian +FROM debian:latest + +# Копируем ваш проект в контейнер +WORKDIR /app +COPY . /app + +# Устанавливаем необходимые зависимости +RUN apt-get update && \ + apt-get install -y make cppcheck git wget tar + +RUN ./scipts/gcc-arm/arm-none-edabi-install.sh + + + +# Запускаем Bash, чтобы контейнер оставался активным +CMD ["bash", "-c", "while true; do sleep 1000; done"] diff --git a/dslogic_insatll-lib.sh b/dslogic_insatll-lib.sh new file mode 100755 index 0000000..686d205 --- /dev/null +++ b/dslogic_insatll-lib.sh @@ -0,0 +1,52 @@ +#!/bin/sh +## +## This file is part of the sigrok-util project. +## +## Copyright (C) 2016 Uwe Hermann +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 3 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, see . +## + +umask 022 + +WGET="wget -c -q" +if [ -z $PREFIX ]; then + PREFIX="/usr/local" +fi +FWDIR="$PREFIX/share/sigrok-firmware" + +# Use the upstream 0.97 firmware/bitstream set. This is the only supported +# set of files in libsigrok >= 20170621. +FWURL="https://github.com/DreamSourceLab/DSView/raw/886b847c21c606df3138ce7ad8f8e8c363ee758b/DSView/res" + +echo "Installing into: $FWDIR" + +mkdir -p $FWDIR + +$WGET $FWURL/DSLogic50.bin -O $FWDIR/dreamsourcelab-dslogic-fpga-5v.fw +$WGET $FWURL/DSLogic33.bin -O $FWDIR/dreamsourcelab-dslogic-fpga-3v3.fw +$WGET $FWURL/DSLogic.fw -O $FWDIR/dreamsourcelab-dslogic-fx2.fw + +$WGET $FWURL/DSCope.bin -O $FWDIR/dreamsourcelab-dscope-fpga.fw +$WGET $FWURL/DSCope.fw -O $FWDIR/dreamsourcelab-dscope-fx2.fw + +$WGET $FWURL/DSLogicPro.bin -O $FWDIR/dreamsourcelab-dslogic-pro-fpga.fw +$WGET $FWURL/DSLogicPro.fw -O $FWDIR/dreamsourcelab-dslogic-pro-fx2.fw + +$WGET $FWURL/DSLogicPlus.bin -O $FWDIR/dreamsourcelab-dslogic-plus-fpga.fw +$WGET $FWURL/DSLogicPlus.fw -O $FWDIR/dreamsourcelab-dslogic-plus-fx2.fw + +$WGET $FWURL/DSLogicBasic.bin -O $FWDIR/dreamsourcelab-dslogic-basic-fpga.fw +$WGET $FWURL/DSLogicBasic.fw -O $FWDIR/dreamsourcelab-dslogic-basic-fx2.fw + diff --git a/scipts/gcc-arm/arm-none-edabi-install.sh b/scipts/gcc-arm/arm-none-edabi-install.sh new file mode 100755 index 0000000..561c0a3 --- /dev/null +++ b/scipts/gcc-arm/arm-none-edabi-install.sh @@ -0,0 +1,4 @@ +wget "https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2" +tar -jxf gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2 +rm gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2 +export PATH="/opt/gcc-arm-none-eabi-10.3-2021.10/bin:$PATH" diff --git a/tools_vesion_check.sh b/tools_vesion_check.sh new file mode 100755 index 0000000..df8c68a --- /dev/null +++ b/tools_vesion_check.sh @@ -0,0 +1,57 @@ +#!/bin/bash + +echo "" +echo "" + +#sublime-text +#echo -e "\e[32msublime-text\e[0m https://www.sublimetext.com/docs/linux_repositories.html#apt" +#subl --version +#echo "" + +#gcc-arm-none-eabi +echo -e "\e[32mgcc-arm-none-eabi\e[0m https://developer.arm.com/downloads/-/gnu-rm" +arm-none-eabi-gcc --version | head -n 1 +echo "" + +#make +echo -e "\e[32mmake\e[0m https://www.gnu.org/software/make/#download" +make --version | head -n 1 +echo "" + +#st-utils +echo -e "\e[32mst-utils\e[0m https://github.com/stlink-org/stlink" +st-util --version +echo "" + +#openocd +echo -e "\e[32mopenocd\e[0m https://openocd.org" +openocd --version 2>&1 | head -n 1 +echo "" + +#doxygen +echo -e "\e[32mdoxygen\e[0m https://github.com/doxygen/doxygen.git" +doxygen --version +echo "" + +#graphviz +echo -e "\e[32mgraphviz\e[0m https://graphviz.org/download/source/" +dot -V 2>&1 +echo "" + +#cppcheck +echo -e "\e[32mcppcheck\e[0m http://cppcheck.net/#download" +cppcheck --version +echo + +#clang-check +#echo -e "\e[32mclang-check\e[0m https://github.com/llvm/llvm-project/releases/tag/llvmorg-16.0.0" +#clang-check --version | head -n 2 | tail -n 1 +#echo "" + +#clang-format +#echo -e "\e[32mclang-format\e[0m https://github.com/llvm/llvm-project/releases/tag/llvmorg-16.0.0" +#clang-format --version +#echo "" + +echo "" +echo ""