diff options
author | Khem Raj <raj.khem@gmail.com> | 2019-11-23 10:15:28 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-11-27 13:25:18 +0000 |
commit | 4d6a9708e6e1e1aadca7e9eb50841778d391a456 (patch) | |
tree | 47744f309f8d667d07fff558b47d3b57e8eeafa1 /meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0001-architecture-Recognise-RISCV-32-RISCV-64.patch | |
parent | 051cfa77c5e7988e1889b02e3e18f74365992deb (diff) | |
download | poky-4d6a9708e6e1e1aadca7e9eb50841778d391a456.tar.gz |
systemd-bootchart: Backport RISC-V support
This is a combined backport from upstream patches for added risc-v
support
Upstream code has been re-organised before risc-v support was added to
its mix of two commits
primarily
https://github.com/systemd/systemd/commit/171b53380085b1288b03b19a2b978f36a5c003d0
https://github.com/systemd/systemd/commit/680a752c834aba1b66449d34f17dbe37e040f6b0
(From OE-Core rev: 7356ae622bd71ba1a022a9ed18c4cf085e948b38)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0001-architecture-Recognise-RISCV-32-RISCV-64.patch')
-rw-r--r-- | meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0001-architecture-Recognise-RISCV-32-RISCV-64.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0001-architecture-Recognise-RISCV-32-RISCV-64.patch b/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0001-architecture-Recognise-RISCV-32-RISCV-64.patch new file mode 100644 index 0000000000..fc03812bb9 --- /dev/null +++ b/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0001-architecture-Recognise-RISCV-32-RISCV-64.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | From 4a6ace0a965965ea15e88c3418c7158ca5cc9f8f Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 21 Nov 2019 10:12:05 -0800 | ||
4 | Subject: [PATCH] architecture: Recognise RISCV-32/RISCV-64 | ||
5 | |||
6 | Upstream-Status: Backport [https://github.com/systemd/systemd/commit/171b53380085b1288b03b19a2b978f36a5c003d0] | ||
7 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
8 | --- | ||
9 | src/architecture.h | 13 +++++++++++++ | ||
10 | 1 file changed, 13 insertions(+) | ||
11 | |||
12 | diff --git a/src/architecture.h b/src/architecture.h | ||
13 | index 26679e2..89c7d32 100644 | ||
14 | --- a/src/architecture.h | ||
15 | +++ b/src/architecture.h | ||
16 | @@ -57,6 +57,8 @@ enum { | ||
17 | ARCHITECTURE_M68K, | ||
18 | ARCHITECTURE_TILEGX, | ||
19 | ARCHITECTURE_CRIS, | ||
20 | + ARCHITECTURE_RISCV32, | ||
21 | + ARCHITECTURE_RISCV64, | ||
22 | _ARCHITECTURE_MAX, | ||
23 | _ARCHITECTURE_INVALID = -1 | ||
24 | }; | ||
25 | @@ -194,6 +196,17 @@ int uname_architecture(void); | ||
26 | #elif defined(__cris__) | ||
27 | # define native_architecture() ARCHITECTURE_CRIS | ||
28 | # error "Missing LIB_ARCH_TUPLE for CRIS" | ||
29 | +#elif defined(__riscv) | ||
30 | +# if __SIZEOF_POINTER__ == 4 | ||
31 | +# define native_architecture() ARCHITECTURE_RISCV32 | ||
32 | +# define LIB_ARCH_TUPLE "riscv32-linux-gnu" | ||
33 | +# elif __SIZEOF_POINTER__ == 8 | ||
34 | +# define native_architecture() ARCHITECTURE_RISCV64 | ||
35 | +# define LIB_ARCH_TUPLE "riscv64-linux-gnu" | ||
36 | +# else | ||
37 | +# error "Unrecognized riscv architecture variant" | ||
38 | +# endif | ||
39 | +# define PROC_CPUINFO_MODEL "cpu model" | ||
40 | #else | ||
41 | # error "Please register your architecture here!" | ||
42 | #endif | ||
43 | -- | ||
44 | 2.24.0 | ||
45 | |||