mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v2] Documentation: devicetree: list automatic boot argument fixups
@ 2023-03-17 12:19 Johannes Zink
  2023-03-17 12:41 ` Ahmad Fatoum
  2023-03-21  8:10 ` Sascha Hauer
  0 siblings, 2 replies; 3+ messages in thread
From: Johannes Zink @ 2023-03-17 12:19 UTC (permalink / raw)
  To: barebox; +Cc: Johannes Zink, afa, jzi

Barebox automatically fixes up several properties to the root and
chosen node of the device tree passed to the booted system.

These entries contain information about the hardware, reset source
and the barebox version string.

Add documentation on how to query these information from the booted
linux system.

Signed-off-by: Johannes Zink <j.zink@pengutronix.de>
---
 Changelog:

 v1 -> v2: Correct errors in content spotted by Ahmad. While at it, fix some typos.

 Documentation/devicetree/index.rst | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/Documentation/devicetree/index.rst b/Documentation/devicetree/index.rst
index 36fa69058d1d..f85ce6608d14 100644
--- a/Documentation/devicetree/index.rst
+++ b/Documentation/devicetree/index.rst
@@ -151,3 +151,25 @@ Contents:
    bindings/regulator/*
    bindings/rtc/*
    bindings/watchdog/*
+
+Automatic Boot Argument Fixups to the Devicetree
+------------------------------------------------
+
+barebox automatically fixes up some boot and system information in the device tree.
+
+In the device tree root, barebox fixes up
+
+ * serial-number (if available)
+ * machine compatible (if overridden)
+
+In the ``chosen``-node, barebox fixes up
+
+ * barebox-version
+ * reset-source
+ * reset-source-instance (if available)
+ * reset-source-device (node-path, only if available)
+ * bootsource
+ * boot-hartid (only on RISC-V)
+
+These values can be read from the booted linux system in ``/proc/device-tree/``
+or ``/sys/firmware/devicetree/base``.
-- 
2.30.2




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

* Re: [PATCH v2] Documentation: devicetree: list automatic boot argument fixups
  2023-03-17 12:19 [PATCH v2] Documentation: devicetree: list automatic boot argument fixups Johannes Zink
@ 2023-03-17 12:41 ` Ahmad Fatoum
  2023-03-21  8:10 ` Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2023-03-17 12:41 UTC (permalink / raw)
  To: Johannes Zink, barebox; +Cc: afa, jzi

On 17.03.23 13:19, Johannes Zink wrote:
> Barebox automatically fixes up several properties to the root and
> chosen node of the device tree passed to the booted system.
> 
> These entries contain information about the hardware, reset source
> and the barebox version string.
> 
> Add documentation on how to query these information from the booted
> linux system.
> 
> Signed-off-by: Johannes Zink <j.zink@pengutronix.de>

Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>

> ---
>  Changelog:
> 
>  v1 -> v2: Correct errors in content spotted by Ahmad. While at it, fix some typos.
> 
>  Documentation/devicetree/index.rst | 22 ++++++++++++++++++++++
>  1 file changed, 22 insertions(+)
> 
> diff --git a/Documentation/devicetree/index.rst b/Documentation/devicetree/index.rst
> index 36fa69058d1d..f85ce6608d14 100644
> --- a/Documentation/devicetree/index.rst
> +++ b/Documentation/devicetree/index.rst
> @@ -151,3 +151,25 @@ Contents:
>     bindings/regulator/*
>     bindings/rtc/*
>     bindings/watchdog/*
> +
> +Automatic Boot Argument Fixups to the Devicetree
> +------------------------------------------------
> +
> +barebox automatically fixes up some boot and system information in the device tree.
> +
> +In the device tree root, barebox fixes up
> +
> + * serial-number (if available)
> + * machine compatible (if overridden)
> +
> +In the ``chosen``-node, barebox fixes up
> +
> + * barebox-version
> + * reset-source
> + * reset-source-instance (if available)
> + * reset-source-device (node-path, only if available)
> + * bootsource
> + * boot-hartid (only on RISC-V)
> +
> +These values can be read from the booted linux system in ``/proc/device-tree/``
> +or ``/sys/firmware/devicetree/base``.

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




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

* Re: [PATCH v2] Documentation: devicetree: list automatic boot argument fixups
  2023-03-17 12:19 [PATCH v2] Documentation: devicetree: list automatic boot argument fixups Johannes Zink
  2023-03-17 12:41 ` Ahmad Fatoum
@ 2023-03-21  8:10 ` Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2023-03-21  8:10 UTC (permalink / raw)
  To: Johannes Zink; +Cc: barebox, afa, jzi

On Fri, Mar 17, 2023 at 01:19:37PM +0100, Johannes Zink wrote:
> Barebox automatically fixes up several properties to the root and
> chosen node of the device tree passed to the booted system.
> 
> These entries contain information about the hardware, reset source
> and the barebox version string.
> 
> Add documentation on how to query these information from the booted
> linux system.
> 
> Signed-off-by: Johannes Zink <j.zink@pengutronix.de>
> ---
>  Changelog:
> 
>  v1 -> v2: Correct errors in content spotted by Ahmad. While at it, fix some typos.
> 
>  Documentation/devicetree/index.rst | 22 ++++++++++++++++++++++
>  1 file changed, 22 insertions(+)

Applied, thanks

Sascha

> 
> diff --git a/Documentation/devicetree/index.rst b/Documentation/devicetree/index.rst
> index 36fa69058d1d..f85ce6608d14 100644
> --- a/Documentation/devicetree/index.rst
> +++ b/Documentation/devicetree/index.rst
> @@ -151,3 +151,25 @@ Contents:
>     bindings/regulator/*
>     bindings/rtc/*
>     bindings/watchdog/*
> +
> +Automatic Boot Argument Fixups to the Devicetree
> +------------------------------------------------
> +
> +barebox automatically fixes up some boot and system information in the device tree.
> +
> +In the device tree root, barebox fixes up
> +
> + * serial-number (if available)
> + * machine compatible (if overridden)
> +
> +In the ``chosen``-node, barebox fixes up
> +
> + * barebox-version
> + * reset-source
> + * reset-source-instance (if available)
> + * reset-source-device (node-path, only if available)
> + * bootsource
> + * boot-hartid (only on RISC-V)
> +
> +These values can be read from the booted linux system in ``/proc/device-tree/``
> +or ``/sys/firmware/devicetree/base``.
> -- 
> 2.30.2
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



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

end of thread, other threads:[~2023-03-21  8:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-17 12:19 [PATCH v2] Documentation: devicetree: list automatic boot argument fixups Johannes Zink
2023-03-17 12:41 ` Ahmad Fatoum
2023-03-21  8:10 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox