Merge branch 'master' of git://git.denx.de/u-boot
[oweals/u-boot.git] / arch / arm / cpu / armv7 / omap-common / config_secure.mk
1 #
2 # Copyright (C) 2016, Texas Instruments, Incorporated - http://www.ti.com/
3 #
4 # SPDX-License-Identifier:      GPL-2.0+
5 #
6 quiet_cmd_mkomapsecimg = MKIMAGE $@
7 ifneq ($(TI_SECURE_DEV_PKG),)
8 ifneq ($(wildcard $(TI_SECURE_DEV_PKG)/scripts/create-boot-image.sh),)
9 ifneq ($(CONFIG_SPL_BUILD),)
10 cmd_mkomapsecimg = $(TI_SECURE_DEV_PKG)/scripts/create-boot-image.sh \
11         $(patsubst u-boot-spl_HS_%,%,$(@F)) $< $@ $(CONFIG_ISW_ENTRY_ADDR) \
12         $(if $(KBUILD_VERBOSE:1=), >/dev/null)
13 else
14 cmd_mkomapsecimg = $(TI_SECURE_DEV_PKG)/scripts/create-boot-image.sh \
15     $(patsubst u-boot_HS_%,%,$(@F)) $< $@ $(CONFIG_ISW_ENTRY_ADDR) \
16     $(if $(KBUILD_VERBOSE:1=), >/dev/null)
17 endif
18 else
19 cmd_mkomapsecimg = echo "WARNING:" \
20         "$(TI_SECURE_DEV_PKG)/scripts/create-boot-image.sh not found." \
21         "$@ was NOT created!"
22 endif
23 else
24 cmd_mkomapsecimg = echo "WARNING: TI_SECURE_DEV_PKG environment" \
25         "variable must be defined for TI secure devices. $@ was NOT created!"
26 endif
27
28 # Standard X-LOADER target (QPSI, NOR flash)
29 u-boot-spl_HS_X-LOADER: $(obj)/u-boot-spl.bin
30         $(call if_changed,mkomapsecimg)
31
32 # For MLO targets (SD card boot) the final file name
33 # that is copied to the SD card fAT partition must
34 # be MLO, so we make a copy of the output file to a
35 # new file with that name
36 u-boot-spl_HS_MLO: $(obj)/u-boot-spl.bin
37         $(call if_changed,mkomapsecimg)
38         @if [ -f $@ ]; then \
39                 cp -f $@ MLO; \
40         fi
41
42 # Standard 2ND target (certain peripheral boot modes)
43 u-boot-spl_HS_2ND: $(obj)/u-boot-spl.bin
44         $(call if_changed,mkomapsecimg)
45
46 # Standard ULO target (certain peripheral boot modes)
47 u-boot-spl_HS_ULO: $(obj)/u-boot-spl.bin
48         $(call if_changed,mkomapsecimg)
49
50 # Standard ISSW target (certain devices, various boot modes)
51 u-boot-spl_HS_ISSW: $(obj)/u-boot-spl.bin
52         $(call if_changed,mkomapsecimg)
53
54 # For SPI flash on AM335x and AM43xx, these
55 # require special byte swap handling so we use
56 # the SPI_X-LOADER target instead of X-LOADER
57 # and let the create-boot-image.sh script handle
58 # that
59 u-boot-spl_HS_SPI_X-LOADER: $(obj)/u-boot-spl.bin
60         $(call if_changed,mkomapsecimg)
61
62 # For supporting single stage XiP QSPI on AM43xx, the
63 # image is a full u-boot file, not an SPL. In this case
64 # the mkomapsecimg command looks for a u-boot-HS_* prefix
65 u-boot_HS_XIP_X-LOADER: $(obj)/u-boot.bin
66         $(call if_changed,mkomapsecimg)