From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerry Van Baren Date: Wed, 15 Aug 2007 19:40:20 -0400 Subject: [U-Boot-Users] [PATCH] Fix of_data copying for CONFIG_OF_FLAT_TREE-using boards In-Reply-To: <11872170563143-git-send-email-afleming@freescale.com> References: <11872170563143-git-send-email-afleming@freescale.com> Message-ID: <46C38EE4.2030707@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Andy Fleming wrote: > The fix, "Fix where the #ifdef CFG_BOOTMAPSZ is placed" > neglected to *also* put the code inside the similar #ifdef > for CONFIG_OF_FLAT_TREE. > > Signed-off-by: Andy Fleming I figured if you weren't interested in the CONFIG_OF_FLAT_TREE case, I *definitely* wasn't. ;-) gvb > --- > common/cmd_bootm.c | 9 +++++++++ > 1 files changed, 9 insertions(+), 0 deletions(-) > > diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c > index df1d038..90e3f8b 100644 > --- a/common/cmd_bootm.c > +++ b/common/cmd_bootm.c > @@ -987,6 +987,15 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag, > #endif > #endif /* CONFIG_OF_LIBFDT */ > #if defined(CONFIG_OF_FLAT_TREE) > +#ifdef CFG_BOOTMAPSZ > + /* > + * The blob must be within CFG_BOOTMAPSZ, > + * so we flag it to be copied if it is not. > + */ > + if (of_flat_tree >= (char *)CFG_BOOTMAPSZ) > + of_data = of_flat_tree; > +#endif > + > /* move of_flat_tree if needed */ > if (of_data) { > ulong of_start, of_len;