Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 1 | # Configuration for gem5 running on ARM64 |
| 2 | |
| 3 | #@TYPE: Machine |
| 4 | #@NAME: Gem5 arm64 machine |
| 5 | #@DESCRIPTION: Machine configuration for Gem5 arm64 |
| 6 | |
| 7 | TUNE_FEATURES = "aarch64" |
| 8 | |
| 9 | require conf/machine/include/arm/arch-armv8a.inc |
| 10 | |
| 11 | MACHINE_FEATURES = "optee pci" |
| 12 | |
| 13 | KERNEL_IMAGETYPES = "Image vmlinux" |
| 14 | KERNEL_IMAGETYPE = "Image" |
| 15 | |
| 16 | IMAGE_FSTYPES += "tar.bz2 ext4" |
| 17 | |
| 18 | SERIAL_CONSOLES = "115200;ttyAMA0" |
| 19 | |
| 20 | EXTRA_IMAGEDEPENDS += "virtual/gem5-bootloader" |
| 21 | |
| 22 | PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" |
| 23 | PREFERRED_VERSION_linux-yocto ?= "5.4%" |
| 24 | |
| 25 | |
| 26 | # Uncomment the following if you need to build gem5 provided bootloader, else |
| 27 | # using standard bootloader by Linux aarch64 |
| 28 | # Use gem5 provided bootloader |
| 29 | # PREFERRED_PROVIDER_virtual/gem5-bootloader = "gem5-aarch64-bootloader" |
| 30 | |
| 31 | # use the dtb stored in the kernel recipe |
| 32 | # KERNEL_DEVICETREE ?= "gem5-arm64/armv8_gem5_v2_4cpu.dtb" |
| 33 | |
| 34 | # Use Linux aarch64 boot wrapper with FDT support and generated |
| 35 | # dtb (gem5-aarch64-dtb.bb) |
| 36 | PREFERRED_PROVIDER_virtual/gem5-bootloader = "boot-wrapper-aarch64" |
| 37 | |
| 38 | BOOT_WRAPPER_AARCH64_CMDLINE ?= "\ |
| 39 | earlyprintk=pl011,0x1c090000 console=ttyAMA0 root=/dev/vda rw mem=1G \ |
| 40 | " |
| 41 | # Use baremetal profile and axf file so dtb is in axf file |
| 42 | GEM5_RUN_PROFILE = "configs/example/arm/baremetal.py" |
| 43 | GEM5_RUN_KERNEL = "linux-system.axf" |
| 44 | GEM5_RUN_EXTRA = "" |
| 45 | GEM5_RUN_DTB = "" |
| 46 | GEM5_RUN_CMDLINE = "" |
| 47 | |
| 48 | EXTRA_IMAGEDEPENDS += "gem5-aarch64-native" |
| 49 | |
| 50 | # As this is a virtual target that will not be used in the real world there is |
| 51 | # no need for real SSH keys. Disable rng-tools (which takes too long to |
| 52 | # initialise) and install the pre-generated keys. |
| 53 | PACKAGECONFIG:remove:pn-openssh = "rng-tools" |
| 54 | MACHINE_EXTRA_RRECOMMENDS += "ssh-pregen-hostkeys" |