diff --git a/add-riscv-support.patch b/add-riscv-support.patch new file mode 100644 index 0000000000000000000000000000000000000000..c55fc6f2c6892fef11448ea744920950e5b9d485 --- /dev/null +++ b/add-riscv-support.patch @@ -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__ */ + diff --git a/libmetal.spec b/libmetal.spec index 247c8e398764eb2f97596130c4ee2b219c72a43d..f00d2842e5c982ce71350e6d78f0ed77bc1e17f5 100644 --- a/libmetal.spec +++ b/libmetal.spec @@ -1,6 +1,6 @@ Name: libmetal Version: 2022.10.0 -Release: 3 +Release: 4 Summary: An abstraction layer across user-space Linux, baremetal, and RTOS environments License: BSD @@ -8,6 +8,7 @@ URL: https://github.com/OpenAMP/libmetal/ Source0: https://github.com/OpenAMP/libmetal/archive/refs/tags/v%{version}/%{name}-%{version}.tar.gz Patch0: libmetal-add-additional-arches.patch +Patch1: add-riscv-support.patch BuildRequires: cmake BuildRequires: doxygen @@ -71,6 +72,9 @@ done %changelog +* Thu Sep 28 2023 Jingwiw - 2022.10.0-4 +- add riscv support + * Mon Feb 27 2023 hanzongcheng - 2022.10.0-3 - update to 2022.10.0