Compare commits
10 Commits
0d306a4314
...
64f18be37b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
64f18be37b | ||
|
|
67eca7e36e | ||
|
|
70980a0045 | ||
|
|
9c9f018475 | ||
|
|
0c5dfedc77 | ||
|
|
b99cad33d7 | ||
|
|
5131cfd210 | ||
|
|
979234d6af | ||
|
|
9ec309aa37 | ||
|
|
4695d602c4 |
47
add-loongarch64-support-for-libmetal.patch
Normal file
47
add-loongarch64-support-for-libmetal.patch
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
From dad4708778f8bb649fa0b874c1e74d5f7b51cd75 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Wenlong Zhang <zhangwenlong@loongson.cn>
|
||||||
|
Date: Tue, 18 Jun 2024 15:10:16 +0800
|
||||||
|
Subject: [PATCH] add loongarch64 support for libmetal
|
||||||
|
|
||||||
|
---
|
||||||
|
lib/processor/loongarch64/CMakeLists.txt | 3 +++
|
||||||
|
lib/processor/loongarch64/cpu.h | 17 +++++++++++++++++
|
||||||
|
2 files changed, 20 insertions(+)
|
||||||
|
create mode 100644 lib/processor/loongarch64/CMakeLists.txt
|
||||||
|
create mode 100644 lib/processor/loongarch64/cpu.h
|
||||||
|
|
||||||
|
diff --git a/lib/processor/loongarch64/CMakeLists.txt b/lib/processor/loongarch64/CMakeLists.txt
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..c06e951
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/lib/processor/loongarch64/CMakeLists.txt
|
||||||
|
@@ -0,0 +1,3 @@
|
||||||
|
+collect (PROJECT_LIB_HEADERS cpu.h)
|
||||||
|
+
|
||||||
|
+# vim: expandtab:ts=2:sw=2:smartindent
|
||||||
|
diff --git a/lib/processor/loongarch64/cpu.h b/lib/processor/loongarch64/cpu.h
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..ea34eb6
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/lib/processor/loongarch64/cpu.h
|
||||||
|
@@ -0,0 +1,17 @@
|
||||||
|
+/*
|
||||||
|
+ * Copyright (c) 2018, Pinecone Inc. and Contributors. All rights reserved.
|
||||||
|
+ *
|
||||||
|
+ * SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+/*
|
||||||
|
+ * @file cpu.h
|
||||||
|
+ * @brief CPU specific primitives
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+#ifndef __METAL_LOONGARCH_CPU__H__
|
||||||
|
+#define __METAL_LOONGARCH_CPU__H__
|
||||||
|
+
|
||||||
|
+#define metal_cpu_yield()
|
||||||
|
+
|
||||||
|
+#endif /* __METAL_LOONGARCH_CPU__H__ */
|
||||||
|
--
|
||||||
|
2.43.0
|
||||||
|
|
||||||
57
add-riscv-support.patch
Normal file
57
add-riscv-support.patch
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
diff -ur --new-file libmetal-2022.10.0/lib/processor/riscv/CMakeLists.txt libmetal-2022.10.0/lib/processor/riscv/CMakeLists.txt
|
||||||
|
--- libmetal-2022.10.0/lib/processor/riscv/CMakeLists.txt 2022-10-28 10:12:23.000000000 +0800
|
||||||
|
+++ libmetal-2022.10.0/lib/processor/riscv/CMakeLists.txt 1970-01-01 08:00:00.000000000 +0800
|
||||||
|
@@ -1,3 +0,0 @@
|
||||||
|
-collect (PROJECT_LIB_HEADERS cpu.h)
|
||||||
|
-
|
||||||
|
-# vim: expandtab:ts=2:sw=2:smartindent
|
||||||
|
diff -ur --new-file libmetal-2022.10.0/lib/processor/riscv/cpu.h libmetal-2022.10.0/lib/processor/riscv/cpu.h
|
||||||
|
--- libmetal-2022.10.0/lib/processor/riscv/cpu.h 2022-10-28 10:12:23.000000000 +0800
|
||||||
|
+++ libmetal-2022.10.0/lib/processor/riscv/cpu.h 1970-01-01 08:00:00.000000000 +0800
|
||||||
|
@@ -1,17 +0,0 @@
|
||||||
|
-/*
|
||||||
|
- * Copyright (c) 2018, Pinecone Inc. and Contributors. All rights reserved.
|
||||||
|
- *
|
||||||
|
- * SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
- */
|
||||||
|
-
|
||||||
|
-/*
|
||||||
|
- * @file cpu.h
|
||||||
|
- * @brief CPU specific primitives
|
||||||
|
- */
|
||||||
|
-
|
||||||
|
-#ifndef __METAL_RISCV_CPU__H__
|
||||||
|
-#define __METAL_RISCV_CPU__H__
|
||||||
|
-
|
||||||
|
-#define metal_cpu_yield()
|
||||||
|
-
|
||||||
|
-#endif /* __METAL_RISCV_CPU__H__ */
|
||||||
|
diff -ur --new-file libmetal-2022.10.0/lib/processor/riscv64/CMakeLists.txt libmetal-2022.10.0/lib/processor/riscv64/CMakeLists.txt
|
||||||
|
--- libmetal-2022.10.0/lib/processor/riscv64/CMakeLists.txt 1970-01-01 08:00:00.000000000 +0800
|
||||||
|
+++ libmetal-2022.10.0/lib/processor/riscv64/CMakeLists.txt 2023-06-20 17:21:21.507556947 +0800
|
||||||
|
@@ -0,0 +1,3 @@
|
||||||
|
+collect (PROJECT_LIB_HEADERS cpu.h)
|
||||||
|
+
|
||||||
|
+# vim: expandtab:ts=2:sw=2:smartindent
|
||||||
|
diff -ur --new-file libmetal-2022.10.0/lib/processor/riscv64/cpu.h libmetal-2022.10.0/lib/processor/riscv64/cpu.h
|
||||||
|
--- libmetal-2022.10.0/lib/processor/riscv64/cpu.h 1970-01-01 08:00:00.000000000 +0800
|
||||||
|
+++ libmetal-2022.10.0/lib/processor/riscv64/cpu.h 2023-06-20 17:21:21.507556947 +0800
|
||||||
|
@@ -0,0 +1,17 @@
|
||||||
|
+/*
|
||||||
|
+ * Copyright (c) 2018, Pinecone Inc. and Contributors. All rights reserved.
|
||||||
|
+ *
|
||||||
|
+ * SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+/*
|
||||||
|
+ * @file cpu.h
|
||||||
|
+ * @brief CPU specific primitives
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+#ifndef __METAL_RISCV_CPU__H__
|
||||||
|
+#define __METAL_RISCV_CPU__H__
|
||||||
|
+
|
||||||
|
+#define metal_cpu_yield()
|
||||||
|
+
|
||||||
|
+#endif /* __METAL_RISCV_CPU__H__ */
|
||||||
|
|
||||||
Binary file not shown.
BIN
libmetal-2022.10.0.tar.gz
Normal file
BIN
libmetal-2022.10.0.tar.gz
Normal file
Binary file not shown.
@ -1,13 +1,15 @@
|
|||||||
Name: libmetal
|
Name: libmetal
|
||||||
Version: 2020.10.0
|
Version: 2022.10.0
|
||||||
Release: 2
|
Release: 5
|
||||||
Summary: An abstraction layer across user-space Linux, baremetal, and RTOS environments
|
Summary: An abstraction layer across user-space Linux, baremetal, and RTOS environments
|
||||||
|
|
||||||
License: BSD
|
License: BSD
|
||||||
URL: https://github.com/OpenAMP/libmetal/
|
URL: https://github.com/OpenAMP/libmetal/
|
||||||
Source0: https://github.com/OpenAMP/libmetal/archive/v%{version}/%{name}-%{version}.tar.gz
|
Source0: https://github.com/OpenAMP/libmetal/archive/refs/tags/v%{version}/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
Patch0: libmetal-add-additional-arches.patch
|
Patch0: libmetal-add-additional-arches.patch
|
||||||
|
Patch1: add-riscv-support.patch
|
||||||
|
Patch2: add-loongarch64-support-for-libmetal.patch
|
||||||
|
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: doxygen
|
BuildRequires: doxygen
|
||||||
@ -40,12 +42,16 @@ baremetal, and RTOS environments.
|
|||||||
%build
|
%build
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
%cmake -DCMAKE_INSTALL_LIBDIR=%{_libdir} -DWITH_STATIC_LIB=OFF ..
|
%cmake -DCMAKE_INSTALL_LIBDIR=%{_libdir} -DWITH_STATIC_LIB=OFF -DWITH_EXAMPLES=ON ..
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
cd build
|
cd build
|
||||||
%make_install
|
%make_install
|
||||||
|
for f in `find %{buildroot}/%{_bindir}/ -type f -regex ".*-shared*"`; do
|
||||||
|
newf="`echo ${f} | sed 's/-shared*$//g'`"
|
||||||
|
mv "${f}" "${newf}"
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
%ldconfig_scriptlets
|
%ldconfig_scriptlets
|
||||||
@ -53,9 +59,8 @@ cd build
|
|||||||
%files
|
%files
|
||||||
%license LICENSE.md
|
%license LICENSE.md
|
||||||
%doc README.md
|
%doc README.md
|
||||||
%{_bindir}/test-metal-shared
|
%{_libdir}/*.so*
|
||||||
%{_libdir}/libmetal.so.0
|
%{_bindir}/test-*
|
||||||
%{_libdir}/libmetal.so.0.1.0
|
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%{_libdir}/libmetal.so
|
%{_libdir}/libmetal.so
|
||||||
@ -68,6 +73,24 @@ cd build
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jun 18 2024 Wenlong Zhang <zhangwenlong@loongson.cn> - 2022.10.0-5
|
||||||
|
- add loongarch64 support for libmetal
|
||||||
|
|
||||||
|
* Thu Sep 28 2023 Jingwiw <wangjingwei@iscas.ac.cn> - 2022.10.0-4
|
||||||
|
- add riscv support
|
||||||
|
|
||||||
|
* Mon Feb 27 2023 hanzongcheng <hanzongcheng@huawei.com> - 2022.10.0-3
|
||||||
|
- update to 2022.10.0
|
||||||
|
|
||||||
|
* Fri Aug 5 2022 zhangziyang <zhangziyang1@huawei.com> - 2022.04.0-2
|
||||||
|
- synchronous embedded compilation and packaging options
|
||||||
|
|
||||||
|
* Thu Jun 30 2022 luojects <luoyonglun@huawei.com> - 2022.04.0-1
|
||||||
|
- update to 2022.04.0
|
||||||
|
|
||||||
|
* Sat Feb 12 2022 Wayne Ren <renwei41@huawei.com> - 2021.10.0-1
|
||||||
|
- update to 2021.10.0
|
||||||
|
|
||||||
* Tue Dec 14 2021 konglidong <konglidong@uniontech.com> - 2020.10.0-2
|
* Tue Dec 14 2021 konglidong <konglidong@uniontech.com> - 2020.10.0-2
|
||||||
- delete %dist
|
- delete %dist
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user