Here is a guide to get both the headless daemon and the sexy QT gui version of Bottlecaps compiled and running on a Raspberry Pi 1 B+ running either straight Raspbian or Raspbian via Noobs. Might work on other flavours but untested. I spent many hours hopping all over google results piecing this together. Hope this helps others save time and frustration.
Most of the solutions came from Hyperstake Pi Wiki, Tranz's thread for Hobonickels Pi on Cryptocointalk and from a post by Pallas regarding DMD on RPi.Last Edited: April 13 - Fixed various typos!The usual prep steps:
Update your RPi
This can take a while...
Change a few system settings
Three things to do...
1) EXPAND FILESYSTEM so all the available space on the SD card is made available
2) BOOT OPTIONS - select CONSOLE so no memory etc is wasted on graphics
3) ADVANCED OPTIONS -> MEMORY SPLIT - set GPU memory to the minimum 16MB.
*You can change the boot options and GPU memory back to whatever you like after the compiling is done.Reboot the RPi to put the changes into effect.
Install dependencies
sudo apt-get install -y git build-essential libboost1.50-dev libboost-filesystem1.50-dev libboost-system1.50-dev libboost-program-options1.50-dev libboost-thread1.50-dev libssl-dev libdb5.3++-dev libminiupnpc-dev libtool autoconf libboost-chrono1.50-dev libboost-test1.50-dev libprotobuf-dev protobuf-compiler qt4-qmake libqt4-dev
Create directories and clone the latest git
*the version on Tranz's github are the newest.
cd ~ && mkdir -p ~/crypto && cd ~/crypto && rm -rf bottlecaps && git clone git://github.com/Tranz5/bottlecaps
OK now is where typically you would rush in and compile either the daemon or the QT...sadly if you try either it will fail so here are the magic steps
1)Bottlecaps is missing scrypt-arm.S so we need to find a copy...might as well keep it in the family and get it from Tranz's other coin HoboNickels
cd ~/crypto && rm -rf HoboNickels && git clone git://github.com/Tranz5/HoboNickels
cp ~/crypto/HoboNickels/src/scrypt-arm.S ~/crypto/bottlecaps/src/scrypt-arm.S
2)Edit makefile.unix. We need to remove a reference to"-msse2" and add line for the scrypt-arm.S file.
cd ~/crypto/bottlecaps/src
sudo nano makefile.unix
Scroll down the file until you see
xCXXFLAGS=-O2 -msse2 -pthread -Wall...etc etc etc more words.........
and simply delete the "-msse2" so it looks like
xCXXFLAGS=-O2 -pthread -Wall...etc etc more words...
.
Keep scrolling down until you see
obj/scrypt-x86.o \
obj/scrypt-x86_64.o
and change it to
obj/scrypt-x86.o \
obj/scrypt-x86_64.o \
obj/scrypt-arm.o
Keep scrolling down until you see
obj/scrypt-x86_64.o: scrypt-x86_64.S
$(CXX) -c $(xCXXFLAGS) -MMD -o $@ $<
and add the following below it
obj/scrypt-arm.o: scrypt-arm.S
$(CXX) -c $(xCXXFLAGS) -MMD -o $@ $<
NOTE: The second line requires a [TAB] at the start to look similar to above or you will get a 'no separator' error.CNTRL-X to exit Nano and say YES to save.
3)Edit scrypt_mine.cpp
sudo nano scrypt_mine.cpp
Right near the top of the file remove the line
Scroll down a few more lines until you see
and change it to
CNTRL-X to exit Nano and say YES to save.
4)Edit bottlecaps-qt.pro to remove the "-msse2" and add scrypt-arm.S to the list of SOURCES.
sudo nano bottlecaps-qt.pro
Similar to the makefile.unix look for any "-msse2" and delete them.
QMAKE_CXXFLAGS += -msse2
QMAKE_CFLAGS += -msse2
Delete these lines.
Now keep scrolling down until you see a section "SOURCES" with a long list of files. The bottom of the list looks like this
src/kernel.cpp \
src/scrypt-x86.S \
src/scrypt-x86_64.S \
src/scrypt_mine.cpp \
src/qt/blockbrowser.cpp \
src/qt/savingsdialog.cpp \
src/pbkdf2.cpp
Add in a line for scrypt-arm.S to make it look like this
src/kernel.cpp \
src/scrypt-x86.S \
src/scrypt-x86_64.S \
src/scrypt-arm.S \
src/scrypt_mine.cpp \
src/qt/blockbrowser.cpp \
src/qt/savingsdialog.cpp \
src/pbkdf2.cpp
CNTRL-X to exit Nano and say YES to save.
Now you are ready to compile either the BottleCaps-Qt or just the headless daemon bottlecapsd
bottlecapsdcd ~/crypto/bottlecaps/src
*takes a long time
sudo mv bottlecapsd /usr/local/bin
make a conf file
mkdir -p ~/.BottleCaps && echo -e "rpcuser=RobcoIndustriesUser\nrpcpassword=$(cat /dev/urandom | tr -cd '[:alnum:]' | head -c32)\nrpcallowip=127.0.0.1\ngen=0\nserver=1\ndaemon=1\nlisten=1\n" > ~/.BottleCaps/BottleCaps.conf
*you can change the rpcuser value...
Now you can start bottlecaps headless by typing bottlecapsd at the command prompt
Example Image:
![](https://ip.bitcointalk.org/?u=http%3A%2F%2Fi.imgur.com%2FVWWQ3tJ.jpg%26t%3D563%26c%3D3wTS2tFsZXdulw&t=665&c=Ple9V7-IdHEw8Q)
This is how I run Bottlecaps on my RPi B+. The bottlecapsd and a 3.5" screen.
BottleCaps-Qt*only need the make clean step if you are retrying after a failed compileqmake bottlecaps-qt.pro && make
this takes a loooooooooooooooong time. Cross your fingers.
If you get weird Assembler errors about no end of file it tends to mean you ran out of memory. Make sure you have no other programs running besides the basics. Reboot and try again.If things go well eventually you will find a BottleCaps-qt file in the bottlecaps directory. Woot!
make a conf file
mkdir -p ~/.BottleCaps && echo -e "rpcuser=RobcoIndustriesUser\nrpcpassword=$(cat /dev/urandom | tr -cd '[:alnum:]' | head -c32)\nrpcallowip=127.0.0.1\ngen=0\nserver=1\ndaemon=1\nlisten=1\n" > ~/.BottleCaps/BottleCaps.conf
*you can change the rpcuser value...
Now we can fire up the Raspbian GUI and try it out
Open a terminal window by clicking the icon on the taskbar and enter
And you should see this:
![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2FuQt54bq.jpg&t=665&c=j8GVbVL4ZmRD4Q)
Hope this helps. It worked for me. If it is useful:
EhiLUx4vKfTyad6Ly3cj7c5csGvJJ4rHhj