Miner setupGet latest binaries from:
https://bitcointalksearch.org/topic/m.57091051Log into your
admin account.
[1] Download and unpack binary. Replace the URL below with whatever is latest at time of reading.
sudo mkdir /opt/miner && cd /opt/miner
sudo wget https://github.com/jstefanop/Apollo-Miner-Binaries/releases/download/1.1/Apollo-Miner_linux-aarch64.tar.xz
sudo tar xf Apollo-Miner_linux-aarch64.tar.xz
[2] Edit the
miner_start.sh file.
cd linux-aarch64/
sudo vim miner_start.sh
[3] Input the following content. This is very much inspired by what the 'original Futurebit OS' ships.
#!/bin/bash
settings='-host stratum.kano.is -port 3333 -user username.worker -pswd x -brd_ocp 48 -osc 30 -fan_temp_low 70 -fan_temp_hi 90'
start_hashboards()
{
while [ $1 ];
do
screen -dmS miner ./apollo-miner -comport $1 -ao_mode 1 $settings
sleep 1
shift
done
}
#reset internal hashboard
gpio write 0 0
sleep .5
gpio write 0 1
sleep 30
#start internal hashboard
screen -dmS miner ./apollo-miner -comport /dev/ttyS1 -ao_mode 1 $settings
#find and start external hashboards
ports=$(ls /dev/ttyACM*)
start_hashboards $ports
echo "Started"
[4] Configure the
'settings' line of this file correctly, to point to your user account and worker name on a pool of your choice. Then hook up the hashboard to the SBC using a Micro-USB to USB-A cable. [TO-DO: this won't be needed later when I figure out the UART connection]
Make sure that
stratum.kano.is is replaced with your pool's URL and that
username.worker is your username on that pool concatenated with a worker name.
[5] Make the file executable.
sudo chmod +x ./miner_start.sh
[6] To test everything's working, execute it and give it some time to start up the hashboard and perform some hashes.
sudo ./miner_start.sh
[7] Create the file for stopping all hashboards.
sudo vim ./miner_stop.sh
[8] Add this content. Full credit to jstefanop.
#!/bin/bash
reset_hashboards()
{
while [ $1 ];
do
python -c 'import termios; termios.tcsendbreak(3, 0)' 3>$1
sleep .5
shift
done
}
#quit all mining proccesses
for scr in $(screen -ls | awk '{print $1}'); do screen -S $scr -X quit; done
#reset internal hashboard
gpio write 0 0
sleep .5
gpio write 0 1
#find and reset external hashboards
ports=$(ls /dev/ttyACM*)
reset_hashboards $ports
echo "Stopped"
[9] Make it executable.
sudo chmod +x ./miner_stop.sh
[10] Stop the miner for now.
sudo ./miner_stop.sh