All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 1/2] common: spl_fit: Default to IH_OS_U_BOOT if FIT_IMAGE_TINY enabled
@ 2019-03-12  8:34 Abel Vesa
  2019-03-12  8:34 ` [U-Boot] [PATCH v2 2/2] tools: fit_image: Add the loadable property to configs Abel Vesa
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Abel Vesa @ 2019-03-12  8:34 UTC (permalink / raw)
  To: u-boot

If FIT_IMAGE_TINY is enabled, spl_fit_image_get_os returns -ENOTSUPP.
In this case, we should default to IH_OS_U_BOOT not to IH_OS_INVALID.

Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
---

Changes since v1:
 * added the #if FIT_IMAGE_TINY as suggested by Mark Vasut

 common/spl/spl_fit.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c
index db43626..c9bfe0c 100644
--- a/common/spl/spl_fit.c
+++ b/common/spl/spl_fit.c
@@ -491,6 +491,10 @@ int spl_load_simple_fit(struct spl_image_info *spl_image,
 
 		if (!spl_fit_image_get_os(fit, node, &os_type))
 			debug("Loadable is %s\n", genimg_get_os_name(os_type));
+#if CONFIG_IS_ENABLED(FIT_IMAGE_TINY)
+		else
+			os_type = IH_OS_U_BOOT;
+#endif
 
 		if (os_type == IH_OS_U_BOOT) {
 			spl_fit_append_fdt(&image_info, info, sector,
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH v2 2/2] tools: fit_image: Add the loadable property to configs
  2019-03-12  8:34 [U-Boot] [PATCH v2 1/2] common: spl_fit: Default to IH_OS_U_BOOT if FIT_IMAGE_TINY enabled Abel Vesa
@ 2019-03-12  8:34 ` Abel Vesa
  2019-03-20 13:16   ` Fabio Estevam
                     ` (2 more replies)
  2019-03-20 13:14 ` [U-Boot] [PATCH v2 1/2] common: spl_fit: Default to IH_OS_U_BOOT if FIT_IMAGE_TINY enabled Fabio Estevam
  2019-03-22 23:17 ` [U-Boot] [U-Boot, v2, " Tom Rini
  2 siblings, 3 replies; 8+ messages in thread
From: Abel Vesa @ 2019-03-12  8:34 UTC (permalink / raw)
  To: u-boot

When running mkimage with "-f auto", the loadable property
needs to be set in order to allow SPL FIT support to boot.

Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
---
 tools/fit_image.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/fit_image.c b/tools/fit_image.c
index 4b62635..3b867e0 100644
--- a/tools/fit_image.c
+++ b/tools/fit_image.c
@@ -298,6 +298,7 @@ static void fit_write_configs(struct image_tool_params *params, char *fdt)
 		typename = genimg_get_type_short_name(params->fit_image_type);
 		snprintf(str, sizeof(str), "%s-1", typename);
 		fdt_property_string(fdt, typename, str);
+		fdt_property_string(fdt, FIT_LOADABLE_PROP, str);
 
 		if (params->fit_ramdisk)
 			fdt_property_string(fdt, FIT_RAMDISK_PROP,
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH v2 1/2] common: spl_fit: Default to IH_OS_U_BOOT if FIT_IMAGE_TINY enabled
  2019-03-12  8:34 [U-Boot] [PATCH v2 1/2] common: spl_fit: Default to IH_OS_U_BOOT if FIT_IMAGE_TINY enabled Abel Vesa
  2019-03-12  8:34 ` [U-Boot] [PATCH v2 2/2] tools: fit_image: Add the loadable property to configs Abel Vesa
@ 2019-03-20 13:14 ` Fabio Estevam
  2019-03-22 23:17 ` [U-Boot] [U-Boot, v2, " Tom Rini
  2 siblings, 0 replies; 8+ messages in thread
From: Fabio Estevam @ 2019-03-20 13:14 UTC (permalink / raw)
  To: u-boot

On Tue, Mar 12, 2019 at 5:36 AM Abel Vesa <abel.vesa@nxp.com> wrote:
>
> If FIT_IMAGE_TINY is enabled, spl_fit_image_get_os returns -ENOTSUPP.
> In this case, we should default to IH_OS_U_BOOT not to IH_OS_INVALID.
>
> Signed-off-by: Abel Vesa <abel.vesa@nxp.com>

Tested-by: Fabio Estevam <festevam@gmail.com>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH v2 2/2] tools: fit_image: Add the loadable property to configs
  2019-03-12  8:34 ` [U-Boot] [PATCH v2 2/2] tools: fit_image: Add the loadable property to configs Abel Vesa
@ 2019-03-20 13:16   ` Fabio Estevam
  2019-03-20 13:38     ` Stefano Babic
  2019-03-22 23:17   ` [U-Boot] [U-Boot, v2, " Tom Rini
  2019-04-12 13:03   ` [U-Boot] [PATCH v2 " Alex Kiernan
  2 siblings, 1 reply; 8+ messages in thread
From: Fabio Estevam @ 2019-03-20 13:16 UTC (permalink / raw)
  To: u-boot

On Tue, Mar 12, 2019 at 5:37 AM Abel Vesa <abel.vesa@nxp.com> wrote:
>
> When running mkimage with "-f auto", the loadable property
> needs to be set in order to allow SPL FIT support to boot.
>
> Signed-off-by: Abel Vesa <abel.vesa@nxp.com>

Tested-by: Fabio Estevam <festevam@gmail.com>

Tom/Stefano,

These two patches fix a boot regression on mx6sabresd/sabreauto.

Please consider applying it for 2019.04.

Thanks

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH v2 2/2] tools: fit_image: Add the loadable property to configs
  2019-03-20 13:16   ` Fabio Estevam
@ 2019-03-20 13:38     ` Stefano Babic
  0 siblings, 0 replies; 8+ messages in thread
From: Stefano Babic @ 2019-03-20 13:38 UTC (permalink / raw)
  To: u-boot

On 20/03/19 14:16, Fabio Estevam wrote:
> On Tue, Mar 12, 2019 at 5:37 AM Abel Vesa <abel.vesa@nxp.com> wrote:
>>
>> When running mkimage with "-f auto", the loadable property
>> needs to be set in order to allow SPL FIT support to boot.
>>
>> Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
> 
> Tested-by: Fabio Estevam <festevam@gmail.com>
> 
> Tom/Stefano,
> 
> These two patches fix a boot regression on mx6sabresd/sabreauto.
> 
> Please consider applying it for 2019.04.
> 
> 

Thanks to report these - there are also a few other patches that I have
already picked up. I take these twos and I sent a new PR.

Stefano



-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [U-Boot, v2, 1/2] common: spl_fit: Default to IH_OS_U_BOOT if FIT_IMAGE_TINY enabled
  2019-03-12  8:34 [U-Boot] [PATCH v2 1/2] common: spl_fit: Default to IH_OS_U_BOOT if FIT_IMAGE_TINY enabled Abel Vesa
  2019-03-12  8:34 ` [U-Boot] [PATCH v2 2/2] tools: fit_image: Add the loadable property to configs Abel Vesa
  2019-03-20 13:14 ` [U-Boot] [PATCH v2 1/2] common: spl_fit: Default to IH_OS_U_BOOT if FIT_IMAGE_TINY enabled Fabio Estevam
@ 2019-03-22 23:17 ` Tom Rini
  2 siblings, 0 replies; 8+ messages in thread
From: Tom Rini @ 2019-03-22 23:17 UTC (permalink / raw)
  To: u-boot

On Tue, Mar 12, 2019 at 08:34:31AM +0000, Abel Vesa wrote:

> If FIT_IMAGE_TINY is enabled, spl_fit_image_get_os returns -ENOTSUPP.
> In this case, we should default to IH_OS_U_BOOT not to IH_OS_INVALID.
> 
> Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
> Tested-by: Fabio Estevam <festevam@gmail.com>

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: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190322/0f2c8051/attachment.sig>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [U-Boot, v2, 2/2] tools: fit_image: Add the loadable property to configs
  2019-03-12  8:34 ` [U-Boot] [PATCH v2 2/2] tools: fit_image: Add the loadable property to configs Abel Vesa
  2019-03-20 13:16   ` Fabio Estevam
@ 2019-03-22 23:17   ` Tom Rini
  2019-04-12 13:03   ` [U-Boot] [PATCH v2 " Alex Kiernan
  2 siblings, 0 replies; 8+ messages in thread
From: Tom Rini @ 2019-03-22 23:17 UTC (permalink / raw)
  To: u-boot

On Tue, Mar 12, 2019 at 08:34:32AM +0000, Abel Vesa wrote:

> When running mkimage with "-f auto", the loadable property
> needs to be set in order to allow SPL FIT support to boot.
> 
> Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
> Tested-by: Fabio Estevam <festevam@gmail.com>

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: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190322/36406983/attachment.sig>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH v2 2/2] tools: fit_image: Add the loadable property to configs
  2019-03-12  8:34 ` [U-Boot] [PATCH v2 2/2] tools: fit_image: Add the loadable property to configs Abel Vesa
  2019-03-20 13:16   ` Fabio Estevam
  2019-03-22 23:17   ` [U-Boot] [U-Boot, v2, " Tom Rini
@ 2019-04-12 13:03   ` Alex Kiernan
  2 siblings, 0 replies; 8+ messages in thread
From: Alex Kiernan @ 2019-04-12 13:03 UTC (permalink / raw)
  To: u-boot

On Tue, Mar 12, 2019 at 8:34 AM Abel Vesa <abel.vesa@nxp.com> wrote:
>
> When running mkimage with "-f auto", the loadable property
> needs to be set in order to allow SPL FIT support to boot.
>
> Signed-off-by: Abel Vesa <abel.vesa@nxp.com>

I've just bisected out to this commit breaking Y-Modem booting of FIT
U-Boot on am335x. Right now I'm at a bit of a loss as to why, as I
can't find a code path where FIT_LOADABLE_PROP would be treated
differently between UART and MMC booting (which still works).

That said the loadables stuff with this patch doesn't seem to match up
with what doc/uImage.FIT/howto.txt has to say about loadables:

/ {
    timestamp = <0x5cb08987>;
    description = "Firmware image with one or more FDT blobs";
    creator = "U-Boot mkimage 2019.04-00217-g38927694f48a-dirty";
    #address-cells = <0x00000001>;
    images {
        firmware-1 {
            data-size = <0x0005e204>;
            data-offset = <0x00000000>;
            description = "U-Boot 2019.04-00217-g38927694f48a-dirty
for A335XHUB board";
            type = "firmware";
            arch = "arm";
            os = "u-boot";
            compression = "none";
            load = <0x80800000>;
            entry = <0x00000000>;
        };
        fdt-1 {
            data-size = <0x000080c4>;
            data-offset = <0x0005e204>;
            description = "A335XHUB-0001";
            type = "firmware";
            arch = "arm";
            compression = "none";
        };
        fdt-2 {
            data-size = <0x000088f4>;
            data-offset = <0x000662c8>;
            description = "A335XHUB-0003";
            type = "firmware";
            arch = "arm";
            compression = "none";
        };
    };
    configurations {
        default = "conf-1";
        conf-1 {
            description = "A335XHUB-0001";
            firmware = "firmware-1";
            loadables = "firmware-1";
            fdt = "fdt-1";
        };
        conf-2 {
            description = "A335XHUB-0003";
            firmware = "firmware-1";
            loadables = "firmware-1";
            fdt = "fdt-2";
        };
    };
};

Still digging...

-- 
Alex Kiernan

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-04-12 13:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-12  8:34 [U-Boot] [PATCH v2 1/2] common: spl_fit: Default to IH_OS_U_BOOT if FIT_IMAGE_TINY enabled Abel Vesa
2019-03-12  8:34 ` [U-Boot] [PATCH v2 2/2] tools: fit_image: Add the loadable property to configs Abel Vesa
2019-03-20 13:16   ` Fabio Estevam
2019-03-20 13:38     ` Stefano Babic
2019-03-22 23:17   ` [U-Boot] [U-Boot, v2, " Tom Rini
2019-04-12 13:03   ` [U-Boot] [PATCH v2 " Alex Kiernan
2019-03-20 13:14 ` [U-Boot] [PATCH v2 1/2] common: spl_fit: Default to IH_OS_U_BOOT if FIT_IMAGE_TINY enabled Fabio Estevam
2019-03-22 23:17 ` [U-Boot] [U-Boot, v2, " 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.