rusefi/firmware/gen_config.sh

83 lines
3.5 KiB
Bash
Raw Normal View History

#!/bin/bash
Fix #1590 (#1602) * Add checkout * remove empty with statement * Actually we do need push depth * convert gen_upload_docs.bat * convert run.bat * forgot to add run.sh * convert gen_upload_docs.bat * remove checking from bats * change config * fix path * fix path again * fix file extension * remove escapes * added missing quotation and escapes * convert build_current_bundle * convert clean_bootloader * convert compile_bootloader_discovery * convert compile_bootloader * add env var to skip upload * remove checking from compile.bat * working on push.yaml * finish sorting * progress * rename push to builds * rename push to builds * Add skip upload env var * fix pull_request name * fixed typo and changed name * fixed indentation and runs-on * try different env var setup * add nucleos and switch to underscore * add quotes * remove boards that were commented * remove boards that were commented * fix project board name * fixed variable name * add ini-file and console-settings * try installing gcc-multilib first * Install g++-multilib as well * remove unnecessary export * fixed exit numbers * change to different env setup * add simulator and console compilation to board bundles * changed OS and added linux simulator build * add checkout and missing colon * add gcc-multilib installes * Install mingw * fixed install * remove mingw from linux sim and call compile directly * change directory * moved envs to command * debug ls * debug ls * set ftp vars * add makefile debug info * removed batchecks * redirect stdout to easier see orrs * change name * remove redirect, add file inpection * Add conditional project name * Try software upgrade * missing char * update ine files * try quotes * add escapes * add quotes * add escapes and quotes * remove quotes and escapes * remove software upgrade * ignore test 2 * update apt * like this then * forgot import * fix case * remove RUSEFI_SKIP_UPLOAD and check RUSEFI_FTP_SERVER instead * break workflow back apart * upload simulator artifact * fixed operator * update apt * change paths * Update build-firmware.yaml * move update bundle to artifacts * fix var name * Install ncftp * set env vars conditionally * remove check so zips are created * try things the github way and copy to primary * re-enable test * missing space * use bash * use bash * add workflow * add check before upload * install kicad * switch firmware to bash * switch unit_testts to bash * switch jenkins to bash * fix path * pwd * checkout submodules * add ppa for kicad 5.1 * install xvfb and set DISPLAY * use xvfb * use python3 and add NO_DISPLAY var * fetch all * remove blob * undo unintentional changes * reset accidentally commited config.xmlu * remove submodule * fix path * Only call one board * make simulator and console conditional * break away bundle packaging * pass bundle name * switch to bash * make primary bundle conditional * break away packaging for primary and pass config names * Add default name to unit tests * add check to skip config * add property to skip config, and fix check * switch primary bundle to still build * switch to bash * move default config to its own script * add exit 0 * go back to gen_config running all boards * remove TS stuf8f * remove TS stuff * switch to gen_config_board * switch to bash * add kinetis back * add check for kinetis * rename compile_and_upload * add error checking * Revert "add error checking" This reverts commit f6c9b7f2521f9c28ea150da8e733c593a59596a1. * Add readme Co-authored-by: David Holdeman <David Holdeman>
2020-07-14 07:28:26 -07:00
echo "This script reads rusefi_config.txt and produces firmware persistent configuration headers"
echo "The storage section of rusefi.ini is updated as well"
Fix #1590 (#1602) * Add checkout * remove empty with statement * Actually we do need push depth * convert gen_upload_docs.bat * convert run.bat * forgot to add run.sh * convert gen_upload_docs.bat * remove checking from bats * change config * fix path * fix path again * fix file extension * remove escapes * added missing quotation and escapes * convert build_current_bundle * convert clean_bootloader * convert compile_bootloader_discovery * convert compile_bootloader * add env var to skip upload * remove checking from compile.bat * working on push.yaml * finish sorting * progress * rename push to builds * rename push to builds * Add skip upload env var * fix pull_request name * fixed typo and changed name * fixed indentation and runs-on * try different env var setup * add nucleos and switch to underscore * add quotes * remove boards that were commented * remove boards that were commented * fix project board name * fixed variable name * add ini-file and console-settings * try installing gcc-multilib first * Install g++-multilib as well * remove unnecessary export * fixed exit numbers * change to different env setup * add simulator and console compilation to board bundles * changed OS and added linux simulator build * add checkout and missing colon * add gcc-multilib installes * Install mingw * fixed install * remove mingw from linux sim and call compile directly * change directory * moved envs to command * debug ls * debug ls * set ftp vars * add makefile debug info * removed batchecks * redirect stdout to easier see orrs * change name * remove redirect, add file inpection * Add conditional project name * Try software upgrade * missing char * update ine files * try quotes * add escapes * add quotes * add escapes and quotes * remove quotes and escapes * remove software upgrade * ignore test 2 * update apt * like this then * forgot import * fix case * remove RUSEFI_SKIP_UPLOAD and check RUSEFI_FTP_SERVER instead * break workflow back apart * upload simulator artifact * fixed operator * update apt * change paths * Update build-firmware.yaml * move update bundle to artifacts * fix var name * Install ncftp * set env vars conditionally * remove check so zips are created * try things the github way and copy to primary * re-enable test * missing space * use bash * use bash * add workflow * add check before upload * install kicad * switch firmware to bash * switch unit_testts to bash * switch jenkins to bash * fix path * pwd * checkout submodules * add ppa for kicad 5.1 * install xvfb and set DISPLAY * use xvfb * use python3 and add NO_DISPLAY var * fetch all * remove blob * undo unintentional changes * reset accidentally commited config.xmlu * remove submodule * fix path * Only call one board * make simulator and console conditional * break away bundle packaging * pass bundle name * switch to bash * make primary bundle conditional * break away packaging for primary and pass config names * Add default name to unit tests * add check to skip config * add property to skip config, and fix check * switch primary bundle to still build * switch to bash * move default config to its own script * add exit 0 * go back to gen_config running all boards * remove TS stuf8f * remove TS stuff * switch to gen_config_board * switch to bash * add kinetis back * add check for kinetis * rename compile_and_upload * add error checking * Revert "add error checking" This reverts commit f6c9b7f2521f9c28ea150da8e733c593a59596a1. * Add readme Co-authored-by: David Holdeman <David Holdeman>
2020-07-14 07:28:26 -07:00
rm -f gen_config.log
rm -f gen_config_board.log
2021-07-30 14:39:55 -07:00
# todo: who is the consumer of this folder? shall we move that 'mkdir' command closer to usage?
mkdir build
2023-08-27 21:31:37 -07:00
cd ../java_tools
./gradlew :config_definition:shadowJar
cd ../firmware
# todo: we have a bit of code duplication with build-firmware.yaml here :(
config/boards/kinetis/config/gen_kinetis_config.sh
[ $? -eq 0 ] || { echo "ERROR generating board kinetis kin"; exit 1; }
config/boards/cypress/config/gen_cypress_config.sh
[ $? -eq 0 ] || { echo "ERROR generating board cypress cypress"; exit 1; }
config/boards/subaru_eg33/config/gen_subaru_config.sh
[ $? -eq 0 ] || { echo "ERROR generating board subaru_eg33 subaru_eg33_f7"; exit 1; }
2021-04-29 20:00:22 -07:00
#
# see also build-firmware where we compile all versions of firmware
2023-06-17 07:40:35 -07:00
# *** IMPORTANT *** most inclusive f407-discovery is last for a reason - we want it's generated files to be in repo
2021-04-29 20:10:36 -07:00
#
2021-08-03 19:26:33 -07:00
for BOARD in \
"config/boards/hellen/alphax-2chan alphax-2chan" \
"config/boards/hellen/alphax-4chan alphax-4chan" \
2023-06-20 11:25:56 -07:00
"config/boards/hellen/alphax-4chan alphax-4chan_f7" \
"config/boards/hellen/alphax-8chan alphax-8chan" \
2023-06-20 11:25:56 -07:00
"config/boards/hellen/alphax-8chan alphax-8chan_f7" \
2023-09-08 04:10:33 -07:00
"config/boards/hellen/alphax-8chan-revA alphax-8chan-revA" \
"config/boards/hellen/hellen128 hellen128" \
"config/boards/hellen/hellen121vag hellen121vag" \
"config/boards/hellen/hellen121nissan hellen121nissan" \
"config/boards/hellen/hellen-honda-k hellen-honda-k" \
"config/boards/hellen/hellen154hyundai hellen154hyundai" \
"config/boards/hellen/hellen88bmw hellen88bmw" \
2023-10-25 19:54:50 -07:00
"config/boards/hellen/uaefi uaefi" \
"config/boards/hellen/hellen-112-17 hellen-112-17" \
"config/boards/hellen/hellen81 hellen81" \
2024-03-05 17:28:16 -08:00
"config/boards/hellen/hellenMiataNA6 hellenMiataNA6" \
"config/boards/hellen/hellenMiataNA96 hellenMiataNA96" \
"config/boards/hellen/hellenMiataNB1 hellenMiataNB1" \
"config/boards/hellen/hellenMiataNB2 hellenMiataNB2" \
"config/boards/hellen/hellen-gm-e67 hellen-gm-e67" \
"config/boards/hellen/small-can-board small-can-board" \
"config/boards/microrusefi mre_f7" \
"config/boards/microrusefi mre_f4" \
2024-03-05 17:28:16 -08:00
"config/boards/at_start_f435 at_start_f435" \
"config/boards/m74_9 m74_9" \
"config/boards/s105 s105" \
2023-06-05 21:13:05 -07:00
"config/boards/test-build-guards t-b-g" \
2024-01-06 06:55:03 -08:00
"config/boards/frankenso_na6 frankenso_na6" \
2024-02-14 19:54:02 -08:00
"config/boards/prometheus/f469 prometheus_469" \
"config/boards/prometheus/f405 prometheus_405" \
"config/boards/proteus proteus_f7" \
"config/boards/proteus proteus_f4" \
"config/boards/proteus proteus_h7" \
2024-03-05 17:28:16 -08:00
"config/boards/f407-discovery f407-discovery" \
"config/boards/f429-discovery f429-discovery" \
2023-12-14 09:02:39 -08:00
"config/boards/f469-discovery f469-discovery" \
"config/boards/nucleo_f413 stm32f413_nucleo" \
"config/boards/nucleo_f429 stm32f429_nucleo" \
"config/boards/nucleo_f767 stm32f767_nucleo" \
2023-04-29 08:13:50 -07:00
"config/boards/nucleo_h743 nucleo_h743" \
"config/boards/atlas atlas"\
"config/boards/tdg-pdm8 tdg-pdm8"\
2021-08-03 19:26:33 -07:00
; do
BOARD_DIR=$(echo "$BOARD" | cut -d " " -f 1)
2024-02-28 19:23:49 -08:00
SHORT_BOARD_NAME=$(echo "$BOARD" | cut -d " " -f 2)
bash gen_signature.sh ${SHORT_BOARD_NAME}
2024-02-28 19:23:49 -08:00
bash gen_config_board.sh $BOARD_DIR $SHORT_BOARD_NAME
bash bin/gen_image_board.sh $BOARD_DIR $SHORT_BOARD_NAME
[ $? -eq 0 ] || { echo "ERROR generating board dir=[$BOARD_DIR] short=[$SHORT_BOARD_NAME]"; exit 1; }
done
exit 0