[PATCH v4] cmd: add FDT setup for bootelf by flag

Tom Rini trini at konsulko.com
Thu Mar 7 21:26:32 CET 2024


On Thu, Mar 07, 2024 at 10:35:35PM +0300, Maxim M. Moskalets wrote:
> On 07.03.2024 15:41, Tom Rini wrote:
> > On Mon, Feb 26, 2024 at 09:35:53PM +0300, Maxim Moskalets wrote:
> > 
> > > From: Maxim Moskalets <maximmosk4 at gmail.com>
> > > 
> > > Added the ability to use FDT for ELF applications, required to run some
> > > OS. To make FDT setup, you need to set the -d fdt_addr_r cmd option for
> > > bootelf command.
> > > 
> > > Signed-off-by: Maxim Moskalets <Maxim.Moskalets at kaspersky.com>
> > > 
> > > Cc: Tom Rini <trini at konsulko.com>
> > > ---
> > >   cmd/elf.c | 27 ++++++++++++++++++++++++---
> > >   1 file changed, 24 insertions(+), 3 deletions(-)
> > This breaks building on a number of platforms such as
> > xilinx_zynqmp_mini_nand_single.
> > 
> There's an unresolved reference to LMB functions. This code compiles
> without a patch (i.e. it is not disabled by the preprocessor or externally),
> but when linking, since this function is not called, it is discarded
> (you can check on a clean build with the command
> aarch64-linux-gnu-objdump -d u-boot | grep image_setup_libfdt).
> I think it's worth fixing this bug too.

Yes, you need to re-structure this patch so the existing configurations
still build.  You might need to guard some areas with
CONFIG_IS_ENABLED(...some existing symbol) before you call
image_setup_libfdt.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20240307/7b0c4a2f/attachment.sig>


More information about the U-Boot mailing list