forked from Mirrors/opensbi
TOP: Allow building platform out-of-tree
This patch extends our current build-system for building platform sources which are not part of OpenSBI sources. For example: Let's say we have out-of-tree ABC platform sources. We place these sources under <XYZ>/ABC directory along with its config.mk and objects.mk. To build out-of-tree ABC platform from OpenSBI directory: $ make PLATFORM_DIR=<XYZ>/ABC OR $ make PLATFORM_DIR=<XYZ> PLATFORM=ABC To build out-of-tree ABC platform from <XYZ>/ABC directory: $ make PLATFORM_DIR=<XYZ>/ABC -C <path_to_opensbi> OR $ make PLATFORM_DIR=<XYZ> PLATFORM=ABC -C <path_to_opensbi> Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
@@ -29,7 +29,7 @@ firmware-bins-$(FW_PAYLOAD) += fw_payload.bin
|
||||
ifdef FW_PAYLOAD_PATH
|
||||
FW_PAYLOAD_PATH_FINAL=$(FW_PAYLOAD_PATH)
|
||||
else
|
||||
FW_PAYLOAD_PATH_FINAL=$(build_dir)/$(platform_subdir)/firmware/payloads/test.bin
|
||||
FW_PAYLOAD_PATH_FINAL=$(platform_build_dir)/firmware/payloads/test.bin
|
||||
endif
|
||||
firmware-genflags-$(FW_PAYLOAD) += -DFW_PAYLOAD_PATH=\"$(FW_PAYLOAD_PATH_FINAL)\"
|
||||
ifdef FW_PAYLOAD_OFFSET
|
||||
@@ -41,7 +41,7 @@ endif
|
||||
|
||||
ifndef FW_PAYLOAD_FDT_PATH
|
||||
ifdef FW_PAYLOAD_FDT
|
||||
FW_PAYLOAD_FDT_PATH=$(build_dir)/$(platform_subdir)/$(FW_PAYLOAD_FDT)
|
||||
FW_PAYLOAD_FDT_PATH=$(platform_build_dir)/$(FW_PAYLOAD_FDT)
|
||||
endif
|
||||
endif
|
||||
ifdef FW_PAYLOAD_FDT_PATH
|
||||
|
Reference in New Issue
Block a user