]> Git Repo - buildroot-mgba.git/blob - support/testing/tests/boot/test_edk2.py
support/testing: new boot test for EDK2
[buildroot-mgba.git] / support / testing / tests / boot / test_edk2.py
1 import os
2
3 import infra.basetest
4
5
6 class TestEdk2(infra.basetest.BRTest):
7     config = \
8         """
9         BR2_aarch64=y
10         BR2_TOOLCHAIN_EXTERNAL=y
11         BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
12         BR2_TARGET_ROOTFS_EXT2=y
13         BR2_TARGET_ROOTFS_EXT2_4=y
14         # BR2_TARGET_ROOTFS_TAR is not set
15         BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/aarch64-sbsa/assemble-flash-images support/scripts/genimage.sh"
16         BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/qemu/aarch64-sbsa/genimage.cfg"
17         BR2_LINUX_KERNEL=y
18         BR2_LINUX_KERNEL_CUSTOM_VERSION=y
19         BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.10.34"
20         BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
21         BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/aarch64-sbsa/linux.config"
22         BR2_TARGET_EDK2=y
23         BR2_TARGET_EDK2_PLATFORM_QEMU_SBSA=y
24         BR2_TARGET_GRUB2=y
25         BR2_TARGET_GRUB2_ARM64_EFI=y
26         BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
27         BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="qemu_sbsa"
28         BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP=y
29         BR2_PACKAGE_HOST_GENIMAGE=y
30         BR2_PACKAGE_HOST_DOSFSTOOLS=y
31         BR2_PACKAGE_HOST_MTOOLS=y
32         """
33
34     def test_run(self):
35         hda = os.path.join(self.builddir, "images", "disk.img")
36         flash0 = os.path.join(self.builddir, "images", "SBSA_FLASH0.fd")
37         flash1 = os.path.join(self.builddir, "images", "SBSA_FLASH1.fd")
38         self.emulator.boot(arch="aarch64",
39                            options=["-M", "sbsa-ref",
40                                     "-cpu", "cortex-a57",
41                                     "-m", "512M",
42                                     "-pflash", flash0,
43                                     "-pflash", flash1,
44                                     "-hda", hda])
45         self.emulator.login()
This page took 0.025191 seconds and 4 git commands to generate.