diff mbox

[U-Boot,06/16] ti: AM43xx: config.mk: Add support for generating secure boot images

Message ID 1460417838-22343-7-git-send-email-d-allred@ti.com
State Accepted
Commit 883dfd15536e41d2b994099dd478be5a18660960
Delegated to: Tom Rini
Headers show

Commit Message

Daniel Allred April 11, 2016, 11:37 p.m. UTC
Modifies the config.mk to build secure images when building
the SPL for secure devices.

Depending on the boot media, different images are needed
for secure devices. The build generates u-boot*_HS_* files
as appropriate for the different boot modes. The same u-boot
binary file is processed slightly differently to produce a
different boot image, depending on whether the user wants to
boot off SPI, QSPI or other boot media.

Refer to README.ti-secure for more information.

Signed-off-by: Madan Srinivas <madans@ti.com>
Signed-off-by: Daniel Allred <d-allred@ti.com>
---
 arch/arm/cpu/armv7/am33xx/config.mk | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

Comments

Lokesh Vutla April 15, 2016, 9:49 a.m. UTC | #1
On Tuesday 12 April 2016 05:07 AM, Daniel Allred wrote:
> Modifies the config.mk to build secure images when building
> the SPL for secure devices.
> 
> Depending on the boot media, different images are needed
> for secure devices. The build generates u-boot*_HS_* files
> as appropriate for the different boot modes. The same u-boot
> binary file is processed slightly differently to produce a
> different boot image, depending on whether the user wants to
> boot off SPI, QSPI or other boot media.
> 
> Refer to README.ti-secure for more information.

Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>

Thanks and regards,
Lokesh
Andreas Dannenberg April 19, 2016, 3:12 p.m. UTC | #2
On Mon, Apr 11, 2016 at 06:37:08PM -0500, Daniel Allred wrote:
> Modifies the config.mk to build secure images when building
> the SPL for secure devices.
> 
> Depending on the boot media, different images are needed
> for secure devices. The build generates u-boot*_HS_* files
> as appropriate for the different boot modes. The same u-boot
> binary file is processed slightly differently to produce a
> different boot image, depending on whether the user wants to
> boot off SPI, QSPI or other boot media.
> 
> Refer to README.ti-secure for more information.
> 
> Signed-off-by: Madan Srinivas <madans@ti.com>
> Signed-off-by: Daniel Allred <d-allred@ti.com>

Tested-by: Andreas Dannenberg <dannenberg@ti.com>

--
Andreas Dannenberg
Texas Instruments Inc
Tom Rini April 21, 2016, 1:39 p.m. UTC | #3
On Mon, Apr 11, 2016 at 06:37:08PM -0500, Daniel Allred wrote:

> Modifies the config.mk to build secure images when building
> the SPL for secure devices.
> 
> Depending on the boot media, different images are needed
> for secure devices. The build generates u-boot*_HS_* files
> as appropriate for the different boot modes. The same u-boot
> binary file is processed slightly differently to produce a
> different boot image, depending on whether the user wants to
> boot off SPI, QSPI or other boot media.
> 
> Refer to README.ti-secure for more information.
> 
> Signed-off-by: Madan Srinivas <madans@ti.com>
> Signed-off-by: Daniel Allred <d-allred@ti.com>

Reviewed-by: Tom Rini <trini@konsulko.com>
diff mbox

Patch

diff --git a/arch/arm/cpu/armv7/am33xx/config.mk b/arch/arm/cpu/armv7/am33xx/config.mk
index 5294d16..6d95d32 100644
--- a/arch/arm/cpu/armv7/am33xx/config.mk
+++ b/arch/arm/cpu/armv7/am33xx/config.mk
@@ -3,9 +3,29 @@ 
 #
 # SPDX-License-Identifier:	GPL-2.0+
 #
+
+include  $(srctree)/$(CPUDIR)/omap-common/config_secure.mk
+
 ifdef CONFIG_SPL_BUILD
+ifeq ($(CONFIG_TI_SECURE_DEVICE),y)
+#
+# For booting from SPI use
+# u-boot-spl_HS_SPI_X-LOADER to program flash
+#
+# For booting spl from all other  media
+# use u-boot-spl_HS_ISSW
+#
+# Refer to README.ti-secure for more info
+#
+ALL-y	+= u-boot-spl_HS_ISSW
+ALL-$(CONFIG_SPL_SPI_SUPPORT) += u-boot-spl_HS_SPI_X-LOADER
+else
 ALL-y	+= MLO
 ALL-$(CONFIG_SPL_SPI_SUPPORT) += MLO.byteswap
+endif
 else
+ifeq ($(CONFIG_TI_SECURE_DEVICE),y)
+ALL-$(CONFIG_QSPI_BOOT) += u-boot_HS_XIP_X-LOADER
+endif
 ALL-y	+= u-boot.img
 endif