Ouss4 commented on a change in pull request #5040:
URL: https://github.com/apache/incubator-nuttx/pull/5040#discussion_r773675452
##########
File path: arch/risc-v/src/mpfs/Make.defs
##########
@@ -89,3 +89,39 @@ endif
ifeq (${CONFIG_MPFS_BOOTLOADER},y)
CHIP_CSRCS += mpfs_cache.c
endif
+
+ifeq (${CONFIG_MPFS_OPENSBI},y)
+CHIP_ASRCS += mpfs_opensbi_utils.S
+CHIP_CSRCS += mpfs_opensbi.c
+
+OPENSBI_UNPACK = opensbi-3rdparty
+OPENSBI_COMMIT = 69d7e536138ae71a24028ca849d401a4d64d564b
+OPENSBI_URL = https://github.com/riscv-software-src/opensbi/tarball
+OPENSBI_TARBALL = opensbi.tar.gz
+OPENSBI_DIR = riscv-software-src-opensbi-69d7e53
+
+$(OPENSBI_TARBALL):
+ $(Q) echo "Downloading: OpenSBI"
+ $(Q) curl -L $(OPENSBI_URL)/$(OPENSBI_COMMIT) -o chip/$(OPENSBI_TARBALL)
+
+chip/$(OPENSBI_UNPACK): $(OPENSBI_TARBALL)
+ $(Q) echo "Unpacking: OpenSBI"
+ $(Q) tar xzf chip/$(OPENSBI_TARBALL) --directory chip/
+ $(Q) mv chip/$(OPENSBI_DIR)* chip/$(OPENSBI_UNPACK)
+ $(Q) touch chip/$(OPENSBI_UNPACK)
+ $(Q) (cd chip/$(OPENSBI_UNPACK); make;)
Review comment:
ARCH_SRC is actually the src directory under the selected arch. So in
this case it is arch/riscv/src. The `context` target there is a double colon
target, so we can add another double colon target under arch/riscv/src/opensbi
and include the Make.defs in our arch/riscv/src/Makefile.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]