board/qemu/aarch64: add a aarch64 virt machine using an ARM cortex-a72 core
PATCH 1/1 board/qemu/aarch64: add a aarch64 virt machine using an ARM cortex-a72 core
ARM cortex-a72 core has been added to Qemu since version 3.1.0 [1] [2].
Rebuild the .gitlab-ci.yml.
Tested using Qemu 4.0.0.
[1] https://git.qemu.org/?p=qemu.git;a=commit;h=f11b452b95df4a0fc6561c278721cad03b24098b
[2] https://wiki.qemu.org/ChangeLog/3.1
---
Qemu also support ARM cortex-a57 cpu core.
Should we support and test all cpu emulation available in Qemu ?
This can be useful for toolchain-builder project to provide a prebuilt ARM aarch64 toolchain optimized for cortex-a57.
--- .gitlab-ci.yml | 1 + .../qemu/aarch64-virt-cortex-a72/linux.config | 54 +++++++++++++++++++ board/qemu/aarch64-virt-cortex-a72/readme.txt | 7 +++ .../qemu_aarch64_virt_cortex-a72_defconfig | 23 ++++++++ 4 files changed, 85 insertions(+) create mode 100644 board/qemu/aarch64-virt-cortex-a72/linux.config create mode 100644 board/qemu/aarch64-virt-cortex-a72/readme.txt create mode 100644 configs/qemu_aarch64_virt_cortex-a72_defconfig
.gitlab-ci.yml +1 -0
@@ -244,6 +244,7 @@ pc_x86_64_bios_defconfig: { extends: .defconfig } pc_x86_64_efi_defconfig: { extends: .defconfig } pine64_defconfig: { extends: .defconfig } pine64_sopine_defconfig: { extends: .defconfig } +qemu_aarch64_virt_cortex-a72_defconfig: { extends: .defconfig } qemu_aarch64_virt_defconfig: { extends: .defconfig } qemu_arm_versatile_defconfig: { extends: .defconfig } qemu_arm_versatile_nommu_defconfig: { extends: .defconfig }
board/qemu/aarch64-virt-cortex-a72/linux.config new file +54 -0
54 lines not on this page · raw message
board/qemu/aarch64-virt-cortex-a72/readme.txt new file +7 -0
@@ -0,0 +1,7 @@ +Run the emulation with: + + qemu-system-aarch64 -M virt -cpu cortex-a72 -nographic -smp 1 -kernel output/images/Image -append "root=/dev/vda console=ttyAMA0" -netdev user,id=eth0 -device virtio-net-device,netdev=eth0 -drive file=output/images/rootfs.ext4,if=none,format=raw,id=hd0 -device virtio-blk-device,drive=hd0 + +The login prompt will appear in the terminal that started Qemu. + +Tested with QEMU 4.0.0
configs/qemu_aarch64_virt_cortex-a72_defconfig new file +23 -0
@@ -0,0 +1,23 @@ +# Architecture +BR2_aarch64=y +BR2_cortex_a72=y + +# System +BR2_SYSTEM_DHCP="eth0" +BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +# BR2_TARGET_ROOTFS_TAR is not set + +# Linux headers same as kernel, a 4.19 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/aarch64-virt-cortex-a72/linux.config" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
Signature · 1 line
2.20.1
PATCH 1/1 board/qemu/aarch64: add a aarch64 virt machine using an ARM cortex-a72 core
Hello Romain,
Quoted 1 line · On Tue, 7 May 2019 13:25:21 +0200 Romain Naour <[email protected]> wrote:
ARM cortex-a72 core has been added to Qemu since version 3.1.0 [1] [2].
Do we really want a different defconfig for each possible ARM core that Qemu emulates ?
Quoted 4 lines
Qemu also support ARM cortex-a57 cpu core.
Should we support and test all cpu emulation available in Qemu ?
This can be useful for toolchain-builder project to provide a prebuilt ARM aarch64 toolchain optimized for cortex-a57.
I'm not sure the toolchain builder project requires exactly a Qemu emulating the specific optimization for which gcc was built. I.e, a Cortex-A53 qemu defconfig can be used to boot test a Cortex-A57 or A72 optimized toolchain.
We're already doing that for example with ARMv5/v6/v7:
armv5-* | armv6-* | armv7-*)
test_defconfig="qemu_arm_vexpress_defconfig"
test_board_dir="arm-vexpress"Or for x86:
x86-core2)
test_defconfig="qemu_x86_defconfig"
x86-i686)
test_defconfig="qemu_x86_defconfig"Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/1 board/qemu/aarch64: add a aarch64 virt machine using an ARM cortex-a72 core
Hello Thomas,
Le 07/05/2019 ? 14:11, Thomas Petazzoni a ?crit?:
Quoted 9 lines
Hello Romain,
Quoted 1 line · On Tue, 7 May 2019 13:25:21 +0200 Romain Naour <[email protected]> wrote:
ARM cortex-a72 core has been added to Qemu since version 3.1.0 [1] [2].
Do we really want a different defconfig for each possible ARM core that Qemu emulates ?
Indeed, it would increase the maintenance burden and duplicating some board files... just to change the target arch variant and one qemu option.
Quoted 17 lines
Quoted 5 lines
Qemu also support ARM cortex-a57 cpu core.
Should we support and test all cpu emulation available in Qemu ?
This can be useful for toolchain-builder project to provide a prebuilt ARM aarch64 toolchain optimized for cortex-a57.I'm not sure the toolchain builder project requires exactly a Qemu emulating the specific optimization for which gcc was built. I.e, a Cortex-A53 qemu defconfig can be used to boot test a Cortex-A57 or A72 optimized toolchain.
We're already doing that for example with ARMv5/v6/v7:
armv5-* | armv6-* | armv7-*) test_defconfig="qemu_arm_vexpress_defconfig" test_board_dir="arm-vexpress"
Quoted 6 lines
Or for x86:
x86-core2) test_defconfig="qemu_x86_defconfig" x86-i686) test_defconfig="qemu_x86_defconfig"
For these configuration we only provide the machine type (-M), not the cpu type (-cpu).
Maybe toolchain-builder should update/replace the -cpu option if provided by the readme.txt using test_qemu_args="-cpu <cpu core>"
Best regards,
Romain
Quoted 5 lines
Best regards,
Thomas