From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] image: fix compiling without CMD_FDT
Date: Sat, 15 Dec 2018 09:56:43 -0500 [thread overview]
Message-ID: <20181215145643.GT8702@bill-the-cat> (raw)
In-Reply-To: <CAAh8qszQrV6f94WYSuUYE2TKJfwYxb9RwQWJo_nPwzExzP2RVQ@mail.gmail.com>
On Fri, Dec 14, 2018 at 08:42:18AM +0100, Simon Goldschmidt wrote:
> Booting an image currently sets the environment variable "fdtaddr"
> by calling into 'cmd/fdt.c'. As a result, linking U-Boot fails if
> CMD_FDT is not enabled.
>
> Fix this by adding 'if (CONFIG_IS_ENABLED(CMD_FDT))' to the two
> places where 'set_working_fdt_addr()' is called.
>
> Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
> ---
> common/bootm.c | 3 ++-
> common/image-fdt.c | 3 ++-
> 2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/common/bootm.c b/common/bootm.c
> index 8bf84ebcb7..80f304ce9f 100644
> --- a/common/bootm.c
> +++ b/common/bootm.c
> @@ -262,7 +262,8 @@ int bootm_find_images(int flag, int argc, char *
> const argv[])
> puts("Could not find a valid device tree\n");
> return 1;
> }
> - set_working_fdt_addr(map_to_sysmem(images.ft_addr));
> + if (CONFIG_IS_ENABLED(CMD_FDT))
> + set_working_fdt_addr(map_to_sysmem(images.ft_addr));
> #endif
>
> #if IMAGE_ENABLE_FIT
> diff --git a/common/image-fdt.c b/common/image-fdt.c
> index 95748f0ae1..8ee5a13352 100644
> --- a/common/image-fdt.c
> +++ b/common/image-fdt.c
> @@ -193,7 +193,8 @@ int boot_relocate_fdt(struct lmb *lmb, char
> **of_flat_tree, ulong *of_size)
> *of_flat_tree = of_start;
> *of_size = of_len;
>
> - set_working_fdt_addr(map_to_sysmem(*of_flat_tree));
> + if (CONFIG_IS_ENABLED(CMD_FDT))
> + set_working_fdt_addr(map_to_sysmem(*of_flat_tree));
> return 0;
>
> error:
Your whitespace was totally destroyed, please v2, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181215/66ee287b/attachment.sig>
next prev parent reply other threads:[~2018-12-15 14:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-14 7:42 [U-Boot] [PATCH] image: fix compiling without CMD_FDT Simon Goldschmidt
2018-12-15 14:56 ` Tom Rini [this message]
2018-12-15 15:00 ` Simon Goldschmidt
2018-12-15 15:04 ` Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181215145643.GT8702@bill-the-cat \
--to=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox