Message ID | dea7938f15c3231984546b12ccc8e3b8ba42a203.1697568616.git.balaton@eik.bme.hu |
---|---|
State | New |
Headers | show |
Series | Add emulation of AmigaOne XE board | expand |
Please add a short patch description if this moves from RFC to a real patch On 17/10/2023 21.06, BALATON Zoltan wrote: > Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> > --- > I have no idea if this works so testing and corrections are welcome Why don't you test it on your own? I think this should be sufficient: make check-avocado AVOCADO_TAGS=machine:amigaone > but this could be a basic test. Booting further is a bit more involved > as we'd need alternative VGA BIOS and selecting menu items in the > firmware to allow CD boot so I did not try to automate that. > > This could be simpler if the u-boot-amigaone.bin could be added to > pc-bios. It's GPL so should be OK to include and distribute but irs > sources seem to be lost and could not be recovered or reconstructed so > we only have this binary. Who should be able to decide about that? I'm sorry, but if the sources are not available anymore, then I think it will not be possible to ship the binary in the QEMU tarball - since the GPL requires that the distributor of the binary can also provide the sources on request. Thomas
On 10/18/23 07:58, Thomas Huth wrote: > Please add a short patch description if this moves from RFC to a real patch > > On 17/10/2023 21.06, BALATON Zoltan wrote: >> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> >> --- >> I have no idea if this works so testing and corrections are welcome > > Why don't you test it on your own? I think this should be sufficient: > > make check-avocado AVOCADO_TAGS=machine:amigaone Test doesn't pass : Fetching asset from tests/avocado/ppc_amiga.py:AmigaOneMachine.test_ppc_amigaone JOB ID : 39645d61f6f6c90ae87e3a48fe29beb16146aa73 JOB LOG : /home/legoater/work/qemu/qemu.git/build/tests/results/job-2023-10-18T05.51-39645d6/job.log (1/1) tests/avocado/ppc_amiga.py:AmigaOneMachine.test_ppc_amigaone: ERROR: file is not an archive (0.10 s) Interrupting job (failfast). RESULTS : PASS 0 | ERROR 1 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0 JOB TIME : 2.53 s C. > >> but this could be a basic test. Booting further is a bit more involved >> as we'd need alternative VGA BIOS and selecting menu items in the >> firmware to allow CD boot so I did not try to automate that. >> >> This could be simpler if the u-boot-amigaone.bin could be added to >> pc-bios. It's GPL so should be OK to include and distribute but irs >> sources seem to be lost and could not be recovered or reconstructed so >> we only have this binary. Who should be able to decide about that? > > I'm sorry, but if the sources are not available anymore, then I think it will not be possible to ship the binary in the QEMU tarball - since the GPL requires that the distributor of the binary can also provide the sources on request. > > Thomas >
On Wed, 18 Oct 2023, Cédric Le Goater wrote: > On 10/18/23 07:58, Thomas Huth wrote: >> Please add a short patch description if this moves from RFC to a real patch >> >> On 17/10/2023 21.06, BALATON Zoltan wrote: >>> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> >>> --- >>> I have no idea if this works so testing and corrections are welcome >> >> Why don't you test it on your own? I think this should be sufficient: >> >> make check-avocado AVOCADO_TAGS=machine:amigaone > > Test doesn't pass : > > Fetching asset from > tests/avocado/ppc_amiga.py:AmigaOneMachine.test_ppc_amigaone > JOB ID : 39645d61f6f6c90ae87e3a48fe29beb16146aa73 > JOB LOG : > /home/legoater/work/qemu/qemu.git/build/tests/results/job-2023-10-18T05.51-39645d6/job.log > (1/1) tests/avocado/ppc_amiga.py:AmigaOneMachine.test_ppc_amigaone: ERROR: > file is not an archive (0.10 s) OK then how to extract a zip file? Does it need to have name ending with .zip to work? The download may end up in a strangely named file due to how the URL ends. Anybody knows how to fix this? I never used Avocado, only followed examples found in other tests but possible I did not get how it should work. Regards, BALATON Zoltan > Interrupting job (failfast). > RESULTS : PASS 0 | ERROR 1 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | > CANCEL 0 > JOB TIME : 2.53 s > > C. > >> >>> but this could be a basic test. Booting further is a bit more involved >>> as we'd need alternative VGA BIOS and selecting menu items in the >>> firmware to allow CD boot so I did not try to automate that. >>> >>> This could be simpler if the u-boot-amigaone.bin could be added to >>> pc-bios. It's GPL so should be OK to include and distribute but irs >>> sources seem to be lost and could not be recovered or reconstructed so >>> we only have this binary. Who should be able to decide about that? >> >> I'm sorry, but if the sources are not available anymore, then I think it >> will not be possible to ship the binary in the QEMU tarball - since the GPL >> requires that the distributor of the binary can also provide the sources on >> request. >> >> Thomas >> > > >
diff --git a/tests/avocado/ppc_amiga.py b/tests/avocado/ppc_amiga.py new file mode 100644 index 0000000000..e3cc2632e9 --- /dev/null +++ b/tests/avocado/ppc_amiga.py @@ -0,0 +1,37 @@ +# Test AmigaNG boards +# +# Copyright (c) 2023 BALATON Zoltan +# +# This work is licensed under the terms of the GNU GPL, version 2 or +# later. See the COPYING file in the top-level directory. + +from avocado.utils import archive +from avocado.utils import process +from avocado_qemu import QemuSystemTest +from avocado_qemu import wait_for_console_pattern + +class AmigaOneMachine(QemuSystemTest): + + timeout = 90 + + def test_ppc_amigaone(self): + """ + :avocado: tags=arch:ppc + :avocado: tags=machine:amigaone + :avocado: tags=cpu:7457 + :avocado: tags=device:articia + :avocado: tags=accel:tcg + """ + self.require_accelerator("tcg") + tar_url = ('https://www.hyperion-entertainment.com/index.php/' + 'downloads?view=download&format=raw&file=25') + tar_hash = 'c52e59bc73e31d8bcc3cc2106778f7ac84f6c755' + file_path = self.fetch_asset(tar_url, asset_hash=tar_hash) + archive.extract(file_path, self.workdir) + cmd = f"tail -c 524288 {self.workdir}/floppy_edition/updater.image >{self.workdir}/u-boot-amigaone.bin" + process.run(cmd) + + self.vm.set_console() + self.vm.add_args('-bios', self.workdir + '/u-boot-amigaone.bin') + self.vm.launch() + wait_for_console_pattern(self, 'FLASH:')
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> --- I have no idea if this works so testing and corrections are welcome but this could be a basic test. Booting further is a bit more involved as we'd need alternative VGA BIOS and selecting menu items in the firmware to allow CD boot so I did not try to automate that. This could be simpler if the u-boot-amigaone.bin could be added to pc-bios. It's GPL so should be OK to include and distribute but irs sources seem to be lost and could not be recovered or reconstructed so we only have this binary. Who should be able to decide about that? tests/avocado/ppc_amiga.py | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 tests/avocado/ppc_amiga.py