From ffe0549aa48aecdedf08e3103ab12c6a9b1be334 Mon Sep 17 00:00:00 2001 From: jahway603 Date: Thu, 27 Apr 2023 12:26:25 -0400 Subject: [PATCH 1/2] minor changes --- .../cross-compile-hush-full-node-to-aarch64-with-docker.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/advanced/cross-compile-hush-full-node-to-aarch64-with-docker.md b/advanced/cross-compile-hush-full-node-to-aarch64-with-docker.md index da42532..449f223 100644 --- a/advanced/cross-compile-hush-full-node-to-aarch64-with-docker.md +++ b/advanced/cross-compile-hush-full-node-to-aarch64-with-docker.md @@ -28,8 +28,8 @@ 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 ``` 4. ### Pull or clone latest hush3 from git.hush.is From 03699db7f6f57d7f3d52f7024c65fd2528b42ddd Mon Sep 17 00:00:00 2001 From: jahway603 Date: Thu, 27 Apr 2023 20:59:11 -0400 Subject: [PATCH 2/2] added successfully tested docs to cross-compile on ARM64 (aarch64) --- ...le-hush-full-node-to-aarch64-with-docker.md | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/advanced/cross-compile-hush-full-node-to-aarch64-with-docker.md b/advanced/cross-compile-hush-full-node-to-aarch64-with-docker.md index 449f223..b24909d 100644 --- a/advanced/cross-compile-hush-full-node-to-aarch64-with-docker.md +++ b/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. @@ -29,14 +27,15 @@ Make sure we have the latest versions of everything in the base OS image. ``` 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 + 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