All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] image: fit: Show firmware configuration property if present
@ 2018-03-26 14:31 Michal Simek
  2018-03-26 14:31 ` [U-Boot] [PATCH 2/2] image: fit: Show information about OS type in firwmare case too Michal Simek
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Michal Simek @ 2018-03-26 14:31 UTC (permalink / raw)
  To: u-boot

SPL ATF support requires to have firmware property which should be also
listed by mkimage -l when images is created.

The patch is also using this macro in spl_fit to match keyword.

When image is created:
 Default Configuration: 'config'
 Configuration 0 (config)
  Description:  ATF with full u-boot
  Kernel:       unavailable
  Firmware:     atf
  FDT:          dtb

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 common/image-fit.c   | 4 ++++
 common/spl/spl_fit.c | 3 ++-
 include/image.h      | 1 +
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/common/image-fit.c b/common/image-fit.c
index 4b0339045421..06b25fefc7da 100644
--- a/common/image-fit.c
+++ b/common/image-fit.c
@@ -1610,6 +1610,10 @@ void fit_conf_print(const void *fit, int noffset, const char *p)
 	if (uname)
 		printf("%s  Init Ramdisk: %s\n", p, uname);
 
+	uname = fdt_getprop(fit, noffset, FIT_FIRMWARE_PROP, NULL);
+	if (uname)
+		printf("%s  Firmware:     %s\n", p, uname);
+
 	for (fdt_index = 0;
 	     uname = fdt_stringlist_get(fit, noffset, FIT_FDT_PROP,
 					fdt_index, NULL), uname;
diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c
index be92ca4b4fd0..9f03e2648a31 100644
--- a/common/spl/spl_fit.c
+++ b/common/spl/spl_fit.c
@@ -395,7 +395,8 @@ int spl_load_simple_fit(struct spl_image_info *spl_image,
 	 *   - fall back to using the first 'loadables' entry
 	 */
 	if (node < 0)
-		node = spl_fit_get_image_node(fit, images, "firmware", 0);
+		node = spl_fit_get_image_node(fit, images, FIT_FIRMWARE_PROP,
+					      0);
 #ifdef CONFIG_SPL_OS_BOOT
 	if (node < 0)
 		node = spl_fit_get_image_node(fit, images, FIT_KERNEL_PROP, 0);
diff --git a/include/image.h b/include/image.h
index 621abf647f3b..f220b3613898 100644
--- a/include/image.h
+++ b/include/image.h
@@ -919,6 +919,7 @@ int booti_setup(ulong image, ulong *relocated_addr, ulong *size);
 #define FIT_DEFAULT_PROP	"default"
 #define FIT_SETUP_PROP		"setup"
 #define FIT_FPGA_PROP		"fpga"
+#define FIT_FIRMWARE_PROP	"firmware"
 
 #define FIT_MAX_HASH_LEN	HASH_MAX_DIGEST_SIZE
 
-- 
1.9.1

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

* [U-Boot] [PATCH 2/2] image: fit: Show information about OS type in firwmare case too
  2018-03-26 14:31 [U-Boot] [PATCH 1/2] image: fit: Show firmware configuration property if present Michal Simek
@ 2018-03-26 14:31 ` Michal Simek
  2018-03-30  8:40   ` Simon Glass
                     ` (2 more replies)
  2018-03-30  8:40 ` [U-Boot] [PATCH 1/2] image: fit: Show firmware configuration property if present Simon Glass
                   ` (3 subsequent siblings)
  4 siblings, 3 replies; 10+ messages in thread
From: Michal Simek @ 2018-03-26 14:31 UTC (permalink / raw)
  To: u-boot

SPL ATF implementation requires FIT image with partitions where the one
is Firmware/ATF and another one Firmware/U-Boot. OS field is used for
recording that difference that's why make sense to show values there for
Firmware types.

For example:
 Image 0 (atf)
  Description:  ATF bl31.bin
  Created:      Mon Mar 26 15:58:14 2018
  Type:         Firmware
  Compression:  uncompressed
  Data Size:    51152 Bytes = 49.95 KiB = 0.05 MiB
  Architecture: ARM
  OS:           ARM Trusted Firmware
  Load Address: 0xfffe0000
  Hash algo:    md5
  Hash value:   36a4212bbb698126bf5a248f0f4b5336
 Image 1 (uboot)
  Description:  u-boot.bin
  Created:      Mon Mar 26 15:58:14 2018
  Type:         Firmware
  Compression:  uncompressed
  Data Size:    761216 Bytes = 743.38 KiB = 0.73 MiB
  Architecture: ARM
  OS:           U-Boot
  Load Address: 0x08000000
  Hash algo:    md5
  Hash value:   f22960fe429be72296dc8dc59a47d566

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 common/image-fit.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/common/image-fit.c b/common/image-fit.c
index 06b25fefc7da..030a3e579f52 100644
--- a/common/image-fit.c
+++ b/common/image-fit.c
@@ -419,7 +419,8 @@ void fit_image_print(const void *fit, int image_noffset, const char *p)
 		printf("%s  Architecture: %s\n", p, genimg_get_arch_name(arch));
 	}
 
-	if ((type == IH_TYPE_KERNEL) || (type == IH_TYPE_RAMDISK)) {
+	if ((type == IH_TYPE_KERNEL) || (type == IH_TYPE_RAMDISK) ||
+	    (type == IH_TYPE_FIRMWARE)) {
 		fit_image_get_os(fit, image_noffset, &os);
 		printf("%s  OS:           %s\n", p, genimg_get_os_name(os));
 	}
-- 
1.9.1

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

* [U-Boot] [PATCH 1/2] image: fit: Show firmware configuration property if present
  2018-03-26 14:31 [U-Boot] [PATCH 1/2] image: fit: Show firmware configuration property if present Michal Simek
  2018-03-26 14:31 ` [U-Boot] [PATCH 2/2] image: fit: Show information about OS type in firwmare case too Michal Simek
@ 2018-03-30  8:40 ` Simon Glass
  2018-04-02 14:59 ` Jun Nie
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: Simon Glass @ 2018-03-30  8:40 UTC (permalink / raw)
  To: u-boot

On 26 March 2018 at 22:31, Michal Simek <michal.simek@xilinx.com> wrote:
> SPL ATF support requires to have firmware property which should be also
> listed by mkimage -l when images is created.
>
> The patch is also using this macro in spl_fit to match keyword.
>
> When image is created:
>  Default Configuration: 'config'
>  Configuration 0 (config)
>   Description:  ATF with full u-boot
>   Kernel:       unavailable
>   Firmware:     atf
>   FDT:          dtb
>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
>
>  common/image-fit.c   | 4 ++++
>  common/spl/spl_fit.c | 3 ++-
>  include/image.h      | 1 +
>  3 files changed, 7 insertions(+), 1 deletion(-)
>

Reviewed-by: Simon Glass <sjg@chromium.org>

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

* [U-Boot] [PATCH 2/2] image: fit: Show information about OS type in firwmare case too
  2018-03-26 14:31 ` [U-Boot] [PATCH 2/2] image: fit: Show information about OS type in firwmare case too Michal Simek
@ 2018-03-30  8:40   ` Simon Glass
  2018-04-03  7:53     ` Michal Simek
  2018-04-02 14:58   ` Jun Nie
  2018-04-07 13:26   ` [U-Boot] [U-Boot, " Tom Rini
  2 siblings, 1 reply; 10+ messages in thread
From: Simon Glass @ 2018-03-30  8:40 UTC (permalink / raw)
  To: u-boot

On 26 March 2018 at 22:31, Michal Simek <michal.simek@xilinx.com> wrote:
> SPL ATF implementation requires FIT image with partitions where the one
> is Firmware/ATF and another one Firmware/U-Boot. OS field is used for
> recording that difference that's why make sense to show values there for
> Firmware types.
>
> For example:
>  Image 0 (atf)
>   Description:  ATF bl31.bin
>   Created:      Mon Mar 26 15:58:14 2018
>   Type:         Firmware
>   Compression:  uncompressed
>   Data Size:    51152 Bytes = 49.95 KiB = 0.05 MiB
>   Architecture: ARM
>   OS:           ARM Trusted Firmware
>   Load Address: 0xfffe0000
>   Hash algo:    md5
>   Hash value:   36a4212bbb698126bf5a248f0f4b5336
>  Image 1 (uboot)
>   Description:  u-boot.bin
>   Created:      Mon Mar 26 15:58:14 2018
>   Type:         Firmware
>   Compression:  uncompressed
>   Data Size:    761216 Bytes = 743.38 KiB = 0.73 MiB
>   Architecture: ARM
>   OS:           U-Boot
>   Load Address: 0x08000000
>   Hash algo:    md5
>   Hash value:   f22960fe429be72296dc8dc59a47d566
>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
>
>  common/image-fit.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

But please fix the commit subject 'firwmare'.

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

* [U-Boot] [PATCH 2/2] image: fit: Show information about OS type in firwmare case too
  2018-03-26 14:31 ` [U-Boot] [PATCH 2/2] image: fit: Show information about OS type in firwmare case too Michal Simek
  2018-03-30  8:40   ` Simon Glass
@ 2018-04-02 14:58   ` Jun Nie
  2018-04-07 13:26   ` [U-Boot] [U-Boot, " Tom Rini
  2 siblings, 0 replies; 10+ messages in thread
From: Jun Nie @ 2018-04-02 14:58 UTC (permalink / raw)
  To: u-boot

2018-03-26 22:31 GMT+08:00 Michal Simek <michal.simek@xilinx.com>:
> SPL ATF implementation requires FIT image with partitions where the one
> is Firmware/ATF and another one Firmware/U-Boot. OS field is used for
> recording that difference that's why make sense to show values there for
> Firmware types.
>
> For example:
>  Image 0 (atf)
>   Description:  ATF bl31.bin
>   Created:      Mon Mar 26 15:58:14 2018
>   Type:         Firmware
>   Compression:  uncompressed
>   Data Size:    51152 Bytes = 49.95 KiB = 0.05 MiB
>   Architecture: ARM
>   OS:           ARM Trusted Firmware
>   Load Address: 0xfffe0000
>   Hash algo:    md5
>   Hash value:   36a4212bbb698126bf5a248f0f4b5336
>  Image 1 (uboot)
>   Description:  u-boot.bin
>   Created:      Mon Mar 26 15:58:14 2018
>   Type:         Firmware
>   Compression:  uncompressed
>   Data Size:    761216 Bytes = 743.38 KiB = 0.73 MiB
>   Architecture: ARM
>   OS:           U-Boot
>   Load Address: 0x08000000
>   Hash algo:    md5
>   Hash value:   f22960fe429be72296dc8dc59a47d566
>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
>
Reviewed-by: Jun Nie <jun.nie@linaro.org>

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

* [U-Boot] [PATCH 1/2] image: fit: Show firmware configuration property if present
  2018-03-26 14:31 [U-Boot] [PATCH 1/2] image: fit: Show firmware configuration property if present Michal Simek
  2018-03-26 14:31 ` [U-Boot] [PATCH 2/2] image: fit: Show information about OS type in firwmare case too Michal Simek
  2018-03-30  8:40 ` [U-Boot] [PATCH 1/2] image: fit: Show firmware configuration property if present Simon Glass
@ 2018-04-02 14:59 ` Jun Nie
  2018-04-02 15:13 ` Dr. Philipp Tomsich
  2018-04-07 13:26 ` [U-Boot] [U-Boot, " Tom Rini
  4 siblings, 0 replies; 10+ messages in thread
From: Jun Nie @ 2018-04-02 14:59 UTC (permalink / raw)
  To: u-boot

2018-03-26 22:31 GMT+08:00 Michal Simek <michal.simek@xilinx.com>:
> SPL ATF support requires to have firmware property which should be also
> listed by mkimage -l when images is created.
>
> The patch is also using this macro in spl_fit to match keyword.
>
> When image is created:
>  Default Configuration: 'config'
>  Configuration 0 (config)
>   Description:  ATF with full u-boot
>   Kernel:       unavailable
>   Firmware:     atf
>   FDT:          dtb
>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
>
Reviewed-by: Jun Nie <jun.nie@linaro.org>

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

* [U-Boot] [PATCH 1/2] image: fit: Show firmware configuration property if present
  2018-03-26 14:31 [U-Boot] [PATCH 1/2] image: fit: Show firmware configuration property if present Michal Simek
                   ` (2 preceding siblings ...)
  2018-04-02 14:59 ` Jun Nie
@ 2018-04-02 15:13 ` Dr. Philipp Tomsich
  2018-04-07 13:26 ` [U-Boot] [U-Boot, " Tom Rini
  4 siblings, 0 replies; 10+ messages in thread
From: Dr. Philipp Tomsich @ 2018-04-02 15:13 UTC (permalink / raw)
  To: u-boot


> On 26 Mar 2018, at 16:31, Michal Simek <michal.simek@xilinx.com> wrote:
> 
> SPL ATF support requires to have firmware property which should be also
> listed by mkimage -l when images is created.
> 
> The patch is also using this macro in spl_fit to match keyword.
> 
> When image is created:
> Default Configuration: 'config'
> Configuration 0 (config)
>  Description:  ATF with full u-boot
>  Kernel:       unavailable
>  Firmware:     atf
>  FDT:          dtb
> 
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>

Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

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

* [U-Boot] [PATCH 2/2] image: fit: Show information about OS type in firwmare case too
  2018-03-30  8:40   ` Simon Glass
@ 2018-04-03  7:53     ` Michal Simek
  0 siblings, 0 replies; 10+ messages in thread
From: Michal Simek @ 2018-04-03  7:53 UTC (permalink / raw)
  To: u-boot

On 30.3.2018 10:40, Simon Glass wrote:
> On 26 March 2018 at 22:31, Michal Simek <michal.simek@xilinx.com> wrote:
>> SPL ATF implementation requires FIT image with partitions where the one
>> is Firmware/ATF and another one Firmware/U-Boot. OS field is used for
>> recording that difference that's why make sense to show values there for
>> Firmware types.
>>
>> For example:
>>  Image 0 (atf)
>>   Description:  ATF bl31.bin
>>   Created:      Mon Mar 26 15:58:14 2018
>>   Type:         Firmware
>>   Compression:  uncompressed
>>   Data Size:    51152 Bytes = 49.95 KiB = 0.05 MiB
>>   Architecture: ARM
>>   OS:           ARM Trusted Firmware
>>   Load Address: 0xfffe0000
>>   Hash algo:    md5
>>   Hash value:   36a4212bbb698126bf5a248f0f4b5336
>>  Image 1 (uboot)
>>   Description:  u-boot.bin
>>   Created:      Mon Mar 26 15:58:14 2018
>>   Type:         Firmware
>>   Compression:  uncompressed
>>   Data Size:    761216 Bytes = 743.38 KiB = 0.73 MiB
>>   Architecture: ARM
>>   OS:           U-Boot
>>   Load Address: 0x08000000
>>   Hash algo:    md5
>>   Hash value:   f22960fe429be72296dc8dc59a47d566
>>
>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>> ---
>>
>>  common/image-fit.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> Reviewed-by: Simon Glass <sjg@chromium.org>
> 
> But please fix the commit subject 'firwmare'.
> 

ok. Fixed.

Thanks,
Michal

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

* [U-Boot] [U-Boot, 1/2] image: fit: Show firmware configuration property if present
  2018-03-26 14:31 [U-Boot] [PATCH 1/2] image: fit: Show firmware configuration property if present Michal Simek
                   ` (3 preceding siblings ...)
  2018-04-02 15:13 ` Dr. Philipp Tomsich
@ 2018-04-07 13:26 ` Tom Rini
  4 siblings, 0 replies; 10+ messages in thread
From: Tom Rini @ 2018-04-07 13:26 UTC (permalink / raw)
  To: u-boot

On Mon, Mar 26, 2018 at 04:31:26PM +0200, Michal Simek wrote:

> SPL ATF support requires to have firmware property which should be also
> listed by mkimage -l when images is created.
> 
> The patch is also using this macro in spl_fit to match keyword.
> 
> When image is created:
>  Default Configuration: 'config'
>  Configuration 0 (config)
>   Description:  ATF with full u-boot
>   Kernel:       unavailable
>   Firmware:     atf
>   FDT:          dtb
> 
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
> Reviewed-by: Jun Nie <jun.nie@linaro.org>
> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.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/20180407/4051fc67/attachment.sig>

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

* [U-Boot] [U-Boot, 2/2] image: fit: Show information about OS type in firwmare case too
  2018-03-26 14:31 ` [U-Boot] [PATCH 2/2] image: fit: Show information about OS type in firwmare case too Michal Simek
  2018-03-30  8:40   ` Simon Glass
  2018-04-02 14:58   ` Jun Nie
@ 2018-04-07 13:26   ` Tom Rini
  2 siblings, 0 replies; 10+ messages in thread
From: Tom Rini @ 2018-04-07 13:26 UTC (permalink / raw)
  To: u-boot

On Mon, Mar 26, 2018 at 04:31:27PM +0200, Michal Simek wrote:

> SPL ATF implementation requires FIT image with partitions where the one
> is Firmware/ATF and another one Firmware/U-Boot. OS field is used for
> recording that difference that's why make sense to show values there for
> Firmware types.
> 
> For example:
>  Image 0 (atf)
>   Description:  ATF bl31.bin
>   Created:      Mon Mar 26 15:58:14 2018
>   Type:         Firmware
>   Compression:  uncompressed
>   Data Size:    51152 Bytes = 49.95 KiB = 0.05 MiB
>   Architecture: ARM
>   OS:           ARM Trusted Firmware
>   Load Address: 0xfffe0000
>   Hash algo:    md5
>   Hash value:   36a4212bbb698126bf5a248f0f4b5336
>  Image 1 (uboot)
>   Description:  u-boot.bin
>   Created:      Mon Mar 26 15:58:14 2018
>   Type:         Firmware
>   Compression:  uncompressed
>   Data Size:    761216 Bytes = 743.38 KiB = 0.73 MiB
>   Architecture: ARM
>   OS:           U-Boot
>   Load Address: 0x08000000
>   Hash algo:    md5
>   Hash value:   f22960fe429be72296dc8dc59a47d566
> 
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
> Reviewed-by: Jun Nie <jun.nie@linaro.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: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180407/1c4c4723/attachment.sig>

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

end of thread, other threads:[~2018-04-07 13:26 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-26 14:31 [U-Boot] [PATCH 1/2] image: fit: Show firmware configuration property if present Michal Simek
2018-03-26 14:31 ` [U-Boot] [PATCH 2/2] image: fit: Show information about OS type in firwmare case too Michal Simek
2018-03-30  8:40   ` Simon Glass
2018-04-03  7:53     ` Michal Simek
2018-04-02 14:58   ` Jun Nie
2018-04-07 13:26   ` [U-Boot] [U-Boot, " Tom Rini
2018-03-30  8:40 ` [U-Boot] [PATCH 1/2] image: fit: Show firmware configuration property if present Simon Glass
2018-04-02 14:59 ` Jun Nie
2018-04-02 15:13 ` Dr. Philipp Tomsich
2018-04-07 13:26 ` [U-Boot] [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.