QEMU main repository: Please see https://www.qemu.org/docs/master/devel/submitting-a-patch.html for how to submit changes to QEMU. Pull Requests are ignored. Please only use release tarballs from the QEMU website. http://www.qemu.org
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.6 KiB
42 lines
1.6 KiB
#!/usr/bin/env python3
|
|
#
|
|
# Functional test that boots the ASPEED machines
|
|
#
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
from qemu_test import Asset, exec_command_and_wait_for_pattern
|
|
from aspeed import AspeedTest
|
|
|
|
|
|
class AST2500Machine(AspeedTest):
|
|
|
|
ASSET_BR2_202511_AST2500_FLASH = Asset(
|
|
('https://github.com/legoater/qemu-aspeed-boot/raw/master/'
|
|
'images/ast2500-evb/buildroot-2025.11/flash.img'),
|
|
'31e5a8e280b982fb0e7c07eb71c94851002f99ac604dfe620e71a5d47cc87e78')
|
|
|
|
def test_arm_ast2500_evb_buildroot(self):
|
|
self.set_machine('ast2500-evb')
|
|
|
|
image_path = self.ASSET_BR2_202511_AST2500_FLASH.fetch()
|
|
|
|
self.vm.add_args('-device',
|
|
'tmp105,bus=aspeed.i2c.bus.3,address=0x4d,id=tmp-test')
|
|
self.do_test_arm_aspeed_buildroot_start(image_path, '0x0',
|
|
'ast2500-evb login:')
|
|
|
|
exec_command_and_wait_for_pattern(self,
|
|
'echo lm75 0x4d > /sys/class/i2c-dev/i2c-3/device/new_device',
|
|
'i2c i2c-3: new_device: Instantiated device lm75 at 0x4d')
|
|
exec_command_and_wait_for_pattern(self,
|
|
'cat /sys/class/hwmon/hwmon1/temp1_input', '0')
|
|
self.vm.cmd('qom-set', path='/machine/peripheral/tmp-test',
|
|
property='temperature', value=18000)
|
|
exec_command_and_wait_for_pattern(self,
|
|
'cat /sys/class/hwmon/hwmon1/temp1_input', '18000')
|
|
|
|
self.do_test_arm_aspeed_buildroot_poweroff()
|
|
|
|
|
|
if __name__ == '__main__':
|
|
AspeedTest.main()
|
|
|