Updated Home (markdown)

JayDDee
2020-03-01 20:33:04 -05:00
parent 2f8b620c66
commit 278fe2c3a5

126
Home.md

@@ -1,11 +1,11 @@
Welcome to the cpuminer-opt wiki! Welcome to the cpuminer-opt wiki!
First draft to add log description. Will be supplimented with examples and A work in progress
detailed descriptions of the logs.
## Requirements
### Hardware requirements. # Requirements
## Hardware requirements.
A x86_64 architecture CPU with a minimum of SSE2 support. This includes 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 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. ARM CPUs are not supported.
### Software requirements ## Software requirements
64 bit Linux OS. Ubuntu and Fedora based distributions, including Mint and 64 bit Linux OS. Ubuntu and Fedora based distributions, including Mint and
Centos, are known to work and have all dependencies in their repositories. 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. MacOS, OSx and Android are not supported.
### Stratum pool ## Stratum pool
Some algorithms may work wallet mining using getwork or GBT, YMMV. Some algorithms may work wallet mining using getwork or GBT, YMMV.
## Supported algorithms # Supported algorithms
allium Garlicoin allium Garlicoin
anime Animecoin anime Animecoin
@@ -127,8 +127,9 @@ Some algorithms may work wallet mining using getwork or GBT, YMMV.
yespower-b2b generic yespower + blake2b yespower-b2b generic yespower + blake2b
zr5 Ziftr zr5 Ziftr
Many variations of scrypt based algos can be mine by specifying their ### Scrypt, yescrypt, yespower parameters
parameters:
Many variations of scrypt based algos can be mine by specifying their parameters:
* scryptn2: --algo scrypt --param-n 1048576 * scryptn2: --algo scrypt --param-n 1048576
@@ -149,12 +150,11 @@ parameters:
* yespowerltncg: --algo yespower --param-n 2048 --param-r 32 --param-key "LTNCGYES" * 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 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 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 distributions such as Ubuntu. Fedora and other distributions may have similar
but different package names. but different package names.
`
$ sudo apt-get install build-essential automake libssl-dev libcurl4-openssl-dev libjansson-dev libgmp-dev zlib1g-dev git $ 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 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 openssl 1.1.0e or higher. Add one of the following to CFLAGS for SHA
support depending on your CPU and compiler version: 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. "-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. Static builds should only considered in a homogeneous HW and SW environment.
Local builds will always have the best performance and compatibility. 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. 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. 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. 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 It is recomended to Build with default options, this will usuallly
produce the best results. produce the best results.
$ ./build.sh to build on Linux or execute the following commands. `$ ./build.sh`
or or
`
$ ./autogen.sh $ ./autogen.sh
$ CFLAGS="-O3 -march=native -Wall" ./configure --with-curl $ CFLAGS="-O3 -march=native -Wall" ./configure --with-curl
$ make -j n $ make -j n
`
n is the number of threads. n is the number of threads.
5. Start mining. ### Start mining.
----------------
$ ./cpuminer -a algo -o url -u username -p password
### 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 Windows compilation using Visual Studio is not supported. Mingw64 is
used on a Linux system (bare metal or virtual machine) to cross-compile 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... 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. Refer to Linux compile instructions and install required packages.
Additionally, install mingw-w64. 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 ### Create a local library
step. Suggested location is $HOME/usr/lib/
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 3. Download and build other packages for mingw that don't have a mingw64
version available in the repositories. version available in the repositories.
@@ -286,54 +294,55 @@ n is the number of CPU threads you want to use.
openssl: openssl:
`
./Configure mingw64 shared --cross-compile-prefix=x86_64-w64-mingw32 ./Configure mingw64 shared --cross-compile-prefix=x86_64-w64-mingw32
make make
`
curl: curl:
./configure --with-winssl --with-winidn --host=x86_64-w64-mingw32 `./configure --with-winssl --with-winidn --host=x86_64-w64-mingw32
make make
`
gmp: gmp:
`
./configure --host=x86_64-w64-mingw32 ./configure --host=x86_64-w64-mingw32
make make
`
### Tweak the environment.
4. Tweak the environment.
This step is required everytime you login or the commands can be added to This step is required everytime you login or the commands can be added to
.bashrc. .bashrc.
Define some local variables to point to local library. Define some local variables to point to local library.
export LOCAL_LIB="$HOME/usr/lib" `
$ export LOCAL_LIB="$HOME/usr/lib"
export LDFLAGS="-L$LOCAL_LIB/curl/lib/.libs -L$LOCAL_LIB/gmp/.libs -L$LOCAL_LIB/openssl" $ 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 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. 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. 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 If the release directory is in cpuminer-opt directory it needs to be
recreated every a source package is decompressed. recreated every a source package is decompressed.
mkdir release `
cp /usr/x86_64-w64-mingw32/lib/zlib1.dll release/ $ mkdir release
cp /usr/x86_64-w64-mingw32/lib/libwinpthread-1.dll release/ $ cp /usr/x86_64-w64-mingw32/lib/zlib1.dll release/
cp /usr/lib/gcc/x86_64-w64-mingw32/7.3-win32/libstdc++-6.dll release/ $ cp /usr/x86_64-w64-mingw32/lib/libwinpthread-1.dll release/
cp /usr/lib/gcc/x86_64-w64-mingw32/7.3-win32/libgcc_s_seh-1.dll release/ $ cp /usr/lib/gcc/x86_64-w64-mingw32/7.3-win32/libstdc++-6.dll release/
cp $LOCAL_LIB/openssl/libcrypto-1_1-x64.dll release/ $ cp /usr/lib/gcc/x86_64-w64-mingw32/7.3-win32/libgcc_s_seh-1.dll release/
cp $LOCAL_LIB/curl/lib/.libs/libcurl-4.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 The following steps need to be done every time a new source package is
opened. opened.
5. Download cpuminer-opt
Download the latest source code package of cpumuner-opt to your desired Download the latest source code package of cpumuner-opt to your desired
location. .zip or .tar.gz, your choice. 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 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 You can use the default compile if you intend to use cpuminer-opt on the
7. Compile
you can use the default compile if you intend to use cpuminer-opt on the
same CPU and the virtual machine supports that architecture. same CPU and the virtual machine supports that architecture.
./build.sh `$ ./build.sh`
Otherwise you can compile manually while setting options in CFLAGS. Otherwise you can compile manually while setting options in CFLAGS.