Compare commits

..

No commits in common. "64f18be37b86d6cee52b3bdd5ca1f389fcda6ec5" and "0d306a4314d58339b5c94eb67597173585bf21bf" have entirely different histories.

5 changed files with 8 additions and 135 deletions

View File

@ -1,47 +0,0 @@
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

View File

@ -1,57 +0,0 @@
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__ */

BIN
libmetal-2020.10.0.tar.gz Normal file

Binary file not shown.

Binary file not shown.

View File

@ -1,15 +1,13 @@
Name: libmetal Name: libmetal
Version: 2022.10.0 Version: 2020.10.0
Release: 5 Release: 2
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/refs/tags/v%{version}/%{name}-%{version}.tar.gz Source0: https://github.com/OpenAMP/libmetal/archive/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
@ -42,16 +40,12 @@ baremetal, and RTOS environments.
%build %build
mkdir build mkdir build
cd build cd build
%cmake -DCMAKE_INSTALL_LIBDIR=%{_libdir} -DWITH_STATIC_LIB=OFF -DWITH_EXAMPLES=ON .. %cmake -DCMAKE_INSTALL_LIBDIR=%{_libdir} -DWITH_STATIC_LIB=OFF ..
%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
@ -59,8 +53,9 @@ done
%files %files
%license LICENSE.md %license LICENSE.md
%doc README.md %doc README.md
%{_libdir}/*.so* %{_bindir}/test-metal-shared
%{_bindir}/test-* %{_libdir}/libmetal.so.0
%{_libdir}/libmetal.so.0.1.0
%files devel %files devel
%{_libdir}/libmetal.so %{_libdir}/libmetal.so
@ -73,24 +68,6 @@ done
%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