#! /bin/bash ######################################################################################## # buildneuros # This script will hopefully build your neuros firmware on linux. # Instructions are in the HOWTO at http://nerochiaro.net/code/neuros/build_on_linux.htm # # - 1.1 2005-08-26 # ~ lots of bug fixes # + now works with native linux buildtools (except Image.exe) # - 1.0 2005-08-22 # + first release ######################################################################################## echo -e "[ Ensure directories ... ]\n" mkdir -v obj mkdir -v debug echo -e "\n[ Start building from source ... ]\n" make -f Neuros200.mak echo -e "\n[ Building the hex file for noload part ... ]" ../../buildtools/emuflash Private_Source/Neuros200.cmd echo -e "\n" wine cl500.exe -@build.lkf echo -e "\n" wine hex500.exe build/neuros_noload.cmd echo -e "\n[ Building the hex file for load part ... ]" ../../buildtools/emuflash Private_Source/Neuros200.cmd echo -e "\n" wine cl500.exe -@build.lkf echo -e "\n" wine hex500.exe build/neuros_load.cmd echo -e "\n[ Merge the two hex files into one ... ]" ../../buildtools/hexmerger build/output/neuros_load.hex build/output/neuros_noload.hex build/output/neuros200.hex echo -e "[ Generating the image file... ]\n" wine ../../buildtools/image.exe build/image.cmd echo -e "\n[ Moving stuff around... ]\n" rm -v build/output/neurosx.hex cp -v build/output/neuros_flash.hex build/output/neurosx.hex rm -v build/output/neuros_flash.hex echo -e "\n[ Merging the bootloader and the application... ]" ../../buildtools/hexmerger ../../../source/BASICBOOT/Debug/basicboot.hex build/output/neurosx.hex build/output/neuros_flashall.hex echo -e "\n[ Some more cleanup ... ]\n" rm -v build/output/neurosx.hex echo -e "\n[ Running conversion ... ]\n" wine ../../buildtools/word2byte build/output/neuros_flashall.hex build/output/neuros_flashall_prog.hex echo -e "\n[ Performing sign ... ]\n" ../../buildtools/bootversion build/output/neuros_flashall.hex echo -e "\n[ Copying the firmware binary ... ]\n" cp build/output/neuros_flashall.hex ../../../source/DEBUGFLASHER/debug/woid.hex echo -e"\n[ Build complete. If all went well you should find your new firmware in ../../../source/DEBUGFLASHER/Debug/woid.hex ]"