1 # Test that the U-Boot firmware boots on ppc 405 machines and check the console
3 # Copyright (c) 2021 Red Hat, Inc.
5 # This work is licensed under the terms of the GNU GPL, version 2 or
6 # later. See the COPYING file in the top-level directory.
8 from avocado
.utils
import archive
9 from avocado_qemu
import Test
10 from avocado_qemu
import wait_for_console_pattern
11 from avocado_qemu
import exec_command_and_wait_for_pattern
13 class Ppc405Machine(Test
):
17 def do_test_ppc405(self
):
18 uboot_url
= ('https://gitlab.com/huth/u-boot/-/raw/'
19 'taihu-2021-10-09/u-boot-taihu.bin')
20 uboot_hash
= ('3208940e908a5edc7c03eab072c60f0dcfadc2ab');
21 file_path
= self
.fetch_asset(uboot_url
, asset_hash
=uboot_hash
)
22 self
.vm
.set_console(console_index
=1)
23 self
.vm
.add_args('-bios', file_path
)
25 wait_for_console_pattern(self
, 'AMCC PPC405EP Evaluation Board')
26 exec_command_and_wait_for_pattern(self
, 'reset', 'AMCC PowerPC 405EP')
28 def test_ppc_taihu(self
):
30 :avocado: tags=arch:ppc
31 :avocado: tags=machine:taihu
32 :avocado: tags=cpu:405ep
36 def test_ppc_ref405ep(self
):
38 :avocado: tags=arch:ppc
39 :avocado: tags=machine:ref405ep
40 :avocado: tags=cpu:405ep