Donate VRC/VRM for the Wiki to VBzaNDExHyFpnNvYc5QH5e4ipBZqxxPnKJ . Thank you, Joe.
Difference between revisions of "Raspberry Pi"
(→Verium Miner Installation) |
(→GCC 7 Installation) |
||
Line 161: | Line 161: | ||
==== GCC 7 Installation ==== | ==== GCC 7 Installation ==== | ||
− | Based on [https://solarianprogrammer.com/2017/12/08/raspberry-pi-raspbian-install-gcc-compile-cpp-17-programs/] | + | Based on [https://solarianprogrammer.com/2017/12/08/raspberry-pi-raspbian-install-gcc-compile-cpp-17-programs/] (Building instructions: [https://solarianprogrammer.com/2017/12/07/raspberry-pi-raspbian-compiling-gcc/] |
Clone binaries: | Clone binaries: |
Revision as of 05:05, 27 January 2018
The RPi is super cool. For general information consult raspberrypi.org.
Contents
Pre-installed Image
There is an OS-image available that has all the needed software pre-installed:
- VeriCoin CLI Wallet (unfortunately syncing is not working)
- Verium CLI Wallet
- Verium Miner by fireworm
Login with standard user and password (pi / raspberry). The Image is configured to automatically start mining. You can stop this by
sudo killall cpuminer
and configure it at the end of
sudo /etc/rc.local
You will find 3 useful files in the home directory:
- VeriCoin_Verium_Read.me (read it, yes RTFM ;) )
- create_VeriCoin_wallet.sh (this will, ehm well, create your VeriCoin wallet)
- create_Verium_wallet.sh (this will turn your RPi into a cold-fusion reactor - not)
Operating System
First step is the choice of an image for the RPi, the current "stretch" images do not work out of the box.
To get the compilation working on Raspbian Stretch see this RPi Stretch Fix.
Raspbian Jessie is unfortunately no longer working for the VRC/VRM wallets.
VeriCoin Wallet Installation
Currently the VeriCoin wallet is not running properly on the Pi. The next update that addresses the current memory issue will likely fix that. Stay tuned.
Verium Wallet Installation
Updated for Version 1.1
The whole thing as a script: [Download Shell script], thanks to [mining-pool.ovh]
wget https://raw.githubusercontent.com/DJoeDt/verium/master/install_Verium_Wallet.sh chmod +x install_Verium_Wallet.sh ./install_Verium_Wallet.sh
It will do what is described in the step-wise Manual Verium Wallet Installation .
In case you see ERRORS like -No such file... - it actually helps to run the script again since probably the installation of the dependencies failed.
Wallet Configuration & Usage
The wallet should run now, but we need to go to its directory
cd verium/wallet/src
and get info about this by:
./veriumd getinfo
Now stop the wallet
./veriumd stop
It is configured in
nano verium.conf
scroll to its very end, the lines to configure are
rpcuser=YourSoloMiningName
rpcpassword=YourSoloMiningPassword
rpcallowip=YourAccessIP
rpcallowip=localhost
You have to configure the IPs of the machines that should be able to connect.
If you mine solo you have to come up with a username and a password for your miners to access the wallet.
Now start the wallet again
./veriumd
The most important thing right now is your wallets address gotten by
./veriumd getaddressesbyaccount ""
Finally backup by
cp ~/.verium/wallet.dat somewhere/save/wallet.dat
To restore your wallet just do a fresh installation and replace the new wallet.dat with your saved one.
Store & Secure both VeriCoin & Verium in One Paper Wallet [Paper Wallet Link]
Learn how to use the Verium Daemon
./veriumd help
will print a wall of text with commands and
./veriumd help [command]
explains each further. further wallet commands
Verium Miner Installation
The Mining software can be installed on the Pi in the same way it works on the Odroid XU4 (a high end SBC) - similarly on other Linux systems.
The whole thing as a script for effectstocause miner (RPi & ARM version): [Download Shell script]
wget https://github.com/DJoeDt/verium/raw/master/install_Verium_Miner_ARM.sh chmod +x install_Verium_Miner_ARM.sh ./install_Verium_Miner_ARM.sh
It will do what is described in the following stepwise manual way.
In a Terminal start with (you need internet access)
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get dist-upgrade -f -y
During the download you could check out a [Mining Pool].
The Miner needs this
sudo apt-get install git automake autoconf pkg-config libcurl4-openssl-dev libjansson-dev libssl-dev libgmp-dev
Special thanks go to birty again for his [guide].
Clone the verium Miner
git clone https://github.com/effectsToCause/veriumMiner
Again time, so maybe check your wallet, the blocks and your wallets address.
For the RPi the Miner needs configuration. On a standard Linux machine just GOTO build.sh. Configure RPi here:
nano veriumMiner/algo/scrypt.c
Find:
ARM_NEON
and change the succeeding lines (First into second)
#define SCRYPT_MAX_WAYS 3 #define SCRYPT_MAX_WAYS 1
#define HAVE_SCRYPT_3WAY 1 //#define HAVE_SCRYPT_3WAY 1
#define scrypt_best_throughput() 3 #define scrypt_best_throughput() 1
void scrypt_core_3way(uint32_t *X, uint32_t *V, int N); void scrypt_core (uint32_t *X, uint32_t *V, int N);
By this the settings are changed from 3-way to 1-way which uses less RAM per thread (128MB instead of 384, RPi can run 4 threads and only has 1GB RAM).
Now the second configuration is done in here
nano veriumMiner/build.sh
and add -mfpu=neon
./configure --with-crypto --with-curl CFLAGS="-O2 $extracflags -DUSE_ASM -pg" ./configure --with-crypto --with-curl CFLAGS="-O2 $extracflags -DUSE_ASM -mfpu=neon -pg”
This enables the use of the ARM CPU feature NEON.
Finally it is time to build the miner (Linux GOTO here)
cd veriumMiner ./build.sh
Ready to mine! Mine! Mine! But oh no, the blockchain download is not yet complete...
To start right away a pool is very helpful at this time.
To directly test the miner you can start with the following command, but be aware: it will mine for me ;)
./cpuminer -o stratum+tcp://pool-eu.bloxstor.com:3003 -u VEXMki29ycW5vSt3MmdM5iwHqsHux91EMr.Guide -p GuidePwd
Of course you want to mine for yourself, but you may consider that testline as a donation for this guide. Let's get you up and running, you need to know your wallets address, in the command above the cryptical sting after '-u ' is my wallets address. If you run your wallet by the verium deamon (veriumd) you run
~/verium/src/veriumd getaddressesbyaccount ""
and your address is in the reply.
At first you might want to watch the miners output in an ssh window. The second step would be to use nohup or tmux to suppress the output and run the miner in background. Finally you can add the command to /etc/rc.local (no nohup needed there).
Once you got your address (I assume you have copied it) you are ready to choose a mining pool. The Bloxstor mining pool was my choice mainly because it has a very user friendly tool to get started. [Bloxstor Getting Started] It will guide you through the setup even better than I can and at the end it simply outputs your personal mining command.
GCC 7 Installation
Based on [1] (Building instructions: [2]
Clone binaries:
git clone https://bitbucket.org/sol_prog/raspberry-pi-gcc-binary.git
and install them
cd raspberry-pi-gcc-binary tar xf gcc-7.2.0.tar.bz2 sudo mv gcc-7.2.0 /usr/local
Now add the new GCC to your path:
echo 'export PATH=/usr/local/gcc-7.2.0/bin:$PATH' >> ~/.bashrc source ~/.bashrc
Notes
Swap File adjustment:
sudo nano /etc/dphys-swapfile
configure
CONF_SWAPSIZE=100
to your desired size (100 means 100 MB).