summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-10-01 21:24:18 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-10-02 14:37:53 +0200
commitc0ac7548f16b472f8d1dbb67782bb8fbfc875e92 (patch)
treee013c743ed687b9997faddbe64790668ad971d4e /src
parentdb3b2ee65fec9d5649bf22df2776b33647927567 (diff)
qemu: support powerpc64le
This uses ELFv2 ABI, which is the only ppc64 ABI musl supports. Big endian uses ELFv1 ABI, which musl doesn't support. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src')
-rw-r--r--src/tests/qemu/Makefile14
-rw-r--r--src/tests/qemu/arch/powerpc64le.config10
2 files changed, 22 insertions, 2 deletions
diff --git a/src/tests/qemu/Makefile b/src/tests/qemu/Makefile
index f00f6dd..0c4bca3 100644
--- a/src/tests/qemu/Makefile
+++ b/src/tests/qemu/Makefile
@@ -182,6 +182,16 @@ else
QEMU_MACHINE := -cpu 24Kf -machine malta -smp 1
CFLAGS += -march=mips32r2 -EL
endif
+else ifeq ($(ARCH),powerpc64le)
+QEMU_ARCH := ppc64
+KERNEL_ARCH := powerpc
+KERNEL_BZIMAGE := $(KERNEL_PATH)/vmlinux
+ifeq ($(CHOST),$(CBUILD))
+QEMU_MACHINE := -cpu host,accel=kvm -machine pseries
+else
+QEMU_MACHINE := -machine pseries
+endif
+CFLAGS += -mcpu=powerpc64le -mlong-double-64
else ifeq ($(ARCH),powerpc)
QEMU_ARCH := ppc
KERNEL_ARCH := powerpc
@@ -202,7 +212,7 @@ else
QEMU_MACHINE := -machine q800
endif
else
-$(error I only build: x86_64, i686, arm, armeb, aarch64, aarch64_be, mips, mipsel, mips64, mips64el, powerpc, m68k)
+$(error I only build: x86_64, i686, arm, armeb, aarch64, aarch64_be, mips, mipsel, mips64, mips64el, powerpc64le, powerpc, m68k)
endif
REAL_CC := $(CBUILD)-gcc
@@ -218,7 +228,7 @@ qemu: $(KERNEL_BZIMAGE)
-nographic \
-smp $(NR_CPUS) \
$(QEMU_MACHINE) \
- -m $$(grep -q CONFIG_DEBUG_KMEMLEAK=y $(KERNEL_PATH)/.config && echo 1G || echo 192M) \
+ -m $$(grep -q CONFIG_DEBUG_KMEMLEAK=y $(KERNEL_PATH)/.config && echo 1G || echo 256M) \
-serial stdio \
-serial file:$(BUILD_PATH)/result \
-no-reboot \
diff --git a/src/tests/qemu/arch/powerpc64le.config b/src/tests/qemu/arch/powerpc64le.config
new file mode 100644
index 0000000..a43926c
--- /dev/null
+++ b/src/tests/qemu/arch/powerpc64le.config
@@ -0,0 +1,10 @@
+CONFIG_PPC64=y
+CONFIG_PPC_PSERIES=y
+CONFIG_ALTIVEC=y
+CONFIG_VSX=y
+CONFIG_PPC_OF_BOOT_TRAMPOLINE=y
+CONFIG_HVC_CONSOLE=y
+CONFIG_CPU_LITTLE_ENDIAN=y
+CONFIG_CMDLINE_BOOL=y
+CONFIG_CMDLINE="console=hvc0 wg.success=hvc1"
+CONFIG_SECTION_MISMATCH_WARN_ONLY=y