summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorAnatolij Gustschin <agust@denx.de>2017-08-17 19:01:48 (GMT)
committerTom Rini <trini@konsulko.com>2017-08-26 18:56:12 (GMT)
commit767cb74a0028be337d2ffecee7450e83fa2e7bd1 (patch)
tree77f102e19cab2df9305f3d62b64e51ca0b19852a /cmd
parent195dc23185400fa605d268c3d903c83286ecae37 (diff)
downloadu-boot-767cb74a0028be337d2ffecee7450e83fa2e7bd1.tar.xz
cmd: spl: provide address and size of prepared FDT in environment
Writing prepared FDT to persistent storage should be possible in scripts. Create environment variables containing address and size of the updated FDT. Scripts can use these variables after running 'spl export fdt ...' command to write the new blob to persistent storage. Signed-off-by: Anatolij Gustschin <agust@denx.de>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/spl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/spl.c b/cmd/spl.c
index 057764a..1165b78 100644
--- a/cmd/spl.c
+++ b/cmd/spl.c
@@ -118,6 +118,11 @@ static int spl_export(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
case SPL_EXPORT_FDT:
printf("Argument image is now in RAM: 0x%p\n",
(void *)images.ft_addr);
+ env_set_addr("fdtargsaddr", images.ft_addr);
+ env_set_hex("fdtargslen", fdt_totalsize(images.ft_addr));
+ if (fdt_totalsize(images.ft_addr) >
+ CONFIG_CMD_SPL_WRITE_SIZE)
+ puts("WARN: FDT size > CMD_SPL_WRITE_SIZE\n");
break;
#endif
case SPL_EXPORT_ATAGS: