]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
microblaze: Set script_offset_nor env variable
authorT Karthik Reddy <t.karthik.reddy@xilinx.com>
Thu, 17 Dec 2020 10:15:55 +0000 (03:15 -0700)
committerMichal Simek <michal.simek@xilinx.com>
Mon, 4 Jan 2021 09:51:27 +0000 (10:51 +0100)
Set script_offset_nor env variable using CONFIG_BOOT_SCRIPT_OFFSET
and nor flash start address to keep bootscript offset configurable.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
board/xilinx/microblaze-generic/microblaze-generic.c

index e5909997690a20dd40767df0fd2bdedf0e2e2d3e..d4095c07c1e9ada68baaa6a3df55c4201ad2adfe 100644 (file)
@@ -67,7 +67,10 @@ int board_late_init(void)
 
        status |= env_set_hex("ramdisk_addr_r",
                               gd->ram_base + SZ_32M + SZ_4M + SZ_2M);
-
+       if (IS_ENABLED(CONFIG_MTD_NOR_FLASH))
+               status |= env_set_hex("script_offset_nor",
+                                      gd->bd->bi_flashstart +
+                                      CONFIG_BOOT_SCRIPT_OFFSET);
        if (status)
                printf("%s: Saving run time variables FAILED\n", __func__);