1*490d25e6SThomas Huth#!/usr/bin/env python3 2*490d25e6SThomas Huth# 3*490d25e6SThomas Huth# Functional test that boots a Linux kernel and checks the console 4*490d25e6SThomas Huth# 5*490d25e6SThomas Huth# SPDX-License-Identifier: GPL-2.0-or-later 6*490d25e6SThomas Huth 7*490d25e6SThomas Huthfrom qemu_test import LinuxKernelTest, Asset 8*490d25e6SThomas Huth 9*490d25e6SThomas Huthclass XlnxVersalVirtMachine(LinuxKernelTest): 10*490d25e6SThomas Huth 11*490d25e6SThomas Huth ASSET_KERNEL = Asset( 12*490d25e6SThomas Huth ('http://ports.ubuntu.com/ubuntu-ports/dists/bionic-updates/main/' 13*490d25e6SThomas Huth 'installer-arm64/20101020ubuntu543.19/images/netboot/' 14*490d25e6SThomas Huth 'ubuntu-installer/arm64/linux'), 15*490d25e6SThomas Huth 'ce54f74ab0b15cfd13d1a293f2d27ffd79d8a85b7bb9bf21093ae9513864ac79') 16*490d25e6SThomas Huth 17*490d25e6SThomas Huth ASSET_INITRD = Asset( 18*490d25e6SThomas Huth ('http://ports.ubuntu.com/ubuntu-ports/dists/bionic-updates/main/' 19*490d25e6SThomas Huth 'installer-arm64/20101020ubuntu543.19/images/netboot/' 20*490d25e6SThomas Huth '/ubuntu-installer/arm64/initrd.gz'), 21*490d25e6SThomas Huth 'e7a5e716b6f516d8be315c06e7331aaf16994fe4222e0e7cfb34bc015698929e') 22*490d25e6SThomas Huth 23*490d25e6SThomas Huth def test_aarch64_xlnx_versal_virt(self): 24*490d25e6SThomas Huth self.set_machine('xlnx-versal-virt') 25*490d25e6SThomas Huth kernel_path = self.ASSET_KERNEL.fetch() 26*490d25e6SThomas Huth initrd_path = self.ASSET_INITRD.fetch() 27*490d25e6SThomas Huth 28*490d25e6SThomas Huth self.vm.set_console() 29*490d25e6SThomas Huth self.vm.add_args('-m', '2G', 30*490d25e6SThomas Huth '-accel', 'tcg', 31*490d25e6SThomas Huth '-kernel', kernel_path, 32*490d25e6SThomas Huth '-initrd', initrd_path) 33*490d25e6SThomas Huth self.vm.launch() 34*490d25e6SThomas Huth self.wait_for_console_pattern('Checked W+X mappings: passed') 35*490d25e6SThomas Huth 36*490d25e6SThomas Huthif __name__ == '__main__': 37*490d25e6SThomas Huth LinuxKernelTest.main() 38