Author

Topic: Creating offline wallet on raspberry pi (Read 786 times)

cp1
hero member
Activity: 616
Merit: 500
Stop using branwallets
July 07, 2014, 03:44:43 PM
#3
Why are you doing all that -- you just want armory on a raspberry pi, right?  https://bitcoinarmory.com/download/
Scroll to Raspberry pi -- offline bundle
hero member
Activity: 1582
Merit: 759
July 07, 2014, 03:38:56 PM
#2
In order to add something to your path, go to your home directory, and edit ~/.profile with your favourite editor. I use nano for simplicity:

Code:
nano ~/.profile

Find the following line
Code:
PATH="$HOME/bin:$PATH"

Add change that line to include the directory. It should be:
Code:
PATH="$HOME/bin:$PATH:/opt/cross/x-tools/arm-unknown-linux-gnueabi/bin"

If something is already defined (Meaning it is not the "PATH="$HOME/bin:$PATH"") just add a colon and enter the same path above).

Let us know if you need any additional help.

You can also use .bashrc using the export command, see http://askubuntu.com/questions/60218/how-to-add-a-directory-to-my-path for more info (This may be more recommended).

Run
source .bashrc afterwards.
Posted from Bitcointa.lk - #HORMaB1aqDCeATIL
member
Activity: 61
Merit: 10
July 07, 2014, 03:23:45 PM
#1
I thought this would be a fun little project and more productive then having 15-20+ paper wallets. Sadly i'm not as competent with computers as most of you here, although I can usually manage after a few hours of frustration. I was hoping somebody, or a few people could help dumb this down for me so i can understand it. Below I posted everything I’m supposed to do; assuming i don't encounter problems along the way.  Cheesy At the moment I’m stuck on step 18. of this tutorial www.bootc.net/archives/2012/05/26/how-to-build-a-cross-compiler-for-your-raspberry-pi/


Quote
18. Just add your compiler directory to your $PATH and start compiling. If you used my preferred prefix directory, you would want to add /opt/cross/x-tools/arm-unknown-linux-gnueabi/bin.

I have ubuntu as my operating system for my raspberry pi, but i'm not sure exactly how to move the compiler directory to the raspberry pi, or even exactly what the $PATH is.    Roll Eyes


Now give your compiler a quick sanity check:

Code:
bootc@tarquin ~ $ arm-unknown-linux-gnueabi-gcc --version
arm-unknown-linux-gnueabi-gcc (crosstool-NG 1.15.2) 4.6.4 20120402 (prerelease)
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Code:
bootc@tarquin ~ $ cat > test.c
#include
int main() { printf("Hello, world!\n"); return 0; }
^D
bootc@tarquin ~ $ arm-unknown-linux-gnueabi-gcc -o test test.c
bootc@tarquin ~ $

Copy over the newly compiled test program to your Raspberry Pi and run it. You should see:

bootc@raspberrypi:~$ ./test
Hello, world!
bootc@raspberrypi:~$

Here is the next tutorial, https://gist.github.com/FiloSottile/3646033 I'm stuck on applying the patch.

Now that you have your arm-unknown-linux-gnueabi-g++ working in your $PATH, clone the Armory repo

Code:
git clone git://github.com/etotheipi/BitcoinArmory.git
cd BitcoinArmory


This is the next step i don't understand exactly, how do i apply the patch to the two make files? Obviously i save it as CXX.patch, but what next?
Quote
Apply the attached patch to the two Makefiles (a smarter patch might be merged in the repo in the future)

Code:
patch -p1 < CXX.patch
Quote
Code:
diff --git a/cppForSwig/Makefile b/cppForSwig/Makefile
index d5b4340..2453ffc 100755
--- a/cppForSwig/Makefile
+++ b/cppForSwig/Makefile
@@ -1,9 +1,9 @@
-COMPILER = g++
+COMPILER = $(CXX)
#COMPILER_OPTS = -c -g -Wall -fPIC -D_DEBUG
COMPILER_OPTS = -c -O2 -pipe -fPIC
#**************************************************************************
-LINKER = g++
+LINKER = $(CXX)
OBJS = UniversalTimer.o BinaryData.o FileDataPtr.o BtcUtils.o BlockObj.o BlockUtils.o EncryptionUtils.o libcryptopp.a
@@ -22,7 +22,7 @@ all :
make BlockUtilsTest.out
swig : $(OBJS) CppBlockUtils_wrap.o
- g++ -shared $(LIBRARY_OPTS) $(OBJS) $(STATICPYTHON) CppBlockUtils_wrap.o -o ../_CppBlockUtils.so
+ $(CXX) -shared $(LIBRARY_OPTS) $(OBJS) $(STATICPYTHON) CppBlockUtils_wrap.o -o ../_CppBlockUtils.so
pyrcc4 -o ../qrc_img_resources.py ../imgList.xml
BlockUtilsTest.out : $(OBJS) BlockUtilsTest.cpp
diff --git a/cppForSwig/cryptopp/Makefile b/cppForSwig/cryptopp/Makefile
index 581d1aa..c75bdaf 100755
--- a/cppForSwig/cryptopp/Makefile
+++ b/cppForSwig/cryptopp/Makefile
@@ -38,7 +38,7 @@ ifeq ($(UNAME),Darwin)
CXXFLAGS += -arch x86_64 -arch i386
else
#CXXFLAGS += -march=native
-CXXFLAGS += -mtune=generic
+#CXXFLAGS += -mtune=generic
endif
endif
And MAKE
Code:
CXX=arm-unknown-linux-gnueabi-g++ make
Quote
Finally, create a tarball to move to your shiny Raspberry

Code:
mkdir -p BitcoinArmoryRPi/img/
cp *.py *.so README LICENSE BitcoinArmoryRPi/
cp img/* BitcoinArmoryRPi/img/
tar cvfz BitcoinArmoryRPi.tar.gz BitcoinArmoryRPi



Any help is greatly appreciated  Smiley

Jump to: