Skip to content

Build AionR Kernel (AVM)

MiaoShi09 edited this page May 17, 2019 · 3 revisions

Build Rust Kernel

System Requirements and Dependencies:

Operating System

 Ubuntu 16.04 or Ubuntu 18.04

Dependent tools and libraries

Installation instruction

  • Ubuntu
	sudo apt update
	sudo apt install g++ gcc libzmq3-dev libjsoncpp-dev python-dev libudev-dev llvm-4.0-dev cmake wget curl git pkg-config lsb-release
	
	################# libboost 1.65.0  ####################################
	# Ubuntu 18.04
  
	sudo apt install libboost-all-dev

	# Ubuntu 16.04
	wget https://dl.bintray.com/boostorg/release/1.65.1/source/boost_1_65_1.tar.bz2
	tar xf boost_1_65_1.tar.bz2
	cd boost_1_65_1
	./bootstrap.sh --libdir=/usr/lib/x86_64-linux-gnu/
	./b2
	sudo ./b2 install
  	#######################################################################
  
	# Rust 1.28.0 ########################################################
	curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.28.0 --default-host x86_64-unknown-linux-gnu
  	source $HOME/.cargo/env
  • System Environment:new:
    • Set up JAVA_HOME
    • Set up ANT_HOME
    • Set up LIBRARY_PATH
    • Set up LD_LIBRARY_PATH
    • Update PATH
export JAVA_HOME=<jdk_directory_location>
export ANT_HOME=<ant_directory_location>
export LIBRARY_PATH=$JAVA_HOME/lib/server
export PATH=$PATH:$JAVA_HOME/bin:$ANT_HOME/bin
export LD_LIBRARY_PATH=$LIBRARY_PATH:/usr/local/lib
    • protobuf(Optional) Only if you want to modify wallet protobuf message, then you should install Google Protobuf. Make sure protoc is in PATH environment.

Source Code

Download source code from Release page or clone the repository:git clone http://github.com/aionnetwork/aionr.git

Build Kernel

In aionr directory, run: ./scripts/package.sh <Users_Defined_Package_Name> to compile code, package the executable binary, settings and quick run scripts into aionr/package/<Users_Defined_Package_Name> directory, and compress the directory into <Users_Defined_Package_Name>.tar.gz archive.

The new package should in the directory structure like below:

package/
└── <Users_Defined_Package_Name>/
    ├── aion                      # the executable binary 

    ├── custom                    # custom(solo) network setting directory
    │   ├── custom.json           # custom(solo) network genesis block file
    │   └── custom.toml           # custom(solo) network configuration
    ├── custom.sh                 # custom(solo) network quick launch script

    ├── avmtestnet                   # avmtestnet network setting directory
    │   ├── avmtestnet.json          # avmtestnet network genesis block file
    │   └── avmtestnet.toml          # avmtestnet network configuration
    ├── avmtestnet.sh                # avmtestnet network quick launch script
    
    ├── mainnet                   # mainnet network setting directory
    │   ├── mainnet.json          # mainnet network genesis block file
    │   └── mainnet.toml          # mainnet network configuration
    ├── mainnet.sh                # mainnet network quick launch script

    ├── mastery                   # mastery network setting directory
    │   ├── mastery.json          # mastery network genesis block file
    │   └── mastery.toml          # mastery network configuration
    ├── mastery.sh                # mastery network quick launch script
    
    └── libs			  # dependent libraries

Launch AionR Kernel

Go to package/<Users_Defined_Package_Name>, and go to User Manual.

Configuration and Genesis File Locations

The configuration and genesis files are generated under each network folder in aionr/package/<Users_Defined_Package_Name>.

Clone this wiki locally