To build support for ALPHA on gem5 you essentially need to compile v19 in the correct environment, which can be difficult due to Python incompatibilities. Here are the steps I took:
git clone https://github.com/ArturKlauser/gem5-dev
Apply this patch to gem5-dev/docker/gem5-dev.sh
:
- echo "building gem5 ARM binary ..."
- cd "${sourcedir}" || exit 1
- # Building inst-constrs-3.cc is a memory hog and can easily run the
- # container out of resources if done in parallel with other compiles. So
- # we first build it alone and then build the rest.
- local cmd="scons build/ARM/arch/arm/generated/inst-constrs-3.o"
- echo "${cmd}"
- ${cmd}
+ echo "building gem5 ALPHA binary ..."
# Now build the rest in parallel.
- cmd="scons -j $(nproc) build/ARM/gem5.opt"
+ cmd="scons -j 4 build/ALPHA/gem5.opt"
Run the following:
docker build -t gem5-dev gem5-dev/docker
git clone https://gem5.googlesource.com/public/gem5
export GEM5_WORKDIR=~/gem5
cd gem5
git checkout v19.0.0.0 # Last release that contains ALPHA
docker run --rm -v $GEM5_WORKDIR:/gem5 -it gem5-dev bash
# Inside bash:
scons -j $(nproc) build/ALPHA/gem5.opt
If scons
reports an error about Python headers not being available, try rm -rf build/.scons_config build/sconsign.dblite
.