[PATCH 2/3] test: mips: add QEMU Malta 64le labgrid config

Denis Orlov denorl2009 at gmail.com
Fri Jun 9 02:38:14 PDT 2023


On Fri, 9 Jun 2023 at 12:28, Ahmad Fatoum <a.fatoum at pengutronix.de> wrote:
>
> On 09.06.23 11:17, Denis Orlov wrote:
> > On Fri, 9 Jun 2023 at 10:21, Ahmad Fatoum <a.fatoum at pengutronix.de> wrote:
> >>
> >> On 09.06.23 09:14, Denis Orlov wrote:
> >>> Hello Ahmad,
> >>>
> >>> On Fri, 9 Jun 2023 at 09:36, Ahmad Fatoum <a.fatoum at pengutronix.de> wrote:
> >>>>
> >>>> On 07.06.23 06:59, Denis Orlov wrote:
> >>>>> Signed-off-by: Denis Orlov <denorl2009 at gmail.com>
> >>>>> ---
> >>>>>  test/mips/qemu-malta64el_defconfig.yaml | 22 ++++++++++++++++++++++
> >>>>>  1 file changed, 22 insertions(+)
> >>>>>  create mode 100644 test/mips/qemu-malta64el_defconfig.yaml
> >>>>>
> >>>>> diff --git a/test/mips/qemu-malta64el_defconfig.yaml b/test/mips/qemu-malta64el_defconfig.yaml
> >>>>> new file mode 100644
> >>>>> index 0000000000..22562d5b7a
> >>>>> --- /dev/null
> >>>>> +++ b/test/mips/qemu-malta64el_defconfig.yaml
> >>>>> @@ -0,0 +1,22 @@
> >>>>> +targets:
> >>>>> +  main:
> >>>>> +    drivers:
> >>>>> +      QEMUDriver:
> >>>>> +        qemu_bin: qemu
> >>>>> +        machine: malta
> >>>>> +        cpu: 5KEf
> >>>>> +        memory: 256M
> >>>>> +        bios: barebox-qemu-malta.img.swapped
> >>>>> +        extra_args: ''
> >>>>> +      BareboxDriver:
> >>>>> +        prompt: 'barebox@[^:]+:[^ ]+ '
> >>>>> +        bootstring: 'commandline:'
> >>>>> +      BareboxTestStrategy: {}
> >>>>> +    features:
> >>>>> +      - virtio-pci
> >>>>
> >>>> Did you test virtio PCI? I don't see it enabled in the defconfig.
> >>>
> >>> Nope, I didn't. I must have copied this from the 32-bit malta config
> >>> file. However, I see that its defconfig also lacks VIRTIO_PCI, so should
> >>> those be removed from both labgrid configs?
> >>>
> >>> Besides, judging from the virtio PCI Kconfig option depends, there seem
> >>> to be some issues with virtio PCI on MIPS without CONFIG_MMU set. Is the
> >>> lack of VIRTIO_PCI option in 32-bit malta defconfig related to that?
> >>
> >> Ah, right. test/emulate.pl reads virtio-pci feature to decide what Virt I/O
> >> transport to use. Maybe the MMU incompatibility is fixed now with your
> >> recent DMA rework or maybe we still have 1:1 mapping assumptions in the
> >> virtio code itself. If you could give it a quick test with CONFIG_MMU=n
> >> and see if it works, that would be great. Something like this should do it:
> >>
> >> /usr/bin/qemu-system-mips64el -M malta -cpu 5KEf -m 256M \
> >>    -bios barebox-qemu-malta.img.swapped -serial mon:stdio -trace file=/dev/null \
> >>    -drive if=none,file=/src/barebox-rockchip/somealigned.img,format=raw,id=hd0 \
> >>    -device virtio-blk-pci,disable-legacy=on,disable-modern=off,drive=hd0
> >>
> >> (Above was generated by ./test/emulate.pl $config -n --blk=somealigned.img)
> >>
> >> You should see a /dev/virtioblk* device if everything is enabled and working.
> >
> > Yeah, it seems that this works on both CONFIG_MMU=y and CONFIG_MMU=n now.
> > The drive mounts successfully and I am able to look at its contents with
> > "ls". So, does this mean that we should enable the VIRTIO_PCI option in
> > malta defconfigs?
>
> Even for 32-bit? Ye, then we can drop the depends line in VIRTIO_PCI and
> enable it in the MIPS defconfigs.

Yep, 32-bit with CONFIG_MMU=n works too. I will send a patch later today.
Should CONFIG_DISK and CONFIG_VIRTIO_BLK also be enabled in those
by default?

>
> Thanks for testing!
> Ahmad
>
> >
> >>
> >> Cheers,
> >> Ahmad
> >>
> >>>
> >>> Regards,
> >>> Denis
> >>>
> >>>>
> >>>>> +images:
> >>>>> +  barebox-qemu-malta.img.swapped: !template "$LG_BUILDDIR/images/barebox-qemu-malta.img.swapped"
> >>>>> +tools:
> >>>>> +  qemu: /usr/bin/qemu-system-mips64el
> >>>>> +imports:
> >>>>> +  -  ../strategy.py
> >>>>
> >>>> --
> >>>> Pengutronix e.K.                           |                             |
> >>>> Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
> >>>> 31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
> >>>> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
> >>>>
> >>>
> >>
> >> --
> >> Pengutronix e.K.                           |                             |
> >> Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
> >> 31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
> >> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
> >>
> >
>
> --
> Pengutronix e.K.                           |                             |
> Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
> 31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
>



More information about the barebox mailing list