[PATCH 10/10] tests/functional/arm: Add MCIMX6UL-EVK boot tests
Bin Meng <[email protected]>
| Newsgroups | org.nongnu.qemu-arm,org.nongnu.qemu-devel |
|---|---|
| Message-ID | <[email protected]> |
The MCIMX6UL-EVK machine supports loading U-Boot proper with the generic loader and booting Linux directly, but neither path has functional coverage. Add a versioned Buildroot asset containing U-Boot, a Linux kernel, the board DTB, and a 128 MiB SD card image. Exercise both boot paths and verify that they reach the Buildroot login prompt. Cover the new test in the existing MCIMX6UL EVK MAINTAINERS entry. Signed-off-by: Bin Meng <[email protected]> --- MAINTAINERS | 1 + tests/functional/arm/meson.build | 2 + tests/functional/arm/test_mcimx6ul_evk.py | 70 +++++++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 tests/functional/arm/test_mcimx6ul_evk.py diff --git a/MAINTAINERS b/MAINTAINERS index 4628793dde..45288fb5b9 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -909,6 +909,7 @@ F: include/hw/arm/fsl-imx6ul.h F: include/hw/display/imx6ul_lcdif.h F: include/hw/misc/imx6ul_ccm.h F: docs/system/arm/mcimx6ul-evk.rst +F: tests/functional/arm/test_mcimx6ul_evk.py MCIMX7D SABRE / i.MX7 M: Peter Maydell <[email protected]> diff --git a/tests/functional/arm/meson.build b/tests/functional/arm/meson.build index 61b00932db..d8b1408b13 100644 --- a/tests/functional/arm/meson.build +++ b/tests/functional/arm/meson.build @@ -20,6 +20,7 @@ test_arm_timeouts = { 'bpim2u' : 500, 'collie' : 180, 'cubieboard' : 360, + 'mcimx6ul_evk' : 240, 'orangepi' : 540, 'quanta_gsj' : 240, 'raspi2' : 120, @@ -59,6 +60,7 @@ tests_arm_system_thorough = [ 'emcraft_sf2', 'integratorcp', 'max78000fthr', + 'mcimx6ul_evk', 'microbit', 'orangepi', 'quanta_gsj', diff --git a/tests/functional/arm/test_mcimx6ul_evk.py b/tests/functional/arm/test_mcimx6ul_evk.py new file mode 100644 index 0000000000..687a0e9032 --- /dev/null +++ b/tests/functional/arm/test_mcimx6ul_evk.py @@ -0,0 +1,70 @@ +#!/usr/bin/env python3 +# +# Functional tests for the NXP MCIMX6UL-EVK machine +# +# Copyright (c) 2026 Process Mission +# +# Author: +# Bin Meng <[email protected]> +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import Asset, LinuxKernelTest, skipIfMissingCommands + + +class MCIMX6ULEVKMachine(LinuxKernelTest): + + ASSET_BUILDROOT = Asset( + ('https://github.com/processmission/qemu-machine-images/releases/download/' + 'v1.0.0/arm-mcimx6ul-evk-v1.0.0.tar.zst'), + 'bedda89c848224dfc5108629975bc379ae5f4d8896d681521f2d485a0fb517aa') + + def _prepare_images(self): + self.set_machine('mcimx6ul-evk') + + archive_path = self.uncompress( + self.ASSET_BUILDROOT, + target='arm-mcimx6ul-evk-v1.0.0.tar', + format='zstd') + self.archive_extract(archive_path, format='tar') + + self.vm.set_console() + self.vm.add_args( + '-m', '512M', + '-drive', + 'file=' + self.scratch_file('images', 'sdcard.img') + + ',if=sd,index=1,format=raw', + '-no-reboot') + + @skipIfMissingCommands('zstd') + def test_uboot_boot(self): + self._prepare_images() + + self.vm.add_args( + '-device', + 'loader,file=' + self.scratch_file('images', 'u-boot.bin') + + ',addr=0x87800000,cpu-num=0') + self.vm.launch() + + self.wait_for_console_pattern('U-Boot 2024.07') + self.wait_for_console_pattern('Starting kernel ...') + self.wait_for_console_pattern('buildroot login:') + + @skipIfMissingCommands('zstd') + def test_linux_boot(self): + self._prepare_images() + + self.vm.add_args( + '-kernel', self.scratch_file('images', 'zImage'), + '-dtb', self.scratch_file('images', + 'imx6ul-14x14-evk.dtb'), + '-append', + 'console=ttymxc0,115200 root=/dev/mmcblk1p2 rootwait rw') + self.vm.launch() + + self.wait_for_console_pattern('Linux version') + self.wait_for_console_pattern('buildroot login:') + + +if __name__ == '__main__': + LinuxKernelTest.main() -- 2.53.0