mirror of
https://github.com/JayDDee/cpuminer-opt.git
synced 2025-09-17 23:44:27 +00:00
Updated Home (markdown)
126
Home.md
126
Home.md
@@ -1,11 +1,11 @@
|
||||
Welcome to the cpuminer-opt wiki!
|
||||
|
||||
First draft to add log description. Will be supplimented with examples and
|
||||
detailed descriptions of the logs.
|
||||
A work in progress
|
||||
|
||||
## Requirements
|
||||
|
||||
### Hardware requirements.
|
||||
# Requirements
|
||||
|
||||
## Hardware requirements.
|
||||
|
||||
A x86_64 architecture CPU with a minimum of SSE2 support. This includes
|
||||
Intel Core2 and newer and AMD equivalents. In order to take advantage of AES_NI
|
||||
@@ -19,7 +19,7 @@ performance.
|
||||
|
||||
ARM CPUs are not supported.
|
||||
|
||||
### Software requirements
|
||||
## Software requirements
|
||||
|
||||
64 bit Linux OS. Ubuntu and Fedora based distributions, including Mint and
|
||||
Centos, are known to work and have all dependencies in their repositories.
|
||||
@@ -29,11 +29,11 @@ don't work due to missing features.
|
||||
|
||||
MacOS, OSx and Android are not supported.
|
||||
|
||||
### Stratum pool
|
||||
## Stratum pool
|
||||
|
||||
Some algorithms may work wallet mining using getwork or GBT, YMMV.
|
||||
|
||||
## Supported algorithms
|
||||
# Supported algorithms
|
||||
|
||||
allium Garlicoin
|
||||
anime Animecoin
|
||||
@@ -127,8 +127,9 @@ Some algorithms may work wallet mining using getwork or GBT, YMMV.
|
||||
yespower-b2b generic yespower + blake2b
|
||||
zr5 Ziftr
|
||||
|
||||
Many variations of scrypt based algos can be mine by specifying their
|
||||
parameters:
|
||||
### Scrypt, yescrypt, yespower parameters
|
||||
|
||||
Many variations of scrypt based algos can be mine by specifying their parameters:
|
||||
|
||||
* scryptn2: --algo scrypt --param-n 1048576
|
||||
|
||||
@@ -149,12 +150,11 @@ parameters:
|
||||
* yespowerltncg: --algo yespower --param-n 2048 --param-r 32 --param-key "LTNCGYES"
|
||||
|
||||
|
||||
## Building
|
||||
# Building
|
||||
|
||||
### Building on Linux
|
||||
## Building on Linux
|
||||
|
||||
2. Building on linux prerequisites:
|
||||
-----------------------------------
|
||||
### Building on linux prerequisites:
|
||||
|
||||
It is assumed users know how to install packages on their system and
|
||||
be able to compile standard source packages. This is basic Linux and
|
||||
@@ -175,13 +175,15 @@ The following command should install everything you need on Debian based
|
||||
distributions such as Ubuntu. Fedora and other distributions may have similar
|
||||
but different package names.
|
||||
|
||||
`
|
||||
$ sudo apt-get install build-essential automake libssl-dev libcurl4-openssl-dev libjansson-dev libgmp-dev zlib1g-dev git
|
||||
`
|
||||
|
||||
SHA support on AMD Ryzen CPUs requires gcc version 5 or higher and
|
||||
openssl 1.1.0e or higher. Add one of the following to CFLAGS for SHA
|
||||
support depending on your CPU and compiler version:
|
||||
|
||||
"-march=native" is always the best choice
|
||||
"-march=native" is usually the best choice and is used by build.sh
|
||||
|
||||
"-march=znver1" for Ryzen 1000 & 2000 series, znver2 for 3000.
|
||||
|
||||
@@ -192,8 +194,7 @@ https://lxadm.com/Static_compilation_of_cpuminer
|
||||
Static builds should only considered in a homogeneous HW and SW environment.
|
||||
Local builds will always have the best performance and compatibility.
|
||||
|
||||
3. Download cpuminer-opt
|
||||
------------------------
|
||||
### Download cpuminer-opt
|
||||
|
||||
Download the source code for the latest release from the official repository.
|
||||
|
||||
@@ -201,36 +202,37 @@ https://github.com/JayDDee/cpuminer-opt/releases
|
||||
|
||||
Extract the source code.
|
||||
|
||||
$ tar xvzf cpuminer-opt-x.y.z.tar.gz
|
||||
`$ tar xvzf cpuminer-opt-x.y.z.tar.gz`
|
||||
|
||||
|
||||
Alternatively it can be cloned from git.
|
||||
|
||||
$ git clone https://github.com/JayDDee/cpuminer-opt.git
|
||||
`$ git clone https://github.com/JayDDee/cpuminer-opt.git`
|
||||
|
||||
4. Build cpuminer-opt
|
||||
---------------------
|
||||
### Build cpuminer-opt
|
||||
|
||||
It is recomended to Build with default options, this will usuallly
|
||||
produce the best results.
|
||||
|
||||
$ ./build.sh to build on Linux or execute the following commands.
|
||||
`$ ./build.sh`
|
||||
|
||||
or
|
||||
|
||||
`
|
||||
$ ./autogen.sh
|
||||
$ CFLAGS="-O3 -march=native -Wall" ./configure --with-curl
|
||||
$ make -j n
|
||||
`
|
||||
|
||||
n is the number of threads.
|
||||
|
||||
5. Start mining.
|
||||
----------------
|
||||
|
||||
$ ./cpuminer -a algo -o url -u username -p password
|
||||
### Start mining.
|
||||
|
||||
|
||||
### Building for Windows
|
||||
`$ ./cpuminer -a algo -o url -u username -p password`
|
||||
|
||||
|
||||
## Building for Windows
|
||||
|
||||
Windows compilation using Visual Studio is not supported. Mingw64 is
|
||||
used on a Linux system (bare metal or virtual machine) to cross-compile
|
||||
@@ -249,17 +251,23 @@ It keeps all mingw stuff contained and isolated from the rest of the system.
|
||||
|
||||
Step by step...
|
||||
|
||||
1. Install necessary packages from the distribution's repositories.
|
||||
### Install packages
|
||||
|
||||
Install necessary packages from the distribution's repositories.
|
||||
|
||||
Refer to Linux compile instructions and install required packages.
|
||||
|
||||
Additionally, install mingw-w64.
|
||||
|
||||
sudo apt-get install mingw-w64
|
||||
`sudo apt-get install mingw-w64`
|
||||
|
||||
|
||||
2. Create a local library directory for packages to be compiled in the next
|
||||
step. Suggested location is $HOME/usr/lib/
|
||||
### Create a local library
|
||||
|
||||
Create a directory for libraries that that need to be compiled in the next stept step.
|
||||
The Suggested location is $HOME/usr/lib/
|
||||
|
||||
`$ mkdir $HOME/usr/lib`
|
||||
|
||||
3. Download and build other packages for mingw that don't have a mingw64
|
||||
version available in the repositories.
|
||||
@@ -286,54 +294,55 @@ n is the number of CPU threads you want to use.
|
||||
|
||||
openssl:
|
||||
|
||||
`
|
||||
./Configure mingw64 shared --cross-compile-prefix=x86_64-w64-mingw32
|
||||
make
|
||||
|
||||
`
|
||||
curl:
|
||||
|
||||
./configure --with-winssl --with-winidn --host=x86_64-w64-mingw32
|
||||
`./configure --with-winssl --with-winidn --host=x86_64-w64-mingw32
|
||||
make
|
||||
|
||||
`
|
||||
gmp:
|
||||
|
||||
`
|
||||
./configure --host=x86_64-w64-mingw32
|
||||
make
|
||||
`
|
||||
|
||||
|
||||
|
||||
4. Tweak the environment.
|
||||
### Tweak the environment.
|
||||
|
||||
This step is required everytime you login or the commands can be added to
|
||||
.bashrc.
|
||||
|
||||
Define some local variables to point to local library.
|
||||
|
||||
export LOCAL_LIB="$HOME/usr/lib"
|
||||
|
||||
export LDFLAGS="-L$LOCAL_LIB/curl/lib/.libs -L$LOCAL_LIB/gmp/.libs -L$LOCAL_LIB/openssl"
|
||||
|
||||
export CONFIGURE_ARGS="--with-curl=$LOCAL_LIB/curl --with-crypto=$LOCAL_LIB/openssl --host=x86_64-w64-mingw32"
|
||||
`
|
||||
$ export LOCAL_LIB="$HOME/usr/lib"
|
||||
$ export LDFLAGS="-L$LOCAL_LIB/curl/lib/.libs -L$LOCAL_LIB/gmp/.libs -L$LOCAL_LIB/openssl"
|
||||
$ export CONFIGURE_ARGS="--with-curl=$LOCAL_LIB/curl --with-crypto=$LOCAL_LIB/openssl --host=x86_64-w64-mingw32"
|
||||
`
|
||||
|
||||
Create a release directory and copy some dll files previously built.
|
||||
This can be done outside of cpuminer-opt and only needs to be done once.
|
||||
If the release directory is in cpuminer-opt directory it needs to be
|
||||
recreated every a source package is decompressed.
|
||||
|
||||
mkdir release
|
||||
cp /usr/x86_64-w64-mingw32/lib/zlib1.dll release/
|
||||
cp /usr/x86_64-w64-mingw32/lib/libwinpthread-1.dll release/
|
||||
cp /usr/lib/gcc/x86_64-w64-mingw32/7.3-win32/libstdc++-6.dll release/
|
||||
cp /usr/lib/gcc/x86_64-w64-mingw32/7.3-win32/libgcc_s_seh-1.dll release/
|
||||
cp $LOCAL_LIB/openssl/libcrypto-1_1-x64.dll release/
|
||||
cp $LOCAL_LIB/curl/lib/.libs/libcurl-4.dll release/
|
||||
|
||||
`
|
||||
$ mkdir release
|
||||
$ cp /usr/x86_64-w64-mingw32/lib/zlib1.dll release/
|
||||
$ cp /usr/x86_64-w64-mingw32/lib/libwinpthread-1.dll release/
|
||||
$ cp /usr/lib/gcc/x86_64-w64-mingw32/7.3-win32/libstdc++-6.dll release/
|
||||
$ cp /usr/lib/gcc/x86_64-w64-mingw32/7.3-win32/libgcc_s_seh-1.dll release/
|
||||
$ cp $LOCAL_LIB/openssl/libcrypto-1_1-x64.dll release/
|
||||
$ cp $LOCAL_LIB/curl/lib/.libs/libcurl-4.dll release/
|
||||
`
|
||||
|
||||
### Download cpuminer-opt
|
||||
|
||||
The following steps need to be done every time a new source package is
|
||||
opened.
|
||||
|
||||
5. Download cpuminer-opt
|
||||
|
||||
Download the latest source code package of cpumuner-opt to your desired
|
||||
location. .zip or .tar.gz, your choice.
|
||||
|
||||
@@ -343,23 +352,18 @@ Decompress and change to the cpuminer-opt directory.
|
||||
|
||||
|
||||
|
||||
6. Prepare to compile
|
||||
### Prepare to compile
|
||||
|
||||
Create a link to the locally compiled version of gmp.h
|
||||
|
||||
ln -s $LOCAL_LIB/gmp-version/gmp.h ./gmp.h
|
||||
`ln -s $LOCAL_LIB/gmp-version/gmp.h ./gmp.h`
|
||||
|
||||
Edit configure.ac to fix lipthread package name.
|
||||
### Compile
|
||||
|
||||
sed -i 's/"-lpthread"/"-lpthreadGC2"/g' configure.ac
|
||||
|
||||
|
||||
7. Compile
|
||||
|
||||
you can use the default compile if you intend to use cpuminer-opt on the
|
||||
You can use the default compile if you intend to use cpuminer-opt on the
|
||||
same CPU and the virtual machine supports that architecture.
|
||||
|
||||
./build.sh
|
||||
`$ ./build.sh`
|
||||
|
||||
Otherwise you can compile manually while setting options in CFLAGS.
|
||||
|
||||
|
Reference in New Issue
Block a user