GEM5 aarch64

This commit is contained in:
Ciro Santilli
2018-02-22 18:50:27 +00:00
parent 5a1d5ba7a9
commit 4a9469d83c
5 changed files with 2854 additions and 3 deletions

View File

@@ -1401,6 +1401,13 @@ Internals:
* networking not working * networking not working
==== GEM5 aarch64
....
./configure && ./build -a aarch64 -g
./run -a aarch64 -g
....
==== GEM5 x86 ==== GEM5 x86
TODO didn't get it working yet. TODO didn't get it working yet.

View File

@@ -23,7 +23,7 @@ if [ "$arch" = x86_64 ]; then
# This file must always be present, despite --kernel overriding that default and selecting the kernel. # This file must always be present, despite --kernel overriding that default and selecting the kernel.
# I'm not even joking. No one has ever built x86 gem5 without the magic dist dir present. # I'm not even joking. No one has ever built x86 gem5 without the magic dist dir present.
touch "${binaries_dir}/x86_64-vmlinux-2.6.22.9" touch "${binaries_dir}/x86_64-vmlinux-2.6.22.9"
elif [ "$arch" = arm ]; then elif [ "$arch" = arm ] || [ "$arch" = aarch64 ]; then
# Compilation fails with gcc 7 on that commit. # Compilation fails with gcc 7 on that commit.
# There were some recent portability patches, so it will likely get there soon. # There were some recent portability patches, so it will likely get there soon.
CC=gcc-6 CXX=g++-6 scons -j"$(nproc)" --ignore-style build/ARM/gem5.opt CC=gcc-6 CXX=g++-6 scons -j"$(nproc)" --ignore-style build/ARM/gem5.opt

View File

@@ -9,6 +9,7 @@ BR2_ROOTFS_POST_BUILD_SCRIPT="../rootfs_post_build_script"
BR2_ROOTFS_POST_IMAGE_SCRIPT="../rootfs_post_image_script" BR2_ROOTFS_POST_IMAGE_SCRIPT="../rootfs_post_image_script"
BR2_ROOTFS_USERS_TABLES="../user_table" BR2_ROOTFS_USERS_TABLES="../user_table"
BR2_TARGET_ROOTFS_CPIO=y BR2_TARGET_ROOTFS_CPIO=y
BR2_TARGET_ROOTFS_EXT2=y
# Host GDB # Host GDB
BR2_GDB_VERSION="7.11.1" BR2_GDB_VERSION="7.11.1"

2843
kernel_config_aarch64-gem5 Normal file

File diff suppressed because it is too large Load Diff

4
run
View File

@@ -65,7 +65,7 @@ M5_PATH='$(pwd)/gem5/gem5-system' \
--kernel='${outdir}/build/linux-custom/vmlinux' \ --kernel='${outdir}/build/linux-custom/vmlinux' \
--root-device=/dev/sda \ --root-device=/dev/sda \
" "
elif [ "$arch" = arm ]; then elif [ "$arch" = arm ] || [ "$arch" = aarch64 ]; then
cmd="\ cmd="\
M5_PATH='$(pwd)/gem5/gem5-system' \ M5_PATH='$(pwd)/gem5/gem5-system' \
$debug_vm \ $debug_vm \
@@ -73,7 +73,7 @@ $debug_vm \
'${gem5_dir}/configs/example/fs.py' \ '${gem5_dir}/configs/example/fs.py' \
--command-line='earlyprintk=pl011,0x1c090000 console=ttyAMA0 lpj=19988480 rw loglevel=8 mem=512MB root=/dev/sda $extra_append' \ --command-line='earlyprintk=pl011,0x1c090000 console=ttyAMA0 lpj=19988480 rw loglevel=8 mem=512MB root=/dev/sda $extra_append' \
--disk-image='${outdir}/images/rootfs.ext2' \ --disk-image='${outdir}/images/rootfs.ext2' \
--dtb-file='${gem5_dir}/system/arm/dt/armv7_gem5_v1_1cpu.dtb' \ --dtb-file='${gem5_dir}/system/arm/dt/$([ "$arch" = arm ] && echo armv7_gem5_v1_1cpu || echo armv8_gem5_v1_1cpu).dtb' \
--kernel='${outdir}/build/linux-custom/vmlinux' \ --kernel='${outdir}/build/linux-custom/vmlinux' \
--machine-type=VExpress_GEM5_V1 \ --machine-type=VExpress_GEM5_V1 \
" "