Harrison Mutai | a197d5d | 2022-09-15 13:45:21 +0100 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | # |
| 3 | # Copyright (c) 2022 Arm Limited. All rights reserved. |
| 4 | # |
| 5 | # SPDX-License-Identifier: BSD-3-Clause |
| 6 | # |
| 7 | |
| 8 | # Generates a machine configuration for QEMU virt. |
| 9 | set_model_path qemu-system-aarch64 |
| 10 | |
| 11 | cat <<EOF >"$model_param_file" |
| 12 | -M virt |
| 13 | -machine 'secure=on,virtualization=on,gic-version=2' |
| 14 | -cpu max |
| 15 | -smp 4 |
| 16 | -m 4G |
| 17 | -nographic -display none -d unimp |
| 18 | -append 'console=ttyAMA0,115200n8 root=/dev/vda earlycon' |
| 19 | ${kernel_bin+-kernel $kernel_bin} |
| 20 | ${rootfs_bin+-initrd $rootfs_bin} |
| 21 | ${qemu_bios_bin+-bios $qemu_bios_bin} |
| 22 | ${wait_debugger+-gdb tcp:localhost:9000} |
| 23 | ${wait_debugger+-S} |
| 24 | EOF |