qemuppc64: Add a QEMU machine definition for ppc64
PATCH 1/5 qemuppc64: Add a QEMU machine definition for ppc64
Signed-off-by Khem Raj <[email protected]>
--- meta/conf/machine/qemuppc64.conf | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 meta/conf/machine/qemuppc64.conf
meta/conf/machine/qemuppc64.conf new file +24 -0
@@ -0,0 +1,24 @@ +#@TYPE: Machine +#@NAME: QEMU PPC64 machine +#@DESCRIPTION: Machine configuration for running a PPC system on QEMU + +require conf/machine/include/qemu.inc +require conf/machine/include/tune-power9.inc + +KERNEL_IMAGETYPE = "vmlinux" + +SERIAL_CONSOLES ?= "115200;hvc0" + +# For runqemu +QB_SYSTEM_NAME = "qemu-system-ppc64" +QB_MACHINE = "-machine pseries" +QB_CPU = "-cpu POWER9" +QB_KERNEL_CMDLINE_APPEND = "console=hvc0" +#QB_OPT_APPEND += "-device qemu-xhci -device usb-tablet -device usb-kbd" +QB_OPT_APPEND = "-usb -device usb-tablet" + +#prelink broken on ppc64 +#USER_CLASSES_remove = "image-prelink" +#IMAGE_PREPROCESS_COMMAND_remove = "prelink_image;" + +MACHINE_EXTRA_RRECOMMENDS += " kernel-modules"
Signature · 1 line
2.30.1
PATCH 2/5 linux-yocto: Enable powerpc64le QEMU
Signed-off-by Khem Raj <[email protected]>
--- meta/recipes-kernel/linux/linux-yocto_5.10.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-kernel/linux/linux-yocto_5.10.bb +1 -1
@@ -45,7 +45,7 @@ KCONF_BSP_AUDIT_LEVEL = "1" KERNEL_DEVICETREE_qemuarmv5 = "versatile-pb.dtb" -COMPATIBLE_MACHINE = "qemuarm|qemuarmv5|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64|qemuriscv64|qemuriscv32" +COMPATIBLE_MACHINE = "qemuarm|qemuarmv5|qemuarm64|qemux86|qemuppc|qemuppc64|qemumips|qemumips64|qemux86-64|qemuriscv64|qemuriscv32" # Functionality flags KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
Signature · 1 line
2.30.1
PATCH 3/5 formfactor: Add machine config for qemuppc64
In reply to Khem RajSigned-off-by Khem Raj <[email protected]>
--- meta/recipes-bsp/formfactor/files/qemuppc64/machconfig | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 meta/recipes-bsp/formfactor/files/qemuppc64/machconfig
meta/recipes-bsp/formfactor/files/qemuppc64/machconfig new file +10 -0
@@ -0,0 +1,10 @@ +HAVE_TOUCHSCREEN=0 +HAVE_KEYBOARD=0 + +DISPLAY_CAN_ROTATE=0 +DISPLAY_ORIENTATION=0 +#DISPLAY_WIDTH_PIXELS=640 +#DISPLAY_HEIGHT_PIXELS=480 +#DISPLAY_BPP=16 +DISPLAY_DPI=150 +DISPLAY_SUBPIXEL_ORDER=vrgb
Signature · 1 line
2.30.1
PATCH 4/5 inittab: Add getty launch on hvc0 for qemuppc64
In reply to Khem RajSigned-off-by Khem Raj <[email protected]>
--- meta/recipes-core/busybox/busybox-inittab_1.32.0.bb | 3 +++ meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb | 4 ++++ 2 files changed, 7 insertions(+)
meta/recipes-core/busybox/busybox-inittab_1.32.0.bb +3 -0
@@ -44,6 +44,9 @@ EOF fi } +do_install_append_qemuppc64 () { + echo "9:12345:respawn:${base_sbindir}/getty 38400 hvc0" >> ${D}${sysconfdir}/inittab +} pkg_postinst_${PN} () { # run this on host and on target
meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb +4 -0
@@ -53,6 +53,10 @@ EOF fi } +do_install_append_qemuppc64 () { + echo "9:12345:respawn:${base_sbindir}/getty 38400 hvc0" >> ${D}${sysconfdir}/inittab +} + pkg_postinst_${PN} () { # run this on host and on target if [ "${SERIAL_CONSOLES_CHECK}" = "" ]; then
Signature · 1 line
2.30.1
PATCH 5/5 parselogs: Allow expected kernel messages for qemuppc64
In reply to Khem Rajpseries machine emulation ends up with these three messages in kernel logs which are harmless, so ignore them for now
https://www.mail-archive.com/[email protected]/msg5600561.html
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1827162
Signed-off-by Khem Raj <[email protected]>
--- meta/lib/oeqa/runtime/cases/parselogs.py | 5 +++++ 1 file changed, 5 insertions(+)
meta/lib/oeqa/runtime/cases/parselogs.py +5 -0
@@ -114,6 +114,11 @@ ignore_errors = { 'can\'t handle BAR above 4GB', 'Cannot reserve Legacy IO', ] + common_errors, + 'qemuppc64' : [ + 'vio vio: uevent: failed to send synthetic uevent', + 'synth uevent: /devices/vio: failed to send uevent', + 'PCI 0000:00 Cannot reserve Legacy IO [io 0x10000-0x10fff]', + ] + common_errors, 'qemuarm' : [ 'mmci-pl18x: probe of fpga:05 failed with error -22', 'mmci-pl18x: probe of fpga:0b failed with error -22',
Signature · 1 line
2.30.1