aboutsummaryrefslogtreecommitdiff
path: root/board/xilinx/zynq/board.c
diff options
context:
space:
mode:
authorT Karthik Reddy <t.karthik.reddy@xilinx.com>2019-12-18 03:34:41 -0700
committerMichal Simek <michal.simek@xilinx.com>2020-01-14 09:05:52 +0100
commit53c69dec331ce8a6d0c57f0daed55d82f76d4fe6 (patch)
treeba6e8a2597fd75d8e7f13db6d82910f777574de0 /board/xilinx/zynq/board.c
parent18be60b8bce2ce4ab38da6f1be9aa8f22557129e (diff)
downloadu-boot-53c69dec331ce8a6d0c57f0daed55d82f76d4fe6.zip
u-boot-53c69dec331ce8a6d0c57f0daed55d82f76d4fe6.tar.gz
u-boot-53c69dec331ce8a6d0c57f0daed55d82f76d4fe6.tar.bz2
board: xilinx: Add support for user configurable boot script offset
Currently "script_offset_f" env variable is hardcoded, this variable specifies from which offset of the flash boot.scr should be read/write. As flashes are of different sizes having a fixed offset makes it difficult to load other images into the flash which may overwrite the boot script or cannot utilize the full memory. This current fix creates a new config "CONFIG_BOOT_SCRIPT_OFFSET" which holds the offset address, overwrites the "script_offset_f" variable. Also removed existing variable with default values, as the default values are held by CONFIG_BOOT_SCRIPT_OFFSET Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'board/xilinx/zynq/board.c')
-rw-r--r--board/xilinx/zynq/board.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/board/xilinx/zynq/board.c b/board/xilinx/zynq/board.c
index cffabe8..390d948 100644
--- a/board/xilinx/zynq/board.c
+++ b/board/xilinx/zynq/board.c
@@ -76,6 +76,8 @@ int board_late_init(void)
env_set("boot_targets", new_targets);
+ env_set_hex("script_offset_f", CONFIG_BOOT_SCRIPT_OFFSET);
+
return 0;
}