Bitcoin Forum
June 27, 2024, 07:50:47 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 [2]
21  Other / Beginners & Help / Re: Building Armory on Raspberry Pi on: September 27, 2013, 08:18:50 AM
Ugh, i completly forgot all about this thread…

After having a quick look I would guess that the problem is copy pasting from the forum… it adds whitespace. I've created a gist at https://gist.github.com/bektar/6725546.

Use this by creating a file inside the "BitcoinArmory" directory called "BitcoinArmory.patch" and instead of doing:

Quote
cat > BitcoinArmory.patch

paste the raw contents in the gist into this file (please use a text editor, not a word editor).

And then go on with step "Apply the patch".


Please note, I havent tried this myself so please let me know how it goes.
22  Other / Beginners & Help / Re: Building Armory on Raspberry Pi on: July 30, 2013, 05:34:29 AM
I'll have a look at it tonight or tomorrow and get back to you… I thought I was pretty thorough when I tested everything, but apparently I messed up somewhere Smiley
23  Other / Beginners & Help / Re: Building Armory on Raspberry Pi on: July 28, 2013, 06:35:15 AM
Just to make sure, you are replacing [user] with your username? If not start by doing that Smiley

In general, to change permissions in *nix you need to use the command "chmod". Perhaps in combination with "sudo" (depending on if you are the owner of the file). What you do is write

Code:
chmod 777 [filename goes here]

and thats it.

Please note that 777 gives read/write permissions to everyone. I believe its ok in this particular case since i expect you are going to be using this offline with no user except for yourself. In general though you should read the man pages for chmod and tailor the permissions as required.
24  Other / Beginners & Help / Re: Building Armory on Raspberry Pi on: May 13, 2013, 01:01:33 PM

IP_of_PI is the ip number of your Raspberry Pi, I use the command ifconfig to find it.


IP_of_PI is the Internet Protocol address of your Pi. like 192.168.0.11

Thanks for responding, bektar & whiskers75.

So, the raspberry pi would be connected to the ubuntu computer, in a closed network?  I'd disconnect the ubuntu computer from the internet and connect to the raspberry pi so that the raspberry pi never touches the actual network?

Yes that would work. Or you could use a usb stick. As long as you get the files from the Pi to the Ubuntu computer any way is fine.
25  Other / Beginners & Help / Re: Building Armory on Raspberry Pi on: May 12, 2013, 06:50:06 AM
@runeks:
good stuff!
I'm sorry for not responding quicker, I forgot all about this thread Smiley I haven't tried your advice yet since everything is working well for me atm. I'm sure I will have to set up another Pi sometime in the future though so will give it a try then Smiley
26  Other / Beginners & Help / Re: Building Armory on Raspberry Pi on: May 12, 2013, 06:47:40 AM
   
## Copy libraries from Pi
Quote
   scp -r pi@[IP_OF_PI_GOES_HERE]:/usr/include/python2.7 ~/src/Crosstool/RaspberryPi/include
   scp -r pi@[IP_OF_PI_GOES_HERE]:/usr/lib/libpython2.7.so ~/src/Crosstool/RaspberryPi/lib


I'm stuck on this one.  Can an example of IP_of_PI be given?  Thanks for any help provided.

IP_of_PI is the ip number of your Raspberry Pi, I use the command ifconfig to find it.
27  Other / Beginners & Help / Re: Building Armory on Raspberry Pi on: April 09, 2013, 04:37:11 AM
On the Pi i used Raspbian wheezy. I didn't think of mentioning it, so I'm glad thing you asked.

Not sure why it is so slow, my guess would be simply because the arm chip isn't very powerful. I imagine the libraries used aren't optimized for arm either. Neither one of these theories provide a way to increase the speed though, so hopefully i'm wrong.

I'm sure using tools with GUIs will work just as well. The main reason I stuck with the command line is that it is so easy to reproduce the results; just copy each line and in the end it will work. Using a GUI makes it a bit trickier to clearly explain each step.
28  Other / Beginners & Help / Re: Building Armory on Raspberry Pi on: March 28, 2013, 07:54:28 AM
Some things I feel are noteworthy:

Would be nice to have Armory autostart once x is up and running. Not sure how to do this in linux. I intend to figure it out after easter is done. I would imagine it is very simple.

It is VERY slow to decrypt an encrypted wallet, it took a couple of minutes to do it for me when i was doing an initial test. I'm contemplating using full disk encryption instead of encrypting each individual wallet since I intend to have a SD-card that i use only for armory. However, i fear this might make the Pi so slow as to make it unusable. Not sure how to it either, but isn't that the point of having a pi? To learn new stuff Smiley. Anyway, this also something to add to the todo list.
29  Other / Beginners & Help / Re: Building Armory on Raspberry Pi on: March 28, 2013, 07:46:15 AM
# Build Bitcoin Armory for Raspberry Pi (using cross compiler)
This is a step by step guide on how to build Bitcoin Armory for the Raspberry Pi. This guide assumes that a working crosscompiler has been set up in a fashion similar to the previous post

## Install packages
Quote
   
   sudo apt-get install git-core build-essential pyqt4-dev-tools swig libqtcore4 libqt4-dev python-qt4 python-dev python-twisted
## Download Armory sourcecode
Quote
   
   cd ~/src/Crosstool/RaspberryPi/staging
   git clone git://github.com/etotheipi/BitcoinArmory.git
   cd BitcoinArmory
   
## Copy libraries from Pi
Quote
   scp -r pi@[IP_OF_PI_GOES_HERE]:/usr/include/python2.7 ~/src/Crosstool/RaspberryPi/include
   scp -r pi@[IP_OF_PI_GOES_HERE]:/usr/lib/libpython2.7.so ~/src/Crosstool/RaspberryPi/lib
## Modify code for ARM
Create a patchfile by executing
Quote
   cat > BitcoinArmory.patch
and then copy and paste
Quote
   diff -rupN BitcoinArmory/cppForSwig/cryptopp/Makefile BitcoinArmoryModified/cppForSwig/cryptopp/Makefile
   --- BitcoinArmory/cppForSwig/cryptopp/Makefile   2013-03-26 16:14:29.670518482 +0100
   +++ BitcoinArmoryModified/cppForSwig/cryptopp/Makefile   2013-03-26 21:34:58.438595983 +0100
   @@ -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
   
   diff -rupN BitcoinArmory/cppForSwig/Makefile BitcoinArmoryModified/cppForSwig/Makefile
   --- BitcoinArmory/cppForSwig/Makefile   2013-03-26 16:14:29.666518482 +0100
   +++ BitcoinArmoryModified/cppForSwig/Makefile   2013-03-26 21:36:47.046595921 +0100
   @@ -1,18 +1,16 @@
   -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
   
   
   -DEPSDIR ?= /usr
   -
    INCLUDE_OPTS += -Icryptopp -DUSE_CRYPTOPP -D__STDC_LIMIT_MACROS
    LIBRARY_OPTS += -lpthread
    SWIG_OPTS    += -c++ -python -classic -threads
   -PYVER        += `python -c 'import sys; print str(sys.version_info[0]) + "." + str(sys.version_info[1])'`
   +PYVER        += 2.7
   
   
    UNAME := $(shell uname)
   @@ -37,7 +35,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
and close the file by hitting control+d.

Apply the patch:
Quote
   patch -p1 < BitcoinArmory.patch
## Build & package it
Quote
   DEPSDIR=/home/[USERNAME]/src/Crosstool/RaspberryPi CXX=arm-unknown-linux-gnueabi-g++ make

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

   scp /tmp/BitcoinArmoryRPi.tar.gz pi@[IP_OF_PI_GOES_HERE]:/home/pi/Desktop/
## Configure Pi
Install required packages
Quote
   sudo apt-get update
   sudo apt-get install python-qt4 python-twisted
Finally, to start armory execute:
Quote
   python ArmoryQt.py

## Resources / References
* [Building Armory from source](https://bitcoinarmory.com/building-armory-from-source/)
* [Building the Armory Bitcoin client for the Raspberry Pi](https://gist.github.com/FiloSottile/3646033#file-cxx-patch)
* [Bitcointalk: Building Armory on Raspberry Pi](https://bitcointalk.org/index.php?topic=156003)
* [The Ten Minute Guide to diff and patch](http://jungels.net/articles/diff-patch-ten-minutes.html)
30  Other / Beginners & Help / Re: Building Armory on Raspberry Pi on: March 28, 2013, 07:42:49 AM

I noticed this thread being linked from the official Armory subforum which inspired me to include a step by step guide to get it working. This could probably be made into a shellscript, but my linuxfu is not strong enough and it will probably be broken very easily as time marches on and things gets updated.

These steps were tested on a clean install of Ubuntu 12.10 64-bit on 2013-03-26. The current version of Bitcoin Armory is 0.87-beta.

(This pretty much a copy paste from a markdown file I wrote for future me, however, there are a few manual edits to account for the forum syntax)
========================================

## Starting point
This step by step guide is done on a clean install of ubuntu 12.10 desktop amd64. During installation the option ”Download updates while installing” was left unchecked to make the results completly replicable.

After the installation process completed the only things I did before starting this guide is change the resolution of the screen and install OpenSSH-server since I’m used to the OS X terminal app.
Quote
   sudo apt-get install openssh-server
   
to figure out the ip of the computer i used
Quote
   ifconfig
(Yes, this is a VERY thorough walkthrough, the idea is that when I’m doing this again, maybe in a year or two, nothing should have to be googled while following this guide)

## Download crosstool-ng
Quote
   wget http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-1.17.0.tar.bz2
   tar xfv crosstool-ng-1.17.0.tar.bz2
   cd crosstool-ng-1.17.0.tar.bz2/

## Install required packages
My main gripe with the other guides was that apparantly they had some stuff already installed on their systems. I say this because when I followed their instructions I kept hitting roadblocks.

The complete list of packages i installed after the ubuntu installer was do is as follows:

* openssh-server    (i can’t imagine this affects anything, but I’m not going to leave anything out)
* automake   
* bison
* build-essential
* flex
* gawk
* gperf
* libncurses5-dev
* libtool
* subversion
* texinfo

## Create directories
Quote
   mkdir -p ~/src/Crosstool/RaspberryPi/include         
   mkdir -p ~/src/Crosstool/RaspberryPi/staging
   mkdir -p ~/bin/Crosstool/crosstool-ng
   mkdir -p ~/bin/Crosstool/Toolchains/
## Configure and Build crosstool-ng
Quote
   sudo apt-get install automake bison build-essential flex gawk gperf libncurses5-dev libtool subversion texinfo
   wget http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-1.17.0.tar.bz2
   tar xfv crosstool-ng-1.17.0.tar.bz2
   
   cd crosstool-ng-1.17.0/
   ./configure --prefix=/home/[USERNAME]/bin/Crosstool/crosstool-ng
   make
   make install
   cd ..
   rm -r crosstool-ng-1.17.0 crosstool-ng-1.17.0.tar.bz2
   
   export PATH=$PATH:/home/[USERNAME]/bin/Crosstool/crosstool-ng/bin/
   
   cd ~/src/Crosstool/RaspberryPi/staging/
   ct-ng menuconfig
This opens up a menubased interface to configure crosstool before building it. Do the following steps:
Quote
   Paths and misc options —> Try features marked as EXPERIMENTAL (NEW)
   Paths and misc options —> Prefix directory (NEW) —> ${HOME}/bin/Crosstool/Toolchains/${CT_TARGET}
   
   Target options    —> Target Architecture(alpha) —> arm
   
   Operating System —> Target OS (bare-metal) —> linux
   
   Binary utilities —> binutils version (2.22 (EXPERIMENTAL)) —> 2.21.1a
   
   C compiler —> Show Linaro versions (EXPERIMENTAL) (NEW)
   C compiler —> C++
   
   Exit —> Yes
Finally build it:
Quote
   ct-ng build
## Modify path permanently (untested)
Add these lines to the bottom of the ~/.profile file:
Quote
   export PATH=$PATH:/home/[USERNAME]/bin/Crosstool/Toolchains/arm-unknown-linux-gnueabi/bin
## Check compiler
Quote
   arm-unknown-linux-gnueabi-gcc --version

   mkdir /tmp/helloWorld/
   cd /tmp/helloWorld/

   cat > test.c
   #include <stdio.h>
   int main() { printf("Hello, world!\n"); return 0; }
   ^D

   arm-unknown-linux-gnueabi-gcc -o test test.c
   chmod +x test

   scp test pi@@[IP_OF_PI_GOES_HERE]:/tmp/
   ssh pi@[IP_OF_PI_GOES_HERE] /tmp/test

## Resources / References
* [Kitware blog: Cross-Compiling for Raspberry Pi](http://kitware.com/blog/home/post/426)
* [Building a Raspberry Pi Cross Compiler: could not retrieve eglibc-2_16](http://brains.witsmith.com/2012/10/building-cross-compiling-toolchain-for.html)
* [How to build a cross compiler for your Raspberry Pi](http://www.bootc.net/archives/2012/05/26/how-to-build-a-cross-compiler-for-your-raspberry-pi/)
* [crosstool-ng](http://crosstool-ng.org/)
31  Other / Beginners & Help / Re: Building Armory on Raspberry Pi on: March 26, 2013, 12:16:02 PM
Hehe, didn't notice your edit until after i was done. But that was the trick. Good catch!
32  Other / Beginners & Help / Re: Building Armory on Raspberry Pi on: March 26, 2013, 12:12:25 PM
It finally compiled!

What I hadn't done was copy all of /usr/include/python2.7 to my cross compiler. After doing this and editing one more line in the makefile it worked perfectly.

I'm going to write down the exact steps I took to get this to work, since I will probably end up doing this again in like a year or so. If there is any interest I'll post it here once I've made sure it is complete and no steps are missing.


I'm also gonna give it a few more tries to get it to compile directly on the Pi. I feel it would be nice to get this to work (even if its very slow) since then one wouldn't need an additional computer.


Big thanks to nomis for the help!



33  Other / Beginners & Help / Re: Building Armory on Raspberry Pi on: March 26, 2013, 11:10:45 AM
Duh, I just ran
Quote
make
instead of
Quote
CXX=/home/testuser/local/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-g++ make

When i actually remember to call the correct compiler i end up with this error instead:
Quote
make[2]: Leaving directory `/home/testuser/Desktop/BitcoinArmory/cppForSwig/cryptopp'
/home/testuser/local/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-g++  -I"/usr/include/python`python -c 'import sys; print str(sys.version_info[0]) + "." + str(sys.version_info[1])'`" -c -O2 -pipe -fPIC  -Icryptopp -DUSE_CRYPTOPP -D__STDC_LIMIT_MACROS  -lpthread  CppBlockUtils_wrap.cxx
In file included from /usr/include/python2.7/Python.h:58:0,
                 from CppBlockUtils_wrap.cxx:151:
/usr/include/python2.7/pyport.h:873:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
make[1]: *** [CppBlockUtils_wrap.o] Error 1
make[1]: Leaving directory `/home/testuser/Desktop/BitcoinArmory/cppForSwig'
make: *** [all] Error 2

I remember getting this error last week as well (didn't mention it in the post since i gave up on crosscompiling and was trying to compile it on the pi itself), and it is mentioned in the comments in the gists.


I assume this is why I'm copying the libpython2.7.so file from the pi? Any idea what I might be doing wrong this time?
34  Other / Beginners & Help / Re: Building Armory on Raspberry Pi on: March 26, 2013, 07:18:50 AM
Still not managing to get it to work…

First I manually applied the patch like you suggested. Then I copied
Quote
/usr/lib/libpython2.7.so
to my compiling computer. I then opened cppForSwig/Makefile and changed the line
Quote
STATICPYTHON += "$(DEPSDIR)/lib/libpython$(PYVER).so"
to
Quote
STATICPYTHON += "/home/testuser/libpython2.7.so"

This nets me the error message
Quote
make[2]: Leaving directory `/home/testuser/src/RaspberryPi/staging/BitcoinArmory/cppForSwig/cryptopp'
g++ -shared -lpthread  UniversalTimer.o BinaryData.o FileDataPtr.o BtcUtils.o BlockObj.o BlockUtils.o EncryptionUtils.o libcryptopp.a "/home/testuser/src/RaspberryPi/staging/BitcoinArmory/libpython2.7.so" CppBlockUtils_wrap.o -o ../_CppBlockUtils.so
/home/testuser/src/RaspberryPi/staging/BitcoinArmory/libpython2.7.so: could not read symbols: File in wrong format
collect2: error: ld returned 1 exit status
make[1]: *** [swig] Error 1
make[1]: Leaving directory `/home/testuser/src/RaspberryPi/staging/BitcoinArmory/cppForSwig'
make: *** [all] Error 2

when i run make…

Hopefully I'm doing something obviously stupid here so its easy to fix Smiley
35  Other / Beginners & Help / Re: Building Armory on Raspberry Pi on: March 25, 2013, 06:56:00 PM
Excellent! Thanks for taking the time to post it here.

I'll give it a try first thing tomorrow!
36  Other / Beginners & Help / Re: Building Armory on Raspberry Pi on: March 22, 2013, 05:52:41 AM
ok, thanks… seems a bit more difficult than I was hoping for. I'll look into it.

If i manage to get it working I'll include a step by step guide here for future reference.
37  Other / Beginners & Help / Building Armory on Raspberry Pi on: March 21, 2013, 03:57:43 PM
I'm trying to build Bitcoin Armory on a Raspberry Pi with Rapsbian (to use as an offline wallet) and I'm in need of assistance.

I've found a couple of guides on how to set up a cross compiler, building it, and then moving it over to the pi. I can't get any of them to work, so I decided to start by getting Armory to build on the Pi itself, and then moving on to getting it to work on the cross compiler.

Since Raspbian is based on debian, I was hoping I could just use the build instructions for Ubuntu found on the official Armory page http://bitcoinarmory.com/building-armory-from-source/.

Doing this ends up with the error:

Quote
make[2]: Entering directory `/home/pi/Desktop/Armory/BitcoinArmory/cppForSwig/cryptopp'
g++ -DNDEBUG -O -g0 -native -template=no%extdef  -c 3way.cpp
g++: error: unrecognized option ‘-native’
g++: error: unrecognized option ‘-template=no%extdef’
make[2]: *** [3way.o] Error 1
make[2]: Leaving directory `/home/pi/Desktop/Armory/BitcoinArmory/cppForSwig/cryptopp'
mv: cannot stat `libcryptopp.a': No such file or directory
make[1]: *** [libcryptopp.a] Error 1
make[1]: Leaving directory `/home/pi/Desktop/Armory/BitcoinArmory/cppForSwig'
make: *** [all] Error 2

To get past this i opened up cppForSwig/cryptopp/Makefile and edited line 106 from:
   CXXFLAGS = -DNDEBUG -O -g0 -native -template=no%extdef $(M32OR64)
to
   CXXFLAGS = -DNDEBUG -O -g0 $(M32OR64)

And ran make oncemore. This resulted in the error:
Quote
g++ -xar -o libcryptopp.a 3way.o adler32.o algebra.o algparam.o arc4.o asn.o authenc.o base32.o base64.o basecode.o bfinit.o blowfish.o blumshub.o camellia.o cast.o casts.o cbcmac.o ccm.o channels.o cmac.o cpu.o crc.o cryptlib_bds.o cryptlib.o default.o des.o dessp.o dh2.o dh.o dll.o dsa.o eax.o ec2n.o eccrypto.o ecp.o elgamal.o emsa2.o eprecomp.o esign.o files.o filters.o fips140.o fipstest.o gcm.o gf2_32.o gf256.o gf2n.o gfpcrypt.o gost.o gzip.o hex.o hmac.o hrtimer.o ida.o idea.o integer.o iterhash.o luc.o md2.o md4.o md5.o misc.o modes.o mqueue.o mqv.o nbtheory.o network.o oaep.o osrng.o pch.o pkcspad.o polynomi.o pssr.o pubkey.o queue.o rabin.o randpool.o rc2.o rc5.o rc6.o rdtables.o rijndael.o ripemd.o rng.o rsa.o rw.o safer.o salsa.o seal.o seed.o serpent.o shacal2.o sha.o sharkbox.o shark.o simple.o skipjack.o socketft.o sosemanuk.o square.o squaretb.o strciphr.o tea.o tftables.o tiger.o tigertab.o trdlocal.o ttmac.o twofish.o vmac.o wait.o wake.o whrlpool.o winpipes.o xtr.o xtrcrypt.o zdeflate.o zinflate.o zlib.o
g++: error: language ar not recognized

(repeated once for each file)

make[2]: *** [libcryptopp.a] Error 1
make[2]: Leaving directory `/home/pi/Desktop/Armory/BitcoinArmory/cppForSwig/cryptopp'
mv: cannot stat `libcryptopp.a': No such file or directory
make[1]: *** [libcryptopp.a] Error 1
make[1]: Leaving directory `/home/pi/Desktop/Armory/BitcoinArmory/cppForSwig'
make: *** [all] Error 2

I fiddled around a bit more in the makefile, but there are so many things that I'm not quite sure what they do that I figure its more efficient to ask for help.

What do I need to do to make this work?
Pages: « 1 [2]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!