diff options
author | Thomas Chou <thomas@wytron.com.tw> | 2015-10-16 08:44:51 +0800 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-10-23 09:42:28 -0600 |
commit | 545dfd101400637219b7024ce0fc02728663380e (patch) | |
tree | 60e9b0327470b041080355a8345c6a62aead7891 | |
parent | 2419cd16a1357a6d0f394b4631ea07b4f9e85ac7 (diff) |
env: export fdt_blob to the environment variable
Export fdt_blob to the environment variable. So that we may
use it to boot Linux.
Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | common/board_r.c | 3 | ||||
-rw-r--r-- | doc/README.fdt-control | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/common/board_r.c b/common/board_r.c index f8c1baa949..0a4dfe4972 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -446,6 +446,9 @@ static int initr_env(void) env_relocate(); else set_default_env(NULL); +#ifdef CONFIG_OF_CONTROL + setenv_addr("fdtcontroladdr", gd->fdt_blob); +#endif /* Initialize from environment */ load_addr = getenv_ulong("loadaddr", 16, load_addr); diff --git a/doc/README.fdt-control b/doc/README.fdt-control index e6d5ed0bb6..29fd56a815 100644 --- a/doc/README.fdt-control +++ b/doc/README.fdt-control @@ -156,7 +156,10 @@ address of the fdt binary blob, and will override either of the options. Be aware that this environment variable is checked prior to relocation, when only the compiled-in environment is available. Therefore it is not possible to define this variable in the saved SPI/NAND flash -environment, for example (it will be ignored). +environment, for example (it will be ignored). After relocation, this +variable will be set to the address of the newly relocated fdt blob. +It is read-only and cannot be changed. It can optionally be used to +control the boot process of Linux with bootm/bootz commands. To use this, put something like this in your board header file: |