I was able to get this working on my Raspberry Pi with 4 newpac's without trouble. I only ran into issues once I started adding a r606 and 2 Futurebit Moonlanders. I did the slub_debug=FP to the cmdline .txt in boot as suggested and still the cgminer would crash causing the raspberry pi to fail. I have since moved my mining hardward over to a FX-6300 powered Ubuntu Linux box and no problems running all of them together.
However in your case, if you are only running the newpacs you should be fine. Below are the steps I took in order to get it setup and running.
I'm going to refer to the Raspberry Pi as simply Pi here out.
First we're going to update the cmdline.txt in the boot directory. Make sure you are logged in as user pi. open a terminal and key the following.
cd / and hit enter. Next
cd boot and hit enter. Now type
sudo nano cmdline.txt and hit enter. I added
slub_debug=FP at the very end of the first line. So it appears as follows:
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p7 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait splash plymouth.ignore-serial-consoles slub_debug=FP
Now hit CTRL and X to exit. It will prompt you to save. Type Y and then it will ask to write file and it will default to cmdline.txt just hit enter. Next reboot the Pi.
Now this portion is done. So just close this terminal and open a new one to begin the steps below in setting everything up:
Once you are logged into Pi, open a terminal and type the following commands:
sudo apt-get update and hit enter. This will take just a few seconds
Next type
sudo apt-get upgrade -y and hit enter. Depending on how many updates/upgrades your system is needing would depend on the time. I was running the latest version of Noobs Rasp so this portion didn't take but a minute or less.
Next you will need to type
sudo apt-get install -y build-essential git libusb-1.0-0-dev libusb-1.0-0 libcurl4-openssl-dev libncurses5-dev libudev-dev screen libtool automake pkg-config libjansson-dev and hit enter. This will take a few minutes to process. Once done, continue below.
Next I created a folder to store my mining software, what I did was open the file explorer. Right click anywhere after you have the folder open and create a new folder. I named my folder
mining. Now from the terminal window, type
cd mining and hit enter (or whatever you called your folder) so that now your terminal is in this same folder / directory.
Next step I keyed
git clone -b r606 https://github.com/vthoang/cgminer.git and hit enter. This will take a couple of minutes to run as it's downloading the cgminer folder.
When the above step has completed you will have a cgminer subfolder in your mining folder. What I did was right clicked on it, and renamed it to gekko since I was also using bfgminer for the moonlanders (they mine scrypt based algos). For your case, you can either leave it as cgminer or rename it to something else of your choosing. In this case I'm going to continue with it being named cgminer for ease.
Go back into your terminal window and
cd cgminer and hit enter.
Now that we are in the correct directory we need to do the following:
Type
CFLAGS="-O2" ./autogen.sh --enable-gekko and hit enter. This will take just a bit to run.
The next step is to type
make -j 2 and hit enter. This can take up to 5 minutes or so on a Pi. As this is now building all of the objects.
Once this completes your next step is to create a .sh file to run the cgminer. For the sake of ease I'm going to walk you through these steps using the gui interface / file explorer.
Go back to your file explorer and make sure you are in the cgminer folder. Once there, you will need to open your text editor. Click on your Raspberry icon at the upper left, go to Accessories and click on Text Editor.
With this open you will need to set your mining pool information and call of cgminer. Here is an example of how the script would look:
./cgminer -o stratum+tcp://miningaddress:port# -u wallet_address -p miner_password --usb 1:6,1:7,1:9,1:10 --widescreen --gekko-newpac-freq 325
In the above line, the
-u will depend on what pool you are using. Some wants you to create workers on their pool site and then -u in this line would be your username.worker and
-p is password for the worker. I normally just default them to x for quick testing but you can set it up however you want. Also above you will see
--usb You can allow the system to scan for all available miners and just don't use the --usb portion, or you can set them up individually. I did it this way since I run other devices. And also believe it's a good rule of thumb to manaully code them this way regardless. The format of the
--usb is bus:device To find this key the command in your terminal window
lsusb and hit enter.
You will now see a listing of all devices using the usb controller. You will be looking for the ones labeled as
Future Technology Devices International, Ltd Bridge(I2C/SPI/UART/FIFO) to the left of them you will have a number in the Bus column and another number in the Device column. These are the addresses you'll use above in the --usb.
So in my example below:
Bus 001 Device 010: ID 0403:6015 Future Technology Devices International, Ltd Bridge(I2C/SPI/UART/FIFO)
I would enter --usb 1:10 and you would place a , if there are more devices to follow.
Next I always key in
--widescreen as it'll show you all display options when the miner is running. And
--gekko-newpac-freq is where you will set your frequency. I'm running mine at 325 Mhz and using a Gekko Science usb hub powered by a HP DPS-1200FB-1A power supply both of which I picked up from 419Mining. Has more than enough power to run this hub and all the miners I currently have connected with plenty of room to grow. So they'll be getting more of my business soon
I do not know what kind of usb hub you are running so I would start off low and go from there. So possibly run
--gekko-newpac-freq 100 and test from there. 200 and up if you have fans blowing on them and also depending on the power of your usb hub.
Now that is done, click on save and be sure to put this into the mining / cgminer folder (or whatever you called the folder). And name the file whatever you want with a
.sh at the end. I simply named mine as
miner_LTC.shNext step you need to use the file terminal and navigate to your mining / cgminer folder. Now you will need to right click on your .sh file you just created, choose properties. When the screen pops up, click on the middle tab for permissions and on the line item that says
Execute: be sure to make that as
Anyone or as
Owner. I created multiple user accounts on my Pi so just set all of my .sh files that I create to Execute for anyone.
Now you are basically done. On the terminal window, make sure you are in the mining / cgminer folder and type
sudo ./yourfilename.sh and hit enter (in my case
sudo ./miner_LTC.sh )
It'll prompt for your password and then will fire up. Takes about a minute before it'll load up completely. And if all is working well, you should start hashing. Happy mining
***** EDIT ******Some additional notes. Updated
6/30/19.
If you do plan to run a r606 on a Raspberry Pi (or both newpac and r606 together) here are the additional steps that would be needed. The R606 btw will run on a raspberry pi, at least the 3 b+ model, just couldn't get the higher clock speeds. If running at a stock freq then you should be ok.
On the steps further above where you would run the command
lsusb you would look for the following:
Bus 001 Device 011: ID 0403:6015 Future Technology Devices International, Ltd Bridge(I2C/SPI/UART/FIFO)
Well for the r606 it shares the same Future Technology Devices name. However it will be on a different Bus. So in my case it's always been on Bus 004.
Bus 004 Device 001: ID 0403:6015 Future Technology Devices International, Ltd Bridge(I2C/SPI/UART/FIFO)
So when making the actual script in this example if running both a newpac and r606 it would be as follows:
./cgminer -o stratum+tcp://miningaddress:port# -u wallet_address -p miner_password --usb 1:7,1:8,1:9,1:10,4:1 --widescreen --gekko-newpac-freq 325 --gekko-r606-freq 550
Where in the above code, --usb is specifying the usb devices, 1:7 through 1:10 are my newpacs and 4:1 is the r606.
I may do a video tutorial at some point and post to youtube once I get a chance. Since the edit of this post, the Raspberry Pi 4 is now out and wouldn't mind giving it some testing.
Thanks and happy mining!