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:
Anup Patel
2018-12-24 10:53:10 +05:30
committed by Anup Patel
parent bb3665d0f0
commit 2d90226e04
3 changed files with 22 additions and 6 deletions

10
firmware/external_deps.mk Normal file
View 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)

View File

@@ -7,10 +7,10 @@
# SPDX-License-Identifier: BSD-2-Clause
#
firmware-cppflags-y =
firmware-cflags-y =
firmware-asflags-y =
firmware-ldflags-y =
firmware-cppflags-y +=
firmware-cflags-y +=
firmware-asflags-y +=
firmware-ldflags-y +=
ifdef FW_TEXT_START
firmware-cppflags-y += -DFW_TEXT_START=$(FW_TEXT_START)
@@ -26,8 +26,11 @@ endif
firmware-bins-$(FW_PAYLOAD) += fw_payload.bin
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
firmware-cppflags-$(FW_PAYLOAD) += -DFW_PAYLOAD_PATH=$(FW_PAYLOAD_PATH_FINAL)
ifdef FW_PAYLOAD_OFFSET
firmware-cppflags-$(FW_PAYLOAD) += -DFW_PAYLOAD_OFFSET=$(FW_PAYLOAD_OFFSET)
endif