From mboxrd@z Thu Jan 1 00:00:00 1970 From: Patrick Delaunay Date: Mon, 20 May 2019 15:00:01 +0200 Subject: [U-Boot] [PATCH v2 2/8] fdt: Allow to use EMBEDDED device tree for SPL In-Reply-To: <1558357207-7345-1-git-send-email-patrick.delaunay@st.com> References: <1558357207-7345-1-git-send-email-patrick.delaunay@st.com> Message-ID: <1558357207-7345-3-git-send-email-patrick.delaunay@st.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de U-boot continue to use load DT from file system, this patch avoid an error when U-Boot "Error: Out of memory" when it try to map gd->fdt_blob (EMBEDDED pointer __dtb_dt_begin is not managed). Signed-off-by: Patrick Delaunay --- Changes in v2: - solve issue for spl sandbox with dtb lib/fdtdec.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/fdtdec.c b/lib/fdtdec.c index fea44a9..d25cfd6 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -1491,6 +1491,12 @@ int fdtdec_setup(void) gd->fdt_blob = __dtb_dt_spl_begin; # else gd->fdt_blob = __dtb_dt_begin; +#ifdef CONFIG_SANDBOX + if (sandbox_read_fdt_from_file()) { + puts("Failed to read control FDT\n"); + return -1; + } +#endif # endif # elif defined(CONFIG_OF_BOARD) || defined(CONFIG_OF_SEPARATE) /* Allow the board to override the fdt address. */ -- 2.7.4