All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@kaod.org>
To: buildroot@buildroot.org
Cc: "Gerome Burlats" <gerome.burlats@smile.fr>,
	"Romain Naour" <romain.naour@gmail.com>,
	"Cédric Le Goater" <clg@kaod.org>
Subject: [Buildroot] [PATCH 1/3] configs/qemu: Add a ppc64le-powernv8 configuration
Date: Mon, 10 Jan 2022 22:02:33 +0100	[thread overview]
Message-ID: <20220110210235.817082-1-clg@kaod.org> (raw)

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

Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
 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

diff --git a/board/qemu/ppc64le-powernv8/readme.txt b/board/qemu/ppc64le-powernv8/readme.txt
new file mode 100644
index 000000000000..059f55fbc917
--- /dev/null
+++ b/board/qemu/ppc64le-powernv8/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_powernv8_defconfig
+
+The login prompt will appear in the terminal window.
diff --git a/configs/qemu_ppc64le_powernv8_defconfig b/configs/qemu_ppc64le_powernv8_defconfig
new file mode 100644
index 000000000000..d8ea6655fce0
--- /dev/null
+++ b/configs/qemu_ppc64le_powernv8_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

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

             reply	other threads:[~2022-01-10 21:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-10 21:02 Cédric Le Goater [this message]
2022-01-10 21:02 ` [Buildroot] [PATCH 2/3] configs/qemu: Add a ppc-bamboo configuration Cédric Le Goater
2022-01-10 21:04 ` [Buildroot] [PATCH 1/3] configs/qemu: Add a ppc64le-powernv8 configuration Cédric Le Goater
2022-01-11 20:45 ` Thomas Petazzoni
2022-01-12  7:07   ` Cédric Le Goater
  -- strict thread matches above, loose matches on Subject: below --
2022-01-10 20:58 Cédric Le Goater

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220110210235.817082-1-clg@kaod.org \
    --to=clg@kaod.org \
    --cc=buildroot@buildroot.org \
    --cc=gerome.burlats@smile.fr \
    --cc=romain.naour@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.