diff mbox

[U-Boot,v3] env: export fdt_blob to the environment variable

Message ID 1444631774-11036-1-git-send-email-thomas@wytron.com.tw
State Superseded
Headers show

Commit Message

Thomas Chou Oct. 12, 2015, 6:36 a.m. UTC
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>
---
v2
  move the code to per board, nios2-generic.c.
v3
  move the code to generic, board_r.c.

 common/board_r.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Simon Glass Oct. 15, 2015, 1:24 p.m. UTC | #1
Hi,

On Monday, 12 October 2015, Thomas Chou <thomas@wytron.com.tw> wrote:
>
> 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>
> ---
> v2
>   move the code to per board, nios2-generic.c.
> v3
>   move the code to generic, board_r.c.
>
>  common/board_r.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/common/board_r.c b/common/board_r.c
> index a4facf8..6f10a31 100644
> --- a/common/board_r.c
> +++ b/common/board_r.c
> @@ -449,6 +449,7 @@ static int initr_env(void)
>                 env_relocate();
>         else
>                 set_default_env(NULL);
> +       setenv_addr("fdt_blob", gd->fdt_blob);
>
>         /* Initialize from environment */
>         load_addr = getenv_ulong("loadaddr", 16, load_addr);
> --
> 2.1.4
>

We already have fdtcontroladdr, so how about using that instead?

Also please can you add docs to README.fdt-control? Also note that it
is read-only and cannot be changed. In fact changing it will be
ignored.

Regards,
Simon
diff mbox

Patch

diff --git a/common/board_r.c b/common/board_r.c
index a4facf8..6f10a31 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -449,6 +449,7 @@  static int initr_env(void)
 		env_relocate();
 	else
 		set_default_env(NULL);
+	setenv_addr("fdt_blob", gd->fdt_blob);
 
 	/* Initialize from environment */
 	load_addr = getenv_ulong("loadaddr", 16, load_addr);