build.sh 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/usr/bin/env bash
  2. if [ -z $1 ]; then
  3. echo "./build <Debug | Release>"
  4. exit 1
  5. fi
  6. printf "Erasing previous hexagon_$1_dynamic_toolv83_v65 and UbuntuARM_$1_aarch64\n"
  7. rm -rf hexagon_$1_dynamic_toolv83_v65 &> /dev/null
  8. rm -rf UbuntuARM_$1_aarch64 &> /dev/null
  9. cd ./DSP &> /dev/null
  10. rm -rf hexagon_$1_dynamic_toolv83_v65 &> /dev/null
  11. printf "Building hexagon_$1_dynamic_toolv83_v65 ..."
  12. make V=hexagon_$1_dynamic_toolv83_v65 &> /dev/null
  13. if [ $? != 0 ]; then
  14. printf "failed\n"
  15. else
  16. printf "done\n"
  17. fi
  18. cd ../ &> /dev/null
  19. printf "Building UbuntuARM_$1_aarch64 ..."
  20. make V=UbuntuARM_$1_aarch64 &> /dev/null
  21. if [ $? != 0 ]; then
  22. printf "failed\n"
  23. else
  24. printf "done\n"
  25. fi
  26. printf "Trying to push libwolfssl_Dsp_skel.so, libwolfssl.so, benchmark, eccverify, eccbenchmark\n"
  27. adb push DSP/hexagon_$1_dynamic_toolv83_v65/ship/libwolfssl_dsp_skel.so /data/rfsa/adsp/
  28. adb push UbuntuARM_$1_aarch64/ship/libwolfssl.so /data/
  29. adb push UbuntuARM_$1_aarch64/ship/benchmark /data/
  30. adb push UbuntuARM_$1_aarch64/ship/eccverify /data/
  31. adb push UbuntuARM_$1_aarch64/ship/eccbenchmark /data/
  32. #adb push UbuntuARM_$1_aarch64/ship/testwolfcrypt /data/wolfcrypt/test/
  33. printf "done\n"
  34. exit 0