mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-18 05:13:43 -09:00
The SBSA Reference Platform was updated to use the neoverse-n1 cpu (armv8.2a) in Qemu v8.1 [1]. Commitc58a2a968"configs/qemu_aarch64_sbsa_defconfig: switch to neoverse-n1 (armv8.2a)" [2] reflected this change in qemu_aarch64_sbsa_defconfig. This commit updates the test_edk2 runtime test the same way. This update is possible with the help of commits [3] and [4]. [1]1877272bad[2]c58a2a9687[3]0d4177598c[4]fba62f2ab1Signed-off-by: Julien Olivain <ju.o@free.fr> Signed-off-by: Romain Naour <romain.naour@smile.fr> (cherry picked from commit36c7a5366a) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
73 lines
3.0 KiB
Python
73 lines
3.0 KiB
Python
import os
|
|
|
|
import infra.basetest
|
|
|
|
|
|
class TestEdk2(infra.basetest.BRTest):
|
|
config = \
|
|
"""
|
|
BR2_aarch64=y
|
|
BR2_neoverse_n1=y
|
|
BR2_TOOLCHAIN_EXTERNAL=y
|
|
BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
|
|
BR2_TARGET_ROOTFS_EXT2=y
|
|
BR2_TARGET_ROOTFS_EXT2_4=y
|
|
# BR2_TARGET_ROOTFS_TAR is not set
|
|
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/aarch64-sbsa/assemble-flash-images support/scripts/genimage.sh"
|
|
BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/qemu/aarch64-sbsa/genimage.cfg"
|
|
BR2_LINUX_KERNEL=y
|
|
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
|
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.58"
|
|
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
|
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="support/testing/tests/boot/test_edk2/linux.config"
|
|
BR2_TARGET_EDK2=y
|
|
BR2_TARGET_EDK2_PLATFORM_QEMU_SBSA=y
|
|
BR2_TARGET_GRUB2=y
|
|
BR2_TARGET_GRUB2_ARM64_EFI=y
|
|
BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
|
|
BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y
|
|
BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.11"
|
|
BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="qemu_sbsa"
|
|
BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP=y
|
|
BR2_PACKAGE_HOST_GENIMAGE=y
|
|
BR2_PACKAGE_HOST_DOSFSTOOLS=y
|
|
BR2_PACKAGE_HOST_MTOOLS=y
|
|
BR2_PACKAGE_HOST_QEMU=y
|
|
BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
|
|
"""
|
|
|
|
def __init__(self, names):
|
|
"""Setup common test variables."""
|
|
super(TestEdk2, self).__init__(names)
|
|
"""All EDK2 releases <= edk2-stable202408 can't be fetched from git
|
|
anymore due to a missing git submodule as reported by [1].
|
|
|
|
Usually Buildroot fall-back using https://sources.buildroot.net
|
|
thanks to BR2_BACKUP_SITE where a backup of the generated archive
|
|
is available. But the BRConfigTest remove BR2_BACKUP_SITE default
|
|
value while generating the .config used by TestEdk2.
|
|
|
|
Replace the BR2_BACKUP_SITE override from BRConfigTest in order
|
|
to continue testing EDK2 package using the usual backup site.
|
|
|
|
To be removed with the next EDK2 version bump using this commit
|
|
[2].
|
|
|
|
[1] https://github.com/tianocore/edk2/issues/6398
|
|
[2] https://github.com/tianocore/edk2/commit/95d8a1c255cfb8e063d679930d08ca6426eb5701
|
|
"""
|
|
self.config = self.config.replace('BR2_BACKUP_SITE=""\n', '')
|
|
|
|
def test_run(self):
|
|
hda = os.path.join(self.builddir, "images", "disk.img")
|
|
flash0 = os.path.join(self.builddir, "images", "SBSA_FLASH0.fd")
|
|
flash1 = os.path.join(self.builddir, "images", "SBSA_FLASH1.fd")
|
|
self.emulator.boot(arch="aarch64",
|
|
options=["-M", "sbsa-ref",
|
|
"-cpu", "neoverse-n1",
|
|
"-m", "512M",
|
|
"-pflash", flash0,
|
|
"-pflash", flash1,
|
|
"-hda", hda])
|
|
self.emulator.login()
|