diff mbox series

[U-Boot,1/2] image: fit: Show firmware configuration property if present

Message ID c2f2b217df170f0091ad41bfeb40b04518387f93.1522074684.git.michal.simek@xilinx.com
State Accepted
Commit 1f8e4bf55eb58bda715c1f8c8777081580f3246b
Delegated to: Tom Rini
Headers show
Series [U-Boot,1/2] image: fit: Show firmware configuration property if present | expand

Commit Message

Michal Simek March 26, 2018, 2:31 p.m. UTC
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(-)

Comments

Simon Glass March 30, 2018, 8:40 a.m. UTC | #1
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>
Jun Nie April 2, 2018, 2:59 p.m. UTC | #2
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>
Philipp Tomsich April 2, 2018, 3:13 p.m. UTC | #3
> 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>
Tom Rini April 7, 2018, 1:26 p.m. UTC | #4
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!
diff mbox series

Patch

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