diff --git a/.gitmodules b/.gitmodules
index 44a4af1c1c..38fd919b7f 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -15,3 +15,6 @@
[submodule "hardware/InteractiveHtmlBom"]
path = hardware/InteractiveHtmlBom
url = https://github.com/openscopeproject/InteractiveHtmlBom.git
+[submodule "misc/InteractiveHtmlBom"]
+ path = misc/InteractiveHtmlBom
+ url = https://github.com/openscopeproject/InteractiveHtmlBom
diff --git a/firmware/bootloader/!clean_bootloader.bat b/firmware/bootloader/!clean_bootloader.bat
index 8cfe7a579f..1468618362 100644
--- a/firmware/bootloader/!clean_bootloader.bat
+++ b/firmware/bootloader/!clean_bootloader.bat
@@ -1 +1,2 @@
-make -f src/Makefile clean
\ No newline at end of file
+@echo off
+sh.exe clean_bootloader.sh
diff --git a/firmware/bootloader/!compile_bootloader.bat b/firmware/bootloader/!compile_bootloader.bat
index 3dc902ead3..7716a69dc2 100644
--- a/firmware/bootloader/!compile_bootloader.bat
+++ b/firmware/bootloader/!compile_bootloader.bat
@@ -1,29 +1,2 @@
@echo off
-
-set script_name=!compile_bootloader.bat
-echo Entering %script_name%
-
-rem Needed for board overrides
-IF "%BOOTLOADER_CODE_DESTINATION_PATH%"=="" (SET BOOTLOADER_CODE_DESTINATION_PATH="..")
-
-set BOOTLOADER_CODE_DESTINATION_FILE=%BOOTLOADER_CODE_DESTINATION_PATH%/bootloader_generated.hxx
-rm -f %BOOTLOADER_CODE_DESTINATION_FILE%
-
-echo %script_name%: Starting bootloader compilation...
-make -j4 -f src/Makefile %1 %2 %3
-
-if errorlevel 1 echo make compilation failed
-if errorlevel 1 exit -1
-
-echo %script_name%: Bootloader build success.
-
-cd blbuild
-rem Generate a header file with binary bootloader code
-java -jar ../../../java_tools/bin2header.jar bootloader.bin %BOOTLOADER_CODE_DESTINATION_FILE% "%BOOTLOADER_COMMENT% static const volatile uint8_t bootloader_code[] BOOTLOADER_SECTION"
-cd ..
-
-rem Touch 'bootloader_storage.c' to update its modification date (needed for make)
-copy /b bootloader_storage.c +,,
-
-pwd
-call ../config/boards/clean_env_variables.bat
\ No newline at end of file
+sh.exe compile_bootloader.sh
diff --git a/firmware/bootloader/!compile_bootloader_discovery407.bat b/firmware/bootloader/!compile_bootloader_discovery407.bat
index 036c988e62..b0251b65c7 100644
--- a/firmware/bootloader/!compile_bootloader_discovery407.bat
+++ b/firmware/bootloader/!compile_bootloader_discovery407.bat
@@ -1,17 +1,2 @@
@echo off
-
-echo Starting compilation for Discovery-407
-
-rem set PROJECT_BOARD=Prometheus
-rem set PROMETHEUS_BOARD=405
-rem set EXTRA_PARAMS=-DDUMMY -DSTM32F405xx -DEFI_ENABLE_ASSERTS=FALSE -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
-set EXTRA_PARAMS=-DDUMMY -DEFI_BOOTLOADER ^
- -DCH_DBG_ENABLE_STACK_CHECK=FALSE ^
- -DBOARD_TLE8888_COUNT=0 ^
- -DBOARD_TLE6240_COUNT=0 ^
- -DBOARD_MC33972_COUNT=0
-set BOOTLOADER_CODE_DESTINATION_PATH=".."
-set BOOTLOADER_COMMENT="/*F4discovery*/"
-rem set DEBUG_LEVEL_OPT="-O2"
-
-call !compile_bootloader.bat -r
+sh.exe compile_bootloader_discovery497.sh
diff --git a/firmware/bootloader/clean_bootloader.sh b/firmware/bootloader/clean_bootloader.sh
new file mode 100644
index 0000000000..08543f9bf7
--- /dev/null
+++ b/firmware/bootloader/clean_bootloader.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+make -f src/Makefile clean
diff --git a/firmware/bootloader/compile_bootloader.sh b/firmware/bootloader/compile_bootloader.sh
new file mode 100644
index 0000000000..3207766e0a
--- /dev/null
+++ b/firmware/bootloader/compile_bootloader.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+SCRIPT_NAME="compile_bootloader.sh"
+echo "Entering $SCRIPT_NAME"
+
+# Needed for board overrides
+[ $BOOTLOADER_CODE_DESTINATION_PATH ] || { BOOTLOADER_CODE_DESTINATION_PATH=".."; }
+
+BOOTLOADER_CODE_DESTINATION_FILE=$BOOTLOADER_CODE_DESTINATION_PATH/bootloader_generated.hxx
+
+echo "$SCRIPT_NAME: Starting bootloader compilation..."
+make -j4 -f src/Makefile $1 $2 $3
+
+[ $? -eq 0 ] || { echo "make compilation failed"; exit 1; }
+
+echo "$SCRIPT_NAME: Bootloader build success."
+
+cd blbuild
+# Generate a header file with binary bootloader code
+rm -f $BOOTLOADER_CODE_DESTINATION_FILE
+java -jar ../../../java_tools/bin2header.jar bootloader.bin "$BOOTLOADER_CODE_DESTINATION_FILE" "$BOOTLOADER_COMMENT static const volatile uint8_t bootloader_code[] BOOTLOADER_SECTION"
+[ $? -eq 0 ] || { echo "$SCRIPT_NAME: error generating header file"; exit 1; }
+cd ..
+
+# Touch 'bootloader_storage.c' to update its modification date (needed for make)
+touch bootloader_storage.c
+
+pwd
+sh ../config/boards/clean_env_variables.sh
diff --git a/firmware/bootloader/compile_bootloader_discovery407.sh b/firmware/bootloader/compile_bootloader_discovery407.sh
new file mode 100644
index 0000000000..e47afcd3cc
--- /dev/null
+++ b/firmware/bootloader/compile_bootloader_discovery407.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+echo "Starting compilation for Discovery-407"
+
+# set PROJECT_BOARD=Prometheus
+# set PROMETHEUS_BOARD=405
+# set EXTRA_PARAMS=-DDUMMY -DSTM32F405xx -DEFI_ENABLE_ASSERTS=FALSE -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 EXTRA_PARAMS="-DDUMMY -DEFI_BOOTLOADER \
+ -DCH_DBG_ENABLE_STACK_CHECK=FALSE \
+ -DBOARD_TLE8888_COUNT=0 \
+ -DBOARD_TLE6240_COUNT=0 \
+ -DBOARD_MC33972_COUNT=0"
+export BOOTLOADER_CODE_DESTINATION_PATH=".."
+export BOOTLOADER_COMMENT="/*F4discovery*/"
+# set DEBUG_LEVEL_OPT="-O2"
+
+sh compile_bootloader.sh
diff --git a/firmware/flash_erase407.bat b/firmware/flash_erase407.bat
index 1dd1ea9c0e..38a3fbc4d0 100644
--- a/firmware/flash_erase407.bat
+++ b/firmware/flash_erase407.bat
@@ -1,30 +1,2 @@
-rem st-link_cli -c SWD ur -ME
-rem 0x100000 would erase both code and configuration
-rem use 0x080000 if you want to erase only configuratio
-set script_name=flash_erase407.bat
-echo Entering %script_name%
-
-
-rem weird, it used to be much nicer with openocd 0.8.0, file location was not broken?
-rem maybe https://sourceforge.net/p/openocd/tickets/105/ ?
-
-pwd
-cd ../misc/install
-
-if not exist openocd/openocd.exe echo openocd/openocd.exe NOT FOUND
-if not exist openocd/openocd.exe exit -1
-
-
-rem newer discovery boards
-echo Invoking openocd...
-openocd\openocd.exe -f openocd/stm32f4discovery.cfg -c init -c targets -c "halt" -c "flash erase_address 0x08000000 0x0100000" -c shutdown
-IF NOT ERRORLEVEL 0 echo ERROR in %script_name%
-IF NOT ERRORLEVEL 0 EXIT /B 1
-
-echo Just invoked openocd to erase chip!
-
-
-rem older disocovery boards or cheap eBay ST-Link
-rem openocd\openocd.exe -f openocd/stm32f4discovery.cfg -c init -c targets -c "halt" -c "flash erase_address 0x08000000 0x0100000" -c shutdown
-
-echo "exiting %script_name%"
+@echo off
+sh.exe flash_erase407.sh
diff --git a/firmware/flash_erase407.sh b/firmware/flash_erase407.sh
new file mode 100644
index 0000000000..de0aea8983
--- /dev/null
+++ b/firmware/flash_erase407.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+# st-link_cli -c SWD ur -ME
+# 0x100000 would erase both code and configuration
+# use 0x080000 if you want to erase only configuratio
+SCRIPT_NAME="flash_erase407.sh"
+echo "Entering $SCRIPT_NAME"
+
+
+# weird, it used to be much nicer with openocd 0.8.0, file location was not broken?
+# maybe https://sourceforge.net/p/openocd/tickets/105/ ?
+
+pwd
+cd ../misc/install
+
+[ -e openocd/openocd.exe ] || { "echo openocd/openocd.exe NOT FOUND"; exit 1; }
+
+# newer discovery boards
+echo "Invoking openocd..."
+./openocd/openocd.exe -f openocd/stm32f4discovery.cfg -c init -c targets -c "halt" -c "flash erase_address 0x08000000 0x0100000" -c shutdown
+[ $? -eq 0 ] || { echo "ERROR in $SCRIPT_NAME"; exit 1; }
+
+echo "Just invoked openocd to erase chip!"
+
+# older discovery boards or cheap eBay ST-Link
+# openocd\openocd.exe -f openocd/stm32f4discovery.cfg -c init -c targets -c "halt" -c "flash erase_address 0x08000000 0x0100000" -c shutdown
+
+echo "exiting $SCRIPT_NAME"
diff --git a/firmware/flash_openocd407.bat b/firmware/flash_openocd407.bat
index 7aad202a4a..0e1d87b83d 100644
--- a/firmware/flash_openocd407.bat
+++ b/firmware/flash_openocd407.bat
@@ -1,9 +1,2 @@
-echo I am flash_openocd.bat
-
-cd ../misc/install
-
-if not exist openocd/openocd.exe echo openocd/openocd.exe NOT FOUND
-if not exist openocd/openocd.exe exit -1
-
-openocd\openocd -f openocd/stm32f4discovery.cfg -c "program ../../firmware/build/rusefi.bin verify reset exit 0x08000000"
-
+@echo off
+sh.exe flash_openocd407.sh
diff --git a/firmware/flash_openocd407.sh b/firmware/flash_openocd407.sh
new file mode 100644
index 0000000000..ecb4f206f0
--- /dev/null
+++ b/firmware/flash_openocd407.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+echo "I am flash_openocd.sh"
+
+cd ../misc/install
+
+[ -e openocd/openocd.exe ] || { echo "openocd/openocd.exe NOT FOUND"; exit 1; }
+
+./openocd/openocd.exe -f openocd/stm32f4discovery.cfg -c "program ../../firmware/build/rusefi.bin verify reset exit 0x08000000"
+
diff --git a/misc/InteractiveHtmlBom b/misc/InteractiveHtmlBom
new file mode 160000
index 0000000000..14945d7553
--- /dev/null
+++ b/misc/InteractiveHtmlBom
@@ -0,0 +1 @@
+Subproject commit 14945d7553940520e11c42f4db9cb2273f57ff3f
diff --git a/misc/jenkins/InteractiveHtmlBom/run.bat b/misc/jenkins/InteractiveHtmlBom/run.bat
index 1c821106fc..3b559f9185 100644
--- a/misc/jenkins/InteractiveHtmlBom/run.bat
+++ b/misc/jenkins/InteractiveHtmlBom/run.bat
@@ -1,19 +1,2 @@
@echo off
-
-set kicad_path=c:\progra~1\KiCad
-set ibom_cmd=%kicad_path%\bin\python.exe C:\stuff\InteractiveHtmlBom\InteractiveHtmlBom\generate_interactive_bom.py --no-browser --name-format %%f_latest --dest-dir ../ibom
-echo "ibom_cmd=%ibom_cmd%"
-
-pwd
-if not exist hardware/frankenso/frankenso.kicad_pcb echo hardware/frankenso/frankenso.kicad_pcb not found. Was this invoked from wrong folder?
-if not exist hardware/frankenso/frankenso.kicad_pcb exit -1
-
-%ibom_cmd% hardware/Common_Rail_MC33816/Common_Rail_MC33816.kicad_pcb
-%ibom_cmd% hardware/brain_board/brain_board_STM32F407.kicad_pcb
-%ibom_cmd% hardware/brain_board_176-pin/176-pin_board.kicad_pcb
-%ibom_cmd% --extra-fields "mfg\,mfg#,vend1\,vend1#" hardware/CJ125_board/O2_input_CJ125.kicad_pcb --netlist-file hardware/CJ125_board/O2_input_CJ125.net
-%ibom_cmd% --extra-fields "MFG\,MFG#,VEND1\,VEND1#" hardware/frankenso/frankenso.kicad_pcb --netlist-file hardware/frankenso/frankenso.net
-%ibom_cmd% --extra-fields "mfg\,mfg#,vend1\,vend1#" hardware/frankenstein/frankenstein.kicad_pcb --netlist-file hardware/frankenstein/frankenstein.net
-%ibom_cmd% hardware/mini48-stm32/mini48-stm32.kicad_pcb
-%ibom_cmd% hardware/HighSideSwitch/VN750PS_E.kicad_pcb
-%ibom_cmd% hardware/can_board/can_brd_1.kicad_pcb
\ No newline at end of file
+sh.exe misc\jenkins\InteractiveHtmlBom\run.sh
diff --git a/misc/jenkins/InteractiveHtmlBom/run.sh b/misc/jenkins/InteractiveHtmlBom/run.sh
new file mode 100644
index 0000000000..06dcc6e356
--- /dev/null
+++ b/misc/jenkins/InteractiveHtmlBom/run.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+IBOM_CMD="python misc/InteractiveHtmlBom/generate_interactive_bom.py --no-browser --name-format \"%f_latest\" --dest-dir ../ibom"
+echo "IBOM_CMD=$IBOM_CMD"
+
+pwd
+[ -e hardware/frankenso/frankenso.kicad_pcb ] || { echo "hardware/frankenso/frankenso.kicad_pcb not found. Was this invoked from wrong folder?"; exit -1; }
+
+$IBOM_CMD hardware/Common_Rail_MC33816/Common_Rail_MC33816.kicad_pcb
+$IBOM_CMD hardware/brain_board/brain_board_STM32F407.kicad_pcb
+$IBOM_CMD hardware/brain_board_176-pin/176-pin_board.kicad_pcb
+$IBOM_CMD --extra-fields "mfg,mfg#,vend1,vend1#" hardware/CJ125_board/O2_input_CJ125.kicad_pcb --netlist-file hardware/CJ125_board/O2_input_CJ125.net
+$IBOM_CMD --extra-fields "MFG,MFG#,VEND1,VEND1#" hardware/frankenso/frankenso.kicad_pcb --netlist-file hardware/frankenso/frankenso.net
+$IBOM_CMD --extra-fields "mfg,mfg#,vend1,vend1#" hardware/frankenstein/frankenstein.kicad_pcb --netlist-file hardware/frankenstein/frankenstein.net
+$IBOM_CMD hardware/mini48-stm32/mini48-stm32.kicad_pcb
+$IBOM_CMD hardware/HighSideSwitch/VN750PS_E.kicad_pcb
+$IBOM_CMD hardware/can_board/can_brd_1.kicad_pcb
diff --git a/misc/jenkins/functional_test_and_build_bundle/build_current_bundle.bat b/misc/jenkins/functional_test_and_build_bundle/build_current_bundle.bat
index 6a5fa75cbe..98d47077a0 100644
--- a/misc/jenkins/functional_test_and_build_bundle/build_current_bundle.bat
+++ b/misc/jenkins/functional_test_and_build_bundle/build_current_bundle.bat
@@ -1,103 +1,2 @@
-rem
-rem This script would compile firmware, dev console and win32 simulator into a single bundle file
-rem This script depends on Cygwin tools: zip
-rem
-
-set script_name=build_current_bundle
-set "root_folder=%cd%"
-echo %script_name Entering root_folder=%root_folder%
-FOR %%i IN ("%root_folder%") DO (set root_folder=%%~si)
-echo %script_name Short name %root_folder%"
-
-echo build_current_bundle.bat: Hello rusEfi build full bundle
-echo %date% %time%
-
-cd firmware/bootloader
-call !clean_bootloader.bat
-call !compile_bootloader_discovery407.bat
-if not exist bootloader_generated.hxx echo FAILED TO COMPILE BOOTLOADER
-if not exist bootloader_generated.hxx exit -1
-pwd
-cd ../..
-rem At root folder here
-
-cd firmware
-echo %date% %time%
-
-
-echo build_current_bundle.bat: will be Erasing chip
-if not exist flash_erase407.bat echo NOT FOUND flash_erase.bat
-if not exist flash_erase407.bat exit -1
-echo build_current_bundle.bat: Erasing chip
-pwd
-rem Using magic 'cd' system variable to save current location here
-set "cur_folder=%cd%"
-call flash_erase407.bat
-cd %cur_folder%
-pwd
-
-
-echo build_current_bundle.bat: Building firmware
-call clean.bat
-git submodule update --init
-
-call update_version.bat
-
-call clean_compile_two_versions.bat
-if not exist deliver/rusefi_no_asserts.hex echo Just to confirm - FAILED to compile no_asserts
-if not exist deliver/rusefi_no_asserts.hex exit -1
-
-if not exist deliver/rusefi.hex echo Just to confirm - FAILED to compile default DEBUG
-if not exist deliver/rusefi.hex exit -1
-
-
-echo "%script_name%: Building DFU"
-..\misc\encedo_hex2dfu\hex2dfu.exe -i deliver/rusefi_no_asserts.hex -o deliver/rusefi_no_asserts.dfu
-..\misc\encedo_hex2dfu\hex2dfu.exe -i deliver/rusefi.hex -o deliver/rusefi.dfu
-ls -l deliver
-cd ..
-
-rem At root folder here
-
-call misc\jenkins\build_java_console.bat
-if not exist java_console_binary/rusefi_console.jar exit -1
-
-call misc\jenkins\build_simulator.bat
-if not exist simulator/build/rusefi_simulator.exe exit -1
-
-set stm_arch=stm32f407
-rem This depends on Cygwin date copied under 'datecyg' name to avoid conflict with Windows date
-rem By the way, '%%' is the way to escape % in batch files
-rem this is copy-pasted at build_version.bat
-for /f %%i in ('datecyg +%%Y%%m%%d_%%H%%M%%S') do set TIMESTAMP=%%i
-
-set folder=snapshot_%TIMESTAMP%_%stm_arch%_rusefi
-echo "%script_name%: folder variable1=%folder%"
-set folder=temp\%folder%
-echo "%script_name%: folder variable3=%folder%"
-
-pwd
-set bundle_full_name=rusefi_bundle
-call misc\jenkins\build_working_folder.bat
-IF NOT ERRORLEVEL 0 (
- echo %script_name%: ERROR: invoking build_working_folder.bat
- EXIT /B 1
-)
-
-echo "%script_name%: Building only console"
-pwd
-dir
-zip %root_folder%/temp/rusefi_console.zip %root_folder%/java_console_binary/rusefi_console.jar %root_folder%/java_console/rusefi.xml
-
-if not exist %root_folder%/temp/rusefi_console.zip echo CONSOLE ZIP FAILED
-if not exist %root_folder%/temp/rusefi_console.zip exit -1
-
-echo "%script_name%: only console ready"
-
-echo "%script_name%: Going back to root folder"
-cd %root_folder%
-pwd
-
-echo "TIMESTAMP %date% %time%"
-pwd
-echo "exiting %script_name%"
+@echo off
+sh.exe misc/jenkins/functional_test_and_build_bundle/build_current_bundle.sh
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
new file mode 100644
index 0000000000..064115348e
--- /dev/null
+++ b/misc/jenkins/functional_test_and_build_bundle/build_current_bundle.sh
@@ -0,0 +1,89 @@
+#!/bin/sh
+
+# This script would compile firmware, dev console and win32 simulator into a single bundle file
+# This script depends on Cygwin tools: zip
+
+SCRIPT_NAME="build_current_bundle"
+ROOT_FOLDER=$(pwd)
+echo "$SCRIPT_NAME Entering ROOT_FOLDER=$ROOT_FOLDER"
+
+echo "$SCRIPT_NAME.sh: Hello rusEfi build full bundle"
+date "+%a %D %T.%2S"
+
+cd firmware/bootloader
+sh clean_bootloader.sh
+sh compile_bootloader_discovery407.sh
+[ -e bootloader_generated.hxx ] || { echo "FAILED TO COMPILE BOOTLOADER"; exit 1; }
+pwd
+cd ../..
+# At root folder here
+
+cd firmware
+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
+
+echo "$SCRIPT_NAME: Building firmware"
+sh clean.sh
+
+sh update_version.sh
+
+sh 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; }
+
+echo "$SCRIPT_NAME: Building DFU"
+if uname | grep "NT"; then
+ chmod u+x ../misc/encedo_hex2dfu/hex2dfu.exe
+ ../misc/encedo_hex2dfu/hex2dfu.exe -i deliver/rusefi_no_asserts.hex -o deliver/rusefi_no_asserts.dfu
+ ../misc/encedo_hex2dfu/hex2dfu.exe -i deliver/rusefi.hex -o deliver/rusefi.dfu
+else
+ chmod u+x ../misc/encedo_hex2dfu/hex2dfu.bin
+ ../misc/encedo_hex2dfu/hex2dfu.bin -i deliver/rusefi_no_asserts.hex -o deliver/rusefi_no_asserts.dfu
+ ../misc/encedo_hex2dfu/hex2dfu.bin -i deliver/rusefi.hex -o deliver/rusefi.dfu
+fi
+
+ls -l deliver
+cd ..
+
+# At root folder here
+
+sh 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
+[ -e simulator/build/rusefi_simulator.exe ] || { echo "rusefi_simulator.exe build FAILED"; exit -1; }
+
+STM_ARCH="stm32f407"
+TIMESTAMP=$(date "+%Y%m%d_%H%M%S")
+
+FOLDER="snapshot_${TIMESTAMP}_${STM_ARCH}_rusefi"
+echo "$SCRIPT_NAME: folder variable1=$FOLDER"
+export FOLDER="temp/$FOLDER"
+echo "$SCRIPT_NAME: folder variable3=$FOLDER"
+
+pwd
+export BUNDLE_FULL_NAME="rusefi_bundle"
+sh misc/jenkins/build_working_folder.sh
+[ $? -eq 0 ] || { echo "$SCRIPT_NAME: ERROR: invoking build_working_folder.sh"; exit 1; }
+
+echo "$SCRIPT_NAME: Building only console"
+pwd
+ls
+zip "$ROOT_FOLDER/temp/rusefi_console.zip" "$ROOT_FOLDER/java_console_binary/rusefi_console.jar" "$ROOT_FOLDER/java_console/rusefi.xml"
+
+[ -e "$ROOT_FOLDER/temp/rusefi_console.zip" ] || { echo "CONSOLE ZIP FAILED"; exit 1; }
+
+echo "$SCRIPT_NAME: only console ready"
+
+echo "$SCRIPT_NAME: Going back to root folder"
+cd "$ROOT_FOLDER"
+pwd
+
+echo "TIMESTAMP $(date "+%a %D %T.%2S")"
+pwd
+echo "exiting $SCRIPT_NAME"
diff --git a/misc/jenkins/functional_test_and_build_bundle/hw_test.bat b/misc/jenkins/functional_test_and_build_bundle/hw_test.bat
index 5ea69d6a8b..e94689a77d 100644
--- a/misc/jenkins/functional_test_and_build_bundle/hw_test.bat
+++ b/misc/jenkins/functional_test_and_build_bundle/hw_test.bat
@@ -1,44 +1,2 @@
-echo "TIMESTAMP %date% %time%"
-set script_name=hw_test.bat
-echo Entering %script_name%
-pwd
-
-cd firmware
-rem Using magic 'cd' system variable here
-set "cur_folder=%cd%"
-echo "%script_name%: erasing first"
-call flash_erase407.bat
-cd %cur_folder%
-pwd
-echo "%script_name%: trying to flash"
-rem This script depends on someone else building firmware
-call flash_openocd407.bat
-IF NOT ERRORLEVEL 0 echo ERROR invoking flash_openocd407.bat
-IF NOT ERRORLEVEL 0 EXIT /B 1
-
-cd %cur_folder%
-
-if not exist build/rusefi.bin echo FIRMWARE NOT FOUND
-if not exist build/rusefi.bin exit -1
-
-pwd
-
-cd ..
-
-rem echo Running some commands
-rem pwd
-rem java -cp java_console_binary\rusefi_console.jar com.rusefi.CmdLine "set_led_blinking_period 10"
-
-cd java_console
-
-echo Running tests
-which java
-which javac
-ant realtest
-
-IF NOT ERRORLEVEL 0 echo ERROR DETECTED
-IF NOT ERRORLEVEL 0 EXIT /B 1
-
-echo "TIMESTAMP %date% %time%"
-pwd
-echo "exiting %script_name%"
+@echo off
+sh.exe misc/jenkins/functional_test_and_build_bundle.sh
diff --git a/misc/jenkins/functional_test_and_build_bundle/hw_test.sh b/misc/jenkins/functional_test_and_build_bundle/hw_test.sh
new file mode 100644
index 0000000000..cb922aadfb
--- /dev/null
+++ b/misc/jenkins/functional_test_and_build_bundle/hw_test.sh
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+echo "TIMESTAMP $(date "+%a %D %T.%2S")"
+SCRIPT_NAME="hw_test.sh"
+echo "Entering $SCRIPT_NAME"
+pwd
+
+cd firmware
+echo "$SCRIPT_NAME: erasing first"
+sh flash_erase407.sh
+echo "$SCRIPT_NAME: trying to flash"
+# This script depends on someone else building firmware
+sh flash_openocd407.sh
+[ $? -eq 0 ] || { echo "ERROR invoking flash_openocd407.sh"; exit 1; }
+
+[ -e build/rusefi.bin ] || { echo "FIRMWARE NOT FOUND"; exit 1; }
+
+pwd
+
+cd ..
+
+# echo Running some commands
+# pwd
+# java -cp java_console_binary\rusefi_console.jar com.rusefi.CmdLine "set_led_blinking_period 10"
+
+cd java_console
+
+echo "Running tests"
+which java
+which javac
+ant realtest
+
+[ $? -eq 0 ] || { echo "ERROR DETECTED"; exit 1; }
+
+echo "TIMESTAMP $(date "+%a %D %T.%2S")"
+pwd
+echo "exiting $SCRIPT_NAME"
diff --git a/misc/jenkins/functional_test_and_build_bundle/run.bat b/misc/jenkins/functional_test_and_build_bundle/run.bat
index f732acc622..1c181e61a3 100644
--- a/misc/jenkins/functional_test_and_build_bundle/run.bat
+++ b/misc/jenkins/functional_test_and_build_bundle/run.bat
@@ -1,17 +1,2 @@
-
-call misc/jenkins/functional_test_and_build_bundle/build_current_bundle.bat
-IF NOT ERRORLEVEL 0 echo build ERROR DETECTED
-IF NOT ERRORLEVEL 0 EXIT /B 1
-
-
-rem call misc/jenkins/functional_test_and_build_bundle/simulator_test.bat
-rem IF NOT ERRORLEVEL 0 echo simulator test ERROR DETECTED
-rem IF NOT ERRORLEVEL 0 EXIT /B 1
-
-
-rem Here we use last version of firmware produced by 'clean_compile_two_versions.bat'
-
-call misc/jenkins/functional_test_and_build_bundle/hw_test.bat
-IF NOT ERRORLEVEL 0 echo real hardware test ERROR DETECTED
-IF NOT ERRORLEVEL 0 EXIT /B 1
-
+@echo off
+sh.exe misc/jenkins/functional_test_and_build_bundle/run.sh
diff --git a/misc/jenkins/functional_test_and_build_bundle/run.sh b/misc/jenkins/functional_test_and_build_bundle/run.sh
new file mode 100644
index 0000000000..309779178a
--- /dev/null
+++ b/misc/jenkins/functional_test_and_build_bundle/run.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+sh 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
+# [ $? -eq 0 ] || { echo "simulator test ERROR DETECTED"; exit 1; }
+
+# Here we use last version of firmware produced by 'clean_compile_two_versions.bat'
+
+if [ ! "$RUSEFI_SKIP_HW" ] || [ "$RUSEFI_SKIP_HW" = "false" ]; then
+ sh misc/jenkins/functional_test_and_build_bundle/hw_test.sh
+ [ $? -eq 0 ] || { echo "real hardware test ERROR DETECTED"; exit 1; }
+fi
diff --git a/misc/jenkins/functional_test_and_build_bundle/simulator_test.bat b/misc/jenkins/functional_test_and_build_bundle/simulator_test.bat
index f2a349bf08..061022c08c 100644
--- a/misc/jenkins/functional_test_and_build_bundle/simulator_test.bat
+++ b/misc/jenkins/functional_test_and_build_bundle/simulator_test.bat
@@ -1,15 +1,2 @@
-echo I am simulator_test.bat
-pwd
-
-cd java_console
-
-echo Running simulator functional test
-which java
-which javac
-ant simlator_test
-
-IF NOT ERRORLEVEL 0 echo ERROR DETECTED
-IF NOT ERRORLEVEL 0 EXIT /B 1
-
-echo "TIMESTAMP %date% %time%"
-echo simulator_test.bat: done
+@echo off
+sh.exe misc/jenkins/functional_test_and_build_bundle/simulator_test.sh
diff --git a/misc/jenkins/functional_test_and_build_bundle/simulator_test.sh b/misc/jenkins/functional_test_and_build_bundle/simulator_test.sh
new file mode 100644
index 0000000000..4929d8695a
--- /dev/null
+++ b/misc/jenkins/functional_test_and_build_bundle/simulator_test.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+echo "I am simulator_test.sh"
+pwd
+
+cd java_console
+
+echo "Running simulator functional test"
+which java
+which javac
+ant simlator_test
+[ $? -eq 0 ] || { echo "ERROR DETECTED"; exit 1; }
+
+echo "TIMESTAMP $(date "+%a %D %T.%2S")"
+echo "simulator_test.sh: done"
diff --git a/misc/jenkins/generate_doxygen/gen_upload_docs.bat b/misc/jenkins/generate_doxygen/gen_upload_docs.bat
index ad990985a6..d2a75ad9e4 100644
--- a/misc/jenkins/generate_doxygen/gen_upload_docs.bat
+++ b/misc/jenkins/generate_doxygen/gen_upload_docs.bat
@@ -1,23 +1,2 @@
-
-echo Should be executed from project root folder. Will try to upload to %RUSEFI_FTP_SERVER%
-
-rem ibom is part of Doxygen job simply in order to reduce workspace HDD usage on my tiny build server
-call misc\jenkins\InteractiveHtmlBom\run.bat
-echo Uploading IBOMs
-ncftpput -R -v -u %RUSEFI_DOXYGEN_FTP_USER% -p %RUSEFI_DOXYGEN_FTP_PASS% %RUSEFI_FTP_SERVER% /ibom hardware/ibom/*
-
-pwd
-cd firmware
-
-doxygen
-IF NOT ERRORLEVEL 0 echo doxygen run FAILED
-IF NOT ERRORLEVEL 0 EXIT /B 1
-
-
-rem http://www.ncftp.com/download/
-rem actually Cygwin http://rusefi.com/wiki/index.php?title=Internal:Software:Build_Server
-cd ../doxygen
-echo Uploading Doxygen
-ncftpput -R -v -u %RUSEFI_DOXYGEN_FTP_USER% -p %RUSEFI_DOXYGEN_FTP_PASS% %RUSEFI_FTP_SERVER% /html html/*
-IF NOT ERRORLEVEL 0 echo upload FAILED
-IF NOT ERRORLEVEL 0 EXIT /B 1
+@echo off
+sh.exe misc\jenkins\generate_doxygen\gen_upload_docs.sh
diff --git a/misc/jenkins/generate_doxygen/gen_upload_docs.sh b/misc/jenkins/generate_doxygen/gen_upload_docs.sh
new file mode 100644
index 0000000000..d0688c949a
--- /dev/null
+++ b/misc/jenkins/generate_doxygen/gen_upload_docs.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+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
+echo "Uploading IBOMs"
+ncftpput -R -v -u "$RUSEFI_DOXYGEN_FTP_USER" -p "$RUSEFI_DOXYGEN_FTP_PASS" "$RUSEFI_FTP_SERVER" /ibom hardware/ibom/*
+
+pwd
+cd firmware
+
+doxygen || { echo "doxygen run FAILED"; exit 1; }
+
+# http://www.ncftp.com/download/
+# actually Cygwin http://rusefi.com/wiki/index.php?title=Internal:Software:Build_Server
+cd ../doxygen
+echo "Uploading Doxygen"
+ncftpput -R -v -u "$RUSEFI_DOXYGEN_FTP_USER" -p "$RUSEFI_DOXYGEN_FTP_PASS" "$RUSEFI_FTP_SERVER" /html html/*
+[ $? -eq 0 ] || { echo "upload FAILED"; exit 1; }
diff --git a/misc/jenkins/setup/jobs/integration_and_primary_bundle/config.xml b/misc/jenkins/setup/jobs/integration_and_primary_bundle/config.xml
index f1b0b97393..d79ac53b03 100644
--- a/misc/jenkins/setup/jobs/integration_and_primary_bundle/config.xml
+++ b/misc/jenkins/setup/jobs/integration_and_primary_bundle/config.xml
@@ -17,12 +17,12 @@
2
- https://github.com/rusefi/rusefi
+ https://github.com/chuckwagoncomputing/rusefi
- */master
+ */testing-primary
false
@@ -81,4 +81,4 @@
-
\ No newline at end of file
+