forked from Mirrors/opensbi
firmware: Use dummy payload for FW_PAYLOAD
We use recently added separate dummy payload for FW_PAYLOAD when FW_PAYLOAD_PATH is not specified. Signed-off-by: Anup Patel <anup.patel@wdc.com>
This commit is contained in:
5
Makefile
5
Makefile
@@ -243,12 +243,15 @@ $(build_dir)/$(platform_subdir)/%.dep: $(src_dir)/%.S
|
|||||||
$(build_dir)/$(platform_subdir)/%.o: $(src_dir)/%.S
|
$(build_dir)/$(platform_subdir)/%.o: $(src_dir)/%.S
|
||||||
$(call compile_as,$@,$<)
|
$(call compile_as,$@,$<)
|
||||||
|
|
||||||
# Dependency files should only be included after default Makefile rule
|
# Dependency files should only be included after default Makefile rules
|
||||||
# They should not be included for any "xxxconfig" or "xxxclean" rule
|
# They should not be included for any "xxxconfig" or "xxxclean" rule
|
||||||
all-deps-1 = $(if $(findstring config,$(MAKECMDGOALS)),,$(deps-y))
|
all-deps-1 = $(if $(findstring config,$(MAKECMDGOALS)),,$(deps-y))
|
||||||
all-deps-2 = $(if $(findstring clean,$(MAKECMDGOALS)),,$(all-deps-1))
|
all-deps-2 = $(if $(findstring clean,$(MAKECMDGOALS)),,$(all-deps-1))
|
||||||
-include $(all-deps-2)
|
-include $(all-deps-2)
|
||||||
|
|
||||||
|
# Include external dependency of firmwares after default Makefile rules
|
||||||
|
include $(src_dir)/firmware/external_deps.mk
|
||||||
|
|
||||||
install_targets-y = install_libsbi
|
install_targets-y = install_libsbi
|
||||||
ifdef PLATFORM
|
ifdef PLATFORM
|
||||||
install_targets-y += install_libplatsbi
|
install_targets-y += install_libplatsbi
|
||||||
|
10
firmware/external_deps.mk
Normal file
10
firmware/external_deps.mk
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2018 Western Digital Corporation or its affiliates.
|
||||||
|
#
|
||||||
|
# Authors:
|
||||||
|
# Anup Patel <anup.patel@wdc.com>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: BSD-2-Clause
|
||||||
|
#
|
||||||
|
|
||||||
|
$(build_dir)/$(platform_subdir)/firmware/fw_payload.o: $(FW_PAYLOAD_PATH_FINAL)
|
@@ -7,10 +7,10 @@
|
|||||||
# SPDX-License-Identifier: BSD-2-Clause
|
# SPDX-License-Identifier: BSD-2-Clause
|
||||||
#
|
#
|
||||||
|
|
||||||
firmware-cppflags-y =
|
firmware-cppflags-y +=
|
||||||
firmware-cflags-y =
|
firmware-cflags-y +=
|
||||||
firmware-asflags-y =
|
firmware-asflags-y +=
|
||||||
firmware-ldflags-y =
|
firmware-ldflags-y +=
|
||||||
|
|
||||||
ifdef FW_TEXT_START
|
ifdef FW_TEXT_START
|
||||||
firmware-cppflags-y += -DFW_TEXT_START=$(FW_TEXT_START)
|
firmware-cppflags-y += -DFW_TEXT_START=$(FW_TEXT_START)
|
||||||
@@ -26,8 +26,11 @@ endif
|
|||||||
|
|
||||||
firmware-bins-$(FW_PAYLOAD) += fw_payload.bin
|
firmware-bins-$(FW_PAYLOAD) += fw_payload.bin
|
||||||
ifdef FW_PAYLOAD_PATH
|
ifdef FW_PAYLOAD_PATH
|
||||||
firmware-cppflags-$(FW_PAYLOAD) += -DFW_PAYLOAD_PATH=$(FW_PAYLOAD_PATH)
|
FW_PAYLOAD_PATH_FINAL=$(FW_PAYLOAD_PATH)
|
||||||
|
else
|
||||||
|
FW_PAYLOAD_PATH_FINAL=$(build_dir)/$(platform_subdir)/firmware/payloads/dummy.bin
|
||||||
endif
|
endif
|
||||||
|
firmware-cppflags-$(FW_PAYLOAD) += -DFW_PAYLOAD_PATH=$(FW_PAYLOAD_PATH_FINAL)
|
||||||
ifdef FW_PAYLOAD_OFFSET
|
ifdef FW_PAYLOAD_OFFSET
|
||||||
firmware-cppflags-$(FW_PAYLOAD) += -DFW_PAYLOAD_OFFSET=$(FW_PAYLOAD_OFFSET)
|
firmware-cppflags-$(FW_PAYLOAD) += -DFW_PAYLOAD_OFFSET=$(FW_PAYLOAD_OFFSET)
|
||||||
endif
|
endif
|
||||||
|
Reference in New Issue
Block a user