All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] fdt: Add U-Boot version to chosen node
@ 2022-05-19 14:22 Francesco Dolcini
  2022-05-19 14:25 ` Francesco Dolcini
  2022-06-06 14:18 ` Tom Rini
  0 siblings, 2 replies; 6+ messages in thread
From: Francesco Dolcini @ 2022-05-19 14:22 UTC (permalink / raw)
  To: Simon Glass, u-boot; +Cc: Francesco Dolcini, Rob Herring, Tom Rini

Add a new device tree property "u-boot,version" in the chosen node to
pass the U-Boot version to the operating system.
This can be useful to implement a firmware upgrade procedure from the
operating system.

Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
---
 common/fdt_support.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/common/fdt_support.c b/common/fdt_support.c
index 7e9e6542041d..8c18af2ce156 100644
--- a/common/fdt_support.c
+++ b/common/fdt_support.c
@@ -19,6 +19,7 @@
 #include <fdt_support.h>
 #include <exports.h>
 #include <fdtdec.h>
+#include <version.h>
 
 /**
  * fdt_getprop_u32_default_node - Return a node's property or a default
@@ -305,6 +306,15 @@ int fdt_chosen(void *fdt)
 		}
 	}
 
+	/* add u-boot version */
+	err = fdt_setprop(fdt, nodeoffset, "u-boot,version", PLAIN_VERSION,
+			  strlen(PLAIN_VERSION) + 1);
+	if (err < 0) {
+		printf("WARNING: could not set u-boot,version %s.\n",
+		       fdt_strerror(err));
+		return err;
+	}
+
 	return fdt_fixup_stdout(fdt, nodeoffset);
 }
 
-- 
2.25.1


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

* Re: [PATCH v1] fdt: Add U-Boot version to chosen node
  2022-05-19 14:22 [PATCH v1] fdt: Add U-Boot version to chosen node Francesco Dolcini
@ 2022-05-19 14:25 ` Francesco Dolcini
  2022-05-19 17:24   ` Tom Rini
  2022-06-06 14:18 ` Tom Rini
  1 sibling, 1 reply; 6+ messages in thread
From: Francesco Dolcini @ 2022-05-19 14:25 UTC (permalink / raw)
  To: Simon Glass, u-boot; +Cc: Francesco Dolcini, Rob Herring, Tom Rini

On Thu, May 19, 2022 at 04:22:26PM +0200, Francesco Dolcini wrote:
> Add a new device tree property "u-boot,version" in the chosen node to
> pass the U-Boot version to the operating system.
> This can be useful to implement a firmware upgrade procedure from the
> operating system.

Related change in dt-schema is available here: 
https://github.com/devicetree-org/dt-schema/pull/74

Francesco


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

* Re: [PATCH v1] fdt: Add U-Boot version to chosen node
  2022-05-19 14:25 ` Francesco Dolcini
@ 2022-05-19 17:24   ` Tom Rini
  2022-05-25  8:16     ` Marcel Ziswiler
  0 siblings, 1 reply; 6+ messages in thread
From: Tom Rini @ 2022-05-19 17:24 UTC (permalink / raw)
  To: Francesco Dolcini; +Cc: Simon Glass, u-boot, Rob Herring

[-- Attachment #1: Type: text/plain, Size: 533 bytes --]

On Thu, May 19, 2022 at 04:25:48PM +0200, Francesco Dolcini wrote:
> On Thu, May 19, 2022 at 04:22:26PM +0200, Francesco Dolcini wrote:
> > Add a new device tree property "u-boot,version" in the chosen node to
> > pass the U-Boot version to the operating system.
> > This can be useful to implement a firmware upgrade procedure from the
> > operating system.
> 
> Related change in dt-schema is available here: 
> https://github.com/devicetree-org/dt-schema/pull/74

Reviewed-by: Tom Rini <trini@konsulko.com>

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

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

* Re: [PATCH v1] fdt: Add U-Boot version to chosen node
  2022-05-19 17:24   ` Tom Rini
@ 2022-05-25  8:16     ` Marcel Ziswiler
  2022-05-25 13:49       ` Tom Rini
  0 siblings, 1 reply; 6+ messages in thread
From: Marcel Ziswiler @ 2022-05-25  8:16 UTC (permalink / raw)
  To: trini, Francesco Dolcini; +Cc: sjg, u-boot, robh

Hi Tom

On Thu, 2022-05-19 at 13:24 -0400, Tom Rini wrote:
> On Thu, May 19, 2022 at 04:25:48PM +0200, Francesco Dolcini wrote:
> > On Thu, May 19, 2022 at 04:22:26PM +0200, Francesco Dolcini wrote:
> > > Add a new device tree property "u-boot,version" in the chosen node to
> > > pass the U-Boot version to the operating system.
> > > This can be useful to implement a firmware upgrade procedure from the
> > > operating system.
> > 
> > Related change in dt-schema is available here: 
> > https://github.com/devicetree-org/dt-schema/pull/74
> 
> Reviewed-by: Tom Rini <trini@konsulko.com>

Anybody dare to apply that one? Thanks!

Cheers

Marcel

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

* Re: [PATCH v1] fdt: Add U-Boot version to chosen node
  2022-05-25  8:16     ` Marcel Ziswiler
@ 2022-05-25 13:49       ` Tom Rini
  0 siblings, 0 replies; 6+ messages in thread
From: Tom Rini @ 2022-05-25 13:49 UTC (permalink / raw)
  To: Marcel Ziswiler; +Cc: Francesco Dolcini, sjg, u-boot, robh

[-- Attachment #1: Type: text/plain, Size: 971 bytes --]

On Wed, May 25, 2022 at 08:16:20AM +0000, Marcel Ziswiler wrote:
> Hi Tom
> 
> On Thu, 2022-05-19 at 13:24 -0400, Tom Rini wrote:
> > On Thu, May 19, 2022 at 04:25:48PM +0200, Francesco Dolcini wrote:
> > > On Thu, May 19, 2022 at 04:22:26PM +0200, Francesco Dolcini wrote:
> > > > Add a new device tree property "u-boot,version" in the chosen node to
> > > > pass the U-Boot version to the operating system.
> > > > This can be useful to implement a firmware upgrade procedure from the
> > > > operating system.
> > > 
> > > Related change in dt-schema is available here: 
> > > https://github.com/devicetree-org/dt-schema/pull/74
> > 
> > Reviewed-by: Tom Rini <trini@konsulko.com>
> 
> Anybody dare to apply that one? Thanks!

I've reviewed this side, and I'm subscribed to the pull request side.
The way this worked last time is Rob took the PR then I took the U-Boot
change.  It's only been 6 days so I assume Rob will take it soon.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

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

* Re: [PATCH v1] fdt: Add U-Boot version to chosen node
  2022-05-19 14:22 [PATCH v1] fdt: Add U-Boot version to chosen node Francesco Dolcini
  2022-05-19 14:25 ` Francesco Dolcini
@ 2022-06-06 14:18 ` Tom Rini
  1 sibling, 0 replies; 6+ messages in thread
From: Tom Rini @ 2022-06-06 14:18 UTC (permalink / raw)
  To: Francesco Dolcini; +Cc: Simon Glass, u-boot, Rob Herring

[-- Attachment #1: Type: text/plain, Size: 456 bytes --]

On Thu, May 19, 2022 at 04:22:26PM +0200, Francesco Dolcini wrote:

> Add a new device tree property "u-boot,version" in the chosen node to
> pass the U-Boot version to the operating system.
> This can be useful to implement a firmware upgrade procedure from the
> operating system.
> 
> Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
> Reviewed-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/master, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

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

end of thread, other threads:[~2022-06-06 14:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-19 14:22 [PATCH v1] fdt: Add U-Boot version to chosen node Francesco Dolcini
2022-05-19 14:25 ` Francesco Dolcini
2022-05-19 17:24   ` Tom Rini
2022-05-25  8:16     ` Marcel Ziswiler
2022-05-25 13:49       ` Tom Rini
2022-06-06 14:18 ` 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.