[Buildroot] [PATCH 1/3] configs/qemu: Add a ppc64le-powernv configuration

Cédric Le Goater clg at kaod.org
Fri Nov 12 16:04:11 UTC 2021


PowerNV (as Non-Virtualized) is the "baremetal" platform using the
OPAL [1] firmware. It runs Linux on IBM and OpenPOWER systems and can
be used as an hypervisor OS, running KVM guests, or simply as a host
OS. OPAL includes a Linux kernel and a buildroot rootfs which acts as
a bootloader [2] for the various systems installed on disks.

Since QEMU provides PowerNV machines for POWER8-10 processors [3], add
a new qemu_ppc64le_powernv board to buildroot.

[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

Cc: Joel Stanley <joel at jms.id.au>
Signed-off-by: Cédric Le Goater <clg at kaod.org>
---
 board/qemu/ppc64le-powernv/readme.txt  |  5 +++++
 configs/qemu_ppc64le_powernv_defconfig | 29 ++++++++++++++++++++++++++
 2 files changed, 34 insertions(+)
 create mode 100644 board/qemu/ppc64le-powernv/readme.txt
 create mode 100644 configs/qemu_ppc64le_powernv_defconfig

diff --git a/board/qemu/ppc64le-powernv/readme.txt b/board/qemu/ppc64le-powernv/readme.txt
new file mode 100644
index 000000000000..ee102a3d6846
--- /dev/null
+++ b/board/qemu/ppc64le-powernv/readme.txt
@@ -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_powernv_defconfig
+
+The login prompt will appear in the terminal window.
diff --git a/configs/qemu_ppc64le_powernv_defconfig b/configs/qemu_ppc64le_powernv_defconfig
new file mode 100644
index 000000000000..d8ea6655fce0
--- /dev/null
+++ b/configs/qemu_ppc64le_powernv_defconfig
@@ -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
-- 
2.31.1



More information about the buildroot mailing list