riscv: add riscv support and update to v1.19.1
*add riscv support *update to v1.19.1 Signed-off-by: luojun <luojun.oerv@isrc.iscas.ac.cn>
This commit is contained in:
parent
24b29d0b18
commit
a1793935dc
@ -1,12 +0,0 @@
|
|||||||
diff -up ./src/stalld.h.old ./src/stalld.h
|
|
||||||
--- ./src/stalld.h.old 2023-07-20 10:28:58.525933347 +0800
|
|
||||||
+++ ./src/stalld.h 2023-07-20 10:29:25.674132507 +0800
|
|
||||||
@@ -83,7 +83,7 @@ struct cpu_info {
|
|
||||||
#elif __arm__
|
|
||||||
# define __NR_sched_setattr 380
|
|
||||||
# define __NR_sched_getattr 381
|
|
||||||
-#elif __aarch64__
|
|
||||||
+#elif __aarch64__ || __loongarch64
|
|
||||||
# define __NR_sched_setattr 274
|
|
||||||
# define __NR_sched_getattr 275
|
|
||||||
#elif __powerpc__
|
|
||||||
30
riscv_support.patch
Normal file
30
riscv_support.patch
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index f866a74..76aefe2 100644
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -34,6 +34,12 @@ USE_BPF := 0
|
||||||
|
FCF_PROTECTION := $(CF_PROTECTION_OPTS)
|
||||||
|
TMOPTS := -mtune=powerpc
|
||||||
|
endif
|
||||||
|
+ifeq ($(ARCH),riscv64)
|
||||||
|
+USE_BPF :=0
|
||||||
|
+FCF_PROTECTION := $(CF_PROTECTION_OPTS)
|
||||||
|
+TMOPTS := -march=rv64gc -mabi=lp64d
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
|
||||||
|
$(info USE_BPF=$(USE_BPF))
|
||||||
|
$(info FCF_PROTECTION=$(FCF_PROTECTION))
|
||||||
|
diff --git a/src/stalld.h b/src/stalld.h
|
||||||
|
index a5b9dbc..7362d4e 100644
|
||||||
|
--- a/src/stalld.h
|
||||||
|
+++ b/src/stalld.h
|
||||||
|
@@ -119,7 +119,7 @@ struct stalld_backend {
|
||||||
|
#elif __arm__
|
||||||
|
# define __NR_sched_setattr 380
|
||||||
|
# define __NR_sched_getattr 381
|
||||||
|
-#elif __aarch64__ || __loongarch64
|
||||||
|
+#elif __aarch64__ || __loongarch64 || __riscv
|
||||||
|
# define __NR_sched_setattr 274
|
||||||
|
# define __NR_sched_getattr 275
|
||||||
|
#elif __powerpc__
|
||||||
Binary file not shown.
BIN
stalld-v1.19.1.tar.bz2
Normal file
BIN
stalld-v1.19.1.tar.bz2
Normal file
Binary file not shown.
23
stalld.spec
23
stalld.spec
@ -1,12 +1,12 @@
|
|||||||
Name: stalld
|
Name: stalld
|
||||||
Version: 1.16
|
Version: v1.19.1
|
||||||
Release: 3
|
Release: 1
|
||||||
Summary: Daemon that finds starving tasks and gives them a temporary boost
|
Summary: Daemon that finds starving tasks and gives them a temporary boost
|
||||||
|
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
URL: https://gitlab.com/rt-linux-tools/%{name}
|
URL: https://gitlab.com/rt-linux-tools/%{name}
|
||||||
Source0: https://gitlab.com/rt-linux-tools/%{name}/-/archive/v%{version}/%{name}-%{version}.tar.bz2
|
Source0: https://gitlab.com/rt-linux-tools/%{name}/-/archive/%{version}/%{name}-%{version}.tar.bz2
|
||||||
Patch0: 0001-Add-support-for-loongarch.patch
|
Patch0: riscv_support.patch
|
||||||
|
|
||||||
BuildRequires: glibc-devel
|
BuildRequires: glibc-devel
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
@ -15,6 +15,15 @@ BuildRequires: systemd
|
|||||||
|
|
||||||
Requires: systemd
|
Requires: systemd
|
||||||
|
|
||||||
|
%ifnarch i686
|
||||||
|
BuildRequires: bpftool
|
||||||
|
BuildRequires: clang
|
||||||
|
BuildRequires: libbpf-devel
|
||||||
|
BuildRequires: llvm
|
||||||
|
|
||||||
|
Requires: libbpf
|
||||||
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The stalld program monitors the set of system threads,
|
The stalld program monitors the set of system threads,
|
||||||
looking for threads that are ready-to-run but have not
|
looking for threads that are ready-to-run but have not
|
||||||
@ -31,11 +40,10 @@ allow 10 microseconds of runtime for 1 second of clock time.
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
%make_install DOCDIR=%{_docdir} MANDIR=%{_mandir} BINDIR=%{_bindir} DATADIR=%{_datadir} VERSION=%{version}
|
%make_install DOCDIR=%{_docdir} MANDIR=%{_mandir} BINDIR=%{_bindir} DATADIR=%{_datadir} VERSION=%{version}
|
||||||
%make_install -C redhat UNITDIR=%{_unitdir}
|
%make_install -C systemd UNITDIR=%{_unitdir}
|
||||||
mkdir -p %{buildroot}%{_docdir}/%{name}
|
mkdir -p %{buildroot}%{_docdir}/%{name}
|
||||||
mv %{buildroot}%{_docdir}/README.md %{buildroot}%{_docdir}/%{name}/
|
mv %{buildroot}%{_docdir}/README.md %{buildroot}%{_docdir}/%{name}/
|
||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%{_bindir}/%{name}
|
%{_bindir}/%{name}
|
||||||
%{_bindir}/throttlectl
|
%{_bindir}/throttlectl
|
||||||
@ -55,6 +63,9 @@ mv %{buildroot}%{_docdir}/README.md %{buildroot}%{_docdir}/%{name}/
|
|||||||
%systemd_postun_with_restart %{name}.service
|
%systemd_postun_with_restart %{name}.service
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Mar 23 2024 luojun <luojun.oerv@isrc.iscas.ac.cn> - v1.19.1-1
|
||||||
|
- update to v1.19 and support for oe-riscv
|
||||||
|
|
||||||
* Thu Sep 14 2023 duyiwei <duyiwei@kylinos.cn> - 1.16-3
|
* Thu Sep 14 2023 duyiwei <duyiwei@kylinos.cn> - 1.16-3
|
||||||
- move README
|
- move README
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user