diff options
author | T Karthik Reddy <t.karthik.reddy@xilinx.com> | 2020-09-22 05:18:54 -0600 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2020-10-27 08:01:36 +0100 |
commit | ed0842d6c5c6681df425bcefcdf259667c9384a9 (patch) | |
tree | cb1a4e9676dc60017c1c967ccf6860b20649fc9a /board/xilinx | |
parent | d6242edcce52499ee24a1994272ecba63fe96e17 (diff) | |
download | u-boot-ed0842d6c5c6681df425bcefcdf259667c9384a9.zip u-boot-ed0842d6c5c6681df425bcefcdf259667c9384a9.tar.gz u-boot-ed0842d6c5c6681df425bcefcdf259667c9384a9.tar.bz2 |
microblaze: Setup distro boot env variables at run time
Setup all the distro boot related environment variables at
run time. Add BOOT_SCRIPT_OFFSET config to microblaze board
Kconfig.
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')
-rw-r--r-- | board/xilinx/microblaze-generic/Kconfig | 5 | ||||
-rw-r--r-- | board/xilinx/microblaze-generic/microblaze-generic.c | 14 |
2 files changed, 19 insertions, 0 deletions
diff --git a/board/xilinx/microblaze-generic/Kconfig b/board/xilinx/microblaze-generic/Kconfig index f2fa0f7..7a97211 100644 --- a/board/xilinx/microblaze-generic/Kconfig +++ b/board/xilinx/microblaze-generic/Kconfig @@ -38,4 +38,9 @@ config XILINX_MICROBLAZE0_HW_VER string "Core version number" default "7.10.d" +config BOOT_SCRIPT_OFFSET + hex "Boot script offset" + default 0xFC0000 + help + Specifies distro boot script offset in NAND/QSPI flash. endif diff --git a/board/xilinx/microblaze-generic/microblaze-generic.c b/board/xilinx/microblaze-generic/microblaze-generic.c index 724c339..c1ae8fb 100644 --- a/board/xilinx/microblaze-generic/microblaze-generic.c +++ b/board/xilinx/microblaze-generic/microblaze-generic.c @@ -63,6 +63,20 @@ int board_late_init(void) lowmem_size)); status |= env_set_addr("fdt_high", (void *)min_t(ulong, max_size, lowmem_size)); + + status |= env_set_hex("scriptaddr", max_size + SZ_2M); + + status |= env_set_hex("pxefile_addr_r", max_size + SZ_1M); + + status |= env_set_hex("kernel_addr_r", gd->ram_base + SZ_32M); + + status |= env_set_hex("fdt_addr_r", gd->ram_base + SZ_32M - SZ_1M); + + status |= env_set_hex("ramdisk_addr_r", + gd->ram_base + SZ_32M + SZ_4M + SZ_2M); + + status |= env_set_hex("script_offset_f", CONFIG_BOOT_SCRIPT_OFFSET); + if (status) printf("%s: Saving run time variables FAILED\n", __func__); |