Andrew F. Davis | 5083696 | 2019-04-12 12:54:46 -0400 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0 |
| 2 | # |
| 3 | # Copyright (C) 2018 Texas Instruments, Incorporated - http://www.ti.com/ |
| 4 | # Andrew F. Davis <afd@ti.com> |
| 5 | |
| 6 | quiet_cmd_k3secureimg = SECURE $@ |
| 7 | ifneq ($(TI_SECURE_DEV_PKG),) |
| 8 | ifneq ($(wildcard $(TI_SECURE_DEV_PKG)/scripts/secure-binary-image.sh),) |
| 9 | cmd_k3secureimg = $(TI_SECURE_DEV_PKG)/scripts/secure-binary-image.sh \ |
| 10 | $< $@ \ |
| 11 | $(if $(KBUILD_VERBOSE:1=), >/dev/null) |
| 12 | else |
| 13 | cmd_k3secureimg = echo "WARNING:" \ |
| 14 | "$(TI_SECURE_DEV_PKG)/scripts/secure-binary-image.sh not found." \ |
| 15 | "$@ was NOT secured!"; cp $< $@ |
| 16 | endif |
| 17 | else |
| 18 | cmd_k3secureimg = echo "WARNING: TI_SECURE_DEV_PKG environment" \ |
| 19 | "variable must be defined for TI secure devices." \ |
| 20 | "$@ was NOT secured!"; cp $< $@ |
| 21 | endif |
| 22 | |
| 23 | %.dtb_HS: %.dtb FORCE |
| 24 | $(call if_changed,k3secureimg) |
| 25 | |
| 26 | $(obj)/u-boot-spl-nodtb.bin_HS: $(obj)/u-boot-spl-nodtb.bin FORCE |
| 27 | $(call if_changed,k3secureimg) |
| 28 | |
| 29 | tispl.bin_HS: $(obj)/u-boot-spl-nodtb.bin_HS $(patsubst %,$(obj)/dts/%.dtb_HS,$(subst ",,$(CONFIG_SPL_OF_LIST))) $(SPL_ITS) FORCE |
| 30 | $(call if_changed,mkfitimage) |
| 31 | |
| 32 | MKIMAGEFLAGS_u-boot.img_HS = -f auto -A $(ARCH) -T firmware -C none -O u-boot \ |
| 33 | -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \ |
| 34 | -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board" -E \ |
| 35 | $(patsubst %,-b arch/$(ARCH)/dts/%.dtb_HS,$(subst ",,$(CONFIG_OF_LIST))) |
| 36 | |
| 37 | OF_LIST_TARGETS = $(patsubst %,arch/$(ARCH)/dts/%.dtb,$(subst ",,$(CONFIG_OF_LIST))) |
| 38 | $(OF_LIST_TARGETS): dtbs |
| 39 | |
| 40 | u-boot-nodtb.bin_HS: u-boot-nodtb.bin FORCE |
| 41 | $(call if_changed,k3secureimg) |
| 42 | |
| 43 | u-boot.img_HS: u-boot-nodtb.bin_HS u-boot.img $(patsubst %.dtb,%.dtb_HS,$(OF_LIST_TARGETS)) FORCE |
| 44 | $(call if_changed,mkimage) |