Introduce powerpc64 LE architecture support
cover Introduce powerpc64 LE architecture support
This patchset adds base support for building ppc64 in Litte-Endian mode, the linux-yocto changes and qemu related changes will make it buildable target out of box, but that is not yet made available
The following changes since commit ecbf203e34484731dcb6acc5e75df79cb86e55dc:
sstatesig: Improve debug output if getpwuid() fails (2020-01-16 22:33:09 +0000)
are available in the Git repository at:
git://git.yoctoproject.org/poky-contrib kraj/ppc64le
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=kraj/ppc64le
Khem Raj (5):
classes,conf,lib: Add support for powerpc64le
gcc: Enable 32bit powerpcle at multi-arch for powerpc64le
openssl: Add powerpc64 LE support
tcf-agent: Add LCL_STOP_SERVICES for powerpc64 LE
ghostscript: Add powerpc64 LE specific objarch.h
meta/classes/libc-package.bbclass | 1 + meta/classes/meson.bbclass | 2 +- meta/conf/bitbake.conf | 1 + meta/lib/oe/elf.py | 2 + meta/lib/oe/package_manager.py | 1 + .../openssl/openssl_1.1.1d.bb | 3 ++ meta/recipes-devtools/gcc/gcc-common.inc | 1 + .../tcf-agent/tcf-agent_git.bb | 1 + .../ghostscript/powerpc64le/objarch.h | 40 +++++++++++++++++++ 9 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-extended/ghostscript/ghostscript/powerpc64le/objarch.h
Signature · 1 line
2.25.0
PATCH 1/5 classes, conf, lib: Add support for powerpc64le
LE is default for modern powerpc64, power8+
PowerPC64 Little Endian Linux ABI specifies Power8 as the minimum ISA. The basic ABI can run on earlier versions of the 64 bit PowerPC ISA, but it was helpful to define a new, minimum instruction set for Linux distribution releases during the switch to Little Endian.
--- meta/classes/libc-package.bbclass | 1 + meta/classes/meson.bbclass | 2 +- meta/conf/bitbake.conf | 1 + meta/lib/oe/elf.py | 2 ++ meta/lib/oe/package_manager.py | 1 + 5 files changed, 6 insertions(+), 1 deletion(-)
meta/classes/libc-package.bbclass +1 -0
@@ -248,6 +248,7 @@ python package_do_split_gconvs () { "sh4": " --uint32-align=4 --big-endian ", \ "powerpc": " --uint32-align=4 --big-endian ", \ "powerpc64": " --uint32-align=4 --big-endian ", \ + "powerpc64le": " --uint32-align=4 --little-endian ", \ "mips": " --uint32-align=4 --big-endian ", \ "mipsisa32r6": " --uint32-align=4 --big-endian ", \ "mips64": " --uint32-align=4 --big-endian ", \
meta/classes/meson.bbclass +1 -1
@@ -45,7 +45,7 @@ def meson_cpu_family(var, d): arch = d.getVar(var) if arch == 'powerpc': return 'ppc' - elif arch == 'powerpc64': + elif arch == 'powerpc64' or arch == 'powerpc64le': return 'ppc64' elif arch == 'armeb': return 'arm'
meta/conf/bitbake.conf +1 -0
@@ -11,6 +11,7 @@ baselib = "${BASELIB}" baselib[vardepvalue] = "${baselib}" BASELIB = "lib" BASELIB_powerpc64 = "lib64" +BASELIB_powerpc64le = "lib64" # Path prefixes export base_prefix = ""
meta/lib/oe/elf.py +2 -0
@@ -34,6 +34,7 @@ def machine_dict(d): "armeb": (40, 97, 0, False, 32), "powerpc": (20, 0, 0, False, 32), "powerpc64": (21, 0, 0, False, 64), + "powerpc64le": (21, 0, 0, True, 64), "i386": ( 3, 0, 0, True, 32), "i486": ( 3, 0, 0, True, 32), "i586": ( 3, 0, 0, True, 32),
@@ -68,6 +69,7 @@ def machine_dict(d): "armeb": ( 40, 97, 0, False, 32), "powerpc": ( 20, 0, 0, False, 32), "powerpc64": ( 21, 0, 0, False, 64), + "powerpc64le": (21, 0, 0, True, 64), "i386": ( 3, 0, 0, True, 32), "i486": ( 3, 0, 0, True, 32), "i586": ( 3, 0, 0, True, 32),
meta/lib/oe/package_manager.py +1 -0
@@ -107,6 +107,7 @@ def generate_locale_archive(d, rootfs, target_arch, localedir): "sh4": ["--uint32-align=4", "--big-endian"], "powerpc": ["--uint32-align=4", "--big-endian"], "powerpc64": ["--uint32-align=4", "--big-endian"], + "powerpc64le": ["--uint32-align=4", "--little-endian"], "mips": ["--uint32-align=4", "--big-endian"], "mipsisa32r6": ["--uint32-align=4", "--big-endian"], "mips64": ["--uint32-align=4", "--big-endian"],
Signature · 1 line
2.25.0
PATCH 2/5 gcc: Enable 32bit powerpcle at multi-arch for powerpc64le
In reply to Khem RajEven though we do not expect any legacy ( 32bit ) for LE, linux-yocto does enable the compat code, so enable 32bit support to get that going
--- meta/recipes-devtools/gcc/gcc-common.inc | 1 + 1 file changed, 1 insertion(+)
meta/recipes-devtools/gcc/gcc-common.inc +1 -0
@@ -47,6 +47,7 @@ def get_gcc_multiarch_setting(bb, d): "i586": "--enable-targets=all", "i686": "--enable-targets=all", "powerpc": "--enable-targets=powerpc64", + "powerpc64le": "--enable-targets=powerpcle", "mips": "--enable-targets=all", "sparc": "--enable-targets=all", }
Signature · 1 line
2.25.0
PATCH 3/5 openssl: Add powerpc64 LE support
In reply to Khem Raj--- meta/recipes-connectivity/openssl/openssl_1.1.1d.bb | 3 +++ 1 file changed, 3 insertions(+)
meta/recipes-connectivity/openssl/openssl_1.1.1d.bb +3 -0
@@ -102,6 +102,9 @@ do_configure () { linux-powerpc64) target=linux-ppc64 ;; + linux-powerpc64le) + target=linux-ppc64le + ;; linux-riscv32) target=linux-generic32 ;;
Signature · 1 line
2.25.0
PATCH 4/5 tcf-agent: Add LCL_STOP_SERVICES for powerpc64 LE
In reply to Khem RajThis is same as PPC64 BE
--- meta/recipes-devtools/tcf-agent/tcf-agent_git.bb | 1 + 1 file changed, 1 insertion(+)
meta/recipes-devtools/tcf-agent/tcf-agent_git.bb +1 -0
@@ -46,6 +46,7 @@ CFLAGS_append_mips = " ${LCL_STOP_SERVICES}" CFLAGS_append_mips64 = " ${LCL_STOP_SERVICES}" CFLAGS_append_libc-musl = " ${LCL_STOP_SERVICES}" CFLAGS_append_powerpc64 = " ${LCL_STOP_SERVICES}" +CFLAGS_append_powerpc64le = " ${LCL_STOP_SERVICES}" CFLAGS_append_riscv64 = " ${LCL_STOP_SERVICES}" do_install() {
Signature · 1 line
2.25.0
PATCH 5/5 ghostscript: Add powerpc64 LE specific objarch.h
In reply to Khem Raj--- .../ghostscript/powerpc64le/objarch.h | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 meta/recipes-extended/ghostscript/ghostscript/powerpc64le/objarch.h
meta/recipes-extended/ghostscript/ghostscript/powerpc64le/objarch.h new file +40 -0
@@ -0,0 +1,40 @@ +/* Parameters derived from machine and compiler architecture. */ +/* This file is generated mechanically by genarch.c. */ + +/* ---------------- Scalar alignments ---------------- */ + +#define ARCH_ALIGN_SHORT_MOD 2 +#define ARCH_ALIGN_INT_MOD 4 +#define ARCH_ALIGN_LONG_MOD 8 +#define ARCH_ALIGN_PTR_MOD 8 +#define ARCH_ALIGN_FLOAT_MOD 4 +#define ARCH_ALIGN_DOUBLE_MOD 8 + +/* ---------------- Scalar sizes ---------------- */ + +#define ARCH_LOG2_SIZEOF_CHAR 0 +#define ARCH_LOG2_SIZEOF_SHORT 1 +#define ARCH_LOG2_SIZEOF_INT 2 +#define ARCH_LOG2_SIZEOF_LONG 3 +#define ARCH_LOG2_SIZEOF_LONG_LONG 3 +#define ARCH_SIZEOF_GX_COLOR_INDEX 8 +#define ARCH_SIZEOF_PTR 8 +#define ARCH_SIZEOF_FLOAT 4 +#define ARCH_SIZEOF_DOUBLE 8 +#define ARCH_FLOAT_MANTISSA_BITS 24 +#define ARCH_DOUBLE_MANTISSA_BITS 53 + +/* ---------------- Unsigned max values ---------------- */ + +#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) +#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) +#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) +#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) + +/* ---------------- Miscellaneous ---------------- */ + +#define ARCH_IS_BIG_ENDIAN 0 +#define ARCH_PTRS_ARE_SIGNED 0 +#define ARCH_FLOATS_ARE_IEEE 1 +#define ARCH_ARITH_RSHIFT 2 +#define ARCH_DIV_NEG_POS_TRUNCATES 1
Signature · 1 line
2.25.0