| # Functional test that boots a Linux kernel on a Raspberry Pi machine |
| # Copyright (c) 2020 Philippe Mathieu-Daudé <f4bug@amsat.org> |
| # SPDX-License-Identifier: GPL-2.0-or-later |
| from zipfile import ZipFile |
| from qemu_test import LinuxKernelTest, Asset |
| class Aarch64Raspi3Machine(LinuxKernelTest): |
| ('https://github.com/pbatard/RPi3/releases/download/' |
| 'v1.15/RPi3_UEFI_Firmware_v1.15.zip'), |
| '8cff2e979560048b4c84921f41a91893240b9fb71a88f0b5c5d6c8edd994bd5b') |
| def test_aarch64_raspi3_atf(self): |
| zip_path = self.ASSET_RPI3_UEFI.fetch() |
| with ZipFile(zip_path, 'r') as zf: |
| zf.extract(efi_name, path=self.workdir) |
| efi_fd = os.path.join(self.workdir, efi_name) |
| self.set_machine('raspi3b') |
| self.vm.set_console(console_index=1) |
| self.vm.add_args('-cpu', 'cortex-a53', |
| '-device', f'loader,file={efi_fd},force-raw=true') |
| self.wait_for_console_pattern('version UEFI Firmware v1.15') |
| if __name__ == '__main__': |