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
PATCH 2/3 configs/qemu: Add a ppc-bamboo configuration
The 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
PATCH 3/3 package/qemu: Add support for PPC970 processors
In reply to Cédric Le GoaterPPC970 processors are well supported by the QEMU pseries and macbook machines. The latest debian 11 (big endian) runs with SMP. Re-add support.
--- package/qemu/Config.in.host | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
package/qemu/Config.in.host +1 -1
@@ -22,7 +22,7 @@ config BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS default y if BR2_xtensa default y if BR2_x86_64 depends on !BR2_x86_steamroller && !BR2_x86_core_avx2 - depends on !BR2_powerpc_620 && !BR2_powerpc_630 && !BR2_powerpc_970 + depends on !BR2_powerpc_620 && !BR2_powerpc_630 config BR2_PACKAGE_HOST_QEMU_SYSTEM_ARCH_SUPPORTS bool
Signature · 6 lines
2.31.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot