Browse Source

Merge pull request 'added successfully tested docs to cross-compile on ARM64 (aarch64)' (#14) from jahway603/hush-docs:master into master

Reviewed-on: hush/docs#14
pull/22/head
jahway603 10 months ago
parent
commit
418713fb1f
  1. 20
      advanced/cross-compile-hush-full-node-to-aarch64-with-docker.md

20
advanced/cross-compile-hush-full-node-to-aarch64-with-docker.md

@ -7,12 +7,10 @@
These are instructions for cross compiling a Hush full node daemon on a regular **AMD64** PC (also known as x86 architecture) to **ARM64(aarch64)** CPU architecture with Docker.
The following instructions enables a smoother transition between your desktop/laptop to the raspberry pi device.
These instructions were created as a result of (#1) issues with **glibc** versions differing on the two different machine architectures and (#2) no gcc and g++ multilib packages existing natively on the arm64(aarch64) architecture.
These instructions were created as a result of (no. 1) issues with **glibc** versions differing on the two different machine architectures and (no. 2) no gcc and g++ multilib packages existing natively on the arm64(aarch64) architecture. Currently there are open issues with Debian to include these packages for this architecture.
*Note: This should work on all types of arm64(aarch64) devices. By cross compiling (building) on a different system for another machine type, we are able to bypass the ARMv7 requirements. Cross compiling is useful for machines that don't have lots of hardware resources to compile on or, in this case, **G++-multilib** isn't available on ARM64(aarch64) devices and hushd requires it to compile binaries.*
**NOTE: THIS IS CURRENTLY NOT WORKING ON HUSHD 3.9.2 BECAUSE OF THE NEW INCLUSION OF RANDOMX. THIS IS CURRENTLY ONLY WORKING UPTO HUSHD 3.9.1. More testing is needed to get this working on 3.9.2...**
1. ### Let's Begin!
- Install & setup Docker-Engine. Most users will install this via their operating system's package manager, but also refer to [Docker-Engine Installation](https://docs.docker.com/engine/install/ubuntu/) for additional information.
@ -28,15 +26,16 @@ Make sure we have the latest versions of everything in the base OS image.
*Note: the dependencies for arm64(aarch64) are slightly different*
```
apt-get -y install build-essential pkg-config libc6-dev m4 autoconf libtool libncurses-dev unzip git python3 python-is-python3 zlib1g-dev wget bsdmainutils
automake nano curl unzip libsodium-dev libboost-dev libdb++-dev libwolfssl-dev g++-aarch64-linux-gnu g++
apt-get -y install build-essential pkg-config libc6-dev m4 autoconf libtool libncurses-dev unzip git python3 python-is-python3 zlib1g-dev wget bsdmainutils \
automake nano curl unzip libsodium-dev libboost-dev libdb++-dev libwolfssl-dev g++-aarch64-linux-gnu g++ cmake \
build-essential vim gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu
```
4. ### Pull or clone latest hush3 from git.hush.is
`git clone https://git.hush.is/hush/hush3.git && cd hush3`
5. ### Build and compile for aarch64-linux-gnu device
`HOST=aarch64-linux-gnu ./build.sh -j$(nproc)`
`HOST=aarch64-linux-gnu ./build-arm-xcompile.sh -j$(nproc)`
Relax and let the code flow. It normally takes 15-30 minutes to compile successfully, but may take longer on some systems.
@ -86,16 +85,21 @@ scp * username@YOUR-SERVER-NAME-OR-IP:/home/username/hush3-folder/
`./hushd --version`
We have successfully cross-compiled a hushd for a arm64(aarch64) from amd64 or other architecture.
We have successfully cross-compiled a hushd for a arm64(aarch64) device from the amd64 architecture.
*Note: this has only been tested from amd64 architecture; we will update this list later for other tested hardware; the process will almost be identical, but other dependencies may be needed*
Happy Hacking! [Hooray!]
![Happy hush puppy rocket](https://git.hush.is/hush/memes/raw/branch/master/hush/hush-puppy-rocket.gif)
## Creating debian ARM64 package
1. Be on a Debian computer.
1. Run `ARCH=aarch64 ./util/build-debian-package.sh` and it will create a Debian installable package from your hush binaries.
## Automation with Docker
*Note: this has not been recently tested...*
**Note: this has not been recently tested... may not work with recent code**
I will update the steps required to automatically build and run hushd with a Dockerfile. This is useful for testing and also aids in other hush puppies who don't need to deep dive into developer chores and maintainance. Required dep is Docker-Engine.
### Create Hush docker image

Loading…
Cancel
Save