From ae9c60731a0f6814fd500a83f9f5c4d24d99fcb3 Mon Sep 17 00:00:00 2001 From: David Holdeman Date: Mon, 28 Sep 2020 17:25:15 -0500 Subject: [PATCH] move cd statements to common_make.sh (#1830) * move cd to compile.sh * rel path * undo changes to compile.sh and move cd to common_make --- firmware/config/boards/common_make.sh | 2 ++ firmware/config/boards/frankenso/compile_frankenso_na6.sh | 4 +--- firmware/config/boards/frankenso/compile_frankenso_pal.sh | 4 +--- firmware/config/boards/hellen/compile_cypress.sh | 4 +--- firmware/config/boards/kinetis/compile_kinetis.sh | 4 +--- firmware/config/boards/microrusefi/compile_mre_f4.sh | 4 +--- .../microrusefi/compile_mre_f4_hardware_QC_special_build.sh | 4 +--- firmware/config/boards/microrusefi/compile_mre_f4_slave.sh | 4 +--- firmware/config/boards/microrusefi/compile_mre_f7.sh | 4 +--- firmware/config/boards/microrusefi/compile_mre_f7_test.sh | 4 +--- .../config/boards/nucleo_f746/compile_stm32f746_nucleo.sh | 3 +-- .../config/boards/nucleo_f767/compile_stm32f767_nucleo.sh | 3 +-- firmware/config/boards/nucleo_f767/compile_stm32f767_osc.sh | 3 +-- firmware/config/boards/prometheus/compile_prometheus_405.sh | 3 +-- firmware/config/boards/prometheus/compile_prometheus_469.sh | 3 +-- firmware/config/boards/proteus/compile_proteus_f4.sh | 6 +----- firmware/config/boards/proteus/compile_proteus_f7.sh | 4 +--- 17 files changed, 18 insertions(+), 45 deletions(-) diff --git a/firmware/config/boards/common_make.sh b/firmware/config/boards/common_make.sh index 0fa718eeee..742139c045 100644 --- a/firmware/config/boards/common_make.sh +++ b/firmware/config/boards/common_make.sh @@ -3,6 +3,8 @@ SCRIPT_NAME="common_make.sh" echo "Entering $SCRIPT_NAME" +cd ../../.. + mkdir .dep # todo: start using env variable for number of threads or for '-r' make -j4 -r diff --git a/firmware/config/boards/frankenso/compile_frankenso_na6.sh b/firmware/config/boards/frankenso/compile_frankenso_na6.sh index c892543b64..6bd4a43709 100644 --- a/firmware/config/boards/frankenso/compile_frankenso_na6.sh +++ b/firmware/config/boards/frankenso/compile_frankenso_na6.sh @@ -1,7 +1,5 @@ #!/bin/bash -cd ../../.. - export EXTRA_PARAMS="-DDUMMY \ -DDEFAULT_ENGINE_TYPE=MIATA_NA6_VAF \ -DSHORT_BOARD_NAME=frankenso_na6 \ @@ -11,5 +9,5 @@ export EXTRA_PARAMS="-DDUMMY \ \ -DFIRMWARE_ID=\\\"frankensoNA6\\\"" -bash config/boards/common_make.sh +bash ../common_make.sh diff --git a/firmware/config/boards/frankenso/compile_frankenso_pal.sh b/firmware/config/boards/frankenso/compile_frankenso_pal.sh index 60c18776f1..9ddefb64a2 100644 --- a/firmware/config/boards/frankenso/compile_frankenso_pal.sh +++ b/firmware/config/boards/frankenso/compile_frankenso_pal.sh @@ -1,7 +1,5 @@ #!/bin/bash -cd ../../.. - export EXTRA_PARAMS="-DDUMMY \ -DDEFAULT_ENGINE_TYPE=MIATA_NA6_VAF \ -DSHORT_BOARD_NAME=frankenso_na6 \ @@ -12,5 +10,5 @@ export EXTRA_PARAMS="-DDUMMY \ -DEFI_LOGIC_ANALYZER=FALSE \ -DFIRMWARE_ID=\\\"frankensoNA6\\\"" -bash config/boards/common_make.sh +bash ../common_make.sh diff --git a/firmware/config/boards/hellen/compile_cypress.sh b/firmware/config/boards/hellen/compile_cypress.sh index c70a271773..4c33d5933a 100644 --- a/firmware/config/boards/hellen/compile_cypress.sh +++ b/firmware/config/boards/hellen/compile_cypress.sh @@ -14,6 +14,4 @@ export USE_FATFS="no" export USE_BOOTLOADER="no" export DEBUG_LEVEL_OPT="-O2" -cd ../../.. - -bash config/boards/common_make.sh +bash ../common_make.sh diff --git a/firmware/config/boards/kinetis/compile_kinetis.sh b/firmware/config/boards/kinetis/compile_kinetis.sh index 8c9fe588ed..ffa3f62634 100644 --- a/firmware/config/boards/kinetis/compile_kinetis.sh +++ b/firmware/config/boards/kinetis/compile_kinetis.sh @@ -16,10 +16,8 @@ export USE_FATFS=no export USE_BOOTLOADER=no # -DCH_DBG_ENABLE_CHECKS=FALSE -cd ../../.. - # rm -f ${BUILDDIR}/rusefi_kinetis.* # make -r -j4 -bash config/boards/common_make.sh +bash ../common_make.sh diff --git a/firmware/config/boards/microrusefi/compile_mre_f4.sh b/firmware/config/boards/microrusefi/compile_mre_f4.sh index 818e95e853..5144be586a 100644 --- a/firmware/config/boards/microrusefi/compile_mre_f4.sh +++ b/firmware/config/boards/microrusefi/compile_mre_f4.sh @@ -1,11 +1,9 @@ #!/bin/bash -cd ../../.. - export PROJECT_BOARD=microrusefi export PROJECT_CPU=ARCH_STM32F4 export EXTRA_PARAMS="-DSHORT_BOARD_NAME=mre_f4" # export DEBUG_LEVEL_OPT="-O0 -ggdb -g3" -bash config/boards/common_make.sh +bash ../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 0e0b870a6f..bb85d2d7ef 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,7 +1,5 @@ #!/bin/bash -cd ../../.. - export PROJECT_BOARD=microrusefi export PROJECT_CPU=ARCH_STM32F4 export EXTRA_PARAMS="-DHW_CHECK_MODE=TRUE -DSHORT_BOARD_NAME=mre_f4" @@ -11,6 +9,6 @@ export DEFAULT_ENGINE_TYPE=-DDEFAULT_ENGINE_TYPE=MRE_BOARD_NEW_TEST # this QC configuration is used to assert our status with debug info export DEBUG_LEVEL_OPT="-O0 -ggdb -g3" -bash config/boards/common_make.sh +bash ../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 e91d656a29..5ab4251261 100644 --- a/firmware/config/boards/microrusefi/compile_mre_f4_slave.sh +++ b/firmware/config/boards/microrusefi/compile_mre_f4_slave.sh @@ -1,13 +1,11 @@ #!/bin/bash -cd ../../.. - export PROJECT_BOARD=microrusefi export PROJECT_CPU=ARCH_STM32F4 export EXTRA_PARAMS=-DDUMMY -DEFI_CANBUS_SLAVE=TRUE -DSHORT_BOARD_NAME=mre_f4 export DEFAULT_ENGINE_TYPE = -DDEFAULT_ENGINE_TYPE=BMW_M73_MRE_SLAVE -bash config/boards/common_make.sh +bash ../common_make.sh diff --git a/firmware/config/boards/microrusefi/compile_mre_f7.sh b/firmware/config/boards/microrusefi/compile_mre_f7.sh index 82f9537f20..1905f34673 100644 --- a/firmware/config/boards/microrusefi/compile_mre_f7.sh +++ b/firmware/config/boards/microrusefi/compile_mre_f7.sh @@ -1,11 +1,9 @@ #!/bin/bash -cd ../../.. - export PROJECT_BOARD=microrusefi export PROJECT_CPU=ARCH_STM32F7 export EXTRA_PARAMS="-DSHORT_BOARD_NAME=mre_f7" export LDSCRIPT="config/boards/NUCLEO_F767/STM32F76xxI.ld" -bash config/boards/common_make.sh +bash ../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 f3ebf65f1e..c99e6c496c 100644 --- a/firmware/config/boards/microrusefi/compile_mre_f7_test.sh +++ b/firmware/config/boards/microrusefi/compile_mre_f7_test.sh @@ -1,11 +1,9 @@ #!/bin/bash -cd ../../.. - export PROJECT_BOARD=microrusefi export PROJECT_CPU=ARCH_STM32F7 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" -bash config/boards/common_make.sh +bash ../common_make.sh diff --git a/firmware/config/boards/nucleo_f746/compile_stm32f746_nucleo.sh b/firmware/config/boards/nucleo_f746/compile_stm32f746_nucleo.sh index 20323650c5..147bdab86a 100644 --- a/firmware/config/boards/nucleo_f746/compile_stm32f746_nucleo.sh +++ b/firmware/config/boards/nucleo_f746/compile_stm32f746_nucleo.sh @@ -5,7 +5,6 @@ SCRIPT_NAME="compile_nucleo_f746.sh" echo "Entering $SCRIPT_NAME" -cd ../../.. export PROJECT_BOARD=nucleo_f746 export PROJECT_CPU=ARCH_STM32F7 export EXTRA_PARAMS="-DDUMMY -DSTM32F746xx \ @@ -18,5 +17,5 @@ export EXTRA_PARAMS="-DDUMMY -DSTM32F746xx \ -DSTATUS_LOGGING_BUFFER_SIZE=1400 \ -DCCM_UNUSED_SIZE=10" export DEBUG_LEVEL_OPT="-O2" -bash config/boards/common_make.sh +bash ../common_make.sh diff --git a/firmware/config/boards/nucleo_f767/compile_stm32f767_nucleo.sh b/firmware/config/boards/nucleo_f767/compile_stm32f767_nucleo.sh index 462b79cd57..95e77107df 100644 --- a/firmware/config/boards/nucleo_f767/compile_stm32f767_nucleo.sh +++ b/firmware/config/boards/nucleo_f767/compile_stm32f767_nucleo.sh @@ -5,7 +5,6 @@ SCRIPT_NAME="compile_nucleo_f767.sh" echo "Entering $SCRIPT_NAME" -cd ../../.. export PROJECT_BOARD=nucleo_f767 export PROJECT_CPU=ARCH_STM32F7 export EXTRA_PARAMS="-DDUMMY -DSTM32F767xx \ @@ -18,4 +17,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" -bash config/boards/common_make.sh +bash ../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 698a3bddb4..1bc13aa824 100644 --- a/firmware/config/boards/nucleo_f767/compile_stm32f767_osc.sh +++ b/firmware/config/boards/nucleo_f767/compile_stm32f767_osc.sh @@ -2,7 +2,6 @@ # STM32F767 version of the firmware for F767ZI chip NOT on Nucleo board, with a real oscilattor -cd ../../.. export PROJECT_BOARD=nucleo_f767 export PROJECT_CPU=ARCH_STM32F7 export EXTRA_PARAMS="-DDUMMY -DSTM32F767xx \ @@ -17,5 +16,5 @@ export EXTRA_PARAMS="-DDUMMY -DSTM32F767xx \ # Do not forget to comment out following line if looking to debug! export DEBUG_LEVEL_OPT="-O2" -bash config/boards/common_make.sh +bash ../common_make.sh diff --git a/firmware/config/boards/prometheus/compile_prometheus_405.sh b/firmware/config/boards/prometheus/compile_prometheus_405.sh index 3190411874..e818f31658 100644 --- a/firmware/config/boards/prometheus/compile_prometheus_405.sh +++ b/firmware/config/boards/prometheus/compile_prometheus_405.sh @@ -2,10 +2,9 @@ # STM32F405 version of the firmware for https://rusefi.com/forum/viewtopic.php?f=4&t=1215 -cd ../../.. export PROJECT_BOARD=prometheus/f405 export EXTRA_PARAMS=-DSHORT_BOARD_NAME=prometheus_405 -bash config/boards/common_make.sh +bash ../common_make.sh diff --git a/firmware/config/boards/prometheus/compile_prometheus_469.sh b/firmware/config/boards/prometheus/compile_prometheus_469.sh index 20778640da..13f132c8f4 100644 --- a/firmware/config/boards/prometheus/compile_prometheus_469.sh +++ b/firmware/config/boards/prometheus/compile_prometheus_469.sh @@ -2,10 +2,9 @@ # STM32F469 version of the firmware for https://rusefi.com/forum/viewtopic.php?f=4&t=1215 -cd ../../.. export PROJECT_BOARD=prometheus/f469 export EXTRA_PARAMS=-DSHORT_BOARD_NAME=prometheus_469 export USE_BOOTLOADER=yes -bash config/boards/common_make.sh +bash ../common_make.sh diff --git a/firmware/config/boards/proteus/compile_proteus_f4.sh b/firmware/config/boards/proteus/compile_proteus_f4.sh index bcd85422cd..7d59320a49 100644 --- a/firmware/config/boards/proteus/compile_proteus_f4.sh +++ b/firmware/config/boards/proteus/compile_proteus_f4.sh @@ -1,11 +1,7 @@ #!/bin/bash -cd ../../.. - export PROJECT_BOARD=proteus export PROJECT_CPU=ARCH_STM32F4 export EXTRA_PARAMS=-DSHORT_BOARD_NAME=proteus_f4 - - -bash config/boards/common_make.sh +bash ../common_make.sh diff --git a/firmware/config/boards/proteus/compile_proteus_f7.sh b/firmware/config/boards/proteus/compile_proteus_f7.sh index 43daf0e6f3..c674cddd9b 100644 --- a/firmware/config/boards/proteus/compile_proteus_f7.sh +++ b/firmware/config/boards/proteus/compile_proteus_f7.sh @@ -1,11 +1,9 @@ #!/bin/bash -cd ../../.. - export PROJECT_BOARD=proteus export PROJECT_CPU=ARCH_STM32F7 export EXTRA_PARAMS=-DSHORT_BOARD_NAME=proteus_f7 export LDSCRIPT=config/boards/NUCLEO_F767/STM32F76xxI.ld -bash config/boards/common_make.sh +bash ../common_make.sh