forked from bitbandi/sgminer-timetravel
-
Notifications
You must be signed in to change notification settings - Fork 14
Building on Linux
Brian Lee edited this page Mar 20, 2018
·
2 revisions
Steps:
Go here and grab the AMD APP SDK 3.0. Install it to /opt/AMDAPPSDK-3.0
.
git clone https://github.com/brian112358/sgminer-x16r
- change dir to the cloned repository
cd sgminer-x16r
- checkout the dev branch
git checkout dev
- next steps are basically the same from the main README:
git submodule update --init --recursive
./autogen.sh
CFLAGS="-O2 -Wall -march=native -I/opt/AMDAPPSDK-3.0/include" ./configure <options>
If you installed the AMD APP SDK somewhere else, just modify the path in the CFLAGS
string.
Note: compiling does not work on gcc 7, so if you're on a system where the default gcc version is 7, make sure you have installed gcc 6 and specify so in your configure step:
CFLAGS="-O2 -Wall -march=native" CC="/usr/bin/gcc-6" ./configure
make -j3 (to use 3 threads, adjust depending on your cpu)
You can either run make install
or you can run it from the build directory.
Sample script file to run the miner:
#!/bin/bash
export GPU_FORCE_64BIT_PTR=1
export GPU_MAX_HEAP_SIZE=100
export GPU_USE_SYNC_OBJECTS=1
export GPU_MAX_ALLOC_PERCENT=100
export GPU_SINGLE_ALLOC_PERCENT=100
ADDRESS="your address"
POOL="stratum+tcp://<pool.url>:<port>"
PASSWORD="x"
INTENSITY="19"
./sgminer -k x16r -o $POOL -u $ADDRESS -p $PASSWORD -I $INTENSITY
Save it in a file, for instance miner.sh
, make it executable (chmod +x miner.sh
) and run it: ./miner.sh