mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2026-10-22 20:02:04 +01:00
lib: Move sbi core library to lib/sbi
Signed-off-by: Atish Patra <atish.patra@wdc.com> Acked-by: Anup Patel <anup.patel@wdc.com>
This commit is contained in:
1 parent
a5b37bd7d2
commit
749b0b0932
22 files changed
+39
-39
No files matched your search
@@ -59,7 +59,7 @@ export platform_src_dir=$(platform_parent_dir)/$(platform_subdir)
|
||||
export platform_build_dir=$(build_dir)/platform/$(platform_subdir)
|
||||
export platform_common_src_dir=$(src_dir)/platform/common
|
||||
export include_dir=$(CURDIR)/include
|
||||
export lib_dir=$(CURDIR)/lib
|
||||
export libsbi_dir=$(CURDIR)/lib/sbi
|
||||
export firmware_dir=$(CURDIR)/firmware
|
||||
|
||||
# Find library version
|
||||
@@ -100,7 +100,7 @@ ifdef PLATFORM
|
||||
platform-object-mks=$(shell if [ -d $(platform_src_dir)/ ]; then find $(platform_src_dir) -iname "objects.mk" | sort -r; fi)
|
||||
platform-common-object-mks=$(shell if [ -d $(platform_common_src_dir) ]; then find $(platform_common_src_dir) -iname "objects.mk" | sort -r; fi)
|
||||
endif
|
||||
lib-object-mks=$(shell if [ -d $(lib_dir) ]; then find $(lib_dir) -iname "objects.mk" | sort -r; fi)
|
||||
libsbi-object-mks=$(shell if [ -d $(libsbi_dir) ]; then find $(libsbi_dir) -iname "objects.mk" | sort -r; fi)
|
||||
firmware-object-mks=$(shell if [ -d $(firmware_dir) ]; then find $(firmware_dir) -iname "objects.mk" | sort -r; fi)
|
||||
|
||||
# Include platform specifig config.mk
|
||||
@@ -113,11 +113,11 @@ ifdef PLATFORM
|
||||
include $(platform-object-mks)
|
||||
include $(platform-common-object-mks)
|
||||
endif
|
||||
include $(lib-object-mks)
|
||||
include $(libsbi-object-mks)
|
||||
include $(firmware-object-mks)
|
||||
|
||||
# Setup list of objects
|
||||
lib-objs-path-y=$(foreach obj,$(lib-objs-y),$(build_dir)/lib/$(obj))
|
||||
libsbi-objs-path-y=$(foreach obj,$(libsbi-objs-y),$(build_dir)/lib/sbi/$(obj))
|
||||
ifdef PLATFORM
|
||||
platform-objs-path-y=$(foreach obj,$(platform-objs-y),$(platform_build_dir)/$(obj))
|
||||
platform-dtb-path-y=$(foreach obj,$(platform-dtb-y),$(platform_build_dir)/$(obj))
|
||||
@@ -130,7 +130,7 @@ firmware-objs-path-y=$(firmware-bins-path-y:.bin=.o)
|
||||
# Setup list of deps files for objects
|
||||
deps-y=$(platform-objs-path-y:.o=.dep)
|
||||
deps-y+=$(platform-common-objs-path-y:.o=.dep)
|
||||
deps-y+=$(lib-objs-path-y:.o=.dep)
|
||||
deps-y+=$(libsbi-objs-path-y:.o=.dep)
|
||||
deps-y+=$(firmware-objs-path-y:.o=.dep)
|
||||
|
||||
# Setup platform ABI, ISA and Code Model
|
||||
@@ -276,10 +276,10 @@ $(build_dir)/%.elf: $(build_dir)/%.o $(build_dir)/%.elf.ld $(platform_build_dir)
|
||||
$(platform_build_dir)/%.ld: $(src_dir)/%.ldS
|
||||
$(call compile_cpp,$@,$<)
|
||||
|
||||
$(build_dir)/lib/libsbi.a: $(lib-objs-path-y)
|
||||
$(build_dir)/lib/libsbi.a: $(libsbi-objs-path-y)
|
||||
$(call compile_ar,$@,$^)
|
||||
|
||||
$(platform_build_dir)/lib/libplatsbi.a: $(lib-objs-path-y) $(platform-common-objs-path-y) $(platform-objs-path-y)
|
||||
$(platform_build_dir)/lib/libplatsbi.a: $(libsbi-objs-path-y) $(platform-common-objs-path-y) $(platform-objs-path-y)
|
||||
$(call compile_ar,$@,$^)
|
||||
|
||||
$(build_dir)/%.dep: $(src_dir)/%.c
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
#
|
||||
# Copyright (c) 2019 Western Digital Corporation or its affiliates.
|
||||
#
|
||||
# Authors:
|
||||
# Anup Patel <anup.patel@wdc.com>
|
||||
#
|
||||
|
||||
lib-objs-y += riscv_asm.o
|
||||
lib-objs-y += riscv_atomic.o
|
||||
lib-objs-y += riscv_hardfp.o
|
||||
lib-objs-y += riscv_locks.o
|
||||
lib-objs-y += riscv_unpriv.o
|
||||
|
||||
lib-objs-y += sbi_console.o
|
||||
lib-objs-y += sbi_ecall.o
|
||||
lib-objs-y += sbi_emulate_csr.o
|
||||
lib-objs-y += sbi_fifo.o
|
||||
lib-objs-y += sbi_hart.o
|
||||
lib-objs-y += sbi_illegal_insn.o
|
||||
lib-objs-y += sbi_init.o
|
||||
lib-objs-y += sbi_ipi.o
|
||||
lib-objs-y += sbi_misaligned_ldst.o
|
||||
lib-objs-y += sbi_scratch.o
|
||||
lib-objs-y += sbi_system.o
|
||||
lib-objs-y += sbi_timer.o
|
||||
lib-objs-y += sbi_tlb.o
|
||||
lib-objs-y += sbi_trap.o
|
||||
|
||||
# External Libraries to include
|
||||
PLATFORM_INCLUDE_LIBC=y
|
||||
@@ -0,0 +1,32 @@
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
#
|
||||
# Copyright (c) 2019 Western Digital Corporation or its affiliates.
|
||||
#
|
||||
# Authors:
|
||||
# Anup Patel <anup.patel@wdc.com>
|
||||
#
|
||||
|
||||
libsbi-objs-y += riscv_asm.o
|
||||
libsbi-objs-y += riscv_atomic.o
|
||||
libsbi-objs-y += riscv_hardfp.o
|
||||
libsbi-objs-y += riscv_locks.o
|
||||
libsbi-objs-y += riscv_unpriv.o
|
||||
|
||||
libsbi-objs-y += sbi_console.o
|
||||
libsbi-objs-y += sbi_ecall.o
|
||||
libsbi-objs-y += sbi_emulate_csr.o
|
||||
libsbi-objs-y += sbi_fifo.o
|
||||
libsbi-objs-y += sbi_hart.o
|
||||
libsbi-objs-y += sbi_illegal_insn.o
|
||||
libsbi-objs-y += sbi_init.o
|
||||
libsbi-objs-y += sbi_ipi.o
|
||||
libsbi-objs-y += sbi_misaligned_ldst.o
|
||||
libsbi-objs-y += sbi_scratch.o
|
||||
libsbi-objs-y += sbi_system.o
|
||||
libsbi-objs-y += sbi_timer.o
|
||||
libsbi-objs-y += sbi_tlb.o
|
||||
libsbi-objs-y += sbi_trap.o
|
||||
|
||||
# External Libraries to include
|
||||
PLATFORM_INCLUDE_LIBC=y
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user