add full build script

This commit is contained in:
Matthew Kennedy 2020-12-10 23:37:28 -08:00
parent 3e9e516466
commit a5ba643ec5
1 changed files with 20 additions and 0 deletions

20
firmware/build_wideband.sh Executable file
View File

@ -0,0 +1,20 @@
#!/bin/bash
# first build the bootloader
cd bootloader
./build_bootloader.sh
cd ..
# delete the elf to force a re-link (it might not pick up the bootloader otherwise)
rm -r build/
rm ../for_rusefi/wideband_image.h
make -j12
# Copy the bin without the bootloader (the image consumed by rusEfi has no bootloader on it)
dd if=build/wideband.bin of=build/wideband_noboot.bin skip=6144 bs=1
# Convert to a header file, and tack "static const " on the front of it
xxd -i build/wideband_noboot.bin \
| cat <(echo -n "static const ") - \
> ../for_rusefi/wideband_image.h