rusefi-1/firmware/gen_config_board.sh

53 lines
1.7 KiB
Bash
Raw Normal View History

#!/bin/bash
2020-07-05 19:44:45 -07:00
# file gen_config_board.sh
#set -x
2020-07-05 19:39:55 -07:00
echo "This script reads rusefi_config.txt and produces firmware persistent configuration headers"
echo "the storage section of rusefiXXX.ini is updated as well"
if [ -z "$1" ]; then
echo "Board name parameter expected"
exit 1
fi
BOARDNAME=$1
SHORT_BOARDNAME=$2
echo "BOARDNAME=${BOARDNAME} SHORT_BOARDNAME=${SHORT_BOARDNAME}"
bash gen_signature.sh ${SHORT_BOARDNAME}
java -DSystemOut.name=gen_config_board \
-Drusefi.generator.lazyfile.enabled=true \
-cp ../java_tools/ConfigDefinition.jar \
com.rusefi.board_generator.BoardReader \
2020-07-05 20:09:43 -07:00
-yaml config/boards/${BOARDNAME}/mapping.yaml \
-firmware_path . \
2020-07-05 22:09:05 -07:00
-output_file tunerstudio/generated/${BOARDNAME}_prefix.txt \
-enumInputFile controllers/algo/rusefi_enums.h \
-enumInputFile controllers/algo/rusefi_hw_enums.h
Convert jenkins build_extra_bundles scripts to sh (#1554) * Add checkout * remove empty with statement * Actually we do need push depth * convert build_working_folder * convert prepare_bundle * fixed extension * fixed closing bracket * fixed comparison and assignments * no comment * convert compile_and_upload and clean * convert build_simulator * Finish converting build_working_folder * convert build_java_console * Add hashbangs * remove findcyg instruction * changed paths * remove call * add path * fixed script names * add prams * fix cd * convert clean_env_variables * convert common_make.sh * Added linux hex2dfu binary * add file extension to linux hex2dfu * add file extension to linux hex2dfu * remove spurious paren * fixed board name * convert compile-frankenso-na6 * convert compile-frankenso-pal * add hashbang * convert compile-kinetis * convert compile-mre-f4 * convert compile-mre-f4-hardware-QC-special-build * convert compile-mre-f4-slave * convert compile-mre-f7 * convert compile-mre-f7-test * switch to underscores * converting boards to sh * convert prometheus * convert proteus * fixed path * switch to underscores * chmod and add extension * add quotes * Add check for Windows * Add chmod * fix script name * fix error checking * quote vars * remove checking from batch shims * fix typo * change error checking to support nix style error codes * switch to 1 retval * cd back to firmware * Add escapes * change from cd to rel path * add p flags to mkdir Co-authored-by: David Holdeman <David Holdeman>
2020-07-01 11:09:01 -07:00
[ $? -eq 0 ] || { echo "ERROR generating TunerStudio config for ${BOARDNAME}"; exit 1; }
2020-07-05 21:29:30 -07:00
# work in progress: migrating to rusefi_${BUNDLE_NAME}.txt
java -DSystemOut.name=gen_config_board \
-jar ../java_tools/ConfigDefinition.jar \
-definition integration/rusefi_config.txt \
-tool gen_config.sh \
-ts_destination tunerstudio \
2020-07-05 21:48:43 -07:00
-cache ${SHORT_BOARDNAME} \
2020-07-05 22:01:30 -07:00
-cache_zip_file tunerstudio/generated/cache.zip \
2020-07-05 21:29:30 -07:00
-firing_order controllers/algo/firing_order.h \
-ts_output_name generated/rusefi_${SHORT_BOARDNAME}.ini \
2020-07-05 22:01:30 -07:00
-signature tunerstudio/generated/signature_${SHORT_BOARDNAME}.txt \
2020-07-05 21:29:30 -07:00
-signature_destination controllers/generated/signature_${SHORT_BOARDNAME}.h \
-enumInputFile controllers/algo/rusefi_enums.h \
2020-07-05 22:09:05 -07:00
-prepend tunerstudio/generated/${BOARDNAME}_prefix.txt \
2020-07-05 21:29:30 -07:00
-prepend config/boards/${BOARDNAME}/prepend.txt
Convert jenkins build_extra_bundles scripts to sh (#1554) * Add checkout * remove empty with statement * Actually we do need push depth * convert build_working_folder * convert prepare_bundle * fixed extension * fixed closing bracket * fixed comparison and assignments * no comment * convert compile_and_upload and clean * convert build_simulator * Finish converting build_working_folder * convert build_java_console * Add hashbangs * remove findcyg instruction * changed paths * remove call * add path * fixed script names * add prams * fix cd * convert clean_env_variables * convert common_make.sh * Added linux hex2dfu binary * add file extension to linux hex2dfu * add file extension to linux hex2dfu * remove spurious paren * fixed board name * convert compile-frankenso-na6 * convert compile-frankenso-pal * add hashbang * convert compile-kinetis * convert compile-mre-f4 * convert compile-mre-f4-hardware-QC-special-build * convert compile-mre-f4-slave * convert compile-mre-f7 * convert compile-mre-f7-test * switch to underscores * converting boards to sh * convert prometheus * convert proteus * fixed path * switch to underscores * chmod and add extension * add quotes * Add check for Windows * Add chmod * fix script name * fix error checking * quote vars * remove checking from batch shims * fix typo * change error checking to support nix style error codes * switch to 1 retval * cd back to firmware * Add escapes * change from cd to rel path * add p flags to mkdir Co-authored-by: David Holdeman <David Holdeman>
2020-07-01 11:09:01 -07:00
[ $? -eq 0 ] || { echo "ERROR generating TunerStudio config for ${BOARDNAME}"; exit 1; }
exit 0