From 53c69dec331ce8a6d0c57f0daed55d82f76d4fe6 Mon Sep 17 00:00:00 2001 From: T Karthik Reddy Date: Wed, 18 Dec 2019 03:34:41 -0700 Subject: 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 Signed-off-by: Michal Simek --- board/xilinx/zynqmp/zynqmp.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'board/xilinx/zynqmp') diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c index b72eade43e..8bdc67748e 100644 --- a/board/xilinx/zynqmp/zynqmp.c +++ b/board/xilinx/zynqmp/zynqmp.c @@ -667,6 +667,8 @@ int board_late_init(void) initrd_hi = round_down(initrd_hi, SZ_16M); env_set_addr("initrd_high", (void *)initrd_hi); + env_set_hex("script_offset_f", CONFIG_BOOT_SCRIPT_OFFSET); + reset_reason(); return 0; -- cgit