Skip to content
This repository was archived by the owner on Apr 13, 2024. It is now read-only.

Commit 2a3984b

Browse files
authored
Merge pull request #196 from nathanchance/ppc64
PPC64 big endian
2 parents 4de156f + 032fab4 commit 2a3984b

File tree

7 files changed

+81
-1
lines changed

7 files changed

+81
-1
lines changed

.travis.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ matrix:
1212
env: ARCH=arm64 LD=ld.lld-9
1313
- name: "ARCH=ppc32"
1414
env: ARCH=ppc32
15+
- name: "ARCH=ppc64"
16+
env: ARCH=ppc64
1517
- name: "ARCH=ppc64le LD=ld.lld"
1618
env: ARCH=ppc64le LD=ld.lld-9
1719
- name: "ARCH=x86_64 LD=ld.lld"
@@ -34,6 +36,9 @@ matrix:
3436
- name: "ARCH=ppc32 REPO=linux-next"
3537
env: ARCH=ppc32 REPO=linux-next
3638
if: type = cron
39+
- name: "ARCH=ppc64 REPO=linux-next"
40+
env: ARCH=ppc64 REPO=linux-next
41+
if: type = cron
3742
- name: "ARCH=ppc64le LD=ld.lld REPO=linux-next"
3843
env: ARCH=ppc64le LD=ld.lld-9 REPO=linux-next
3944
if: type = cron
@@ -115,6 +120,9 @@ matrix:
115120
- name: "ARCH=ppc32 LLVM_VERSION=8"
116121
env: ARCH=ppc32 LLVM_VERSION=8
117122
if: type = cron
123+
- name: "ARCH=ppc64 REPO=linux-next LLVM_VERSION=8"
124+
env: ARCH=ppc64 REPO=linux-next LLVM_VERSION=8
125+
if: type = cron
118126
- name: "ARCH=ppc64le LLVM_VERSION=8"
119127
env: ARCH=ppc64le LLVM_VERSION=8
120128
if: type = cron

buildroot/ppc64.config

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
BR2_powerpc64=y
2+
BR2_CCACHE=y
3+
BR2_KERNEL_HEADERS_4_4=y
4+
BR2_BINUTILS_VERSION_2_31_X=y
5+
BR2_GCC_VERSION_8_X=y
6+
BR2_TARGET_GENERIC_ROOT_PASSWD="root"
7+
BR2_SYSTEM_BIN_SH_BASH=y
8+
BR2_TARGET_GENERIC_GETTY_PORT="hvc0"
9+
BR2_ROOTFS_OVERLAY="../overlay-poweroff"
10+
BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
11+
BR2_TARGET_ROOTFS_CPIO=y
12+
BR2_TARGET_ROOTFS_EXT2=y
13+
BR2_TARGET_ROOTFS_EXT2_4=y
14+
BR2_TARGET_ROOTFS_EXT2_SIZE="20M"
15+
# BR2_TARGET_ROOTFS_TAR is not set

buildroot/rebuild.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ CONFIGS=()
2525
while (( ${#} )); do
2626
case ${1} in
2727
all) for CONFIG in *.config; do CONFIGS+=( "../${CONFIG}" ); done ;;
28-
arm64|arm|mipsel|ppc32|ppc64le|x86_64) CONFIGS+=( "../${1}.config" ) ;;
28+
arm64|arm|mipsel|ppc32|ppc64|ppc64le|x86_64) CONFIGS+=( "../${1}.config" ) ;;
2929
*) echo "Unknown parameter '${1}', exiting!"; exit 1 ;;
3030
esac
3131
shift

driver.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,17 @@ setup_variables() {
112112
export ARCH=powerpc
113113
export CROSS_COMPILE=powerpc-linux-gnu- ;;
114114

115+
"ppc64")
116+
config=pseries_defconfig
117+
qemu="qemu-system-ppc64"
118+
image_name=vmlinux
119+
qemu_ram=1G
120+
qemu_cmdline=( -machine pseries
121+
-vga none
122+
-initrd "images/ppc64/rootfs.cpio" )
123+
export ARCH=powerpc
124+
export CROSS_COMPILE=powerpc64-linux-gnu- ;;
125+
115126
"ppc64le")
116127
config=powernv_defconfig
117128
image_name=zImage.epapr

images/ppc64/rootfs.cpio

8.73 MB
Binary file not shown.

images/ppc64/rootfs.ext4

20 MB
Binary file not shown.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
From 959a7892b40ce6553827343b1d25a0aad507b467 Mon Sep 17 00:00:00 2001
2+
From: Daniel Axtens <dja@axtens.net>
3+
Date: Thu, 10 Jan 2019 12:42:58 +1100
4+
Subject: [PATCH] powerpc/vdso32: Drop -mabi=elfv1 for 32 bit objects
5+
6+
All 64-bit objects need to specify the flag to be compiled correctly, we
7+
just don't need it for 32-bit objects. GCC just ignored it, but clang
8+
doesn't.
9+
10+
Link: https://github.com/ClangBuiltLinux/linux/issues/240
11+
Signed-off-by: Daniel Axtens <dja@axtens.net>
12+
Signed-off-by: Joel Stanley <joel@jms.id.au>
13+
(am from https://lore.kernel.org/linuxppc-dev/20190110014258.20963-1-joel@jms.id.au/)
14+
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
15+
---
16+
arch/powerpc/kernel/vdso32/Makefile | 14 ++++++++++++++
17+
1 file changed, 14 insertions(+)
18+
19+
diff --git a/arch/powerpc/kernel/vdso32/Makefile b/arch/powerpc/kernel/vdso32/Makefile
20+
index 06f54d947057..d50978ec2ee5 100644
21+
--- a/arch/powerpc/kernel/vdso32/Makefile
22+
+++ b/arch/powerpc/kernel/vdso32/Makefile
23+
@@ -34,6 +34,20 @@ obj-y += vdso32_wrapper.o
24+
extra-y += vdso32.lds
25+
CPPFLAGS_vdso32.lds += -P -C -Upowerpc
26+
27+
+# clang refuses to accept -mabi=elfv1 for when using the
28+
+# 64-bit target in 32-bit mode
29+
+ifdef CONFIG_CC_IS_CLANG
30+
+ifdef CONFIG_PPC64
31+
+AFLAGS_REMOVE_getcpu.o += -mabi=elfv1
32+
+endif
33+
+AFLAGS_REMOVE_sigtramp.o += -mabi=elfv1
34+
+AFLAGS_REMOVE_gettimeofday.o += -mabi=elfv1
35+
+AFLAGS_REMOVE_datapage.o += -mabi=elfv1
36+
+AFLAGS_REMOVE_cacheflush.o += -mabi=elfv1
37+
+AFLAGS_REMOVE_note.o += -mabi=elfv1
38+
+endif
39+
+
40+
+
41+
# Force dependency (incbin is bad)
42+
$(obj)/vdso32_wrapper.o : $(obj)/vdso32.so
43+
44+
--
45+
2.22.0
46+

0 commit comments

Comments
 (0)