* atf-20240117-bacca82a8: import new atf Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org> * atf-20240117-bacca82a8: remove Werror * atf-20240117-bacca82a8: call bromimage-x86_64 for aarch64 host * atf-20240117-bacca82a8: export ram boot uart option Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org> * atf-20240117-bacca82a8: apply openwrt patches Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org> * atf-20240117-bacca82a8: port board configs Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org> * build.sh: switch to use atf-20240117-bacca82a8 Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org> * build.sh: support new menuconfig Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org> * build.sh: pass u-boot path by variable Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org> * atf-20231013-0ea67d76a: drop Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org> --------- Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org> Co-authored-by: hanwckf <hanwckf@vip.qq.com>
58 lines
1.7 KiB
Makefile
58 lines
1.7 KiB
Makefile
#
|
|
# Copyright (C) 2021, MediaTek Inc. All rights reserved.
|
|
#
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
#
|
|
|
|
# Create a dependency rule for a .o file
|
|
# Arguments:
|
|
# $(1) = image_type (scp_bl2, bl33, etc.)
|
|
# $(2) = source file name (without suffix)
|
|
define ADD_DEP_RULE
|
|
$(BUILD_PLAT)/$(1)/$(2).o: $(BUILD_PLAT)/$(1)/$(2).cfg.h
|
|
endef
|
|
|
|
# Create dependency rules for .o files
|
|
# Arguments:
|
|
# $(1) = image_type (scp_bl2, bl33, etc.)
|
|
# $(2) = source file names (without suffix)
|
|
define GEN_DEP_RULES
|
|
$(foreach f,$(2),$(eval $(call ADD_DEP_RULE,$(1),$(f))))
|
|
endef
|
|
|
|
# Generate the content of a dependency file
|
|
# Arguments:
|
|
# $(1) = list of dependency variable names
|
|
define GEN_DEP_HEADER_TEXT
|
|
$(foreach dep,$(1),/* #define $(dep) $($(dep)) */\n)
|
|
endef
|
|
|
|
# Create commands to check & update a dependency file for a .o file
|
|
# Arguments:
|
|
# $(1) = image_type (scp_bl2, bl33, etc.)
|
|
# $(2) = dependency header file path
|
|
# $(3) = list of dependency variable names
|
|
define CHECK_DEP
|
|
$(BUILD_PLAT)/$(1)/$(2).cfg.h::
|
|
${Q}mkdir -p $(BUILD_PLAT)/$(1); \
|
|
echo "$(call GEN_DEP_HEADER_TEXT,$(3))" > $(BUILD_PLAT)/$(1)/$(2).cfg-new.h; \
|
|
if ! test -f $(BUILD_PLAT)/$(1)/$(2).cfg.h; then \
|
|
mv $(BUILD_PLAT)/$(1)/$(2).cfg-new.h $(BUILD_PLAT)/$(1)/$(2).cfg.h; \
|
|
else \
|
|
if ! cmp -s $(BUILD_PLAT)/$(1)/$(2).cfg.h $(BUILD_PLAT)/$(1)/$(2).cfg-new.h; then \
|
|
mv -f $(BUILD_PLAT)/$(1)/$(2).cfg-new.h $(BUILD_PLAT)/$(1)/$(2).cfg.h; \
|
|
else \
|
|
rm -f $(BUILD_PLAT)/$(1)/$(2).cfg-new.h; \
|
|
fi \
|
|
fi
|
|
endef
|
|
|
|
# Create dependency rule for a .cfg.h file
|
|
# Arguments:
|
|
# $(1) = image_type (scp_bl2, bl33, etc.)
|
|
# $(2) = dependency header file path
|
|
# $(3) = list of dependency variable names
|
|
define MAKE_DEP
|
|
$(eval $(call CHECK_DEP,$(1),$(2),$(3)))
|
|
endef
|