From: Wolfgang Denk Date: Sun, 06 Jul 2008 00:32:01 +0200 Subject: [U-Boot-Users] [PATCH v3 4/4] Resize device tree to allow space for board changes and the chosen node In-Reply-To: Your message of "Mon, 16 Jun 2008 13:58:56 CDT." <1213642736-20713-4-git-send-email-afleming@freescale.com> Message-ID: <20080705223201.48D18248DE@gemini.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 In message <1213642736-20713-4-git-send-email-afleming@freescale.com> you wrote: > Current code requires that a compiled device tree have space added to the end to > leave room for extra nodes added by board code (and the chosen node). This > requires that device tree creators anticipate how much space U-Boot will add to > the tree, which is absurd. Ideally, the code would resize and/or relocate the > tree when it needed more space, but this would require a systemic change to the > fdt code, which is non-trivial. Instead, we resize the tree inside > boot_relocate_fdt, reserving either the remainder of the bootmap (in the case > where the fdt is inside the bootmap), or adding CFG_FDT_PAD bytes to the size. > > Signed-off-by: Andy Fleming > --- > Rebased off the top of tree to ease application. > > lib_ppc/bootm.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++++------ > 1 files changed, 58 insertions(+), 8 deletions(-) Applied, thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de CAUTION: The Mass of This Product Contains the Energy Equivalent of 85 Million Tons of TNT per Net Ounce of Weight.