configs/qemu: Add a ppc64le-powernv8 configuration
PATCH 1/3 configs/qemu: Add a ppc64le-powernv8 configuration
PowerNV is the platform using the OPAL [1] firmware on OpenPOWER systems. OPAL first loads a kernel and an initramfs image based on buildroot including a second boot loader petitboot [2]. The latter does device discovery and kexecs a new Linux image from disk or network.
QEMU implements PowerNV machines [3] for the POWER8, POWER9 and Power10 processors which are used for dev and tests. POWER8 images being compatible with POWER9 and Power10, simply add a single qemu_ppc64le_powernv8 board for all.
The QEMU script boots directly from a nvme disk because it is simple enough but a real system would boot from a ramfs first.
[1] https://github.com/open-power/skiboot/blob/master/doc/overview.rst
[2] https://github.com/open-power/petitboot/
[3] https://qemu.readthedocs.io/en/latest/system/ppc/powernv.html
--- board/qemu/ppc64le-powernv8/readme.txt | 5 +++++ configs/qemu_ppc64le_powernv8_defconfig | 29 +++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 board/qemu/ppc64le-powernv8/readme.txt create mode 100644 configs/qemu_ppc64le_powernv8_defconfig
board/qemu/ppc64le-powernv8/readme.txt new file +5 -0
@@ -0,0 +1,5 @@ +Run the emulation with: + +qemu-system-ppc64 -M powernv9 -kernel vmlinux -append "console=hvc0 rootwait root=/dev/nvme0n1" -device nvme,bus=pcie.3,addr=0x0,drive=drive0,serial=1234 -drive file=./rootfs.ext2,if=none,id=drive0,format=raw,cache=none -device e1000e,netdev=net0,mac=C0:FF:EE:00:01:03,bus=pcie.1,addr=0x0 -netdev user,id=net0 -serial mon:stdio -nographic # qemu_ppc64le_powernv8_defconfig + +The login prompt will appear in the terminal window.
configs/qemu_ppc64le_powernv8_defconfig new file +29 -0
@@ -0,0 +1,29 @@ +# Architecture +BR2_powerpc64le=y +BR2_powerpc_power8=y + +# System +BR2_TARGET_GENERIC_GETTY_PORT="hvc0" +BR2_SYSTEM_DHCP="eth0" + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +# BR2_TARGET_ROOTFS_TAR is not set + +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# Linux headers same as kernel +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_15=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15" +BR2_LINUX_KERNEL_DEFCONFIG="powernv" +BR2_LINUX_KERNEL_VMLINUX=y + +# host-qemu for gitlab testing +BR2_PACKAGE_HOST_QEMU=y +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
Signature · 6 lines
2.31.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
oops. I sent the patchset twice. Sorry for the noise.
C.
Quoted 63 lines · Cédric Le Goater
PowerNV is the platform using the OPAL [1] firmware on OpenPOWER systems. OPAL first loads a kernel and an initramfs image based on buildroot including a second boot loader petitboot [2]. The latter does device discovery and kexecs a new Linux image from disk or network.
QEMU implements PowerNV machines [3] for the POWER8, POWER9 and Power10 processors which are used for dev and tests. POWER8 images being compatible with POWER9 and Power10, simply add a single
qemu_ppc64le_powernv8board for all.The QEMU script boots directly from a nvme disk because it is simple enough but a real system would boot from a ramfs first.
[1] https://github.com/open-power/skiboot/blob/master/doc/overview.rst
[2] https://github.com/open-power/petitboot/
[3] https://qemu.readthedocs.io/en/latest/system/ppc/powernv.htmlSigned-off-by Cédric Le Goater <[email protected]>--- board/qemu/ppc64le-powernv8/readme.txt | 5 +++++ configs/qemu_ppc64le_powernv8_defconfig | 29 +++++++++++++++++++++++++ 2 files changed, 34 insertions(+)create mode 100644
board/qemu/ppc64le-powernv8/readme.txtcreate mode 100644 configs/qemu_ppc64le_powernv8_defconfigboard/qemu/ppc64le-powernv8/readme.txt new file +5
-0@@ -0,0 +1,5 @@ +Run the emulation with: + +qemu-system-ppc64 -M powernv9 -kernel vmlinux -append "console=hvc0 rootwait root=/dev/nvme0n1" -device nvme,bus=pcie.3,addr=0x0,drive=drive0,serial=1234 -drive file=./rootfs.ext2,if=none,id=drive0,format=raw,cache=none -device e1000e,netdev=net0,mac=C0:FF:EE:00:01:03,bus=pcie.1,addr=0x0 -netdev user,id=net0 -serial mon:stdio -nographic # qemu_ppc64le_powernv8_defconfig + +The login prompt will appear in the terminal window.configs/qemu_ppc64le_powernv8_defconfig new file +19
-0@@ -0,0 +1,29 @@ +# Architecture +BR2_powerpc64le=y +BR2_powerpc_power8=y + +# System +BR2_TARGET_GENERIC_GETTY_PORT="hvc0" +BR2_SYSTEM_DHCP="eth0" + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +# BR2_TARGET_ROOTFS_TAR is not set + +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# Linux headers same as kernel +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_15=y +
configs/qemu_ppc64le_powernv8_defconfig line 29
Quoted 10 lines
configs/qemu_ppc64le_powernv8_defconfig new file +10
-0+# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15" +BR2_LINUX_KERNEL_DEFCONFIG="powernv" +BR2_LINUX_KERNEL_VMLINUX=y + +# host-qemu for gitlab testing +BR2_PACKAGE_HOST_QEMU=y +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 2/3 configs/qemu: Add a ppc-bamboo configuration
In reply to Cédric Le GoaterThe Bamboo board is an evaluation board for PowerPC 440EP CPUs.
--- board/qemu/ppc-bamboo/linux.fragment | 6 +++++ board/qemu/ppc-bamboo/readme.txt | 5 ++++ configs/qemu_ppc_bamboo_defconfig | 36 ++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 board/qemu/ppc-bamboo/linux.fragment create mode 100644 board/qemu/ppc-bamboo/readme.txt create mode 100644 configs/qemu_ppc_bamboo_defconfig
board/qemu/ppc-bamboo/linux.fragment new file +6 -0
@@ -0,0 +1,6 @@ +# Enable virtio (blk, rng and net devices) +CONFIG_VIRTIO=y +CONFIG_VIRTIO_PCI=y +CONFIG_HW_RANDOM_VIRTIO=y +CONFIG_VIRTIO_BLK=y +CONFIG_VIRTIO_NET=y
board/qemu/ppc-bamboo/readme.txt new file +5 -0
@@ -0,0 +1,5 @@ +Run the emulation with: + +qemu-system-ppc -nographic -M bamboo -kernel vmlinux -net nic,model=virtio-net-pci -net user # qemu_ppc_bamboo_defconfig + +The login prompt will appear in the terminal that started Qemu.
configs/qemu_ppc_bamboo_defconfig new file +36 -0
@@ -0,0 +1,36 @@ +# Architecture +BR2_powerpc=y +BR2_powerpc_440fp=y + +# System +BR2_SYSTEM_DHCP="eth0" + +# Filesystem +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_ROOTFS_INITRAMFS=y + +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# Linux headers same as kernel +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_15=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15" +BR2_LINUX_KERNEL_DEFCONFIG="44x/bamboo" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/qemu/ppc-bamboo/linux.fragment" +BR2_LINUX_KERNEL_VMLINUX=y + +# Serial port config +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" + +# Kernel needs mkimage +BR2_PACKAGE_HOST_UBOOT_TOOLS=y + +# host-qemu for gitlab testing +BR2_PACKAGE_HOST_QEMU=y +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
Signature · 6 lines
2.31.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hello Cédric,
Quoted 18 lines · On Mon, 10 Jan 2022 22:02:33 +0100 Cédric Le Goater <[email protected]> wrote:
PowerNV is the platform using the OPAL [1] firmware on OpenPOWER systems. OPAL first loads a kernel and an initramfs image based on buildroot including a second boot loader petitboot [2]. The latter does device discovery and kexecs a new Linux image from disk or network.
QEMU implements PowerNV machines [3] for the POWER8, POWER9 and Power10 processors which are used for dev and tests. POWER8 images being compatible with POWER9 and Power10, simply add a single
qemu_ppc64le_powernv8board for all.The QEMU script boots directly from a nvme disk because it is simple enough but a real system would boot from a ramfs first.
[1] https://github.com/open-power/skiboot/blob/master/doc/overview.rst
[2] https://github.com/open-power/petitboot/
[3] https://qemu.readthedocs.io/en/latest/system/ppc/powernv.html
Quoted 7 lines
Signed-off-by Cédric Le Goater <[email protected]>--- board/qemu/ppc64le-powernv8/readme.txt | 5 +++++ configs/qemu_ppc64le_powernv8_defconfig | 29 +++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 board/qemu/ppc64le-powernv8/readme.txt create mode 100644 configs/qemu_ppc64le_powernv8_defconfig
Thanks, entire patch series applied. One small change was done: add appropriate entries to the DEVELOPERS file, so that we know who to contact for those defconfigs :-) Especially if our Gitlab CI infrastructure detects build issues, you will be notified.
Since you are a PowerPC expert, I'd like to take this opportunity to ask you about the toolchains we're providing at
https://toolchains.bootlin.com/. For the moment for PowerPC, we are providing the following toolchains:
powerpc-440fp, not tested
powerpc64-e5500, tested with qemu_ppc64_e5500_defconfig powerpc64-e6500, not tested
powerpc64le-power8, tested with qemu_ppc64le_pseries_defconfig powerpc64-power8, tested with qemu_ppc64_pseries_defconfig powerpc-e300c3, not tested
powerpc-e500mc, not tested
I suppose I could now test the powerpc-440fp toolchain with the qemu_ppc_bamboo_defconfig you have added. Is that correct?
What about the other toolchain configurations? Is there some matching Qemu emulation?
And generally speaking, does this selection of PowerPC architecture variants make sense to offer pre-compiled toolchains? For quite a while, we've had requests for other PowerPC variants:
https://github.com/bootlin/toolchains-builder/issues/2. Your input would be very welcome :-)
Thanks!
Thomas
Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hello Thomas,
Quoted 4 lines
Thanks, entire patch series applied. One small change was done: add appropriate entries to the DEVELOPERS file, so that we know who to contact for those defconfigs :-) Especially if our Gitlab CI infrastructure detects build issues, you will be notified.
sure. I have a generated set here :
https://github.com/legoater/qemu-ppc-boot/tree/main/buildroot
that I use for non regression on QEMU PPC.
Quoted 6 lines
Since you are a PowerPC expert, I'd like to take this opportunity to ask you about the toolchains we're providing at
https://toolchains.bootlin.com/. For the moment for PowerPC, we are providing the following toolchains:powerpc-440fp, not tested
The bamboo machine uses a 440EP CPU implementation, which has a floating point unit.
Quoted 2 lines
powerpc64-e5500, tested with
qemu_ppc64_e5500_defconfigpowerpc64-e6500, not tested
e6500 is nearly the same CPU as e5500. AFAIK, the main differences are altivec instructions and more HV support for guest translations.
More info here :
https://www.linux-kvm.org/page/E500_virtual_CPU_specification
Quoted 4 lines
powerpc64le-power8, tested with
qemu_ppc64le_pseries_defconfigpowerpc64-power8, tested withqemu_ppc64_pseries_defconfigpowerpc-e300c3, not tested
powerpc-e500mc, not tested
you could use the 32bit ppce500 machine for that.
Quoted 2 lines
I suppose I could now test the powerpc-440fp toolchain with the
qemu_ppc_bamboo_defconfigyou have added. Is that correct?
yes.
Quoted 4 lines
What about the other toolchain configurations? Is there some matching Qemu emulation?>
And generally speaking, does this selection of PowerPC architecture variants make sense to offer pre-compiled toolchains? For quite a
Here is a quick status of machine/CPUs that QEMU implements :
* prep
prep: 604 CPU (we might remove 601-603 CPUs)
* embedded
ref405ep: 405EP (user space segfaults but same image works on 44x CPUs
I hope to get that one fixed by QEMU 7.0 )
bambo: 440FP
sam460ex: 460EP is very much like the 440fp
* Mac
g3beige: G3 (or 75x CPU) family
mac99: G4 (7400 7410 7441 7447 7448 7450 7451 7455 7457) family
* book3e 32bit:
ppce500: e500mc
mpc8544ds: mpc8544
* book3e 64bit:
ppce500 (KVM): e5500, e6500
* book3s 64bit (para virtualized and baremetal):
mac99: PPC970
pseries (BE only): PPC970, PPC970mp, POWER5+ pseries (LE, BE and KVM) : POWER7, POWER8, POWER9, POWER10
powernv: POWER8, POWER9, POWER10
Most of the attention is on book3s 64bit CPUs. MAC emulation is well maintained. Embedded world is not.
Quoted 3 lines
while, we've had requests for other PowerPC variants:
https://github.com/bootlin/toolchains-builder/issues/2. Your input would be very welcome :-)
OK. I will take a look.
Thanks,
C.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot