* [U-Boot] [PATCH] spl: add check for FIT-header when loading image
@ 2016-11-16 10:54 Tomas Melin
2016-11-16 11:07 ` Lokesh Vutla
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Tomas Melin @ 2016-11-16 10:54 UTC (permalink / raw)
To: u-boot
Add check for FDT_MAGIC, otherwise also legacy images will be loaded as
a FIT. With this check in place, the loader works correct both
with legacy and FIT images.
Signed-off-by: Tomas Melin <tomas.melin@vaisala.com>
---
common/spl/spl_spi.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/common/spl/spl_spi.c b/common/spl/spl_spi.c
index a3caafb..78b8cd1 100644
--- a/common/spl/spl_spi.c
+++ b/common/spl/spl_spi.c
@@ -99,7 +99,8 @@ static int spl_spi_load_image(struct spl_image_info *spl_image,
if (err)
return err;
- if (IS_ENABLED(CONFIG_SPL_LOAD_FIT)) {
+ if (IS_ENABLED(CONFIG_SPL_LOAD_FIT) &&
+ image_get_magic(header) == FDT_MAGIC) {
struct spl_load_info load;
debug("Found FIT\n");
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] spl: add check for FIT-header when loading image
2016-11-16 10:54 [U-Boot] [PATCH] spl: add check for FIT-header when loading image Tomas Melin
@ 2016-11-16 11:07 ` Lokesh Vutla
2016-11-18 1:15 ` Simon Glass
2016-11-29 0:55 ` [U-Boot] " Tom Rini
2 siblings, 0 replies; 4+ messages in thread
From: Lokesh Vutla @ 2016-11-16 11:07 UTC (permalink / raw)
To: u-boot
On Wednesday 16 November 2016 04:24 PM, Tomas Melin wrote:
> Add check for FDT_MAGIC, otherwise also legacy images will be loaded as
> a FIT. With this check in place, the loader works correct both
> with legacy and FIT images.
>
Acked-by: Lokesh Vutla <lokeshvutla@ti.com>
Thanks and regards,
Lokesh
> Signed-off-by: Tomas Melin <tomas.melin@vaisala.com>
> ---
> common/spl/spl_spi.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/common/spl/spl_spi.c b/common/spl/spl_spi.c
> index a3caafb..78b8cd1 100644
> --- a/common/spl/spl_spi.c
> +++ b/common/spl/spl_spi.c
> @@ -99,7 +99,8 @@ static int spl_spi_load_image(struct spl_image_info *spl_image,
> if (err)
> return err;
>
> - if (IS_ENABLED(CONFIG_SPL_LOAD_FIT)) {
> + if (IS_ENABLED(CONFIG_SPL_LOAD_FIT) &&
> + image_get_magic(header) == FDT_MAGIC) {
> struct spl_load_info load;
>
> debug("Found FIT\n");
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] spl: add check for FIT-header when loading image
2016-11-16 10:54 [U-Boot] [PATCH] spl: add check for FIT-header when loading image Tomas Melin
2016-11-16 11:07 ` Lokesh Vutla
@ 2016-11-18 1:15 ` Simon Glass
2016-11-29 0:55 ` [U-Boot] " Tom Rini
2 siblings, 0 replies; 4+ messages in thread
From: Simon Glass @ 2016-11-18 1:15 UTC (permalink / raw)
To: u-boot
On 16 November 2016 at 03:54, Tomas Melin <tomas.melin@vaisala.com> wrote:
> Add check for FDT_MAGIC, otherwise also legacy images will be loaded as
> a FIT. With this check in place, the loader works correct both
> with legacy and FIT images.
>
> Signed-off-by: Tomas Melin <tomas.melin@vaisala.com>
> ---
> common/spl/spl_spi.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/common/spl/spl_spi.c b/common/spl/spl_spi.c
> index a3caafb..78b8cd1 100644
> --- a/common/spl/spl_spi.c
> +++ b/common/spl/spl_spi.c
> @@ -99,7 +99,8 @@ static int spl_spi_load_image(struct spl_image_info *spl_image,
> if (err)
> return err;
>
> - if (IS_ENABLED(CONFIG_SPL_LOAD_FIT)) {
> + if (IS_ENABLED(CONFIG_SPL_LOAD_FIT) &&
> + image_get_magic(header) == FDT_MAGIC) {
> struct spl_load_info load;
>
> debug("Found FIT\n");
> --
> 2.1.4
>
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] spl: add check for FIT-header when loading image
2016-11-16 10:54 [U-Boot] [PATCH] spl: add check for FIT-header when loading image Tomas Melin
2016-11-16 11:07 ` Lokesh Vutla
2016-11-18 1:15 ` Simon Glass
@ 2016-11-29 0:55 ` Tom Rini
2 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2016-11-29 0:55 UTC (permalink / raw)
To: u-boot
On Wed, Nov 16, 2016 at 12:54:39PM +0200, tomas.melin at vaisala.com wrote:
> Add check for FDT_MAGIC, otherwise also legacy images will be loaded as
> a FIT. With this check in place, the loader works correct both
> with legacy and FIT images.
>
> Signed-off-by: Tomas Melin <tomas.melin@vaisala.com>
> Acked-by: Lokesh Vutla <lokeshvutla@ti.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161128/1f543ee5/attachment.sig>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-11-29 0:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-16 10:54 [U-Boot] [PATCH] spl: add check for FIT-header when loading image Tomas Melin
2016-11-16 11:07 ` Lokesh Vutla
2016-11-18 1:15 ` Simon Glass
2016-11-29 0:55 ` [U-Boot] " Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.