build.sh 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. #!/bin/bash
  2. sudo apt-get update -y
  3. sudo apt-get upgrade -y
  4. sudo apt-get install git build-essential autoconf automake libtool pkg-config libcurl4-openssl-dev libudev-dev libjansson-dev libncurses5-dev -y
  5. sudo apt-get install screen htop build-essential autoconf automake libtool pkg-config libcurl4-gnutls-dev libjansson-dev uthash-dev libncursesw5-dev libudev-dev libusb-1.0-0-dev libevent-dev libmicrohttpd-dev libhidapi-dev libgcrypt20-dev libssl-dev -y
  6. echo ""
  7. git clone https://github.com/wareck/cgminer-gekko.git
  8. echo ""
  9. git clone https://github.com/wareck/cgminer-lketc.git
  10. echo ""
  11. git clone https://github.com/wareck/bfgminer.git bfgminer-ftb
  12. echo ""
  13. git clone https://github.com/wareck/bfgminer.git
  14. echo ""
  15. git clone https://github.com/wareck/dualminer-cgminer.git
  16. echo ""
  17. git clone https://github.com/csa402/cgminer-ants3.git
  18. echo ""
  19. git clone https://github.com/tpruvot/cpuminer-multi.git
  20. echo ""
  21. sudo usermod -a -G dialout,plugdev $USER
  22. sudo cp 01-cgminer.rules /etc/udev/rules.d/
  23. sudo cp 70-bfgminer.rules /etc/udev/rules.d/
  24. echo ""
  25. cd cgminer-gekko
  26. ./autogen.sh
  27. ./configure --enable-gekko
  28. make
  29. cat <<'EOF'>> go.sh
  30. #!/bin/bash
  31. ./cgminer -o stratum+tcp://b3v.f2pool.com:1328 -u 1EjmJRoZ5UL7Bd7ujpRFRLK7g1oQt78nSR.Stick -p x --gekko-compac-freq 200 --gekko-2pac-freq 150
  32. EOF
  33. chmod +x go.sh
  34. cd ..
  35. echo ""
  36. cd cgminer-lketc
  37. ./autogen.sh
  38. ./configure --enable-scrypt --enable-zeus --enable-lketc
  39. make
  40. cat <<'EOF'>> go.sh
  41. #!/bin/bash
  42. ./cgminer --scrypt -o stratum+tcp://scrypt.eu.mine.zpool.ca:3433 -u D7zsHbdJvoL17mYWXPTDt3XfxNMwgoxuYt -p c=XVG,zap=XVG --lketc-clock 280 --zeus-chips 6 --zeus-clock 328
  43. EOF
  44. chmod +x go.sh
  45. cd ..
  46. echo ""
  47. cd dualminer-cgminer
  48. ./autogen.sh
  49. ./configure --enable-dualminer --enable-scrypt
  50. make
  51. cat <<'EOF'>> go.sh
  52. #!/bin/bash
  53. ./cgminer --scrypt -o stratum+tcp://scrypt.eu.mine.zpool.ca:3433 -u D7zsHbdJvoL17mYWXPTDt3XfxNMwgoxuYt -p c=XVG,zap=XV
  54. EOF
  55. chmod +x go.sh
  56. cd ..
  57. echo ""
  58. cd bfgminer-ftb
  59. ./autogen.sh
  60. ./configure --enable-scrypt --enable-futurebit --disable-gridseed --disable-zeusminer --disable-dualminer
  61. make
  62. cat <<'EOF'>> go.sh
  63. #!/bin/bash
  64. ./bfgminer --scrypt -o stratum+tcp://scrypt.eu.mine.zpool.ca:3433/#skipcbcheck -u D7zsHbdJvoL17mYWXPTDt3XfxNMwgoxuYt -p c=XVG,zap=XVG -S all --set MLD:clock=600 --set ZUS:clock=328
  65. EOF
  66. chmod +x go.sh
  67. cd ..
  68. echo ""
  69. cd bfgminer
  70. ./autogen.sh
  71. ./configure --enable-futurebit --enable-scrypt
  72. make
  73. cat <<'EOF'>> go.sh
  74. #!/bin/bash
  75. ./bfgminer --scrypt -o stratum+tcp://scrypt.eu.mine.zpool.ca:3433/#skipcbcheck -u D7zsHbdJvoL17mYWXPTDt3XfxNMwgoxuYt -p c=XVG,zap=XVG -S all --set MLD:clock=600 --set ZUS:clock=328
  76. EOF
  77. chmod +x go.sh
  78. cd ..
  79. echo ""
  80. cd cgminer-ants3
  81. ./autogen.sh
  82. ./configure --enable-ants3
  83. make
  84. cd ..
  85. echo ""
  86. cd cpuminer-multi
  87. ./autogen.sh
  88. ./build.sh
  89. cat <<'EOF'>> go.sh
  90. #!/bin/bash
  91. #./cpuminer -a x16rv2 -o stratum+tcp://x16rv2.eu.nicehash.com:3379 -u 3Fn2uyxTZ8Zu9ksVyakH6tT2XYzq1fyXf3.pi -px
  92. ./cpuminer -a lyra2v3 -o stratum+tcp://lyra2rev3.eu.nicehash.com:3373 -u 3Fn2uyxTZ8Zu9ksVyakH6tT2XYzq1fyXf3.pi -p x
  93. EOF
  94. chmod +x go.sh
  95. cd ..
  96. echo ""
  97. if ! grep "bfgminer-ftb" /etc/rc.local >/dev/null
  98. then
  99. sudo bash -c 'sed -i -e "s/exit 0//g" /etc/rc.local'
  100. sudo bash -c 'echo -e "su - pi -c \047screen -dmS miner /home/pi/miner_base/bfgminer-ftb/bfgminer --scrypt -o stratum+tcp://scrypt.eu.mine.zpool.ca:3433/#skipcbcheck -u D7zsHbdJvoL17mYWXPTDt3XfxNMwgoxuYt -p c=XVG,zap=XVG -S all --set MLD:clock=600\047" >>/etc/rc.local'
  101. sudo bash -c 'echo "exit 0" >>/etc/rc.local'
  102. fi