libatomic-ops: Backport nios2 support
PATCH 1/7 libatomic-ops: Backport nios2 support
Backport a patch adding nios2 support into libatomic-ops
Signed-off-by Marek Vasut <[email protected]>
Cc Ley Foon Tan <[email protected]>
Cc Richard Purdie <[email protected]>
Cc Ross Burton <[email protected]>
Cc Thomas Chou <[email protected]>
Cc Walter Goossens <[email protected]>
--- ...01-Add-initial-nios2-architecture-support.patch | 70 ++++++++++++++++++++++ .../libatomic-ops/libatomic-ops_7.4.2.bb | 5 +- 2 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-support/libatomic-ops/libatomic-ops/0001-Add-initial-nios2-architecture-support.patch
meta/recipes-support/libatomic-ops/libatomic-ops/0001-Add-initial-nios2-architecture-support.patch new file +70 -0
@@ -0,0 +1,70 @@ +From 4b005ee56898309e8afba9b3c48cf94f0f5f78e4 Mon Sep 17 00:00:00 2001 +From: Marek Vasut <[email protected]> +Date: Tue, 15 Mar 2016 10:09:26 +0300 +Subject: [PATCH] Add initial nios2 architecture support + +* src/Makefile.am (nobase_private_HEADERS): Add nios2.h. +* src/atomic_ops.h: Include nios2.h if __nios2__. +* src/atomic_ops/sysdeps/gcc/nios2.h: New file. + +Signed-off-by: Marek Vasut <[email protected]> +Upstream-Status: Backport [ https://github.com/ivmai/libatomic_ops.git 4b005ee56898309e8afba9b3c48cf94f0f5f78e4 ] +--- + src/Makefile.am | 1 + + src/atomic_ops.h | 3 +++ + src/atomic_ops/sysdeps/gcc/nios2.h | 17 +++++++++++++++++ + 3 files changed, 21 insertions(+) + create mode 100644 src/atomic_ops/sysdeps/gcc/nios2.h + +diff --git a/src/Makefile.am b/src/Makefile.am +index fc09b27..d463427 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -79,6 +79,7 @@ nobase_private_HEADERS = atomic_ops/ao_version.h \ + atomic_ops/sysdeps/gcc/ia64.h \ + atomic_ops/sysdeps/gcc/m68k.h \ + atomic_ops/sysdeps/gcc/mips.h \ ++ atomic_ops/sysdeps/gcc/nios2.h \ + atomic_ops/sysdeps/gcc/powerpc.h \ + atomic_ops/sysdeps/gcc/s390.h \ + atomic_ops/sysdeps/gcc/sh.h \ +diff --git a/src/atomic_ops.h b/src/atomic_ops.h +index 33fe00e..ec02ba4 100644 +--- a/src/atomic_ops.h ++++ b/src/atomic_ops.h +@@ -262,6 +262,9 @@ + # if defined(__m68k__) + # include "atomic_ops/sysdeps/gcc/m68k.h" + # endif /* __m68k__ */ ++# if defined(__nios2__) ++# include "atomic_ops/sysdeps/gcc/nios2.h" ++# endif /* __nios2__ */ + # if defined(__powerpc__) || defined(__ppc__) || defined(__PPC__) \ + || defined(__powerpc64__) || defined(__ppc64__) + # include "atomic_ops/sysdeps/gcc/powerpc.h" +diff --git a/src/atomic_ops/sysdeps/gcc/nios2.h b/src/atomic_ops/sysdeps/gcc/nios2.h +new file mode 100644 +index 0000000..f402cbb +--- /dev/null ++++ b/src/atomic_ops/sysdeps/gcc/nios2.h +@@ -0,0 +1,17 @@ ++/* ++ * Copyright (C) 2016 Marek Vasut <[email protected]> ++ * ++ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED ++ * OR IMPLIED. ANY USE IS AT YOUR OWN RISK. ++ * ++ * Permission is hereby granted to use or copy this program ++ * for any purpose, provided the above notices are retained on all copies. ++ * Permission to modify the code and to distribute modified code is granted, ++ * provided the above notices are retained, and a notice that the code was ++ * modified is included with the above copyright notice. ++ */ ++ ++#include "../test_and_set_t_is_ao_t.h" ++#include "generic.h" ++ ++#define AO_T_IS_INT +-- +2.7.0 +
meta/recipes-support/libatomic-ops/libatomic-ops_7.4.2.bb +4 -1
@@ -7,7 +7,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ file://doc/LICENSING.txt;md5=e00dd5c8ac03a14c5ae5225a4525fa2d \ " -SRC_URI = "http://www.ivmaisoft.com/_bin/atomic_ops/libatomic_ops-${PV}.tar.gz" +SRC_URI = "\ + http://www.ivmaisoft.com/_bin/atomic_ops/libatomic_ops-${PV}.tar.gz \ + file://0001-Add-initial-nios2-architecture-support.patch \ + " SRC_URI[md5sum] = "1d6538604b314d2fccdf86915e5c0857" SRC_URI[sha256sum] = "04fa615f62992547bcbda562260e28b504bc4c06e2f985f267f3ade30304b5dd"
Signature · 1 line
2.7.0
PATCH 2/7 bdgwc: Backport nios2 support
Backport patch from bdwgc mainline which adds initial support for nios2 architecture.
Signed-off-by Marek Vasut <[email protected]>
Cc Ley Foon Tan <[email protected]>
Cc Richard Purdie <[email protected]>
Cc Ross Burton <[email protected]>
Cc Thomas Chou <[email protected]>
Cc Walter Goossens <[email protected]>
--- .../bdwgc/bdwgc/0002-Altera-NIOS2-support.patch | 71 ++++++++++++++++++++++ meta/recipes-support/bdwgc/bdwgc_7.4.2.bb | 1 + 2 files changed, 72 insertions(+) create mode 100644 meta/recipes-support/bdwgc/bdwgc/0002-Altera-NIOS2-support.patch
meta/recipes-support/bdwgc/bdwgc/0002-Altera-NIOS2-support.patch new file +71 -0
@@ -0,0 +1,71 @@ +From 2571df0e30b4976d7a12dbc6fbec4f1c4027924d Mon Sep 17 00:00:00 2001 +From: Marek Vasut <[email protected]> +Date: Thu, 28 Jan 2016 04:13:13 +0100 +Subject: [PATCH] Altera NIOS2 support + +Add simple nios2 configuration support. + +* include/private/gcconfig.h (NIOS2): New macro. +* include/private/gcconfig.h (mach_type_known, CPP_WORDSZ, MACH_TYPE, +OS_TYPE, DYNAMIC_LOADING, _end, __data_start, DATASTART, DATAEND, +ALIGNMENT, HBLKSIZE, HBLKSIZE, LINUX_STACKBOTTOM, NO_GETCONTEXT): +Define for NIOS2. + +Signed-off-by: Marek Vasut <[email protected]> +Upstream-Status: Backport [ https://github.com/ivmai/bdwgc.git 2571df0e30b4976d7a12dbc6fbec4f1c4027924d ] +--- + include/private/gcconfig.h | 24 +++++++++++++++++++++++- + 1 file changed, 23 insertions(+), 1 deletion(-) + +diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h +index c467c26..92d4727 100644 +--- a/include/private/gcconfig.h ++++ b/include/private/gcconfig.h +@@ -181,6 +181,10 @@ + # endif + # define mach_type_known + # endif ++# if defined(__NIOS2__) || defined(__NIOS2) || defined(__nios2__) ++# define NIOS2 /* Altera NIOS2 */ ++# define mach_type_known ++# endif + # if defined(DGUX) && (defined(i386) || defined(__i386__)) + # define I386 + # ifndef _USING_DGUX +@@ -1658,6 +1662,24 @@ + # endif + # endif + ++# ifdef NIOS2 ++# define CPP_WORDSZ 32 ++# define MACH_TYPE "NIOS2" ++# ifdef LINUX ++# define OS_TYPE "LINUX" ++# define DYNAMIC_LOADING ++ extern int _end[]; ++ extern int __data_start[]; ++# define DATASTART ((ptr_t)(__data_start)) ++# define DATAEND ((ptr_t)(_end)) ++# define ALIGNMENT 4 ++# ifndef HBLKSIZE ++# define HBLKSIZE 4096 ++# endif ++# define LINUX_STACKBOTTOM ++# endif /* Linux */ ++# endif ++ + # ifdef HP_PA + # define MACH_TYPE "HP_PA" + # ifdef __LP64__ +@@ -2622,6 +2644,7 @@ + #if ((defined(UNIX_LIKE) && (defined(DARWIN) || defined(HURD) \ + || defined(OPENBSD) || defined(ARM32) \ +- || defined(MIPS) || defined(AVR32))) \ ++ || defined(MIPS) || defined(AVR32) \ ++ || defined(NIOS2))) \ + || (defined(LINUX) && (defined(SPARC) || defined(M68K))) \ + || ((defined(RTEMS) || defined(PLATFORM_ANDROID)) && defined(I386))) \ + && !defined(NO_GETCONTEXT) +-- +2.7.0 +
meta/recipes-support/bdwgc/bdwgc_7.4.2.bb +1 -0
@@ -23,6 +23,7 @@ LIC_FILES_CHKSUM = "file://README.QUICK;md5=55f5088f90a982fed7af9a4897047ef7" SRC_URI = "http://www.hboehm.info/gc/gc_source/gc-${PV}.tar.gz \ file://0001-fix-build-with-musl.patch \ + file://0002-Altera-NIOS2-support.patch \ " SRC_URI[md5sum] = "12c05fd2811d989341d8c6d81f66af87"
Signature · 1 line
2.7.0
PATCH 3/7 packagegroup-core-sdk: Disable sanitizers for nios2
In reply to Marek VasutThese are not available on nios2 yet, so disable them.
Signed-off-by Marek Vasut <[email protected]>
Cc Ley Foon Tan <[email protected]>
Cc Richard Purdie <[email protected]>
Cc Ross Burton <[email protected]>
Cc Thomas Chou <[email protected]>
Cc Walter Goossens <[email protected]>
--- meta/recipes-core/packagegroups/packagegroup-core-sdk.bb | 1 + 1 file changed, 1 insertion(+)
meta/recipes-core/packagegroups/packagegroup-core-sdk.bb +1 -0
@@ -32,6 +32,7 @@ SANITIZERS_aarch64 = "" SANITIZERS_mips = "" SANITIZERS_mips64 = "" SANITIZERS_mips64n32 = "" +SANITIZERS_nios2 = "" SANITIZERS_powerpc64 = "" SANITIZERS_sparc = "" SANITIZERS_libc-musl = ""
Signature · 1 line
2.7.0
PATCH 4/7 kexec: Disable on nios2
In reply to Marek Vasutkexec is not supported on nios2, so disable it.
Signed-off-by Marek Vasut <[email protected]>
Cc Ley Foon Tan <[email protected]>
Cc Richard Purdie <[email protected]>
Cc Ross Burton <[email protected]>
Cc Thomas Chou <[email protected]>
Cc Walter Goossens <[email protected]>
--- meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb +2 -1
@@ -11,9 +11,10 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" inherit packagegroup -# kexec-tools doesn't work on e5500-64b yet +# kexec-tools doesn't work on e5500-64b and nios2 yet KEXECTOOLS ?= "kexec" KEXECTOOLS_e5500-64b ?= "" +KEXECTOOLS_nios2 ?= "" X11GLTOOLS = "\ mesa-demos \
Signature · 1 line
2.7.0
PATCH 5/7 lttng-modules: Add nios2 support
In reply to Marek VasutThe lttng-modules are compatible with nios2, so just amend the compatibility string.
Signed-off-by Marek Vasut <[email protected]>
Cc Ley Foon Tan <[email protected]>
Cc Richard Purdie <[email protected]>
Cc Ross Burton <[email protected]>
Cc Thomas Chou <[email protected]>
Cc Walter Goossens <[email protected]>
--- meta/recipes-kernel/lttng/lttng-modules_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-kernel/lttng/lttng-modules_git.bb +1 -1
@@ -11,7 +11,7 @@ inherit module SRCREV = "45e0ebd91f995cc73c2b0d5c60cf9d12e8c838bf" PV = "2.7.1+git${SRCPV}" -COMPATIBLE_HOST = '(x86_64|i.86|powerpc|aarch64|mips|arm).*-linux' +COMPATIBLE_HOST = '(x86_64|i.86|powerpc|aarch64|mips|nios2|arm).*-linux' SRC_URI = "git://git.lttng.org/lttng-modules.git;branch=stable-2.7"
Signature · 1 line
2.7.0
PATCH 6/7 systemtap: Disable nios2 support
In reply to Marek Vasutsystemtap does not support nios2 yet, so disable it.
Signed-off-by Marek Vasut <[email protected]>
Cc Ley Foon Tan <[email protected]>
Cc Richard Purdie <[email protected]>
Cc Ross Burton <[email protected]>
Cc Thomas Chou <[email protected]>
Cc Walter Goossens <[email protected]>
--- meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb | 1 + 1 file changed, 1 insertion(+)
meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb +1 -0
@@ -36,6 +36,7 @@ SYSTEMTAP_libc-uclibc = "" SYSTEMTAP_mips = "" SYSTEMTAP_mips64 = "" SYSTEMTAP_mips64n32 = "" +SYSTEMTAP_nios2 = "" SYSTEMTAP_aarch64 = "" # lttng-ust uses sched_getcpu() which is not there on uclibc
Signature · 1 line
2.7.0
PATCH 7/7 valgrind: Disable nios2 support
In reply to Marek Vasutvalgrind does not support nios2 yet, so disable it.
Signed-off-by Marek Vasut <[email protected]>
Cc Ley Foon Tan <[email protected]>
Cc Richard Purdie <[email protected]>
Cc Ross Burton <[email protected]>
Cc Thomas Chou <[email protected]>
Cc Walter Goossens <[email protected]>
--- meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb | 1 + 1 file changed, 1 insertion(+)
meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb +1 -0
@@ -61,6 +61,7 @@ VALGRIND_libc-uclibc = "" VALGRIND_mips = "" VALGRIND_mips64 = "" VALGRIND_mips64n32 = "" +VALGRIND_nios2 = "" VALGRIND_arm = "" VALGRIND_aarch64 = ""
Signature · 1 line
2.7.0