1f04cb2d0SCédric Le Goater#!/usr/bin/env python3 2f04cb2d0SCédric Le Goater# 3*38cd5c52SCédric Le Goater# Functional test that boots the ASPEED machines 4f04cb2d0SCédric Le Goater# 5f04cb2d0SCédric Le Goater# SPDX-License-Identifier: GPL-2.0-or-later 6f04cb2d0SCédric Le Goater 7*38cd5c52SCédric Le Goaterfrom qemu_test import Asset 8*38cd5c52SCédric Le Goaterfrom aspeed import AspeedTest 9f04cb2d0SCédric Le Goater 10*38cd5c52SCédric Le Goaterclass RainierMachine(AspeedTest): 11f04cb2d0SCédric Le Goater 12f04cb2d0SCédric Le Goater ASSET_RAINIER_EMMC = Asset( 13f04cb2d0SCédric Le Goater ('https://fileserver.linaro.org/s/B6pJTwWEkzSDi36/download/' 14f04cb2d0SCédric Le Goater 'mmc-p10bmc-20240617.qcow2'), 15f04cb2d0SCédric Le Goater 'd523fb478d2b84d5adc5658d08502bc64b1486955683814f89c6137518acd90b') 16f04cb2d0SCédric Le Goater 17f04cb2d0SCédric Le Goater def test_arm_aspeed_emmc_boot(self): 18f04cb2d0SCédric Le Goater self.set_machine('rainier-bmc') 19f04cb2d0SCédric Le Goater self.require_netdev('user') 20f04cb2d0SCédric Le Goater 21f04cb2d0SCédric Le Goater image_path = self.ASSET_RAINIER_EMMC.fetch() 22f04cb2d0SCédric Le Goater 23f04cb2d0SCédric Le Goater self.vm.set_console() 24f04cb2d0SCédric Le Goater self.vm.add_args('-drive', 25f04cb2d0SCédric Le Goater 'file=' + image_path + ',if=sd,id=sd2,index=2', 26f04cb2d0SCédric Le Goater '-net', 'nic', '-net', 'user', '-snapshot') 27f04cb2d0SCédric Le Goater self.vm.launch() 28f04cb2d0SCédric Le Goater 29f04cb2d0SCédric Le Goater self.wait_for_console_pattern('U-Boot SPL 2019.04') 30f04cb2d0SCédric Le Goater self.wait_for_console_pattern('Trying to boot from MMC1') 31f04cb2d0SCédric Le Goater self.wait_for_console_pattern('U-Boot 2019.04') 32f04cb2d0SCédric Le Goater self.wait_for_console_pattern('eMMC 2nd Boot') 33f04cb2d0SCédric Le Goater self.wait_for_console_pattern('## Loading kernel from FIT Image') 34f04cb2d0SCédric Le Goater self.wait_for_console_pattern('Starting kernel ...') 35f04cb2d0SCédric Le Goater self.wait_for_console_pattern('Booting Linux on physical CPU 0xf00') 36f04cb2d0SCédric Le Goater self.wait_for_console_pattern('mmcblk0: p1 p2 p3 p4 p5 p6 p7') 37f04cb2d0SCédric Le Goater self.wait_for_console_pattern('IBM eBMC (OpenBMC for IBM Enterprise') 38f04cb2d0SCédric Le Goater 39f04cb2d0SCédric Le Goaterif __name__ == '__main__': 40*38cd5c52SCédric Le Goater AspeedTest.main() 41