gem5: support variants

This commit is contained in:
Ciro Santilli
2018-06-08 17:50:26 +01:00
parent cadb92f2df
commit c7155d0e6f
5 changed files with 41 additions and 12 deletions

View File

@@ -3,7 +3,7 @@ set -eu
arch=x86_64
cross_compile=
j=
outdir="$(pwd)/out"
outdir="$(pwd)"
while getopts a:c:j:o: OPT; do
case "$OPT" in
a)
@@ -28,7 +28,6 @@ system_dir="${outdir}/system"
binaries_dir="${system_dir}/binaries"
disks_dir="${system_dir}/disks"
mkdir -p "$binaries_dir" "$disks_dir"
cd "gem5"
if [ "$arch" = x86_64 ]; then
scons -j "$j" --ignore-style "${outdir}/build/X86/gem5.opt"
f="${disks_dir}/linux-bigswap2.img"

View File

@@ -16,7 +16,13 @@ endif
define GEM5_BUILD_CMDS
# Cannot pass "-c '$(TARGET_CROSS)'" here because the ARM build uses aarch64 for the bootloader...
cd '$(GEM5_SITE)' && ./build -a '$(ARCH)' -j '$(BR2_JLEVEL)' -o '$(GEM5_SITE)/../out/common/gem5'
cd '$(GEM5_LKMC_OUTDIR)' && '$(GEM5_SITE)/build' -a '$(ARCH)' -j '$(BR2_JLEVEL)'
# This would build using the submodule source out of tree.
# We gave up on it because in the end we still need the python scripts to match:
# we need to have an entire copy of the tree somwhere to switch between them.
#cd '$(GEM5_SITE)/gem5' && ../build -a '$(ARCH)' -j '$(BR2_JLEVEL)' -o '$(GEM5_SITE)/../out/common/gem5'
# This would build inside the buildroot directory as a more normal package.
#cd '$(@D)' && ./build -a '$(ARCH)' -j '$(BR2_JLEVEL)'