Advertisement
Guest User

Untitled

a guest
Apr 26th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.89 KB | None | 0 0
  1. #!/bin/bash
  2. # This looks horrible af, i know. But hey, atleast it wörks! :D
  3. echo -e "\n\e[93m*** Numworks multiboot automation thingy by DSch *** \n"
  4. echo -e "\e[91mTHINGS TO NOTE:\e[39m"
  5. echo -e "Build qspi_loader and multiboot beforehand!"
  6. echo -e "run 'make epsilon.bin' to get the binfiles for extflash"
  7. echo -e "name files like this: 'xepsilon.bin' where x is the number for the firmware slot\n"
  8. echo -e "\e[94m[1] \e[39mInstalling Multiboot"
  9. echo -e "\e[36m[*] \e[91mConnect calculator and press reset."
  10. echo -e "\e[39mPress enter to continue"
  11. read -i ""
  12. cd ../multiboot
  13. make flash_multiboot
  14. cd ../tools
  15. echo -e "\e[36m[*] \e[91mmultiboot loaded onto device."
  16. echo -e "\e[94m[2] \e[39mRunning qspi_loader"
  17. #echo -e "\e[36m[*] \e[91mConnect calculator and press reset."
  18. echo -e "\e[39mPress enter to continue"
  19. read -i ""
  20. cd ../qspi_loader
  21. make run_qspi_loader
  22. cd ../tools
  23. echo -e "\e[36m[*] \e[91mqspi_loader is now in ram ;)"
  24. echo -e "\e[94m[3] \e[39mMaking extflash image"
  25. dd if=/dev/zero bs=8M count=1 | tr "\000" "\377" > flashme.bin
  26. dd if=1epsilon.bin of=flashme.bin bs=1M seek=4 conv=notrunc
  27. dd if=2epsilon.bin of=flashme.bin bs=1M seek=5 conv=notrunc
  28. dd if=3epsilon.bin of=flashme.bin bs=1M seek=6 conv=notrunc
  29. dd if=4epsilon.bin of=flashme.bin bs=1M seek=7 conv=notrunc
  30. echo -e "\n\e[36m[*] \e[39mDone :) | \e[91mPress enter to flash flashme.bin to the external flash.\e[39m"
  31. read -i ""
  32. flashrom -p serprog:dev=/dev/ttyACM0:115200 -w flashme.bin
  33. echo -e "\e[36m[*] \e[39mDone :)\n"
  34. echo -e "\e[91mPress [Reset], HOLD [Home] and Press [1] when the LED is Green\e[39m\n"
  35. echo -e "\e[39mPress enter to continue"
  36. read -i ""
  37. cd ../multiboot
  38. make run_multiboot
  39. cd ../tools
  40. echo -e "\n\e[39m\e[91mHOW TO START THE CALCULATOR:\n\e[96m[1]: \e[39mHold [Home]\n\e[96m[2]: \e[39mPress [RESET] on the calculator\n\e[96m[3]: \e[39mLed should light up in BLUE\n\e[96m[4]: \e[39mPress [1]-[4] to load the firmware.\n (!!!UNPLUG USB CABLE!!!)"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement