Skip to contentSkip to conversation

powerpc64 powerpc64le: add support

PATCH Superseded Cody P Schafer 4 participants 6 messages May 11, 2014 – May 12, 2014 Kbuild

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 powerpc64 powerpc64le: add support

This enables powerpc64 and powerpc64le. Currently, le needs at least glibc 2.19 and gcc 4.9.0. For gdb, 7.7.1 works (added in a later patch).

This also provides a helper config to replace the ad-hoc altivec logic.

---
 Makefile                                    |  4 +-
 arch/Config.in                              | 21 +++++++-
 arch/Config.in.powerpc                      | 76 ++++++++++++++++++++++++++---
 linux/Config.in                             |  5 +-
 package/Makefile.in                         |  2 +-
 package/efl/libevas/libevas.mk              |  2 +-
 package/ffmpeg/ffmpeg.mk                    |  5 +-
 package/glibc/Config.in                     |  3 +-
 package/gstreamer/gst-ffmpeg/gst-ffmpeg.mk  |  5 +-
 package/gstreamer1/gst1-libav/gst1-libav.mk |  5 +-
 package/libatomic_ops/Config.in             |  2 +-
 package/mpg123/mpg123.mk                    |  4 +-
 package/openssl/openssl.mk                  |  6 +++
 package/systemd/Config.in                   |  3 +-
 package/vlc/vlc.mk                          |  3 +-
 toolchain/toolchain-buildroot/Config.in     |  5 +-
 16 files changed, 117 insertions(+), 34 deletions(-)
Makefile +3 -1
index 2f18aab..c6a2e5d 100644
@@ -38,7 +38,8 @@ export HOSTARCH := $(shell uname -m | \
 	    -e s/sun4u/sparc64/ \
 	    -e s/arm.*/arm/ \
 	    -e s/sa110/arm/ \
-	    -e s/ppc64/powerpc/ \
+	    -e s/ppc64/powerpc64/ \
+	    -e s/ppc64le/powerpc64le/ \
 	    -e s/ppc/powerpc/ \
 	    -e s/macppc/powerpc/\
 	    -e s/sh.*/sh/)
@@ -310,6 +311,7 @@ KERNEL_ARCH := $(shell echo "$(ARCH)" | sed -e "s/-.*//" \
 	-e s/aarch64/arm64/ \
 	-e s/bfin/blackfin/ \
 	-e s/parisc64/parisc/ \
+	-e s/powerpc64le/powerpc/ \
 	-e s/powerpc64/powerpc/ \
 	-e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
 	-e s/sh.*/sh/ \
arch/Config.in +20 -1
index bc81dac..819823c 100644
@@ -140,6 +140,25 @@ config BR2_powerpc
 	bool "PowerPC"
 	help
 	  PowerPC is a RISC architecture created by Apple-IBM-Motorola alliance.
+	  Big endian.
+	  http://www.power.org/
+	  http://en.wikipedia.org/wiki/Powerpc
+
+config BR2_powerpc64
+	bool "PowerPC 64"
+	select BR2_ARCH_IS_64
+	help
+	  PowerPC is a RISC architecture created by Apple-IBM-Motorola alliance.
+	  Big endian.
+	  http://www.power.org/
+	  http://en.wikipedia.org/wiki/Powerpc
+
+config BR2_powerpc64le
+	bool "PowerPC 64 (Little endian)"
+	select BR2_ARCH_IS_64
+	help
+	  PowerPC is a RISC architecture created by Apple-IBM-Motorola alliance.
+	  Little endian.
 	  http://www.power.org/
 	  http://en.wikipedia.org/wiki/Powerpc
 
@@ -321,7 +340,7 @@ if BR2_nios2
 source "arch/Config.in.nios2"
 endif
 
-if BR2_powerpc
+if BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
 source "arch/Config.in.powerpc"
 endif
 
arch/Config.in.powerpc +70 -6

176 lines not on this page · raw message

linux/Config.in +3 -2
index 77c28f3..0bd1c9e 100644
@@ -183,8 +183,9 @@ config BR2_LINUX_KERNEL_BZIMAGE
 
 config BR2_LINUX_KERNEL_ZIMAGE
 	bool "zImage"
-	depends on BR2_arm || BR2_armeb || BR2_powerpc || BR2_sparc || \
-		   BR2_sh || BR2_sh64 || BR2_xtensa
+	depends on BR2_arm || BR2_armeb || \
+		   BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le || \
+		   BR2_sparc || BR2_sh || BR2_sh64 || BR2_xtensa
 
 config BR2_LINUX_KERNEL_APPENDED_ZIMAGE
 	bool "zImage with appended DT"
package/Makefile.in +1 -1
index 2fc3aa7..0233506 100644
@@ -321,7 +321,7 @@ endif
 ifeq ($(BR2_m68k),y)
 BR2_AC_CV_TRAP_CHECK=ac_cv_lbl_unaligned_fail=no
 endif
-ifeq ($(BR2_powerpc)$(BR2_ENDIAN),yBIG)
+ifeq ($(BR2_powerpc)$(BR2_powerpc64)$(BR2_powerpc64le),y)
 BR2_AC_CV_TRAP_CHECK=ac_cv_lbl_unaligned_fail=no
 endif
 
package/efl/libevas/libevas.mk +1 -1
index 41ceb49..71f1aeb 100644
@@ -136,7 +136,7 @@ else
 LIBEVAS_CONF_OPT += --disable-cpu-sse3
 endif
 
-ifeq ($(BR2_powerpc_7400)$(BR2_powerpc_7450)$(BR2_powerpc_970),y)
+ifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC),y)
 LIBEVAS_CONF_OPT += --enable-cpu-altivec
 else
 LIBEVAS_CONF_OPT += --disable-cpu-altivec
package/ffmpeg/ffmpeg.mk +1 -4
index f8c1526..b14f678 100644
@@ -299,14 +299,11 @@ FFMPEG_CONF_OPT += \
 	--disable-mipsdspr2
 endif
 
-# Set powerpc altivec appropriately
-ifeq ($(BR2_powerpc),y)
-ifeq ($(BR2_powerpc_7400)$(BR2_powerpc_7450)$(BR2_powerpc_970),y)
+ifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC),y)
 FFMPEG_CONF_OPT += --enable-altivec
 else
 FFMPEG_CONF_OPT += --disable-altivec
 endif
-endif
 
 ifeq ($(BR2_PREFER_STATIC_LIB),)
 FFMPEG_CONF_OPT += --enable-pic
package/glibc/Config.in +2 -1
index 693a33e..c20d9e1 100644
@@ -8,7 +8,8 @@ choice
 		   BR2_i386   || BR2_mips     || BR2_mipsel  || \
 		   BR2_mips64 || BR2_mips64el || BR2_powerpc || \
 		   BR2_sh     || BR2_sh64     || BR2_sparc   || \
-		   BR2_x86_64 || BR2_microblaze
+		   BR2_x86_64 || BR2_microblaze || BR2_powerpc64 || \
+		   BR2_powerpc64le
 
 config BR2_GLIBC_VERSION_2_18
        bool "2.18"
package/gstreamer/gst-ffmpeg/gst-ffmpeg.mk +1 -4
index f18ab18..5c4b754 100644
@@ -63,14 +63,11 @@ ifeq ($(BR2_ARM_CPU_HAS_NEON),y)
 GST_FFMPEG_CONF_EXTRA_OPT += --enable-neon
 endif
 
-# Set powerpc altivec appropriately
-ifeq ($(BR2_powerpc),y)
-ifeq ($(BR2_powerpc_7400)$(BR2_powerpc_7450)$(BR2_powerpc_970),y)
+ifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC),y)
 GST_FFMPEG_CONF_EXTRA_OPT += --enable-altivec
 else
 GST_FFMPEG_CONF_EXTRA_OPT += --disable-altivec
 endif
-endif
 
 ifeq ($(BR2_PREFER_STATIC_LIB),)
 GST_FFMPEG_CONF_EXTRA_OPT += --enable-pic
package/gstreamer1/gst1-libav/gst1-libav.mk +1 -4
index 7a0182e..f84bcb2 100644
@@ -71,14 +71,11 @@ else
 GST1_LIBAV_CONF_EXTRA_OPT += --disable-vfp
 endif
 
-# Set powerpc altivec appropriately
-ifeq ($(BR2_powerpc),y)
-ifeq ($(BR2_powerpc_7400)$(BR2_powerpc_7450)$(BR2_powerpc_970),y)
+ifeq ($(BR2_POWERPC_CPU_HASH_ALTIVEC),y)
 GST1_LIBAV_CONF_EXTRA_OPT += --enable-altivec
 else
 GST1_LIBAV_CONF_EXTRA_OPT += --disable-altivec
 endif
-endif
 
 GST1_LIBAV_CONF_OPT = \
 	--with-libav-extra-configure="$(GST1_LIBAV_CONF_EXTRA_OPT)"
package/libatomic_ops/Config.in +1 -1
index f0a55a4..fe1efd4 100644
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_LIBATOMIC_ARCH_SUPPORTS
 	bool
-	default y if BR2_arm || BR2_armeb || BR2_aarch64 || BR2_i386 || BR2_sparc || BR2_powerpc || BR2_x86_64
+	default y if BR2_arm || BR2_armeb || BR2_aarch64 || BR2_i386 || BR2_sparc || BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le || BR2_x86_64
 
 config BR2_PACKAGE_LIBATOMIC_OPS
 	bool "libatomic_ops"
package/mpg123/mpg123.mk +1 -3
index a950813..d66592c 100644
@@ -22,14 +22,12 @@ ifeq ($(BR2_i386),y)
 MPG123_CPU = x86
 endif
 
-ifeq ($(BR2_powerpc),y)
-ifneq ($(BR2_powerpc_7400)$(BR2_powerpc_7450)$(BR2_powerpc_970),)
+ifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC),y)
 MPG123_CPU = altivec
 endif
 ifeq ($(BR2_SOFT_FLOAT),y)
 MPG123_CPU = ppc_nofpu
 endif
-endif
 
 ifeq ($(BR2_x86_64),y)
 MPG123_CPU = x86-64
package/openssl/openssl.mk +6 -0
index 52abb46..87bc2ef 100644
@@ -42,6 +42,12 @@ ifeq ($(BR2_powerpc_401)$(BR2_powerpc_403)$(BR2_powerpc_405)$(BR2_powerpc_405fp)
 	OPENSSL_TARGET_ARCH = ppc
 endif
 endif
+ifeq ($(ARCH),powerpc64)
+	OPENSSL_TARGET_ARCH = ppc64
+endif
+ifeq ($(ARCH),powerpc64le)
+	OPENSSL_TARGET_ARCH = ppc64le
+endif
 ifeq ($(ARCH),x86_64)
 	OPENSSL_TARGET_ARCH = x86_64
 endif
package/systemd/Config.in +2 -1
index f10637a..05f4680 100644
@@ -2,7 +2,8 @@ config BR2_PACKAGE_SYSTEMD_ARCH_SUPPORTS
 	bool
 	# see src/shared/architecture.h
 	default y if BR2_arm || BR2_armeb || BR2_i386 || BR2_mips || \
-		BR2_mipsel || BR2_powerpc || BR2_sh4 || BR2_sh4eb || \
+		BR2_mipsel || BR2_powerpc || BR2_powerpc64 || \
+		BR2_powerpc64le  || BR2_sh4 || BR2_sh4eb || \
 		BR2_sh4a || BR2_sh4aeb || BR2_sparc || BR2_x86_64 || \
 		BR2_aarch64 || BR2_m68k
 
package/vlc/vlc.mk +1 -2
index e14c9c3..6eb7eea 100644
@@ -49,8 +49,7 @@ ifeq ($(BR2_PREFER_STATIC_LIB),)
 VLC_CONF_OPT += --disable-static
 endif
 
-# Set powerpc altivec appropriately
-ifeq ($(BR2_powerpc_7400)$(BR2_powerpc_7450)$(BR2_powerpc_970),y)
+ifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC),y)
 VCL_CONF_OPT += --enable-altivec
 else
 VLC_CONF_OPT += --disable-altivec
toolchain/toolchain-buildroot/Config.in +3 -2
index 216f9db..91ff705 100644
@@ -45,7 +45,7 @@ config BR2_TOOLCHAIN_BUILDROOT_EGLIBC
 		   BR2_i386   || BR2_mips     || BR2_mipsel  || \
 		   BR2_mips64 || BR2_mips64el || BR2_powerpc || \
 		   BR2_sh     || BR2_sh64     || BR2_sparc   || \
-		   BR2_x86_64 || BR2_microblaze
+		   BR2_x86_64 || BR2_microblaze || BR2_powerpc64
 	depends on BR2_USE_MMU
 	depends on !BR2_PREFER_STATIC_LIB
 	select BR2_TOOLCHAIN_USES_GLIBC
@@ -63,7 +63,8 @@ config BR2_TOOLCHAIN_BUILDROOT_GLIBC
 		   BR2_i386   || BR2_mips     || BR2_mipsel  || \
 		   BR2_mips64 || BR2_mips64el || BR2_powerpc || \
 		   BR2_sh     || BR2_sh64     || BR2_sparc   || \
-		   BR2_x86_64 || BR2_microblaze
+		   BR2_x86_64 || BR2_microblaze || BR2_powerpc64 || \
+		   BR2_powerpc64le
 	depends on BR2_USE_MMU
 	depends on !BR2_PREFER_STATIC_LIB
 	select BR2_TOOLCHAIN_USES_GLIBC
Signature · 1 line
1.9.3
#1 lore raw

PATCH 2/2 package/gdb: add gdb 7.7.1

---
 package/gdb/Config.in.host | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
package/gdb/Config.in.host +7 -2
index e853469..77c5459 100644
@@ -19,7 +19,7 @@ choice
 	depends on !BR2_microblaze
 	default BR2_GDB_VERSION_6_6 if BR2_bfin
 	default BR2_GDB_VERSION_6_7_1_AVR32_2_1_5 if BR2_avr32
-	default BR2_GDB_VERSION_7_5
+	default BR2_GDB_VERSION_7_7
 	help
 	  Select the version of gdb you wish to use.
 
@@ -39,6 +39,10 @@ choice
 		bool "gdb 7.5.x"
 		depends on !BR2_bfin
 
+	config BR2_GDB_VERSION_7_7
+		bool "gdb 7.7.x"
+		depends on !BR2_bfin
+
 endchoice
 
 endif
@@ -54,4 +58,5 @@ config BR2_GDB_VERSION
 	default "arc-4.8-R3" if BR2_arc
 	default "6be65fb56ea6694a9260733a536a023a1e2d4d57" if BR2_microblaze
 	default "7.4.1"    if BR2_GDB_VERSION_7_4
-	default "7.5.1"    if BR2_GDB_VERSION_7_5 || !BR2_PACKAGE_HOST_GDB
+	default "7.5.1"    if BR2_GDB_VERSION_7_5
+	default "7.7.1"    if BR2_GDB_VERSION_7_7 || !BR2_PACKAGE_HOST_GDB
Signature · 1 line
1.9.3
#2 lore raw

PATCH 1/2 powerpc64 powerpc64le: add support

In reply to Cody P Schafer

arch/Config.in.powerpc line 119

Quoted 8 lines · Cody P Schafer

config BR2_generic_powerpc

arch/Config.in.powerpc +5 -0
 	bool "generic"
+	select BR2_POWERPC_CPU_HAS_ALTIVEC if BR2_ARCH_IS_64
 
+config BR2_powerpc_power4
+	bool "power4"
+config BR2_powerpc_power5
+	bool "power5"

Generic has altivec and power4/5 don't?
That doesn't sound right, generic should be the lowest common denominator... Regards.

#3 lore raw

PATCH 1/2 powerpc64 powerpc64le: add support

You're right, that ALTIVEC selection needs to be removed.

Quoted 20 lines · Gustavo Zacarias

arch/Config.in.powerpc line 119

Quoted 8 lines · Cody P Schafer

config BR2_generic_powerpc
bool "generic"

arch/Config.in.powerpc +5 -0
+     select BR2_POWERPC_CPU_HAS_ALTIVEC if BR2_ARCH_IS_64
 
+config BR2_powerpc_power4
+     bool "power4"
+config BR2_powerpc_power5
+     bool "power5"

Generic has altivec and power4/5 don't?
That doesn't sound right, generic should be the lowest common denominator... Regards.

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#4 lore raw

PATCH 1/2 powerpc64 powerpc64le: add support

Quoted 1 line · Cody P Schafer

You're right, that ALTIVEC selection needs to be removed.

Please don't top-post.

Quoted 9 lines
Quoted 6 lines · Gustavo Zacarias
Quoted 3 lines · Cody P Schafer

config BR2_generic_powerpc
bool "generic"
+ select BR2_POWERPC_CPU_HAS_ALTIVEC if BR2_ARCH_IS_64

Quoted 7 lines
Quoted 7 lines

arch/Config.in.powerpc line 119

Quoted 4 lines
arch/Config.in.powerpc +4 -0
+config BR2_powerpc_power4
+     bool "power4"
+config BR2_powerpc_power5
+     bool "power5"

Generic has altivec and power4/5 don't?
That doesn't sound right, generic should be the lowest common denominator...

Looks OK to me though. I do think that all 64-bit PowerPC platforms have
Altivec, so the generic of powerpc64 and powerpc64le should indeed enable Altivec.

Remember that we're reusing the same symbols here for the three ppc architectures.

Regards,
Arnout

Quoted 13 lines
Quoted 7 lines

Regards.

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#5 lore raw

PATCH 1/2 powerpc64 powerpc64le: add support

In reply to Cody P Schafer
Quoted 1 line · Cody P Schafer

You're right, that ALTIVEC selection needs to be removed.

Please don't top-post.

Quoted 9 lines
Quoted 6 lines · Gustavo Zacarias
Quoted 3 lines · Cody P Schafer

config BR2_generic_powerpc
bool "generic"
+ select BR2_POWERPC_CPU_HAS_ALTIVEC if BR2_ARCH_IS_64

Quoted 7 lines
Quoted 7 lines

arch/Config.in.powerpc line 119

Quoted 4 lines
arch/Config.in.powerpc +4 -0
+config BR2_powerpc_power4
+     bool "power4"
+config BR2_powerpc_power5
+     bool "power5"

Generic has altivec and power4/5 don't?
That doesn't sound right, generic should be the lowest common denominator...

Looks OK to me though. I do think that all 64-bit PowerPC platforms have
Altivec, so the generic of powerpc64 and powerpc64le should indeed enable Altivec.

Remember that we're reusing the same symbols here for the three ppc architectures.

Regards,
Arnout

Quoted 13 lines
Quoted 7 lines

Regards.

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F