Automate failed gem5 x86 attempt

This commit is contained in:
Ciro Santilli
2017-12-29 13:34:13 +00:00
parent 0f51fbca08
commit 6ddbec9c99
6 changed files with 2917 additions and 31 deletions

15
build
View File

@@ -37,14 +37,17 @@ case "$arch" in
x86_64)
defconfig=qemu_x86_64_defconfig
;;
x86_64-gem5)
defconfig=qemu_x86_64_defconfig
;;
arm)
# qemu_arm_vexpress_defconfig required a newer QEMU than 2.0.0 on a Ubuntu host.
# so let's stick to versatile for now.
defconfig=qemu_arm_versatile_defconfig
;;
arm-gem5)
# qemu_arm_vexpress_defconfig required a newer QEMU than 2.0.0 on a Ubuntu host.
# so let's stick to versatile for now.
# Ideally we should use a custom clean config here.
# But let's just use this one as a starting point for now.
defconfig=qemu_arm_versatile_defconfig
post_script_args="$post_script_args -n"
;;
@@ -67,9 +70,9 @@ make O="$outdir" BR2_EXTERNAL="$(pwd)/../kernel_module" "$defconfig"
# TODO Can't get rid of this for now.
# http://stackoverflow.com/questions/44078245/is-it-possible-to-use-config-fragments-with-buildroots-config
cat ../buildroot_config_fragment >> "${outdir}/.config"
if [ "$arch" = 'arm-gem5' ]; then
if echo "$arch" | grep -Eq -- '-gem5$'; then
echo "\
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE=\"../kernel_config_gem5\"
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE=\"../kernel_config_${arch}\"
" >> "${outdir}/.config"
else
echo "\
@@ -99,6 +102,6 @@ time \
all \
;
cd ..
if [ "$arch" = 'arm-gem5' ]; then
./build-gem5
if echo "$arch" | grep -Eq -- '-gem5$'; then
./build-gem5 -a "$arch"
fi