Skip to content

Build instruction

Donghyun Gouk edited this page Oct 10, 2018 · 4 revisions

Prepare a source code

First, clone this repository.

git clone [email protected]:simplessd/simplessd-fullsystem
cd simplessd-fullsystem
git checkout v1.1-rc11

Initialize and update submodules.

git submodule update --init --recursive
cd src/dev/storage/simplessd
git checkout v1.1-rc12

Now, full system code are prepared with proper version of SimpleSSD library.

Install necessary programs and libraries

Install scons, python library, zlib library. You man want to install optional protobuf compiler and tcmalloc for performance enhancemant.

# RedHat, CentOS, etc.
yum groupinstall "Development Tools"
yum install epel-release
yum install scons python2-devel zlib-devel
yum install protobuf-devel google-perftools-devel
# Debian, Ubuntu, etc.
apt install build-essentials
apt install scons python-dev zlib1-dev m4
apt install libprotobuf-dev protobuf-compiler
apt install libgoogle-perftools-dev

Build

SimpleSSD FullSystem supports X86 and ARM architectures.

Example command line to build SimpleSSD FullSystem.
For more options, you can check here.

# At root of SimpleSSD FullSystem source code
# Optimized build with ARM architecture
# Parallel compilation with 4 jobs, do not install git hook
scons build/ARM/gem5.opt -j 4 --ignore-style

Prepare full-system files

As SimpleSSD FullSystem (gem5) boots unmodified Linux Kernel, you should prepare kernel and OS disk image.

Original full-system files from gem5 can be downloaded here (ARM) and here (X86).

These original full-system files are outdated, which does not supports NVMe.
You can download additional files provided by CAMELab from here.

Create arbitrary directory to store all files downloaded. Set M5_PATH environment variable to path of created directory.

mkdir $HOME/m5
export M5_PATH=$HOME/m5

Extract full system files. If you only downloaded files from CAMELab, directory tree should look like:

$M5_PATH
├─ binaries
│ ├─ boot.arm
│ ├─ boot_emm.arm
│ ├─ boot_emm.arm64
│ ├─ aarch64-vmlinux-4.9.92
│ └─ x86_64-vmlinux-4.9.92
└─ disks
  ├─ linaro-aarch64-linux.img
  └─ x86root

ARM specific

We need to prepare dtb files (Compiled DeviceTree file which defines hardwares connected to system) to use SimpleSSD FullSystem in ARM architecture.

Install device tree compiler.

# RedHat, CentOS, etc.
yum install dtc
# Debian, Ubuntu, etc.
apt install device-tree-compiler

Compile device tree files provided by SimpleSSD FullSystem.

# At root of SimpleSSD FullSystem source code
cd system/arm/dt
make

Move compiled files to $M5_PATH/binaries

mv *.dtb $M5_PATH/binaries

Now you are ready to run simulation.

Clone this wiki locally