From 01e807293d1c7caa783b22b70f9fa11ceb370e53 Mon Sep 17 00:00:00 2001 From: Bryan O'Donoghue Date: Wed, 1 Nov 2017 01:19:21 +0000 Subject: warp7: Make a boot_path variable for secure optee boot We want to be able to control where boot.scr, zImage and FDT live via a variable that will enable us to redirect the location of these images for the purposes of secure-optee boot without breaking the existing upstream WaRP7 bsp. This patch introduces ${boot_path} as a prefix for those binaries but only sets the boot_path for secure-optee boot. This enables a NOOP on ordinary WaRP7 but redirects the path as needed on secure-optee booting. Signed-off-by: Bryan O'Donoghue --- include/configs/warp7.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/include/configs/warp7.h b/include/configs/warp7.h index 1a09483cda..46e3957f80 100644 --- a/include/configs/warp7.h +++ b/include/configs/warp7.h @@ -43,16 +43,17 @@ #define CONFIG_EXTRA_ENV_SETTINGS \ CONFIG_DFU_ENV_SETTINGS \ - "script=boot.scr\0" \ - "script_signed=boot.scr.imx-signed\0" \ - "image=zImage\0" \ - "image_signed=zImage.imx-signed\0" \ + "boot_path=\0" \ + "script=${boot_path}/boot.scr\0" \ + "script_signed=${boot_path}/boot.scr.imx-signed\0" \ + "image=${boot_path}/zImage\0" \ + "image_signed=${boot_path}/zImage.imx-signed\0" \ "console=ttymxc0\0" \ "ethact=usb_ether\0" \ "fdt_high=0xffffffff\0" \ "initrd_high=0xffffffff\0" \ - "fdt_file=imx7s-warp.dtb\0" \ - "fdt_file_signed=imx7s-warp.dtb.imx-signed\0" \ + "fdt_file=${boot_path}/imx7s-warp.dtb\0" \ + "fdt_file_signed=${boot_path}/imx7s-warp.dtb.imx-signed\0" \ "fdt_addr=" __stringify(CONFIG_SYS_FDT_ADDR)"\0" \ "optee_file=uTee.optee\0" \ "optee_file_signed=uTee.optee.imx-signed\0" \ @@ -176,6 +177,7 @@ #define CONFIG_BOOTCOMMAND \ "mmc dev ${mmcdev};" \ "mmc dev ${mmcdev}; if mmc rescan; then " \ + "setenv boot_path /boot;" \ "run loadbootscript_hab;" \ "if test ${filesize} -ne 0; then "\ "run bootscript; " \ -- cgit v1.2.3