diff options
-rw-r--r-- | recipes-core/systemd/systemd/0001-Add-support-for-nios2.patch | 50 | ||||
-rw-r--r-- | recipes-core/systemd/systemd_%.bbappend | 2 |
2 files changed, 52 insertions, 0 deletions
diff --git a/recipes-core/systemd/systemd/0001-Add-support-for-nios2.patch b/recipes-core/systemd/systemd/0001-Add-support-for-nios2.patch new file mode 100644 index 0000000..0ebf6c4 --- /dev/null +++ b/recipes-core/systemd/systemd/0001-Add-support-for-nios2.patch | |||
@@ -0,0 +1,50 @@ | |||
1 | From bf53c92c93c38abc6d98cc9ba405e905e8a2795d Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 16 May 2016 23:06:04 -0700 | ||
4 | Subject: [PATCH] Add support for nios2 | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | --- | ||
8 | src/shared/architecture.c | 2 ++ | ||
9 | src/shared/architecture.h | 5 +++++ | ||
10 | 2 files changed, 7 insertions(+) | ||
11 | |||
12 | diff --git a/src/shared/architecture.c b/src/shared/architecture.c | ||
13 | index a9ecfc1..4c46835 100644 | ||
14 | --- a/src/shared/architecture.c | ||
15 | +++ b/src/shared/architecture.c | ||
16 | @@ -121,6 +121,8 @@ int uname_architecture(void) { | ||
17 | { "tilegx", ARCHITECTURE_TILEGX }, | ||
18 | #elif defined(__cris__) | ||
19 | { "crisv32", ARCHITECTURE_CRIS }, | ||
20 | +#elif defined(__nios2__) | ||
21 | + { "nios2", ARCHITECTURE_NIOS2 }, | ||
22 | #else | ||
23 | #error "Please register your architecture here!" | ||
24 | #endif | ||
25 | diff --git a/src/shared/architecture.h b/src/shared/architecture.h | ||
26 | index 26679e2..7a4cbf3 100644 | ||
27 | --- a/src/shared/architecture.h | ||
28 | +++ b/src/shared/architecture.h | ||
29 | @@ -57,6 +57,7 @@ enum { | ||
30 | ARCHITECTURE_M68K, | ||
31 | ARCHITECTURE_TILEGX, | ||
32 | ARCHITECTURE_CRIS, | ||
33 | + ARCHITECTURE_NIOS2, | ||
34 | _ARCHITECTURE_MAX, | ||
35 | _ARCHITECTURE_INVALID = -1 | ||
36 | }; | ||
37 | @@ -194,6 +195,10 @@ int uname_architecture(void); | ||
38 | #elif defined(__cris__) | ||
39 | # define native_architecture() ARCHITECTURE_CRIS | ||
40 | # error "Missing LIB_ARCH_TUPLE for CRIS" | ||
41 | +#elif defined(__nios2__) | ||
42 | +# define native_architecture() ARCHITECTURE_NIOS2 | ||
43 | +# define LIB_ARCH_TUPLE "nios2-linux-gnu" | ||
44 | +# define PROC_CPUINFO_MODEL "cpu" | ||
45 | #else | ||
46 | # error "Please register your architecture here!" | ||
47 | #endif | ||
48 | -- | ||
49 | 2.8.2 | ||
50 | |||
diff --git a/recipes-core/systemd/systemd_%.bbappend b/recipes-core/systemd/systemd_%.bbappend new file mode 100644 index 0000000..7347e4c --- /dev/null +++ b/recipes-core/systemd/systemd_%.bbappend | |||
@@ -0,0 +1,2 @@ | |||
1 | FILESEXTRAPATHS_prepend := "${THISDIR}/systemd:" | ||
2 | SRC_URI += "file://0001-Add-support-for-nios2.patch" | ||