Add simple Linux kernel boot tests for BookE 64-bit and 32-bit CPUs
using Guenter Roeck's rootfs images for Linux testing, and a gitlab
repository with kernel images that I built since there are very few
sources of modern BookE images now.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
tests/avocado/boot_linux_console.py | 53 +++++++++++++++++++++++++++++
1 file changed, 53 insertions(+)
diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux_console.py
index 9434304cd3..dc3346ef49 100644
--- a/tests/avocado/boot_linux_console.py
+++ b/tests/avocado/boot_linux_console.py
@@ -1355,6 +1355,59 @@ def test_ppc64_e500(self):
tar_hash = '6951d86d644b302898da2fd701739c9406527fe1'
self.do_test_advcal_2018('19', tar_hash, 'uImage')
+ def test_ppc64_e6500(self):
+ """
+ :avocado: tags=arch:ppc64
+ :avocado: tags=machine:ppce500
+ :avocado: tags=cpu:e6500
+ :avocado: tags=accel:tcg
+ """
+ kernel_url = ('https://gitlab.com/npiggin/qemu-ci-images/-/raw/main/ppc/corenet64_vmlinux?ref_type=heads&inline=false')
+ kernel_hash = '01051590b083fec66cb3b9e2e553e95d4cf47691'
+ kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
+
+ initrd_url = ('https://github.com/groeck/linux-build-test/raw/master/rootfs/ppc64/rootfs.cpio.gz')
+ initrd_hash = '798acffc036c3b1ae6cacf95c869bba2'
+ initrd_path = self.fetch_asset(initrd_url, asset_hash=initrd_hash,
+ algorithm="md5")
+
+ self.vm.set_console()
+ kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE
+ self.vm.add_args('-smp', '2',
+ '-kernel', kernel_path,
+ '-initrd', initrd_path,
+ '-append', kernel_command_line,
+ '-no-reboot')
+ self.vm.launch()
+ # Wait for VM to shut down gracefully
+ self.vm.wait()
+
+ def test_ppc32_mpc85xx(self):
+ """
+ :avocado: tags=arch:ppc
+ :avocado: tags=machine:ppce500
+ :avocado: tags=cpu:mpc8568
+ :avocado: tags=accel:tcg
+ """
+ kernel_url = ('https://gitlab.com/npiggin/qemu-ci-images/-/raw/main/ppc/mpc85xx_vmlinux?ref_type=heads&inline=false')
+ kernel_hash = '726f7f574a491282454850b48546b3827593142b'
+ kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
+
+ initrd_url = ('https://github.com/groeck/linux-build-test/raw/master/rootfs/ppc/rootfs.cpio.gz')
+ initrd_hash = '4d30fa93b742c493e8cf2140e49bbd9a'
+ initrd_path = self.fetch_asset(initrd_url, asset_hash=initrd_hash,
+ algorithm="md5")
+
+ self.vm.set_console()
+ kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE
+ self.vm.add_args('-kernel', kernel_path,
+ '-initrd', initrd_path,
+ '-append', kernel_command_line,
+ '-no-reboot')
+ self.vm.launch()
+ # Wait for VM to shut down gracefully
+ self.vm.wait()
+
def do_test_ppc64_powernv(self, proc):
self.require_accelerator("tcg")
images_url = ('https://github.com/open-power/op-build/releases/download/v2.7/')
--
2.42.0
On 10/10/23 09:52, Nicholas Piggin wrote:
> Add simple Linux kernel boot tests for BookE 64-bit and 32-bit CPUs
> using Guenter Roeck's rootfs images for Linux testing, and a gitlab
> repository with kernel images that I built since there are very few
> sources of modern BookE images now.
>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> ---
> tests/avocado/boot_linux_console.py | 53 +++++++++++++++++++++++++++++
> 1 file changed, 53 insertions(+)
>
> diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux_console.py
> index 9434304cd3..dc3346ef49 100644
> --- a/tests/avocado/boot_linux_console.py
> +++ b/tests/avocado/boot_linux_console.py
> @@ -1355,6 +1355,59 @@ def test_ppc64_e500(self):
> tar_hash = '6951d86d644b302898da2fd701739c9406527fe1'
> self.do_test_advcal_2018('19', tar_hash, 'uImage')
>
> + def test_ppc64_e6500(self):
> + """
> + :avocado: tags=arch:ppc64
> + :avocado: tags=machine:ppce500
> + :avocado: tags=cpu:e6500
> + :avocado: tags=accel:tcg
> + """
> + kernel_url = ('https://gitlab.com/npiggin/qemu-ci-images/-/raw/main/ppc/corenet64_vmlinux?ref_type=heads&inline=false')
> + kernel_hash = '01051590b083fec66cb3b9e2e553e95d4cf47691'
> + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
> +
> + initrd_url = ('https://github.com/groeck/linux-build-test/raw/master/rootfs/ppc64/rootfs.cpio.gz')
I think you should use buildroot images from the qemu_ppc64_e5500 defconfig:
https://github.com/buildroot/buildroot/tree/master/board/qemu/ppc64-e5500
The question is where to store them. I did under my GH account for PPC and
Aspeed but it is not satisfactory in the long term.
May be could have a common repo for all the buildroot QEMU boards images ?
and rebuild once a year ?
Thanks,
C.
> + initrd_hash = '798acffc036c3b1ae6cacf95c869bba2'
> + initrd_path = self.fetch_asset(initrd_url, asset_hash=initrd_hash,
> + algorithm="md5")
> +
> + self.vm.set_console()
> + kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE
> + self.vm.add_args('-smp', '2',
> + '-kernel', kernel_path,
> + '-initrd', initrd_path,
> + '-append', kernel_command_line,
> + '-no-reboot')
> + self.vm.launch()
> + # Wait for VM to shut down gracefully
> + self.vm.wait()
> +
> + def test_ppc32_mpc85xx(self):
> + """
> + :avocado: tags=arch:ppc
> + :avocado: tags=machine:ppce500
> + :avocado: tags=cpu:mpc8568
> + :avocado: tags=accel:tcg
> + """
> + kernel_url = ('https://gitlab.com/npiggin/qemu-ci-images/-/raw/main/ppc/mpc85xx_vmlinux?ref_type=heads&inline=false')
> + kernel_hash = '726f7f574a491282454850b48546b3827593142b'
> + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
> +
> + initrd_url = ('https://github.com/groeck/linux-build-test/raw/master/rootfs/ppc/rootfs.cpio.gz')
> + initrd_hash = '4d30fa93b742c493e8cf2140e49bbd9a'
> + initrd_path = self.fetch_asset(initrd_url, asset_hash=initrd_hash,
> + algorithm="md5")
> +
> + self.vm.set_console()
> + kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE
> + self.vm.add_args('-kernel', kernel_path,
> + '-initrd', initrd_path,
> + '-append', kernel_command_line,
> + '-no-reboot')
> + self.vm.launch()
> + # Wait for VM to shut down gracefully
> + self.vm.wait()
> +
> def do_test_ppc64_powernv(self, proc):
> self.require_accelerator("tcg")
> images_url = ('https://github.com/open-power/op-build/releases/download/v2.7/')
On Tue, 10 Oct 2023 at 18:23, Nicholas Piggin <npiggin@gmail.com> wrote:
>
> Add simple Linux kernel boot tests for BookE 64-bit and 32-bit CPUs
> using Guenter Roeck's rootfs images for Linux testing, and a gitlab
> repository with kernel images that I built since there are very few
> sources of modern BookE images now.
>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Should we get mpe to add a https://github.com/linuxppc/qemu-ci-images
for you to keep those kernel images? But perhaps you'd prefer to keep
them on gitlab. Just a suggestion.
> ---
> tests/avocado/boot_linux_console.py | 53 +++++++++++++++++++++++++++++
> 1 file changed, 53 insertions(+)
>
> diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux_console.py
> index 9434304cd3..dc3346ef49 100644
> --- a/tests/avocado/boot_linux_console.py
> +++ b/tests/avocado/boot_linux_console.py
> @@ -1355,6 +1355,59 @@ def test_ppc64_e500(self):
> tar_hash = '6951d86d644b302898da2fd701739c9406527fe1'
> self.do_test_advcal_2018('19', tar_hash, 'uImage')
>
> + def test_ppc64_e6500(self):
> + """
> + :avocado: tags=arch:ppc64
> + :avocado: tags=machine:ppce500
> + :avocado: tags=cpu:e6500
> + :avocado: tags=accel:tcg
> + """
> + kernel_url = ('https://gitlab.com/npiggin/qemu-ci-images/-/raw/main/ppc/corenet64_vmlinux?ref_type=heads&inline=false')
Is the ref_type?heads=inline-false required? I seem to get the file
successfully with wget and those omitted.
> + kernel_hash = '01051590b083fec66cb3b9e2e553e95d4cf47691'
> + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
> +
> + initrd_url = ('https://github.com/groeck/linux-build-test/raw/master/rootfs/ppc64/rootfs.cpio.gz')
> + initrd_hash = '798acffc036c3b1ae6cacf95c869bba2'
> + initrd_path = self.fetch_asset(initrd_url, asset_hash=initrd_hash,
> + algorithm="md5")
> +
> + self.vm.set_console()
> + kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE
> + self.vm.add_args('-smp', '2',
> + '-kernel', kernel_path,
> + '-initrd', initrd_path,
> + '-append', kernel_command_line,
> + '-no-reboot')
> + self.vm.launch()
> + # Wait for VM to shut down gracefully
> + self.vm.wait()
> +
> + def test_ppc32_mpc85xx(self):
> + """
> + :avocado: tags=arch:ppc
> + :avocado: tags=machine:ppce500
> + :avocado: tags=cpu:mpc8568
> + :avocado: tags=accel:tcg
> + """
> + kernel_url = ('https://gitlab.com/npiggin/qemu-ci-images/-/raw/main/ppc/mpc85xx_vmlinux?ref_type=heads&inline=false')
> + kernel_hash = '726f7f574a491282454850b48546b3827593142b'
> + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
> +
> + initrd_url = ('https://github.com/groeck/linux-build-test/raw/master/rootfs/ppc/rootfs.cpio.gz')
> + initrd_hash = '4d30fa93b742c493e8cf2140e49bbd9a'
> + initrd_path = self.fetch_asset(initrd_url, asset_hash=initrd_hash,
> + algorithm="md5")
> +
> + self.vm.set_console()
> + kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE
> + self.vm.add_args('-kernel', kernel_path,
> + '-initrd', initrd_path,
> + '-append', kernel_command_line,
> + '-no-reboot')
> + self.vm.launch()
> + # Wait for VM to shut down gracefully
> + self.vm.wait()
> +
> def do_test_ppc64_powernv(self, proc):
> self.require_accelerator("tcg")
> images_url = ('https://github.com/open-power/op-build/releases/download/v2.7/')
> --
> 2.42.0
>
>
On Tue Oct 10, 2023 at 10:03 PM AEST, Joel Stanley wrote:
> On Tue, 10 Oct 2023 at 18:23, Nicholas Piggin <npiggin@gmail.com> wrote:
> >
> > Add simple Linux kernel boot tests for BookE 64-bit and 32-bit CPUs
> > using Guenter Roeck's rootfs images for Linux testing, and a gitlab
> > repository with kernel images that I built since there are very few
> > sources of modern BookE images now.
> >
> > Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
>
> Reviewed-by: Joel Stanley <joel@jms.id.au>
>
> Should we get mpe to add a https://github.com/linuxppc/qemu-ci-images
> for you to keep those kernel images? But perhaps you'd prefer to keep
> them on gitlab. Just a suggestion.
Not a bad idea. Or we could try for gitlab/qemu/ci-images I suppose.
>
> > ---
> > tests/avocado/boot_linux_console.py | 53 +++++++++++++++++++++++++++++
> > 1 file changed, 53 insertions(+)
> >
> > diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux_console.py
> > index 9434304cd3..dc3346ef49 100644
> > --- a/tests/avocado/boot_linux_console.py
> > +++ b/tests/avocado/boot_linux_console.py
> > @@ -1355,6 +1355,59 @@ def test_ppc64_e500(self):
> > tar_hash = '6951d86d644b302898da2fd701739c9406527fe1'
> > self.do_test_advcal_2018('19', tar_hash, 'uImage')
> >
> > + def test_ppc64_e6500(self):
> > + """
> > + :avocado: tags=arch:ppc64
> > + :avocado: tags=machine:ppce500
> > + :avocado: tags=cpu:e6500
> > + :avocado: tags=accel:tcg
> > + """
> > + kernel_url = ('https://gitlab.com/npiggin/qemu-ci-images/-/raw/main/ppc/corenet64_vmlinux?ref_type=heads&inline=false')
>
> Is the ref_type?heads=inline-false required? I seem to get the file
> successfully with wget and those omitted.
I just copied the download link, so if it works without then
I'll remove it.
Thanks,
Nick
On 10/10/23 22:53, Nicholas Piggin wrote:
> On Tue Oct 10, 2023 at 10:03 PM AEST, Joel Stanley wrote:
>> On Tue, 10 Oct 2023 at 18:23, Nicholas Piggin <npiggin@gmail.com> wrote:
>>>
>>> Add simple Linux kernel boot tests for BookE 64-bit and 32-bit CPUs
>>> using Guenter Roeck's rootfs images for Linux testing, and a gitlab
>>> repository with kernel images that I built since there are very few
>>> sources of modern BookE images now.
>>>
>>> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
>>
>> Reviewed-by: Joel Stanley <joel@jms.id.au>
>>
>> Should we get mpe to add a https://github.com/linuxppc/qemu-ci-images
>> for you to keep those kernel images? But perhaps you'd prefer to keep
>> them on gitlab. Just a suggestion.
>
> Not a bad idea. Or we could try for gitlab/qemu/ci-images I suppose.
Feel free to take these :
https://github.com/legoater/qemu-ppc-boot/tree/main/buildroot
Supported machines
prep/ppc 604 CPU
ref405ep/ppc 405EP CPU
bamboo/ppc 440EP CPU
sam460ex/ppc 460EX CPU (equivalent to a 440)
g3beige/ppc G3 CPU
mac99/ppc G4 CPU
e500mc/ppc e500mc CPU
mpc8544ds/ppc e500v2 CPU
ppce500/ppc64 e5500, e6500
mac99/ppc64 970 CPU with 64bit and 32bit user space
pseries/ppc64 POWER5+, 970, 970MP, POWER7
pseries/ppc64le POWER8, POWER9, POWER10
powernv8/ppc64le POWER8 HV CPU
powernv9/ppc64le POWER9 HV CPU
Thanks,
C.
>
>>
>>> ---
>>> tests/avocado/boot_linux_console.py | 53 +++++++++++++++++++++++++++++
>>> 1 file changed, 53 insertions(+)
>>>
>>> diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux_console.py
>>> index 9434304cd3..dc3346ef49 100644
>>> --- a/tests/avocado/boot_linux_console.py
>>> +++ b/tests/avocado/boot_linux_console.py
>>> @@ -1355,6 +1355,59 @@ def test_ppc64_e500(self):
>>> tar_hash = '6951d86d644b302898da2fd701739c9406527fe1'
>>> self.do_test_advcal_2018('19', tar_hash, 'uImage')
>>>
>>> + def test_ppc64_e6500(self):
>>> + """
>>> + :avocado: tags=arch:ppc64
>>> + :avocado: tags=machine:ppce500
>>> + :avocado: tags=cpu:e6500
>>> + :avocado: tags=accel:tcg
>>> + """
>>> + kernel_url = ('https://gitlab.com/npiggin/qemu-ci-images/-/raw/main/ppc/corenet64_vmlinux?ref_type=heads&inline=false')
>>
>> Is the ref_type?heads=inline-false required? I seem to get the file
>> successfully with wget and those omitted.
>
> I just copied the download link, so if it works without then
> I'll remove it.
>
> Thanks,
> Nick
>
On 10/10/23 09:52, Nicholas Piggin wrote: > Add simple Linux kernel boot tests for BookE 64-bit and 32-bit CPUs > using Guenter Roeck's rootfs images for Linux testing, and a gitlab > repository with kernel images that I built since there are very few > sources of modern BookE images now. > > Signed-off-by: Nicholas Piggin <npiggin@gmail.com> > --- > tests/avocado/boot_linux_console.py | 53 +++++++++++++++++++++++++++++ > 1 file changed, 53 insertions(+) Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
© 2016 - 2026 Red Hat, Inc.