From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Sun, 11 Oct 2015 14:16:26 +0200 Subject: [U-Boot] [PATCH v2] nios2: export fdt_blob to the environment variable In-Reply-To: <1444534456-6067-1-git-send-email-thomas@wytron.com.tw> References: <1444391217-9883-1-git-send-email-thomas@wytron.com.tw> <1444534456-6067-1-git-send-email-thomas@wytron.com.tw> Message-ID: <201510111416.26398.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sunday, October 11, 2015 at 05:34:16 AM, Thomas Chou wrote: > Export fdt_blob to the environment variable. So that we may > use it to boot Linux. > > Signed-off-by: Thomas Chou > --- > v2 > move the code to per board, nios2-generic.c. > > board/altera/nios2-generic/nios2-generic.c | 9 +++++++++ > include/configs/nios2-generic.h | 1 + > 2 files changed, 10 insertions(+) > > diff --git a/board/altera/nios2-generic/nios2-generic.c > b/board/altera/nios2-generic/nios2-generic.c index e7fecd2..f508c00 100644 > --- a/board/altera/nios2-generic/nios2-generic.c > +++ b/board/altera/nios2-generic/nios2-generic.c > @@ -14,6 +14,8 @@ > #include > #include > > +DECLARE_GLOBAL_DATA_PTR; > + > #if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CONFIG_ENV_ADDR) && \ > defined(CONFIG_CFI_FLASH_MTD) > static void __early_flash_cmd_reset(void) > @@ -35,6 +37,13 @@ int board_early_init_f(void) > return 0; > } > > +int misc_init_r(void) > +{ > + setenv_addr("fdt_blob", gd->fdt_blob); > + > + return 0; > +} Shouldn't this go into generic code ? Best regards, Marek Vasut