3 # Copyright (c) 2023 BALATON Zoltan
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
.utils
import process
10 from avocado_qemu
import QemuSystemTest
11 from avocado_qemu
import wait_for_console_pattern
13 class AmigaOneMachine(QemuSystemTest
):
17 def test_ppc_amigaone(self
):
19 :avocado: tags=arch:ppc
20 :avocado: tags=machine:amigaone
21 :avocado: tags=device:articia
22 :avocado: tags=accel:tcg
24 self
.require_accelerator("tcg")
25 tar_name
= 'A1Firmware_Floppy_05-Mar-2005.zip'
26 tar_url
= ('https://www.hyperion-entertainment.com/index.php/'
27 'downloads?view=download&format=raw&file=25')
28 tar_hash
= 'c52e59bc73e31d8bcc3cc2106778f7ac84f6c755'
29 zip_file
= self
.fetch_asset(tar_name
, locations
=tar_url
,
31 archive
.extract(zip_file
, self
.workdir
)
32 cmd
= f
"tail -c 524288 {self.workdir}/floppy_edition/updater.image >{self.workdir}/u-boot-amigaone.bin"
33 process
.run(cmd
, shell
=True)
36 self
.vm
.add_args('-bios', self
.workdir
+ '/u-boot-amigaone.bin')
38 wait_for_console_pattern(self
, 'FLASH:')