From 3f12900839fd29222d3215f82579874ca3628581 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 6 Feb 2018 22:53:02 +0100 Subject: qemu: add support for powerpc --- src/tests/qemu/Makefile | 14 ++++++++++++-- src/tests/qemu/arch/ppc.config | 9 +++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 src/tests/qemu/arch/ppc.config (limited to 'src') diff --git a/src/tests/qemu/Makefile b/src/tests/qemu/Makefile index e2d5ff5..5063f4f 100644 --- a/src/tests/qemu/Makefile +++ b/src/tests/qemu/Makefile @@ -14,7 +14,7 @@ endif ARCH := $(firstword $(subst -, ,$(CBUILD))) # Set these from the environment to override -KERNEL_VERSION ?= 4.15 +KERNEL_VERSION ?= 4.15.1 BUILD_PATH ?= $(PWD)/../../../qemu-build/$(ARCH) DISTFILES_PATH ?= $(PWD)/distfiles DEBUG_KERNEL ?= no @@ -161,8 +161,18 @@ else QEMU_MACHINE := -cpu 24Kf -machine malta -smp 1 CFLAGS += -march=mips32r2 -EL endif +else ifeq ($(ARCH),powerpc) +QEMU_ARCH := ppc +KERNEL_ARCH := powerpc +KERNEL_BZIMAGE := $(KERNEL_PATH)/arch/powerpc/boot/uImage +ifeq ($(CHOST),$(CBUILD)) +QEMU_MACHINE := -cpu host,accel=kvm -machine ppce500 +else +QEMU_MACHINE := -machine ppce500 +endif +CFLAGS += -mcpu=powerpc -mlong-double-64 -msecure-plt else -$(error I only build: x86_64, i686, arm, aarch64, mips, mipsel, mips64, mips64el) +$(error I only build: x86_64, i686, arm, aarch64, mips, mipsel, mips64, mips64el, powerpc) endif REAL_CC := $(CBUILD)-gcc diff --git a/src/tests/qemu/arch/ppc.config b/src/tests/qemu/arch/ppc.config new file mode 100644 index 0000000..8ec5911 --- /dev/null +++ b/src/tests/qemu/arch/ppc.config @@ -0,0 +1,9 @@ +CONFIG_PPC_QEMU_E500=y +CONFIG_FSL_SOC_BOOKE=y +CONFIG_PPC_85xx=y +CONFIG_PHYS_64BIT=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_MATH_EMULATION=y +CONFIG_CMDLINE_BOOL=y +CONFIG_CMDLINE="console=ttyS0 wg.success=ttyS1" -- cgit v1.2.3-59-g8ed1b