From 779029caede1070f101f964c300f0f5a68ad4d36 Mon Sep 17 00:00:00 2001 From: David Holdeman Date: Thu, 9 Jul 2020 09:27:20 -0500 Subject: [PATCH] Switch to Bash (#1585) * switch firmware to bash * switch unit_testts to bash * switch jenkins to bash --- firmware/bootloader/clean_bootloader.sh | 2 +- firmware/bootloader/compile_bootloader.sh | 4 ++-- .../compile_bootloader_discovery407.sh | 4 ++-- firmware/clean.bat | 2 +- firmware/clean.sh | 2 ++ firmware/clean_compile_two_versions.bat | 2 +- firmware/clean_compile_two_versions.sh | 6 +++--- firmware/config/boards/clean_env_variables.sh | 2 +- firmware/config/boards/common_make.sh | 4 +++- .../frankenso/!compile_frankenso_na6.bat | 2 +- .../frankenso/!compile_frankenso_pal.bat | 2 +- .../boards/frankenso/compile_frankenso_na6.sh | 4 ++-- .../boards/frankenso/compile_frankenso_pal.sh | 4 ++-- .../boards/kinetis/!compile_kinetis.bat | 2 +- .../config/boards/kinetis/compile_kinetis.sh | 4 ++-- .../boards/kinetis/config/gen_config.sh | 3 ++- .../config/kinetis_gen_enum_to_string.sh | 2 +- .../boards/microrusefi/!compile_mre_f4.bat | 2 +- ...mpile_mre_f4_hardware_QC_special_build.bat | 2 +- .../microrusefi/!compile_mre_f4_slave.bat | 2 +- .../boards/microrusefi/!compile_mre_f7.bat | 2 +- .../microrusefi/!compile_mre_f7_test.bat | 2 +- .../boards/microrusefi/compile_mre_f4.sh | 4 ++-- ...ompile_mre_f4_hardware_QC_special_build.sh | 4 ++-- .../microrusefi/compile_mre_f4_slave.sh | 4 ++-- .../boards/microrusefi/compile_mre_f7.sh | 4 ++-- .../boards/microrusefi/compile_mre_f7_test.sh | 4 ++-- .../nucleo_f746/!compile_stm32f746_nucleo.bat | 2 +- .../nucleo_f746/compile_stm32f746_nucleo.sh | 4 ++-- .../nucleo_f767/!compile_stm32f767_nucleo.bat | 2 +- .../nucleo_f767/!compile_stm32f767_osc.bat | 2 +- .../nucleo_f767/compile_stm32f767_nucleo.sh | 4 ++-- .../nucleo_f767/compile_stm32f767_osc.sh | 4 ++-- .../prometheus/!compile_prometheus_405.bat | 2 +- .../prometheus/!compile_prometheus_469.bat | 2 +- .../prometheus/compile_prometheus_405.sh | 4 ++-- .../prometheus/compile_prometheus_469.sh | 4 ++-- .../boards/proteus/!compile_proteus_f4.bat | 2 +- .../boards/proteus/!compile_proteus_f7.bat | 2 +- .../boards/proteus/compile_proteus_f4.sh | 4 ++-- .../boards/proteus/compile_proteus_f7.sh | 4 ++-- firmware/flash_dfu.sh | 2 +- firmware/flash_erase407.bat | 2 +- firmware/flash_erase407.sh | 2 +- firmware/flash_openocd407.bat | 2 +- firmware/flash_openocd407.sh | 2 +- firmware/gen_config.bat | 2 +- firmware/gen_config.sh | 8 ++++---- firmware/gen_config_board.bat | 2 +- firmware/gen_config_board.sh | 4 ++-- firmware/gen_enum_to_string.bat | 2 +- firmware/gen_enum_to_string.sh | 4 +++- firmware/gen_live_documentation.bat | 2 +- firmware/gen_live_documentation.sh | 2 +- firmware/update_version.bat | 2 +- firmware/update_version.sh | 1 + misc/jenkins/InteractiveHtmlBom/run.sh | 2 +- misc/jenkins/build_java_console.sh | 2 +- misc/jenkins/build_simulator.sh | 4 ++-- misc/jenkins/build_working_folder.sh | 2 +- .../compile_and_upload.sh | 8 ++++---- .../compile_other_versions/prepare_bundle.sh | 4 ++-- .../build_current_bundle.sh | 20 +++++++++---------- .../hw_test.sh | 6 +++--- .../functional_test_and_build_bundle/run.sh | 6 +++--- .../simulator_test.sh | 2 +- .../generate_doxygen/gen_upload_docs.sh | 4 ++-- unit_tests/compile.sh | 2 +- 68 files changed, 116 insertions(+), 108 deletions(-) diff --git a/firmware/bootloader/clean_bootloader.sh b/firmware/bootloader/clean_bootloader.sh index 08543f9bf7..8bef1b6a78 100644 --- a/firmware/bootloader/clean_bootloader.sh +++ b/firmware/bootloader/clean_bootloader.sh @@ -1,3 +1,3 @@ -#!/bin/sh +#!/bin/bash make -f src/Makefile clean diff --git a/firmware/bootloader/compile_bootloader.sh b/firmware/bootloader/compile_bootloader.sh index 3207766e0a..a8c7b4faae 100644 --- a/firmware/bootloader/compile_bootloader.sh +++ b/firmware/bootloader/compile_bootloader.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash SCRIPT_NAME="compile_bootloader.sh" echo "Entering $SCRIPT_NAME" @@ -26,4 +26,4 @@ cd .. touch bootloader_storage.c pwd -sh ../config/boards/clean_env_variables.sh +bash ../config/boards/clean_env_variables.sh diff --git a/firmware/bootloader/compile_bootloader_discovery407.sh b/firmware/bootloader/compile_bootloader_discovery407.sh index e47afcd3cc..a6a5e61ab8 100644 --- a/firmware/bootloader/compile_bootloader_discovery407.sh +++ b/firmware/bootloader/compile_bootloader_discovery407.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash echo "Starting compilation for Discovery-407" @@ -14,4 +14,4 @@ export BOOTLOADER_CODE_DESTINATION_PATH=".." export BOOTLOADER_COMMENT="/*F4discovery*/" # set DEBUG_LEVEL_OPT="-O2" -sh compile_bootloader.sh +bash compile_bootloader.sh diff --git a/firmware/clean.bat b/firmware/clean.bat index 6572c38824..27404f63d4 100644 --- a/firmware/clean.bat +++ b/firmware/clean.bat @@ -1,2 +1,2 @@ @echo off -sh.exe clean.sh +bash.exe clean.sh diff --git a/firmware/clean.sh b/firmware/clean.sh index f4e3750765..b4d10a862c 100644 --- a/firmware/clean.sh +++ b/firmware/clean.sh @@ -1,3 +1,5 @@ +#!/bin/bash + echo "Entering firmware/clean.sh" rm -rf .dep rm -rf build diff --git a/firmware/clean_compile_two_versions.bat b/firmware/clean_compile_two_versions.bat index 4c0c3d179d..ec4433e401 100644 --- a/firmware/clean_compile_two_versions.bat +++ b/firmware/clean_compile_two_versions.bat @@ -1,2 +1,2 @@ @echo off -sh.exe clean_compile_two_versions.sh +bash.exe clean_compile_two_versions.sh diff --git a/firmware/clean_compile_two_versions.sh b/firmware/clean_compile_two_versions.sh index 85df87f930..af168a94e0 100644 --- a/firmware/clean_compile_two_versions.sh +++ b/firmware/clean_compile_two_versions.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash echo "Compiler gcc version" arm-none-eabi-gcc -v @@ -6,7 +6,7 @@ arm-none-eabi-gcc -v rm -rf deliver mkdir deliver -#sh clean.sh +#bash clean.sh #echo "TIMESTAMP $(date "+%D %T.%2N")" #EXTRA_PARAMS="-DDUMMY -DFIRMWARE_ID=\\\"default_no_assert\\\" -DEFI_ENABLE_ASSERTS=FALSE -DCH_DBG_ENABLE_ASSERTS=FALSE -DCH_DBG_ENABLE_STACK_CHECK=FALSE -DCH_DBG_FILL_THREADS=FALSE -DCH_DBG_THREADS_PROFILING=FALSE" @@ -22,7 +22,7 @@ mkdir deliver #ls -l build #[ -e deliver/rusefi_no_asserts.hex ] || { echo "FAILED to compile NO ASSERTS version"; exit 1; } -sh clean.sh +bash clean.sh echo "TIMESTAMP $(date "+%D %T.%2N")" EXTRA_PARAMS="-DDUMMY -DFIRMWARE_ID=\\\"default\\\"" make -j4 diff --git a/firmware/config/boards/clean_env_variables.sh b/firmware/config/boards/clean_env_variables.sh index 52c5c526ec..26a26ee8bf 100644 --- a/firmware/config/boards/clean_env_variables.sh +++ b/firmware/config/boards/clean_env_variables.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash echo "clean_env_variables.sh: Cleaning up so that no one inherits any of these values" export DEBUG_LEVEL_OPT="" diff --git a/firmware/config/boards/common_make.sh b/firmware/config/boards/common_make.sh index 88d8b7c3e5..e3219627d9 100644 --- a/firmware/config/boards/common_make.sh +++ b/firmware/config/boards/common_make.sh @@ -1,3 +1,5 @@ +#!/bin/bash + SCRIPT_NAME="common_make.sh" echo "Entering $SCRIPT_NAME" @@ -22,4 +24,4 @@ cp build/rusefi.bin deliver/ echo "$SCRIPT_NAME: deliver folder" ls -l deliver -sh config/boards/clean_env_variables.sh +bash config/boards/clean_env_variables.sh diff --git a/firmware/config/boards/frankenso/!compile_frankenso_na6.bat b/firmware/config/boards/frankenso/!compile_frankenso_na6.bat index 9ef7a87b34..2899678980 100644 --- a/firmware/config/boards/frankenso/!compile_frankenso_na6.bat +++ b/firmware/config/boards/frankenso/!compile_frankenso_na6.bat @@ -1,2 +1,2 @@ @echo off -sh.exe compile_frankenso_na6.sh +bash.exe compile_frankenso_na6.sh diff --git a/firmware/config/boards/frankenso/!compile_frankenso_pal.bat b/firmware/config/boards/frankenso/!compile_frankenso_pal.bat index a8911570d3..4388c6505d 100644 --- a/firmware/config/boards/frankenso/!compile_frankenso_pal.bat +++ b/firmware/config/boards/frankenso/!compile_frankenso_pal.bat @@ -1,2 +1,2 @@ @echo off -sh.exe compile_frankenso_pal.sh +bash.exe compile_frankenso_pal.sh diff --git a/firmware/config/boards/frankenso/compile_frankenso_na6.sh b/firmware/config/boards/frankenso/compile_frankenso_na6.sh index 623883a602..c892543b64 100644 --- a/firmware/config/boards/frankenso/compile_frankenso_na6.sh +++ b/firmware/config/boards/frankenso/compile_frankenso_na6.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash cd ../../.. @@ -11,5 +11,5 @@ export EXTRA_PARAMS="-DDUMMY \ \ -DFIRMWARE_ID=\\\"frankensoNA6\\\"" -sh config/boards/common_make.sh +bash config/boards/common_make.sh diff --git a/firmware/config/boards/frankenso/compile_frankenso_pal.sh b/firmware/config/boards/frankenso/compile_frankenso_pal.sh index 985955ce95..4029692152 100644 --- a/firmware/config/boards/frankenso/compile_frankenso_pal.sh +++ b/firmware/config/boards/frankenso/compile_frankenso_pal.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash cd ../../.. @@ -11,5 +11,5 @@ export EXTRA_PARAMS="-DDUMMY \ -DEFI_LOGIC_ANALYZER=FALSE \ -DFIRMWARE_ID=\\\"frankensoNA6\\\"" -sh config/boards/common_make.sh +bash config/boards/common_make.sh diff --git a/firmware/config/boards/kinetis/!compile_kinetis.bat b/firmware/config/boards/kinetis/!compile_kinetis.bat index 0ae8cfafcd..f301aea912 100644 --- a/firmware/config/boards/kinetis/!compile_kinetis.bat +++ b/firmware/config/boards/kinetis/!compile_kinetis.bat @@ -1,2 +1,2 @@ @echo off -sh.exe compile_kinetis.sh +bash.exe compile_kinetis.sh diff --git a/firmware/config/boards/kinetis/compile_kinetis.sh b/firmware/config/boards/kinetis/compile_kinetis.sh index e446137971..8c9fe588ed 100644 --- a/firmware/config/boards/kinetis/compile_kinetis.sh +++ b/firmware/config/boards/kinetis/compile_kinetis.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash echo "Compiling for Kinetis MKE16F512" # TODO: somehow this -DDUMMY is helping us to not mess up the parameters, why?! @@ -22,4 +22,4 @@ cd ../../.. # make -r -j4 -sh config/boards/common_make.sh +bash config/boards/common_make.sh diff --git a/firmware/config/boards/kinetis/config/gen_config.sh b/firmware/config/boards/kinetis/config/gen_config.sh index 4b6f15041c..6225e7f619 100644 --- a/firmware/config/boards/kinetis/config/gen_config.sh +++ b/firmware/config/boards/kinetis/config/gen_config.sh @@ -1,3 +1,4 @@ +#!/bin/bash # This batch files reads rusefi_config.txt and produses firmware persistent configuration headers # the storage section of rusefi.ini is updated as well @@ -5,7 +6,7 @@ cd ../../../.. pwd -sh gen_signature.sh kin +bash gen_signature.sh kin java \ -DSystemOut.name=gen_config_kinetis_board \ diff --git a/firmware/config/boards/kinetis/config/kinetis_gen_enum_to_string.sh b/firmware/config/boards/kinetis/config/kinetis_gen_enum_to_string.sh index 155c77b5ed..8bc62e8c2e 100644 --- a/firmware/config/boards/kinetis/config/kinetis_gen_enum_to_string.sh +++ b/firmware/config/boards/kinetis/config/kinetis_gen_enum_to_string.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash cd ../../../.. diff --git a/firmware/config/boards/microrusefi/!compile_mre_f4.bat b/firmware/config/boards/microrusefi/!compile_mre_f4.bat index b411fa0899..12f6a55e3a 100644 --- a/firmware/config/boards/microrusefi/!compile_mre_f4.bat +++ b/firmware/config/boards/microrusefi/!compile_mre_f4.bat @@ -1,2 +1,2 @@ @echo off -sh.exe compile_mre_f4.sh +bash.exe compile_mre_f4.sh diff --git a/firmware/config/boards/microrusefi/!compile_mre_f4_hardware_QC_special_build.bat b/firmware/config/boards/microrusefi/!compile_mre_f4_hardware_QC_special_build.bat index fd684021e7..888da1a27c 100644 --- a/firmware/config/boards/microrusefi/!compile_mre_f4_hardware_QC_special_build.bat +++ b/firmware/config/boards/microrusefi/!compile_mre_f4_hardware_QC_special_build.bat @@ -1,2 +1,2 @@ @echo off -sh.exe compile_mre_f4_hardware_QC_special_build.sh +bash.exe compile_mre_f4_hardware_QC_special_build.sh diff --git a/firmware/config/boards/microrusefi/!compile_mre_f4_slave.bat b/firmware/config/boards/microrusefi/!compile_mre_f4_slave.bat index 65c03f84e5..87b01e0e9c 100644 --- a/firmware/config/boards/microrusefi/!compile_mre_f4_slave.bat +++ b/firmware/config/boards/microrusefi/!compile_mre_f4_slave.bat @@ -1,2 +1,2 @@ @echo off -sh.exe compile_mre_f4_slave.sh +bash.exe compile_mre_f4_slave.sh diff --git a/firmware/config/boards/microrusefi/!compile_mre_f7.bat b/firmware/config/boards/microrusefi/!compile_mre_f7.bat index a097f12c6c..f8cf21d18b 100644 --- a/firmware/config/boards/microrusefi/!compile_mre_f7.bat +++ b/firmware/config/boards/microrusefi/!compile_mre_f7.bat @@ -1,2 +1,2 @@ @echo off -sh.exe compile_mre_f7.sh +bash.exe compile_mre_f7.sh diff --git a/firmware/config/boards/microrusefi/!compile_mre_f7_test.bat b/firmware/config/boards/microrusefi/!compile_mre_f7_test.bat index bed3bf9fc0..4c6260f42b 100644 --- a/firmware/config/boards/microrusefi/!compile_mre_f7_test.bat +++ b/firmware/config/boards/microrusefi/!compile_mre_f7_test.bat @@ -1,2 +1,2 @@ @echo off -sh.exe compile_mre_f7_test.sh +bash.exe compile_mre_f7_test.sh diff --git a/firmware/config/boards/microrusefi/compile_mre_f4.sh b/firmware/config/boards/microrusefi/compile_mre_f4.sh index 81688cdc4d..5d00d07f33 100644 --- a/firmware/config/boards/microrusefi/compile_mre_f4.sh +++ b/firmware/config/boards/microrusefi/compile_mre_f4.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash cd ../../.. @@ -8,4 +8,4 @@ export EXTRA_PARAMS="-DSHORT_BOARD_NAME=mre_f4" -sh config/boards/common_make.sh +bash config/boards/common_make.sh diff --git a/firmware/config/boards/microrusefi/compile_mre_f4_hardware_QC_special_build.sh b/firmware/config/boards/microrusefi/compile_mre_f4_hardware_QC_special_build.sh index bd11512314..3a6f6697f3 100644 --- a/firmware/config/boards/microrusefi/compile_mre_f4_hardware_QC_special_build.sh +++ b/firmware/config/boards/microrusefi/compile_mre_f4_hardware_QC_special_build.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash cd ../../.. @@ -8,6 +8,6 @@ export EXTRA_PARAMS="-DHW_CHECK_MODE=TRUE -DSHORT_BOARD_NAME=mre_f4" export DEFAULT_ENGINE_TYPE=-DDEFAULT_ENGINE_TYPE=MRE_BOARD_NEW_TEST -sh config/boards/common_make.sh +bash config/boards/common_make.sh diff --git a/firmware/config/boards/microrusefi/compile_mre_f4_slave.sh b/firmware/config/boards/microrusefi/compile_mre_f4_slave.sh index 120b00c160..e91d656a29 100644 --- a/firmware/config/boards/microrusefi/compile_mre_f4_slave.sh +++ b/firmware/config/boards/microrusefi/compile_mre_f4_slave.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash cd ../../.. @@ -8,6 +8,6 @@ export EXTRA_PARAMS=-DDUMMY -DEFI_CANBUS_SLAVE=TRUE -DSHORT_BOARD_NAME=mre_f4 export DEFAULT_ENGINE_TYPE = -DDEFAULT_ENGINE_TYPE=BMW_M73_MRE_SLAVE -sh config/boards/common_make.sh +bash config/boards/common_make.sh diff --git a/firmware/config/boards/microrusefi/compile_mre_f7.sh b/firmware/config/boards/microrusefi/compile_mre_f7.sh index 5202e49ae0..59ac9aace3 100644 --- a/firmware/config/boards/microrusefi/compile_mre_f7.sh +++ b/firmware/config/boards/microrusefi/compile_mre_f7.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash cd ../../.. @@ -8,4 +8,4 @@ export EXTRA_PARAMS=-DSHORT_BOARD_NAME=mre_f7 export LDSCRIPT="config/boards/NUCLEO_F767/STM32F76xxI.ld" -sh config/boards/common_make.sh +bash config/boards/common_make.sh diff --git a/firmware/config/boards/microrusefi/compile_mre_f7_test.sh b/firmware/config/boards/microrusefi/compile_mre_f7_test.sh index d978a35946..f3ebf65f1e 100644 --- a/firmware/config/boards/microrusefi/compile_mre_f7_test.sh +++ b/firmware/config/boards/microrusefi/compile_mre_f7_test.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash cd ../../.. @@ -8,4 +8,4 @@ export EXTRA_PARAMS=-DSHORT_BOARD_NAME=mre_f7 export DEFAULT_ENGINE_TYPE="-DDEFAULT_ENGINE_TYPE=MRE_BOARD_TEST" export LDSCRIPT="config/boards/NUCLEO_F767/STM32F76xxI.ld" -sh config/boards/common_make.sh +bash config/boards/common_make.sh diff --git a/firmware/config/boards/nucleo_f746/!compile_stm32f746_nucleo.bat b/firmware/config/boards/nucleo_f746/!compile_stm32f746_nucleo.bat index f2739af419..de410d1648 100644 --- a/firmware/config/boards/nucleo_f746/!compile_stm32f746_nucleo.bat +++ b/firmware/config/boards/nucleo_f746/!compile_stm32f746_nucleo.bat @@ -1,2 +1,2 @@ @echo off -sh.exe compile_stm32f746_nucleo.sh +bash.exe compile_stm32f746_nucleo.sh diff --git a/firmware/config/boards/nucleo_f746/compile_stm32f746_nucleo.sh b/firmware/config/boards/nucleo_f746/compile_stm32f746_nucleo.sh index 06920dc224..20323650c5 100644 --- a/firmware/config/boards/nucleo_f746/compile_stm32f746_nucleo.sh +++ b/firmware/config/boards/nucleo_f746/compile_stm32f746_nucleo.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # STM32F767 version of the firmware for Nucleo-F746ZG board @@ -18,5 +18,5 @@ export EXTRA_PARAMS="-DDUMMY -DSTM32F746xx \ -DSTATUS_LOGGING_BUFFER_SIZE=1400 \ -DCCM_UNUSED_SIZE=10" export DEBUG_LEVEL_OPT="-O2" -sh config/boards/common_make.sh +bash config/boards/common_make.sh diff --git a/firmware/config/boards/nucleo_f767/!compile_stm32f767_nucleo.bat b/firmware/config/boards/nucleo_f767/!compile_stm32f767_nucleo.bat index 60fdbea7f6..9db02d59fb 100644 --- a/firmware/config/boards/nucleo_f767/!compile_stm32f767_nucleo.bat +++ b/firmware/config/boards/nucleo_f767/!compile_stm32f767_nucleo.bat @@ -1,2 +1,2 @@ @echo off -sh.exe compile_stm32f767_nucleo.sh +bash.exe compile_stm32f767_nucleo.sh diff --git a/firmware/config/boards/nucleo_f767/!compile_stm32f767_osc.bat b/firmware/config/boards/nucleo_f767/!compile_stm32f767_osc.bat index 0ade9af2d4..6d53202953 100644 --- a/firmware/config/boards/nucleo_f767/!compile_stm32f767_osc.bat +++ b/firmware/config/boards/nucleo_f767/!compile_stm32f767_osc.bat @@ -1,2 +1,2 @@ @echo off -sh.exe compile_stm32f767_osc.sh +bash.exe compile_stm32f767_osc.sh diff --git a/firmware/config/boards/nucleo_f767/compile_stm32f767_nucleo.sh b/firmware/config/boards/nucleo_f767/compile_stm32f767_nucleo.sh index 3cf7ad4df4..462b79cd57 100644 --- a/firmware/config/boards/nucleo_f767/compile_stm32f767_nucleo.sh +++ b/firmware/config/boards/nucleo_f767/compile_stm32f767_nucleo.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # STM32F767 version of the firmware for Nucleo-F767ZI board @@ -18,4 +18,4 @@ export EXTRA_PARAMS="-DDUMMY -DSTM32F767xx \ -DCH_DBG_ENABLE_CHECKS=FALSE -DCH_DBG_ENABLE_ASSERTS=FALSE -DCH_DBG_ENABLE_STACK_CHECK=FALSE -DCH_DBG_FILL_THREADS=FALSE -DCH_DBG_THREADS_PROFILING=FALSE" export DEBUG_LEVEL_OPT="-O2" -sh config/boards/common_make.sh +bash config/boards/common_make.sh diff --git a/firmware/config/boards/nucleo_f767/compile_stm32f767_osc.sh b/firmware/config/boards/nucleo_f767/compile_stm32f767_osc.sh index 3b7bd28ae6..698a3bddb4 100644 --- a/firmware/config/boards/nucleo_f767/compile_stm32f767_osc.sh +++ b/firmware/config/boards/nucleo_f767/compile_stm32f767_osc.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # STM32F767 version of the firmware for F767ZI chip NOT on Nucleo board, with a real oscilattor @@ -17,5 +17,5 @@ export EXTRA_PARAMS="-DDUMMY -DSTM32F767xx \ # Do not forget to comment out following line if looking to debug! export DEBUG_LEVEL_OPT="-O2" -sh config/boards/common_make.sh +bash config/boards/common_make.sh diff --git a/firmware/config/boards/prometheus/!compile_prometheus_405.bat b/firmware/config/boards/prometheus/!compile_prometheus_405.bat index 108b722432..45d724a8e1 100644 --- a/firmware/config/boards/prometheus/!compile_prometheus_405.bat +++ b/firmware/config/boards/prometheus/!compile_prometheus_405.bat @@ -1,2 +1,2 @@ @echo off -sh.exe compile_prometheus_405.sh +bash.exe compile_prometheus_405.sh diff --git a/firmware/config/boards/prometheus/!compile_prometheus_469.bat b/firmware/config/boards/prometheus/!compile_prometheus_469.bat index 1f108e188c..296043a115 100644 --- a/firmware/config/boards/prometheus/!compile_prometheus_469.bat +++ b/firmware/config/boards/prometheus/!compile_prometheus_469.bat @@ -1,2 +1,2 @@ @echo off -sh.exe compile_prometheus_469.sh +bash.exe compile_prometheus_469.sh diff --git a/firmware/config/boards/prometheus/compile_prometheus_405.sh b/firmware/config/boards/prometheus/compile_prometheus_405.sh index 6ca1498cc3..3190411874 100644 --- a/firmware/config/boards/prometheus/compile_prometheus_405.sh +++ b/firmware/config/boards/prometheus/compile_prometheus_405.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # STM32F405 version of the firmware for https://rusefi.com/forum/viewtopic.php?f=4&t=1215 @@ -7,5 +7,5 @@ export PROJECT_BOARD=prometheus/f405 export EXTRA_PARAMS=-DSHORT_BOARD_NAME=prometheus_405 -sh config/boards/common_make.sh +bash config/boards/common_make.sh diff --git a/firmware/config/boards/prometheus/compile_prometheus_469.sh b/firmware/config/boards/prometheus/compile_prometheus_469.sh index 9c4f7d5b0a..20778640da 100644 --- a/firmware/config/boards/prometheus/compile_prometheus_469.sh +++ b/firmware/config/boards/prometheus/compile_prometheus_469.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # STM32F469 version of the firmware for https://rusefi.com/forum/viewtopic.php?f=4&t=1215 @@ -7,5 +7,5 @@ export PROJECT_BOARD=prometheus/f469 export EXTRA_PARAMS=-DSHORT_BOARD_NAME=prometheus_469 export USE_BOOTLOADER=yes -sh config/boards/common_make.sh +bash config/boards/common_make.sh diff --git a/firmware/config/boards/proteus/!compile_proteus_f4.bat b/firmware/config/boards/proteus/!compile_proteus_f4.bat index 3504424b33..5023bbf66e 100644 --- a/firmware/config/boards/proteus/!compile_proteus_f4.bat +++ b/firmware/config/boards/proteus/!compile_proteus_f4.bat @@ -1,2 +1,2 @@ @echo off -sh.exe compile_proteus_f4.sh +bash.exe compile_proteus_f4.sh diff --git a/firmware/config/boards/proteus/!compile_proteus_f7.bat b/firmware/config/boards/proteus/!compile_proteus_f7.bat index 02e08ba586..7f66cee153 100644 --- a/firmware/config/boards/proteus/!compile_proteus_f7.bat +++ b/firmware/config/boards/proteus/!compile_proteus_f7.bat @@ -1,2 +1,2 @@ @echo off -sh.exe compile_proteus_f7.sh +bash.exe compile_proteus_f7.sh diff --git a/firmware/config/boards/proteus/compile_proteus_f4.sh b/firmware/config/boards/proteus/compile_proteus_f4.sh index b73ecf9b97..bcd85422cd 100644 --- a/firmware/config/boards/proteus/compile_proteus_f4.sh +++ b/firmware/config/boards/proteus/compile_proteus_f4.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash cd ../../.. @@ -8,4 +8,4 @@ export EXTRA_PARAMS=-DSHORT_BOARD_NAME=proteus_f4 -sh config/boards/common_make.sh +bash config/boards/common_make.sh diff --git a/firmware/config/boards/proteus/compile_proteus_f7.sh b/firmware/config/boards/proteus/compile_proteus_f7.sh index d66a8605b2..43daf0e6f3 100644 --- a/firmware/config/boards/proteus/compile_proteus_f7.sh +++ b/firmware/config/boards/proteus/compile_proteus_f7.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash cd ../../.. @@ -8,4 +8,4 @@ export EXTRA_PARAMS=-DSHORT_BOARD_NAME=proteus_f7 export LDSCRIPT=config/boards/NUCLEO_F767/STM32F76xxI.ld -sh config/boards/common_make.sh +bash config/boards/common_make.sh diff --git a/firmware/flash_dfu.sh b/firmware/flash_dfu.sh index 044f8e5451..cdc5f597ae 100755 --- a/firmware/flash_dfu.sh +++ b/firmware/flash_dfu.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # This is a Linux/Unix script to do USB DFU (Device Firmware Update). # # The STM32 has multiple ways to write an application into the MCU. One is diff --git a/firmware/flash_erase407.bat b/firmware/flash_erase407.bat index 38a3fbc4d0..100ac0b4ab 100644 --- a/firmware/flash_erase407.bat +++ b/firmware/flash_erase407.bat @@ -1,2 +1,2 @@ @echo off -sh.exe flash_erase407.sh +bash.exe flash_erase407.sh diff --git a/firmware/flash_erase407.sh b/firmware/flash_erase407.sh index de0aea8983..6e97aabc35 100644 --- a/firmware/flash_erase407.sh +++ b/firmware/flash_erase407.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # st-link_cli -c SWD ur -ME # 0x100000 would erase both code and configuration diff --git a/firmware/flash_openocd407.bat b/firmware/flash_openocd407.bat index 0e1d87b83d..c828d5e92f 100644 --- a/firmware/flash_openocd407.bat +++ b/firmware/flash_openocd407.bat @@ -1,2 +1,2 @@ @echo off -sh.exe flash_openocd407.sh +bash.exe flash_openocd407.sh diff --git a/firmware/flash_openocd407.sh b/firmware/flash_openocd407.sh index ecb4f206f0..0ec2a6c93f 100644 --- a/firmware/flash_openocd407.sh +++ b/firmware/flash_openocd407.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash echo "I am flash_openocd.sh" diff --git a/firmware/gen_config.bat b/firmware/gen_config.bat index 63d9abe983..78c67c9d94 100644 --- a/firmware/gen_config.bat +++ b/firmware/gen_config.bat @@ -1,5 +1,5 @@ @echo off -sh.exe gen_config.sh +bash.exe gen_config.sh rem This would automatically copy latest file to 'dev' TS project set ts_path="%HOMEDRIVE%%HOMEPATH%\Documents\TunerStudioProjects" diff --git a/firmware/gen_config.sh b/firmware/gen_config.sh index 71bb10c5c6..d31a962645 100644 --- a/firmware/gen_config.sh +++ b/firmware/gen_config.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash #set -x #TS_PATH="/home//TunerStudioProjects/" @@ -11,7 +11,7 @@ rm gen_config_board.log mkdir build -sh gen_signature.sh all +bash gen_signature.sh all java -DSystemOut.name=gen_config \ -Drusefi.generator.lazyfile.enabled=true \ @@ -52,11 +52,11 @@ cp -v tunerstudio/generated/rusefi_mre_f4.ini $TS_PATH/mre_f4/projectCfg/mainCon for BOARD in "microrusefi mre_f7" "microrusefi mre_f4" "frankenso frankenso_na6" "prometheus prometheus_469" "prometheus prometheus_405" "proteus proteus_f7" "proteus proteus_f4"; do BOARD_NAME="${BOARD% *}" BOARD_SHORT_NAME="${BOARD#* }" - sh gen_config_board.sh $BOARD_NAME $BOARD_SHORT_NAME + bash gen_config_board.sh $BOARD_NAME $BOARD_SHORT_NAME [ $? -eq 0 ] || { echo "ERROR generating board $BOARD_NAME $BOARD_SHORT_NAME"; exit 1; } done cd config/boards/kinetis/config -sh gen_config.sh +bash gen_config.sh exit 0 diff --git a/firmware/gen_config_board.bat b/firmware/gen_config_board.bat index c4aad17c6b..c7f9f77d5d 100644 --- a/firmware/gen_config_board.bat +++ b/firmware/gen_config_board.bat @@ -1,2 +1,2 @@ @echo off -sh.exe gen_config_board.sh +bash.exe gen_config_board.sh diff --git a/firmware/gen_config_board.sh b/firmware/gen_config_board.sh index 175f5ec197..32015aa8ff 100644 --- a/firmware/gen_config_board.sh +++ b/firmware/gen_config_board.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # file gen_config_board.sh @@ -17,7 +17,7 @@ SHORT_BOARDNAME=$2 echo "BOARDNAME=${BOARDNAME} SHORT_BOARDNAME=${SHORT_BOARDNAME}" -sh gen_signature.sh ${SHORT_BOARDNAME} +bash gen_signature.sh ${SHORT_BOARDNAME} java -DSystemOut.name=gen_config_board \ -Drusefi.generator.lazyfile.enabled=true \ diff --git a/firmware/gen_enum_to_string.bat b/firmware/gen_enum_to_string.bat index 776d032726..af925ecfa0 100644 --- a/firmware/gen_enum_to_string.bat +++ b/firmware/gen_enum_to_string.bat @@ -2,5 +2,5 @@ rem This batch files reads rusefi_enums.h and produses auto_generated_enums.* fi rm gen_enum_to_string.log -sh.exe gen_enum_to_string.sh +bash.exe gen_enum_to_string.sh diff --git a/firmware/gen_enum_to_string.sh b/firmware/gen_enum_to_string.sh index 4c2a2ed584..29e969db2e 100644 --- a/firmware/gen_enum_to_string.sh +++ b/firmware/gen_enum_to_string.sh @@ -1,3 +1,5 @@ +#!/bin/bash + echo "This batch files reads rusefi_enums.h and produses auto_generated_enums.* files" rm gen_enum_to_string.log @@ -11,4 +13,4 @@ java -DSystemOut.name=gen_enum_to_string \ pwd cd config/boards/kinetis/config -sh kinetis_gen_enum_to_string.sh +bash kinetis_gen_enum_to_string.sh diff --git a/firmware/gen_live_documentation.bat b/firmware/gen_live_documentation.bat index 339b2d7d94..2f4ac753d8 100644 --- a/firmware/gen_live_documentation.bat +++ b/firmware/gen_live_documentation.bat @@ -1,2 +1,2 @@ @echo off -sh.exe gen_live_documentation.sh +bash.exe gen_live_documentation.sh diff --git a/firmware/gen_live_documentation.sh b/firmware/gen_live_documentation.sh index 6b66113857..53c3472fc8 100644 --- a/firmware/gen_live_documentation.sh +++ b/firmware/gen_live_documentation.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash rm gen_live_documentation.log diff --git a/firmware/update_version.bat b/firmware/update_version.bat index 2ba8669d9f..ece396113d 100644 --- a/firmware/update_version.bat +++ b/firmware/update_version.bat @@ -1,2 +1,2 @@ @echo off -sh.exe update_version.sh +bash.exe update_version.sh diff --git a/firmware/update_version.sh b/firmware/update_version.sh index dfd44d5220..f02b03ff37 100644 --- a/firmware/update_version.sh +++ b/firmware/update_version.sh @@ -1,3 +1,4 @@ +#!/bin/bash # Let's regenerate 'svnversion.h' # TODO: handle std err - for example, in case svn needs upgrade diff --git a/misc/jenkins/InteractiveHtmlBom/run.sh b/misc/jenkins/InteractiveHtmlBom/run.sh index 06dcc6e356..819e77f5d3 100644 --- a/misc/jenkins/InteractiveHtmlBom/run.sh +++ b/misc/jenkins/InteractiveHtmlBom/run.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash IBOM_CMD="python misc/InteractiveHtmlBom/generate_interactive_bom.py --no-browser --name-format \"%f_latest\" --dest-dir ../ibom" echo "IBOM_CMD=$IBOM_CMD" diff --git a/misc/jenkins/build_java_console.sh b/misc/jenkins/build_java_console.sh index ec9071ba00..f3364179f7 100644 --- a/misc/jenkins/build_java_console.sh +++ b/misc/jenkins/build_java_console.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash echo "java version" java -version diff --git a/misc/jenkins/build_simulator.sh b/misc/jenkins/build_simulator.sh index 92feba30ef..4395dbf4ac 100644 --- a/misc/jenkins/build_simulator.sh +++ b/misc/jenkins/build_simulator.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash echo "TIMESTAMP $(date "+%D %T.%2N") Building rusefi simulator" pwd @@ -8,7 +8,7 @@ make -v mkdir -p out rm -rf build rm -rf .dep -sh compile.sh +bash compile.sh ls build cd .. [ -e simulator/build/rusefi_simulator.exe ] || { echo "SIMULATOR COMPILATION FAILED"; exit 1; } diff --git a/misc/jenkins/build_working_folder.sh b/misc/jenkins/build_working_folder.sh index 6d8a86a02c..da82195d40 100644 --- a/misc/jenkins/build_working_folder.sh +++ b/misc/jenkins/build_working_folder.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash FULL_BUNDLE_FILE="$BUNDLE_FULL_NAME.zip" UPDATE_BUNDLE_FILE="${BUNDLE_FULL_NAME}_autoupdate.zip" diff --git a/misc/jenkins/compile_other_versions/compile_and_upload.sh b/misc/jenkins/compile_other_versions/compile_and_upload.sh index 587241d434..40e4061745 100644 --- a/misc/jenkins/compile_other_versions/compile_and_upload.sh +++ b/misc/jenkins/compile_other_versions/compile_and_upload.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # for example 'proteus' BOARD_NAME="$1" @@ -19,7 +19,7 @@ echo "Entering $SCRIPT_NAME with 1=$1 2=$2 3=$3 4=$4" COMPILE_SCRIPT="compile_$BUNDLE_NAME.sh" cd firmware -sh clean.sh +bash clean.sh cd .. cd firmware/config/boards @@ -28,7 +28,7 @@ cd $BOARD_NAME pwd echo "Invoking $COMPILE_SCRIPT" -sh $COMPILE_SCRIPT +bash $COMPILE_SCRIPT [ -e ../../../build/rusefi.hex ] || { echo "Just to confirm - FAILED to compile with $COMPILE_SCRIPT"; exit 1; } @@ -36,6 +36,6 @@ cd ../../../.. # We are back at root rusEfi folder pwd -sh misc/jenkins/compile_other_versions/prepare_bundle.sh +bash misc/jenkins/compile_other_versions/prepare_bundle.sh echo "exiting $SCRIPT_NAME" diff --git a/misc/jenkins/compile_other_versions/prepare_bundle.sh b/misc/jenkins/compile_other_versions/prepare_bundle.sh index 9ed8cdff5a..0344212da0 100644 --- a/misc/jenkins/compile_other_versions/prepare_bundle.sh +++ b/misc/jenkins/compile_other_versions/prepare_bundle.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash SCRIPT_NAME="prepare_bundle.sh" echo "Entering $SCRIPT_NAME with $BUNDLE_NAME" @@ -10,7 +10,7 @@ export FOLDER="temp/snapshot_${TIMESTAMP}_${BUNDLE_NAME}_rusefi" export BUNDLE_FULL_NAME="rusefi_bundle_$BUNDLE_NAME" -sh misc/jenkins/build_working_folder.sh +bash misc/jenkins/build_working_folder.sh pwd echo "exiting $SCRIPT_NAME" diff --git a/misc/jenkins/functional_test_and_build_bundle/build_current_bundle.sh b/misc/jenkins/functional_test_and_build_bundle/build_current_bundle.sh index b5f8df2d04..8ee7dbcde2 100644 --- a/misc/jenkins/functional_test_and_build_bundle/build_current_bundle.sh +++ b/misc/jenkins/functional_test_and_build_bundle/build_current_bundle.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # This script would compile firmware, dev console and win32 simulator into a single bundle file # This script depends on Cygwin tools: zip @@ -13,8 +13,8 @@ date "+%a %D %T.%2S" export BUNDLE_NAME="default" cd firmware/bootloader -sh clean_bootloader.sh -sh compile_bootloader_discovery407.sh +bash clean_bootloader.sh +bash compile_bootloader_discovery407.sh [ -e bootloader_generated.hxx ] || { echo "FAILED TO COMPILE BOOTLOADER"; exit 1; } pwd cd ../.. @@ -26,14 +26,14 @@ date "+%a %D %T.%2S" echo "$SCRIPT_NAME: will be Erasing chip" [ -e flash_erase407.sh ] || { echo "NOT FOUND flash_erase.sh"; exit 1; } echo "$SCRIPT_NAME: Erasing chip" -sh flash_erase407.sh +bash flash_erase407.sh echo "$SCRIPT_NAME: Building firmware" -sh clean.sh +bash clean.sh -sh update_version.sh +bash update_version.sh -sh clean_compile_two_versions.sh +bash clean_compile_two_versions.sh #[ -e deliver/rusefi_no_asserts.hex ] || { echo "Just to confirm - FAILED to compile no_asserts"; exit 1; } [ -e deliver/rusefi.hex ] || { echo "Just to confirm - FAILED to compile default DEBUG"; exit 1; } @@ -55,10 +55,10 @@ cd .. # At root folder here -sh misc/jenkins/build_java_console.sh +bash misc/jenkins/build_java_console.sh [ -e java_console_binary/rusefi_console.jar ] || { echo "rusefi_console.jar build FAILED"; exit 1; } -sh misc/jenkins/build_simulator.sh +bash misc/jenkins/build_simulator.sh [ -e simulator/build/rusefi_simulator.exe ] || { echo "rusefi_simulator.exe build FAILED"; exit 1; } STM_ARCH="stm32f407" @@ -71,7 +71,7 @@ echo "$SCRIPT_NAME: folder variable3=$FOLDER" pwd export BUNDLE_FULL_NAME="rusefi_bundle" -sh misc/jenkins/build_working_folder.sh +bash misc/jenkins/build_working_folder.sh [ $? -eq 0 ] || { echo "$SCRIPT_NAME: ERROR: invoking build_working_folder.sh"; exit 1; } diff --git a/misc/jenkins/functional_test_and_build_bundle/hw_test.sh b/misc/jenkins/functional_test_and_build_bundle/hw_test.sh index cb922aadfb..cfaaaf3349 100644 --- a/misc/jenkins/functional_test_and_build_bundle/hw_test.sh +++ b/misc/jenkins/functional_test_and_build_bundle/hw_test.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash echo "TIMESTAMP $(date "+%a %D %T.%2S")" SCRIPT_NAME="hw_test.sh" @@ -7,10 +7,10 @@ pwd cd firmware echo "$SCRIPT_NAME: erasing first" -sh flash_erase407.sh +bash flash_erase407.sh echo "$SCRIPT_NAME: trying to flash" # This script depends on someone else building firmware -sh flash_openocd407.sh +bash flash_openocd407.sh [ $? -eq 0 ] || { echo "ERROR invoking flash_openocd407.sh"; exit 1; } [ -e build/rusefi.bin ] || { echo "FIRMWARE NOT FOUND"; exit 1; } diff --git a/misc/jenkins/functional_test_and_build_bundle/run.sh b/misc/jenkins/functional_test_and_build_bundle/run.sh index 309779178a..1d9229a7d4 100644 --- a/misc/jenkins/functional_test_and_build_bundle/run.sh +++ b/misc/jenkins/functional_test_and_build_bundle/run.sh @@ -1,9 +1,9 @@ -#!/bin/sh +#!/bin/bash -sh misc/jenkins/functional_test_and_build_bundle/build_current_bundle.sh +bash misc/jenkins/functional_test_and_build_bundle/build_current_bundle.sh [ $? -eq 0 ] || { echo "build ERROR DETECTED"; exit 1; } -# sh misc/jenkins/functional_test_and_build_bundle/simulator_test.sh +# bash misc/jenkins/functional_test_and_build_bundle/simulator_test.sh # [ $? -eq 0 ] || { echo "simulator test ERROR DETECTED"; exit 1; } # Here we use last version of firmware produced by 'clean_compile_two_versions.bat' diff --git a/misc/jenkins/functional_test_and_build_bundle/simulator_test.sh b/misc/jenkins/functional_test_and_build_bundle/simulator_test.sh index 4929d8695a..e3ea9515f1 100644 --- a/misc/jenkins/functional_test_and_build_bundle/simulator_test.sh +++ b/misc/jenkins/functional_test_and_build_bundle/simulator_test.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash echo "I am simulator_test.sh" pwd diff --git a/misc/jenkins/generate_doxygen/gen_upload_docs.sh b/misc/jenkins/generate_doxygen/gen_upload_docs.sh index d0688c949a..6a339ed161 100644 --- a/misc/jenkins/generate_doxygen/gen_upload_docs.sh +++ b/misc/jenkins/generate_doxygen/gen_upload_docs.sh @@ -1,9 +1,9 @@ -#!/bin/sh +#!/bin/bash echo "Should be executed from project root folder. Will try to upload to $RUSEFI_FTP_SERVER" # ibom is part of Doxygen job simply in order to reduce workspace HDD usage on my tiny build server -sh misc/jenkins/InteractiveHtmlBom/run.sh +bash misc/jenkins/InteractiveHtmlBom/run.sh echo "Uploading IBOMs" ncftpput -R -v -u "$RUSEFI_DOXYGEN_FTP_USER" -p "$RUSEFI_DOXYGEN_FTP_PASS" "$RUSEFI_FTP_SERVER" /ibom hardware/ibom/* diff --git a/unit_tests/compile.sh b/unit_tests/compile.sh index f6452ffe7e..9386e5d6fb 100644 --- a/unit_tests/compile.sh +++ b/unit_tests/compile.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash echo "Compiling unit tests" rm -rf .dep/