Add CI for MIPS64
cover Add CI for MIPS64
This adds a necessary defconfig and labgrid configuration file together with the corresponding CI job for building and testing the MIPS image with 64BIT option set.
I've decided against giving the defconfig a generic name such as mips64_defconfig. For now, only Malta running in QEMU is really supported, so naming it as that seems more fitting for me. And if more MIPS64 boards will get support in the future, then this defconfig might be renamed appropriately.
Denis Orlov (3):
MIPS: add qemu-malta64el_defconfig
test: mips: add QEMU Malta 64le labgrid config
ci: add a job for testing 64BIT MIPS with labgrid
.github/workflows/test-labgrid-pytest.yml | 4 + arch/mips/configs/qemu-malta64el_defconfig | 87 ++++++++++++++++++++++ test/mips/qemu-malta64el_defconfig.yaml | 22 ++++++ 3 files changed, 113 insertions(+) create mode 100644 arch/mips/configs/qemu-malta64el_defconfig create mode 100644 test/mips/qemu-malta64el_defconfig.yaml
Signature · 1 line
2.41.0
PATCH 1/3 MIPS: add qemu-malta64el_defconfig
This defconfig will compile barebox for Malta board and MIPS64 5KEc/5KEf CPUs, emulatable in QEMU. The analogous 32-bit defconfig uses big endian CPU as the default one. So, for the sake of variety, and to improve the coverage of options, set the CPU as little endian for this one.
--- arch/mips/configs/qemu-malta64el_defconfig | 87 ++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 arch/mips/configs/qemu-malta64el_defconfig
arch/mips/configs/qemu-malta64el_defconfig new file +87 -0
@@ -0,0 +1,87 @@ +CONFIG_BOARD_QEMU_MALTA=y +CONFIG_CPU_LITTLE_ENDIAN=y +CONFIG_CPU_MIPS64_R2=y +CONFIG_64BIT=y +CONFIG_IMAGE_COMPRESSION_XZKERN=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x400000 +CONFIG_STACK_SIZE=0x7000 +CONFIG_EXPERIMENTAL=y +CONFIG_BAUDRATE=38400 +CONFIG_HUSH_FANCY_PROMPT=y +CONFIG_CMDLINE_EDITING=y +CONFIG_AUTO_COMPLETE=y +CONFIG_MENU=y +CONFIG_BOOTM_SHOW_TYPE=y +CONFIG_CONSOLE_ALLOW_COLOR=y +CONFIG_PARTITION=y +CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y +CONFIG_CMD_DMESG=y +CONFIG_LONGHELP=y +CONFIG_CMD_IOMEM=y +CONFIG_CMD_IMD=y +CONFIG_CMD_MEMINFO=y +CONFIG_CMD_GO=y +CONFIG_CMD_LOADB=y +CONFIG_CMD_LOADY=y +CONFIG_CMD_RESET=y +CONFIG_CMD_PARTITION=y +CONFIG_CMD_EXPORT=y +CONFIG_CMD_DEFAULTENV=y +CONFIG_CMD_LOADENV=y +CONFIG_CMD_PRINTENV=y +CONFIG_CMD_SAVEENV=y +CONFIG_CMD_MD5SUM=y +CONFIG_CMD_SHA1SUM=y +CONFIG_CMD_SHA256SUM=y +CONFIG_CMD_UNCOMPRESS=y +CONFIG_CMD_SLEEP=y +CONFIG_CMD_DHCP=y +CONFIG_CMD_MIITOOL=y +CONFIG_CMD_PING=y +CONFIG_CMD_TFTP=y +CONFIG_CMD_ECHO_E=y +CONFIG_CMD_EDIT=y +CONFIG_CMD_LOGIN=y +CONFIG_CMD_MENU=y +CONFIG_CMD_MENU_MANAGEMENT=y +CONFIG_CMD_PASSWD=y +CONFIG_CMD_FBTEST=y +CONFIG_CMD_READLINE=y +CONFIG_CMD_TIMEOUT=y +CONFIG_CMD_CRC=y +CONFIG_CMD_CRC_CMP=y +CONFIG_CMD_FLASH=y +CONFIG_CMD_GPIO=y +CONFIG_CMD_I2C=y +CONFIG_CMD_OF_NODE=y +CONFIG_CMD_OF_PROPERTY=y +CONFIG_CMD_OFTREE=y +CONFIG_CMD_TIME=y +CONFIG_NET=y +CONFIG_NET_NFS=y +CONFIG_NET_NETCONSOLE=y +CONFIG_OFDEVICE=y +CONFIG_OF_BAREBOX_DRIVERS=y +CONFIG_DRIVER_NET_RTL8139=y +# CONFIG_SPI is not set +CONFIG_I2C=y +CONFIG_I2C_GPIO=y +CONFIG_MTD=y +CONFIG_DRIVER_CFI=y +# CONFIG_DRIVER_CFI_AMD is not set +# CONFIG_DRIVER_CFI_BANK_WIDTH_1 is not set +# CONFIG_DRIVER_CFI_BANK_WIDTH_2 is not set +CONFIG_CFI_BUFFER_WRITE=y +CONFIG_VIDEO=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_DRIVER_VIDEO_BOCHS_PCI=y +CONFIG_GPIO_MALTA_FPGA_I2C=y +CONFIG_PCI=y +CONFIG_PCI_DEBUG=y +CONFIG_SYSCON_REBOOT_MODE=y +CONFIG_POWER_RESET_SYSCON=y +CONFIG_FS_CRAMFS=y +CONFIG_FS_TFTP=y +CONFIG_FS_FAT=y +CONFIG_FS_FAT_WRITE=y +CONFIG_FS_FAT_LFN=y
Signature · 1 line
2.41.0
Re: [PATCH 1/3] MIPS: add qemu-malta64el_defconfig
Hi Denis!
Quoted 4 lines · On Wed, 7 Jun 2023 07:59:38 +0300 Denis Orlov <[email protected]> wrote:
This defconfig will compile barebox for Malta board and MIPS64 5KEc/5KEf CPUs, emulatable in QEMU. The analogous 32-bit defconfig uses big endian CPU as the default one. So, for the sake of variety, and to improve the coverage of options, set the CPU as little endian for this one.
One more reason to run MIPS 64-bit barebox in little endian mode:
there is the Debian MIPS64 little endian port but
there is no Debian MIPS64 big endian port.
Also please note that the Debian 32-bit MIPS big endian port was discontinued after Debian 10 (Buster).
Signature · 2 lines
Best regards, Antony Pavlov
Re: [PATCH 1/3] MIPS: add qemu-malta64el_defconfig
In reply to Denis OrlovQuoted 6 lines · Denis Orlov
This defconfig will compile barebox for Malta board and MIPS64 5KEc/5KEf CPUs, emulatable in QEMU. The analogous 32-bit defconfig uses big endian CPU as the default one. So, for the sake of variety, and to improve the coverage of options, set the CPU as little endian for this one.
Signed-off-by Denis Orlov <[email protected]>
Quoted 98 lines
--- arch/mips/configs/qemu-malta64el_defconfig | 87 ++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 arch/mips/configs/qemu-malta64el_defconfigarch/mips/configs/qemu-malta64el_defconfig new file +87
-0@@ -0,0 +1,87 @@ +CONFIG_BOARD_QEMU_MALTA=y +CONFIG_CPU_LITTLE_ENDIAN=y +CONFIG_CPU_MIPS64_R2=y +CONFIG_64BIT=y +CONFIG_IMAGE_COMPRESSION_XZKERN=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x400000 +CONFIG_STACK_SIZE=0x7000 +CONFIG_EXPERIMENTAL=y +CONFIG_BAUDRATE=38400 +CONFIG_HUSH_FANCY_PROMPT=y +CONFIG_CMDLINE_EDITING=y +CONFIG_AUTO_COMPLETE=y +CONFIG_MENU=y +CONFIG_BOOTM_SHOW_TYPE=y +CONFIG_CONSOLE_ALLOW_COLOR=y +CONFIG_PARTITION=y +CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y +CONFIG_CMD_DMESG=y +CONFIG_LONGHELP=y +CONFIG_CMD_IOMEM=y +CONFIG_CMD_IMD=y +CONFIG_CMD_MEMINFO=y +CONFIG_CMD_GO=y +CONFIG_CMD_LOADB=y +CONFIG_CMD_LOADY=y +CONFIG_CMD_RESET=y +CONFIG_CMD_PARTITION=y +CONFIG_CMD_EXPORT=y +CONFIG_CMD_DEFAULTENV=y +CONFIG_CMD_LOADENV=y +CONFIG_CMD_PRINTENV=y +CONFIG_CMD_SAVEENV=y +CONFIG_CMD_MD5SUM=y +CONFIG_CMD_SHA1SUM=y +CONFIG_CMD_SHA256SUM=y +CONFIG_CMD_UNCOMPRESS=y +CONFIG_CMD_SLEEP=y +CONFIG_CMD_DHCP=y +CONFIG_CMD_MIITOOL=y +CONFIG_CMD_PING=y +CONFIG_CMD_TFTP=y +CONFIG_CMD_ECHO_E=y +CONFIG_CMD_EDIT=y +CONFIG_CMD_LOGIN=y +CONFIG_CMD_MENU=y +CONFIG_CMD_MENU_MANAGEMENT=y +CONFIG_CMD_PASSWD=y +CONFIG_CMD_FBTEST=y +CONFIG_CMD_READLINE=y +CONFIG_CMD_TIMEOUT=y +CONFIG_CMD_CRC=y +CONFIG_CMD_CRC_CMP=y +CONFIG_CMD_FLASH=y +CONFIG_CMD_GPIO=y +CONFIG_CMD_I2C=y +CONFIG_CMD_OF_NODE=y +CONFIG_CMD_OF_PROPERTY=y +CONFIG_CMD_OFTREE=y +CONFIG_CMD_TIME=y +CONFIG_NET=y +CONFIG_NET_NFS=y +CONFIG_NET_NETCONSOLE=y +CONFIG_OFDEVICE=y +CONFIG_OF_BAREBOX_DRIVERS=y +CONFIG_DRIVER_NET_RTL8139=y +# CONFIG_SPI is not set +CONFIG_I2C=y +CONFIG_I2C_GPIO=y +CONFIG_MTD=y +CONFIG_DRIVER_CFI=y +# CONFIG_DRIVER_CFI_AMD is not set +# CONFIG_DRIVER_CFI_BANK_WIDTH_1 is not set +# CONFIG_DRIVER_CFI_BANK_WIDTH_2 is not set +CONFIG_CFI_BUFFER_WRITE=y +CONFIG_VIDEO=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_DRIVER_VIDEO_BOCHS_PCI=y +CONFIG_GPIO_MALTA_FPGA_I2C=y +CONFIG_PCI=y +CONFIG_PCI_DEBUG=y +CONFIG_SYSCON_REBOOT_MODE=y +CONFIG_POWER_RESET_SYSCON=y +CONFIG_FS_CRAMFS=y +CONFIG_FS_TFTP=y +CONFIG_FS_FAT=y +CONFIG_FS_FAT_WRITE=y +CONFIG_FS_FAT_LFN=y
Signature · 4 lines
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 |
PATCH 2/3 test: mips: add QEMU Malta 64le labgrid config
In reply to Denis Orlov--- test/mips/qemu-malta64el_defconfig.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 test/mips/qemu-malta64el_defconfig.yaml
test/mips/qemu-malta64el_defconfig.yaml new file +22 -0
@@ -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 +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
Signature · 1 line
2.41.0
Re: [PATCH 2/3] test: mips: add QEMU Malta 64le labgrid config
Quoted 18 lines · Denis Orlov
Signed-off-by Denis Orlov <[email protected]>--- test/mips/qemu-malta64el_defconfig.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 test/mips/qemu-malta64el_defconfig.yamltest/mips/qemu-malta64el_defconfig.yaml new file +6
-0@@ -0,0 +1,22 @@ +targets: + main: + drivers: + QEMUDriver: + qemu_bin: qemu + machine: malta
test/mips/qemu-malta64el_defconfig.yaml line 16
Quoted 10 lines
test/mips/qemu-malta64el_defconfig.yaml new file +10
-0+ 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.
Quoted 6 lines
test/mips/qemu-malta64el_defconfig.yaml new file +6
-0+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
Signature · 4 lines
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 |
Re: [PATCH 2/3] test: mips: add QEMU Malta 64le labgrid config
Hello Ahmad,
Quoted 24 lines · Ahmad Fatoum
Quoted 22 lines · Denis Orlov
Signed-off-by Denis Orlov <[email protected]>--- test/mips/qemu-malta64el_defconfig.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 test/mips/qemu-malta64el_defconfig.yamltest/mips/qemu-malta64el_defconfig.yaml new file +10
-0@@ -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: ''
Quoted 8 lines
test/mips/qemu-malta64el_defconfig.yaml line 16
Quoted 6 lines
test/mips/qemu-malta64el_defconfig.yaml new file +6
-0+ BareboxDriver: + prompt: 'barebox@[^:]+:[^ ]+ ' + bootstring: 'commandline:' + BareboxTestStrategy: {} + features: + - virtio-pciDid 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?
Regards,
Denis
Quoted 14 lines
test/mips/qemu-malta64el_defconfig.yaml line 22
Quoted 7 lines
test/mips/qemu-malta64el_defconfig.yaml new file +6
-0+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 |
Re: [PATCH 2/3] test: mips: add QEMU Malta 64le labgrid config
Quoted 36 lines · Denis Orlov
Hello Ahmad,
Quoted 24 lines · Ahmad Fatoum
Quoted 22 lines · Denis Orlov
Signed-off-by Denis Orlov <[email protected]>--- test/mips/qemu-malta64el_defconfig.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 test/mips/qemu-malta64el_defconfig.yamltest/mips/qemu-malta64el_defconfig.yaml new file +10
-0@@ -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: ''Quoted 8 lines
test/mips/qemu-malta64el_defconfig.yaml line 16
Quoted 6 lines
test/mips/qemu-malta64el_defconfig.yaml new file +6
-0+ BareboxDriver: + prompt: 'barebox@[^:]+:[^ ]+ ' + bootstring: 'commandline:' + BareboxTestStrategy: {} + features: + - virtio-pciDid you test virtio PCI? I don't see it enabled in the defconfig.
Quoted 7 lines
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
Kconfigoption depends, there seem to be some issues with virtio PCI on MIPS withoutCONFIG_MMUset. Is the lack ofVIRTIO_PCIoption 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.
Cheers,
Ahmad
Quoted 19 lines
Regards,
DenisQuoted 14 lines
test/mips/qemu-malta64el_defconfig.yaml line 22
Quoted 7 lines
test/mips/qemu-malta64el_defconfig.yaml new file +6
-0+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 |
Signature · 4 lines
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 |
Re: [PATCH 2/3] test: mips: add QEMU Malta 64le labgrid config
Quoted 52 lines · Ahmad Fatoum
Quoted 36 lines · Denis Orlov
Hello Ahmad,
Quoted 24 lines · Ahmad Fatoum
Quoted 22 lines · Denis Orlov
Signed-off-by Denis Orlov <[email protected]>--- test/mips/qemu-malta64el_defconfig.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 test/mips/qemu-malta64el_defconfig.yamltest/mips/qemu-malta64el_defconfig.yaml new file +10
-0@@ -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: ''Quoted 8 lines
test/mips/qemu-malta64el_defconfig.yaml line 16
Quoted 6 lines
test/mips/qemu-malta64el_defconfig.yaml new file +6
-0+ BareboxDriver: + prompt: 'barebox@[^:]+:[^ ]+ ' + bootstring: 'commandline:' + BareboxTestStrategy: {} + features: + - virtio-pciDid you test virtio PCI? I don't see it enabled in the defconfig.
Quoted 7 lines
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
Kconfigoption depends, there seem to be some issues with virtio PCI on MIPS withoutCONFIG_MMUset. Is the lack ofVIRTIO_PCIoption in 32-bit malta defconfig related to that?Ah, right.
test/emulate.plreads 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 withCONFIG_MMU=nand see if it works, that would be great. Something like this should do it:
Quoted 8 lines
/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?
Quoted 30 lines
Cheers,
AhmadQuoted 19 lines
Regards,
DenisQuoted 14 lines
test/mips/qemu-malta64el_defconfig.yaml line 22
Quoted 7 lines
test/mips/qemu-malta64el_defconfig.yaml new file +6
-0+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 |
Re: [PATCH 2/3] test: mips: add QEMU Malta 64le labgrid config
Quoted 58 lines · Denis Orlov
Quoted 57 lines · Ahmad Fatoum
Quoted 36 lines · Denis Orlov
Hello Ahmad,
Quoted 24 lines · Ahmad Fatoum
Quoted 22 lines · Denis Orlov
Signed-off-by Denis Orlov <[email protected]>--- test/mips/qemu-malta64el_defconfig.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 test/mips/qemu-malta64el_defconfig.yamltest/mips/qemu-malta64el_defconfig.yaml new file +10
-0@@ -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: ''Quoted 8 lines
test/mips/qemu-malta64el_defconfig.yaml line 16
Quoted 6 lines
test/mips/qemu-malta64el_defconfig.yaml new file +6
-0+ BareboxDriver: + prompt: 'barebox@[^:]+:[^ ]+ ' + bootstring: 'commandline:' + BareboxTestStrategy: {} + features: + - virtio-pciDid you test virtio PCI? I don't see it enabled in the defconfig.
Quoted 7 lines
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
Kconfigoption depends, there seem to be some issues with virtio PCI on MIPS withoutCONFIG_MMUset. Is the lack ofVIRTIO_PCIoption in 32-bit malta defconfig related to that?Ah, right.
test/emulate.plreads 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 withCONFIG_MMU=nand 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
Quoted 8 lines
Quoted 3 lines
(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=yandCONFIG_MMU=nnow. The drive mounts successfully and I am able to look at its contents with "ls". So, does this mean that we should enable theVIRTIO_PCIoption 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.
Thanks for testing!
Ahmad
Quoted 32 lines
Quoted 31 lines
Cheers,
AhmadQuoted 19 lines
Regards,
DenisQuoted 14 lines
test/mips/qemu-malta64el_defconfig.yaml line 22
Quoted 7 lines
test/mips/qemu-malta64el_defconfig.yaml new file +6
-0+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 |
Signature · 4 lines
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 |
Re: [PATCH 2/3] test: mips: add QEMU Malta 64le labgrid config
Quoted 64 lines · Ahmad Fatoum
Quoted 62 lines · Denis Orlov
Quoted 60 lines · Ahmad Fatoum
Quoted 36 lines · Denis Orlov
Hello Ahmad,
Quoted 24 lines · Ahmad Fatoum
Quoted 22 lines · Denis Orlov
Signed-off-by Denis Orlov <[email protected]>--- test/mips/qemu-malta64el_defconfig.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 test/mips/qemu-malta64el_defconfig.yamltest/mips/qemu-malta64el_defconfig.yaml new file +10
-0@@ -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: ''Quoted 8 lines
test/mips/qemu-malta64el_defconfig.yaml line 16
Quoted 6 lines
test/mips/qemu-malta64el_defconfig.yaml new file +6
-0+ BareboxDriver: + prompt: 'barebox@[^:]+:[^ ]+ ' + bootstring: 'commandline:' + BareboxTestStrategy: {} + features: + - virtio-pciDid you test virtio PCI? I don't see it enabled in the defconfig.
Quoted 7 lines
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
Kconfigoption depends, there seem to be some issues with virtio PCI on MIPS withoutCONFIG_MMUset. Is the lack ofVIRTIO_PCIoption in 32-bit malta defconfig related to that?Ah, right.
test/emulate.plreads 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 withCONFIG_MMU=nand 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.
Quoted 7 lines
Quoted 4 lines
Yeah, it seems that this works on both
CONFIG_MMU=yandCONFIG_MMU=nnow. The drive mounts successfully and I am able to look at its contents with "ls". So, does this mean that we should enable theVIRTIO_PCIoption in malta defconfigs?Even for 32-bit? Ye, then we can drop the depends line in
VIRTIO_PCIand 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?
Quoted 43 lines
Thanks for testing!
AhmadQuoted 25 lines
Quoted 25 lines
Cheers,
AhmadQuoted 19 lines
Regards,
DenisQuoted 14 lines
test/mips/qemu-malta64el_defconfig.yaml line 22
Quoted 7 lines
test/mips/qemu-malta64el_defconfig.yaml new file +6
-0+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 |Quoted 7 lines
Quoted 6 lines
--
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 |
Re: [PATCH 2/3] test: mips: add QEMU Malta 64le labgrid config
Quoted 70 lines · Denis Orlov
Quoted 69 lines · Ahmad Fatoum
Quoted 66 lines · Denis Orlov
Quoted 52 lines · Ahmad Fatoum
Quoted 36 lines · Denis Orlov
Hello Ahmad,
Quoted 24 lines · Ahmad Fatoum
Quoted 22 lines · Denis Orlov
Signed-off-by Denis Orlov <[email protected]>--- test/mips/qemu-malta64el_defconfig.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 test/mips/qemu-malta64el_defconfig.yamltest/mips/qemu-malta64el_defconfig.yaml new file +10
-0@@ -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: ''Quoted 8 lines
test/mips/qemu-malta64el_defconfig.yaml line 16
Quoted 6 lines
test/mips/qemu-malta64el_defconfig.yaml new file +6
-0+ BareboxDriver: + prompt: 'barebox@[^:]+:[^ ]+ ' + bootstring: 'commandline:' + BareboxTestStrategy: {} + features: + - virtio-pciDid you test virtio PCI? I don't see it enabled in the defconfig.
Quoted 7 lines
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
Kconfigoption depends, there seem to be some issues with virtio PCI on MIPS withoutCONFIG_MMUset. Is the lack ofVIRTIO_PCIoption in 32-bit malta defconfig related to that?Ah, right.
test/emulate.plreads 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 withCONFIG_MMU=nand see if it works, that would be great. Something like this should do it:Quoted 8 lines
/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=yandCONFIG_MMU=nnow. The drive mounts successfully and I am able to look at its contents with "ls". So, does this mean that we should enable theVIRTIO_PCIoption in malta defconfigs?
Quoted 6 lines
Quoted 2 lines
Even for 32-bit? Ye, then we can drop the depends line in
VIRTIO_PCIand enable it in the MIPS defconfigs.Yep, 32-bit with
CONFIG_MMU=nworks too. I will send a patch later today. ShouldCONFIG_DISKandCONFIG_VIRTIO_BLKalso be enabled in those by default?
Given that size is not a constraint for malta, I'd suggest enabling everything Virt I/O related:
CONFIG_VIRTIO_MENU=y
CONFIG_VIRTIO_PCI=y
CONFIG_VIRTIO_CONSOLE=y
CONFIG_VIRTIO_BLK=y
CONFIG_HWRNG=y
CONFIG_HW_RANDOM_VIRTIO=y
CONFIG_VIRTIO_INPUT=y
and their dependencies.
Thanks for looking into this,
Ahmad
Quoted 45 lines
Quoted 44 lines
Thanks for testing!
AhmadQuoted 25 lines
Quoted 25 lines
Cheers,
AhmadQuoted 19 lines
Regards,
DenisQuoted 14 lines
test/mips/qemu-malta64el_defconfig.yaml line 22
Quoted 7 lines
test/mips/qemu-malta64el_defconfig.yaml new file +6
-0+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 |Quoted 7 lines
Quoted 6 lines
--
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 |
Signature · 4 lines
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 |
PATCH 3/3 ci: add a job for testing 64BIT MIPS with labgrid
In reply to Denis Orlov--- .github/workflows/test-labgrid-pytest.yml | 4 ++++ 1 file changed, 4 insertions(+)
.github/workflows/test-labgrid-pytest.yml +4 -0
@@ -26,6 +26,10 @@ jobs: lgenv: test/mips/qemu-malta_defconfig.yaml defconfig: qemu-malta_defconfig + - ARCH: mips + lgenv: test/mips/qemu-malta64el_defconfig.yaml + defconfig: qemu-malta64el_defconfig + - ARCH: x86 lgenv: test/x86/efi_defconfig.yaml defconfig: efi_defconfig
Signature · 1 line
2.41.0
Re: [PATCH 3/3] ci: add a job for testing 64BIT MIPS with labgrid
Quoted 1 line · Denis Orlov
Signed-off-by Denis Orlov <[email protected]>
https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.1.0/
has a dedicated mips64 toolchain. Given that you don't touch the Containerfile, I assume this means that the normal toolchain can compile both 32- and 64-bit?
If so,
Quoted 19 lines
--- .github/workflows/test-labgrid-pytest.yml | 4 ++++ 1 file changed, 4 insertions(+).github/workflows/test-labgrid-pytest.yml +4
-0@@ -26,6 +26,10 @@ jobs: lgenv: test/mips/qemu-malta_defconfig.yaml defconfig: qemu-malta_defconfig + - ARCH: mips + lgenv: test/mips/qemu-malta64el_defconfig.yaml + defconfig: qemu-malta64el_defconfig + - ARCH: x86 lgenv: test/x86/efi_defconfig.yaml defconfig: efi_defconfig
Signature · 4 lines
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 |
Re: [PATCH 3/3] ci: add a job for testing 64BIT MIPS with labgrid
Quoted 7 lines · Ahmad Fatoum
Quoted 1 line · Denis Orlov
Signed-off-by Denis Orlov <[email protected]>https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.1.0/
has a dedicated mips64 toolchain. Given that you don't touch the Containerfile, I assume this means that the normal toolchain can compile both 32- and 64-bit?
Well, it seems so, judging by the fact that I had run CI successfully on my GitHub repo. I guess the main difference between mips and mips64 toolchains is the default compile configuration values. On debian there are also many different MIPS compilers (mips-linux-gnu-, mipsel-linux-gnu-, mips64-linux-gnuabi64-, mips64el-linux-gnuabi64-, and others) available, however I am compiling barebox/Linux successfully with the mips-linux-gnu- one when the correct target endianness/ABI options are being passed. Maybe there are other differences, but I don't know of them.
Regards,
Denis
Quoted 31 lines
If so,
Reviewed-by Ahmad Fatoum <[email protected]>Quoted 9 lines
--- .github/workflows/test-labgrid-pytest.yml | 4 ++++ 1 file changed, 4 insertions(+).github/workflows/test-labgrid-pytest.yml +0
-0.github/workflows/test-labgrid-pytest.yml jobs: · line 35
Quoted 10 lines
.github/workflows/test-labgrid-pytest.yml +4
-0@@ -26,6 +26,10 @@ jobs: lgenv: test/mips/qemu-malta_defconfig.yaml defconfig: qemu-malta_defconfig + - ARCH: mips + lgenv: test/mips/qemu-malta64el_defconfig.yaml + defconfig: qemu-malta64el_defconfig + - ARCH: x86 lgenv: test/x86/efi_defconfig.yaml defconfig: efi_defconfig--
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 |
Sascha Hauer
AppliedQuoted 10 lines · Denis Orlov
This adds a necessary defconfig and labgrid configuration file together with the corresponding CI job for building and testing the MIPS image with 64BIT option set.
I've decided against giving the defconfig a generic name such as
mips64_defconfig. For now, only Malta running in QEMU is really supported, so naming it as that seems more fitting for me. And if more MIPS64 boards will get support in the future, then this defconfig might be renamed appropriately.
Quoted 4 lines
Denis Orlov (3):
MIPS: add qemu-malta64el_defconfig
test: mips: add QEMU Malta 64le labgrid config
ci: add a job for testing 64BIT MIPS with labgrid
Applied, thanks
Sascha
Quoted 12 lines
.github/workflows/test-labgrid-pytest.yml | 4 + arch/mips/configs/qemu-malta64el_defconfig | 87 ++++++++++++++++++++++ test/mips/qemu-malta64el_defconfig.yaml | 22 ++++++ 3 files changed, 113 insertions(+) create mode 100644 arch/mips/configs/qemu-malta64el_defconfig create mode 100644 test/mips/qemu-malta64el_defconfig.yamlSignature · 1 line
2.41.0
Signature · 4 lines
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 |