Skip to content

Instantly share code, notes, and snippets.

@2b
Last active July 23, 2018 11:16
Show Gist options
  • Select an option

  • Save 2b/c75ed4808451bc6b0329ce8bcf846443 to your computer and use it in GitHub Desktop.

Select an option

Save 2b/c75ed4808451bc6b0329ce8bcf846443 to your computer and use it in GitHub Desktop.
Cross-compilling Bulwark wallet for armhf architecture (Raspberry Pi 2)

Cross-compilling Bulwark wallet for armhf architecture (Raspberry Pi 2)

Build successful tested on Ubuntu Server 18.04 LTS (x86-64)

  1. First install build essential packages (for non-GUI wallet):

sudo apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils python3 libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev git

  1. Install ARM cross compiler toolchain:

sudo apt-get install g++-arm-linux-gnueabihf

  1. Clone bulwark repo:

git clone https://github.com/bulwark-crypto/Bulwark.git

  1. Switch branch to specific version:

cd Bulwark git checkout 1.3.1

  1. Pull all build dependencies:

cd depends make HOST=arm-linux-gnueabihf NO_QT=1 NO_UPNP=1 -j4

  1. Generate configure file:

cd .. ./autogen.sh

  1. Change some autogenerated options (if you need so). Below disabled graphical UI, UPNP (firewall-jumping support) and ZMQ notifications.

./configure --prefix=pwd/depends/arm-linux-gnueabihf --with-gui=no --without-miniupnpc --disable-zmq

  1. Compile using all cores:

make -j$(nproc)

  1. Find built in last step binaries, and manual copy them to RPi 2 device:

find src -maxdepth 1 -type f -executable -exec file {} ; | grep -Eo "^([^,]+,){6}"

On RPi 2 device (tested with ArchLinuxARM-rpi-2)

Better to do all steps from non-root user

  1. Copy binaries to system directories

sudo cp bulwarkd /usr/local/bin sudo cp bulwark-cli /usr/local/bin sudo cp bulwark-tx /usr/local/bin

  1. Write required parameters to bulwark.conf (also add staking=1 if you want to stake coins)

cat > ~/.bulwark/bulwark.conf << EOL rpcuser=bulwark rpcpassword=some_strong_password EOL

  1. Create systemd service (change username SOMEUSER to yours)

cat > /etc/systemd/system/bulwarkd.service << EOL [Unit] Description=Bulwarks's distributed currency daemon After=network.target [Service] Type=forking User=SOMEUSER WorkingDirectory=/home/SOMEUSER PIDFile=/home/SOMEUSER/.bulwark/bulwarkd.pid ExecStart=/usr/local/bin/bulwarkd -daemon -conf=/home/SOMEUSER/.bulwark/bulwark.conf -datadir=/home/SOMEUSER/.bulwark ExecStop=/usr/local/bin/bulwark-cli -conf=/home/SOMEUSER/.bulwark/bulwark.conf -datadir=/home/SOMEUSER/.bulwark stop Restart=on-failure RestartSec=1m StartLimitIntervalSec=5m StartLimitInterval=5m StartLimitBurst=10 [Install] WantedBy=multi-user.target EOL

  1. Activate and run service

sudo systemctl enable bulwarkd

sudo systemctl start bulwarkd

  1. Check wallet status (will take some time to sync blocks):

watch bulwark-cli getinfo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment