From 6c063250b55eb9d7bc96615557fa731474f287fe Mon Sep 17 00:00:00 2001 From: Maximilian Brune Date: Sat, 29 Jun 2024 01:41:47 +0200 Subject: arch/riscv: Allow adding OpenSBI as external blob The reasoning is that even though vendors currently tend to open source their OpenSBI implementation, they often do so in their own repository. So instead of adding all possible source repositories as submodules, we shall allow specifying a path to an already compiled OpenSBI ELF file. This is similar of what we currently do on ARM64 with the BL31 binary. Signed-off-by: Maximilian Brune Change-Id: I6592ad90a254ca4ac9a6cee89404ad49274f0dea Reviewed-on: https://review.coreboot.org/c/coreboot/+/83284 Tested-by: build bot (Jenkins) Reviewed-by: Alicja Michalska Reviewed-by: ron minnich --- src/arch/riscv/Makefile.mk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/arch/riscv/Makefile.mk') diff --git a/src/arch/riscv/Makefile.mk b/src/arch/riscv/Makefile.mk index 51ed016653..bda392adb4 100644 --- a/src/arch/riscv/Makefile.mk +++ b/src/arch/riscv/Makefile.mk @@ -159,7 +159,12 @@ $(OPENSBI_TARGET): $(obj)/config.h | $(OPENSBI_SOURCE) FW_PAYLOAD=n \ FW_TEXT_START=$(CONFIG_OPENSBI_TEXT_START) -$(OPENSBI): $(OPENSBI_TARGET) +# build upstream OpenSBI source tree +opensbi-source-y = $(OPENSBI_TARGET) +# get OpenSBI from specified binary +opensbi-source-$(CONFIG_OPENSBI_BLOB) = $(call strip_quotes,$(CONFIG_OPENSBI_BLOB_PATH)) + +$(OPENSBI): $(opensbi-source-y) cp $< $@ OPENSBI_CBFS := $(CONFIG_CBFS_PREFIX)/opensbi -- cgit v1.2.3