DistroKit Mailinglist
 help / color / mirror / Atom feed
From: Robert Schwebel <r.schwebel@pengutronix.de>
To: Roland Hieber <rhi@pengutronix.de>
Cc: distrokit@pengutronix.de
Subject: Re: [DistroKit] [PATCH 04/14] v7a: barebox: include generic bootstate node in device tree
Date: Mon, 14 Aug 2023 18:36:41 +0200	[thread overview]
Message-ID: <ZNpYGbxVz1LB73HX@pengutronix.de> (raw)
In-Reply-To: <20230623124755.2292833-5-rhi@pengutronix.de>

Applied to next.

On Fri, Jun 23, 2023 at 02:47:45PM +0200, Roland Hieber wrote:
> Add a device tree fragment via CONFIG_EXTERNAL_DTS_FRAGMENTS in the
> barebox config, which is appended to each device tree built by barebox.
> Then add definitions for the state variables, which are the same on all
> boards; board-specific state backends will be added in the next patches.
> 
> Signed-off-by: Roland Hieber <rhi@pengutronix.de>
> ---
>  configs/platform-v7a/barebox-am335x.config    |  2 +-
>  .../platform-v7a/barebox-am335x.config.diff   |  2 +-
>  configs/platform-v7a/barebox-at91.config      |  2 +-
>  configs/platform-v7a/barebox-at91.config.diff |  2 +-
>  configs/platform-v7a/barebox-mx6.config       |  2 +-
>  configs/platform-v7a/barebox-mx6.config.diff  |  2 +-
>  configs/platform-v7a/barebox-rpi2.config      |  2 +-
>  configs/platform-v7a/barebox-rpi2.config.diff |  2 +-
>  configs/platform-v7a/barebox-stm32mp.config   |  2 +-
>  .../platform-v7a/barebox-stm32mp.config.diff  |  2 +-
>  configs/platform-v7a/barebox-vexpress.config  |  2 +-
>  .../platform-v7a/barebox-vexpress.config.diff |  2 +-
>  configs/platform-v7a/barebox.config           |  2 +-
>  configs/platform-v7a/dts/bootstate.dtsi       | 50 +++++++++++++++++++
>  14 files changed, 63 insertions(+), 13 deletions(-)
>  create mode 100644 configs/platform-v7a/dts/bootstate.dtsi
> 
> diff --git a/configs/platform-v7a/barebox-am335x.config b/configs/platform-v7a/barebox-am335x.config
> index 3d950403c71a..d91181f4dfe2 100644
> --- a/configs/platform-v7a/barebox-am335x.config
> +++ b/configs/platform-v7a/barebox-am335x.config
> @@ -215,7 +215,7 @@ CONFIG_STATE=y
>  CONFIG_RESET_SOURCE=y
>  # CONFIG_MACHINE_ID is not set
>  # CONFIG_SYSTEMD_OF_WATCHDOG is not set
> -CONFIG_EXTERNAL_DTS_FRAGMENTS=""
> +CONFIG_EXTERNAL_DTS_FRAGMENTS="${PTXDIST_PLATFORMCONFIGDIR}/dts/bootstate.dtsi"
>  
>  #
>  # OP-TEE loading
> diff --git a/configs/platform-v7a/barebox-am335x.config.diff b/configs/platform-v7a/barebox-am335x.config.diff
> index f3f08c161636..d4ef2e860be7 100644
> --- a/configs/platform-v7a/barebox-am335x.config.diff
> +++ b/configs/platform-v7a/barebox-am335x.config.diff
> @@ -1,4 +1,4 @@
> -cae3c1d7fff409368cf71da28bce089f
> +e1ec3277facf26f7ecc5fc49c9c31515
>  # CONFIG_32BIT is undefined
>  # CONFIG_64BIT is undefined
>  # CONFIG_AM33XX_NET_BOOT is not set
> diff --git a/configs/platform-v7a/barebox-at91.config b/configs/platform-v7a/barebox-at91.config
> index 754552b3c9df..5dc6ec9dc51d 100644
> --- a/configs/platform-v7a/barebox-at91.config
> +++ b/configs/platform-v7a/barebox-at91.config
> @@ -226,7 +226,7 @@ CONFIG_STATE=y
>  CONFIG_RESET_SOURCE=y
>  # CONFIG_MACHINE_ID is not set
>  # CONFIG_SYSTEMD_OF_WATCHDOG is not set
> -CONFIG_EXTERNAL_DTS_FRAGMENTS=""
> +CONFIG_EXTERNAL_DTS_FRAGMENTS="${PTXDIST_PLATFORMCONFIGDIR}/dts/bootstate.dtsi"
>  
>  #
>  # OP-TEE loading
> diff --git a/configs/platform-v7a/barebox-at91.config.diff b/configs/platform-v7a/barebox-at91.config.diff
> index e7550cca7299..937c41987be2 100644
> --- a/configs/platform-v7a/barebox-at91.config.diff
> +++ b/configs/platform-v7a/barebox-at91.config.diff
> @@ -1,4 +1,4 @@
> -cae3c1d7fff409368cf71da28bce089f
> +e1ec3277facf26f7ecc5fc49c9c31515
>  # CONFIG_32BIT is undefined
>  # CONFIG_64BIT is undefined
>  CONFIG_ARCH_AT91=y
> diff --git a/configs/platform-v7a/barebox-mx6.config b/configs/platform-v7a/barebox-mx6.config
> index c2e6cc122c1c..79e41dda076f 100644
> --- a/configs/platform-v7a/barebox-mx6.config
> +++ b/configs/platform-v7a/barebox-mx6.config
> @@ -289,7 +289,7 @@ CONFIG_STATE=y
>  CONFIG_RESET_SOURCE=y
>  # CONFIG_MACHINE_ID is not set
>  # CONFIG_SYSTEMD_OF_WATCHDOG is not set
> -CONFIG_EXTERNAL_DTS_FRAGMENTS=""
> +CONFIG_EXTERNAL_DTS_FRAGMENTS="${PTXDIST_PLATFORMCONFIGDIR}/dts/bootstate.dtsi"
>  
>  #
>  # OP-TEE loading
> diff --git a/configs/platform-v7a/barebox-mx6.config.diff b/configs/platform-v7a/barebox-mx6.config.diff
> index 40a9a4fc7b36..5b99586b9773 100644
> --- a/configs/platform-v7a/barebox-mx6.config.diff
> +++ b/configs/platform-v7a/barebox-mx6.config.diff
> @@ -1,4 +1,4 @@
> -cae3c1d7fff409368cf71da28bce089f
> +e1ec3277facf26f7ecc5fc49c9c31515
>  # CONFIG_32BIT is undefined
>  # CONFIG_64BIT is undefined
>  # CONFIG_ARCH_BCM283X is not set
> diff --git a/configs/platform-v7a/barebox-rpi2.config b/configs/platform-v7a/barebox-rpi2.config
> index d562d307fa94..70fba6eeedc2 100644
> --- a/configs/platform-v7a/barebox-rpi2.config
> +++ b/configs/platform-v7a/barebox-rpi2.config
> @@ -214,7 +214,7 @@ CONFIG_STATE=y
>  CONFIG_RESET_SOURCE=y
>  # CONFIG_MACHINE_ID is not set
>  # CONFIG_SYSTEMD_OF_WATCHDOG is not set
> -CONFIG_EXTERNAL_DTS_FRAGMENTS=""
> +CONFIG_EXTERNAL_DTS_FRAGMENTS="${PTXDIST_PLATFORMCONFIGDIR}/dts/bootstate.dtsi"
>  
>  #
>  # OP-TEE loading
> diff --git a/configs/platform-v7a/barebox-rpi2.config.diff b/configs/platform-v7a/barebox-rpi2.config.diff
> index e3a266687572..e6dce16ce7d4 100644
> --- a/configs/platform-v7a/barebox-rpi2.config.diff
> +++ b/configs/platform-v7a/barebox-rpi2.config.diff
> @@ -1,4 +1,4 @@
> -cae3c1d7fff409368cf71da28bce089f
> +e1ec3277facf26f7ecc5fc49c9c31515
>  CONFIG_ARM_ASM_UNIFIED=y
>  # CONFIG_CMD_NVMEM is not set
>  CONFIG_DRIVER_NET_BCMGENET=y
> diff --git a/configs/platform-v7a/barebox-stm32mp.config b/configs/platform-v7a/barebox-stm32mp.config
> index 85a40d37ce31..08a21f50c00e 100644
> --- a/configs/platform-v7a/barebox-stm32mp.config
> +++ b/configs/platform-v7a/barebox-stm32mp.config
> @@ -207,7 +207,7 @@ CONFIG_STATE=y
>  CONFIG_RESET_SOURCE=y
>  # CONFIG_MACHINE_ID is not set
>  # CONFIG_SYSTEMD_OF_WATCHDOG is not set
> -CONFIG_EXTERNAL_DTS_FRAGMENTS=""
> +CONFIG_EXTERNAL_DTS_FRAGMENTS="${PTXDIST_PLATFORMCONFIGDIR}/dts/bootstate.dtsi"
>  
>  #
>  # OP-TEE loading
> diff --git a/configs/platform-v7a/barebox-stm32mp.config.diff b/configs/platform-v7a/barebox-stm32mp.config.diff
> index 284be0e5e4ff..e951f3824fd3 100644
> --- a/configs/platform-v7a/barebox-stm32mp.config.diff
> +++ b/configs/platform-v7a/barebox-stm32mp.config.diff
> @@ -1,4 +1,4 @@
> -cae3c1d7fff409368cf71da28bce089f
> +e1ec3277facf26f7ecc5fc49c9c31515
>  # CONFIG_32BIT is undefined
>  # CONFIG_64BIT is undefined
>  # CONFIG_ARCH_BCM283X is not set
> diff --git a/configs/platform-v7a/barebox-vexpress.config b/configs/platform-v7a/barebox-vexpress.config
> index b85f6653126c..de35478f9a91 100644
> --- a/configs/platform-v7a/barebox-vexpress.config
> +++ b/configs/platform-v7a/barebox-vexpress.config
> @@ -192,7 +192,7 @@ CONFIG_STATE=y
>  CONFIG_RESET_SOURCE=y
>  # CONFIG_MACHINE_ID is not set
>  # CONFIG_SYSTEMD_OF_WATCHDOG is not set
> -CONFIG_EXTERNAL_DTS_FRAGMENTS=""
> +CONFIG_EXTERNAL_DTS_FRAGMENTS="${PTXDIST_PLATFORMCONFIGDIR}/dts/bootstate.dtsi"
>  
>  #
>  # OP-TEE loading
> diff --git a/configs/platform-v7a/barebox-vexpress.config.diff b/configs/platform-v7a/barebox-vexpress.config.diff
> index d323768fc1c1..f50d7f0f1195 100644
> --- a/configs/platform-v7a/barebox-vexpress.config.diff
> +++ b/configs/platform-v7a/barebox-vexpress.config.diff
> @@ -1,4 +1,4 @@
> -cae3c1d7fff409368cf71da28bce089f
> +e1ec3277facf26f7ecc5fc49c9c31515
>  # CONFIG_32BIT is undefined
>  # CONFIG_64BIT is undefined
>  CONFIG_AMBA_SP804=y
> diff --git a/configs/platform-v7a/barebox.config b/configs/platform-v7a/barebox.config
> index e8989d4e4d3a..27a6373837b0 100644
> --- a/configs/platform-v7a/barebox.config
> +++ b/configs/platform-v7a/barebox.config
> @@ -213,7 +213,7 @@ CONFIG_STATE=y
>  CONFIG_RESET_SOURCE=y
>  # CONFIG_MACHINE_ID is not set
>  # CONFIG_SYSTEMD_OF_WATCHDOG is not set
> -CONFIG_EXTERNAL_DTS_FRAGMENTS=""
> +CONFIG_EXTERNAL_DTS_FRAGMENTS="${PTXDIST_PLATFORMCONFIGDIR}/dts/bootstate.dtsi"
>  
>  #
>  # OP-TEE loading
> diff --git a/configs/platform-v7a/dts/bootstate.dtsi b/configs/platform-v7a/dts/bootstate.dtsi
> new file mode 100644
> index 000000000000..d41c888dbd43
> --- /dev/null
> +++ b/configs/platform-v7a/dts/bootstate.dtsi
> @@ -0,0 +1,50 @@
> +/** Generic bootstate node for all platforms **********************************/
> +/ {
> +	state: state {
> +		bootstate: bootstate {};
> +	};
> +};
> +
> +&bootstate {
> +	#address-cells = <1>;
> +	#size-cells = <1>;
> +
> +	system0 {
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +
> +		remaining_attempts@0 {
> +			reg = <0x0 0x4>;
> +			type = "uint32";
> +			default = <3>;
> +		};
> +
> +		priority@4 {
> +			reg = <0x4 0x4>;
> +			type = "uint32";
> +			default = <20>;
> +		};
> +	};
> +
> +	system1 {
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +
> +		remaining_attempts@8 {
> +			reg = <0x8 0x4>;
> +			type = "uint32";
> +			default = <3>;
> +		};
> +
> +		priority@c {
> +			reg = <0xc 0x4>;
> +			type = "uint32";
> +			default = <10>;
> +		};
> +	};
> +
> +	last_chosen@10 {
> +		reg = <0x10 0x4>;
> +		type = "uint32";
> +	};
> +};
> -- 
> 2.39.2
> 
> 
> 

-- 
Pengutronix e.K.                           | Dipl.-Ing. Robert Schwebel  |
Steuerwalder Str. 21                       | https://www.pengutronix.de/ |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-9    |



  reply	other threads:[~2023-08-14 16:36 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-23 12:47 [DistroKit] [PATCH 00/14] v7a: add redundant update support via RAUC Roland Hieber
2023-06-23 12:47 ` [DistroKit] [PATCH 01/14] platforms: revert to default systemd loglevel Roland Hieber
2023-08-14 15:39   ` Robert Schwebel
2023-06-23 12:47 ` [DistroKit] [PATCH 02/14] ptxconfig: enable more tools for debugging Roland Hieber
2023-08-14 16:03   ` Robert Schwebel
2023-06-23 12:47 ` [DistroKit] [PATCH 03/14] rauc-udev: add a compatibility layer for mapping partitions Roland Hieber
2023-08-14 16:36   ` Robert Schwebel
2023-06-23 12:47 ` [DistroKit] [PATCH 04/14] v7a: barebox: include generic bootstate node in device tree Roland Hieber
2023-08-14 16:36   ` Robert Schwebel [this message]
2023-06-23 12:47 ` [DistroKit] [PATCH 05/14] v7a: add RAUC support for qemu-vexpress Roland Hieber
2023-08-14 16:36   ` Robert Schwebel
2023-06-23 12:47 ` [DistroKit] [PATCH 06/14] v7a: add RAUC support for beaglebone black Roland Hieber
2023-08-14 16:36   ` Robert Schwebel
2023-06-23 12:47 ` [DistroKit] [PATCH 07/14] v7a: add RAUC support for rpi3 Roland Hieber
2023-08-14 16:37   ` Robert Schwebel
2023-06-23 12:47 ` [DistroKit] [PATCH 08/14] v7a: add RAUC support for riotboard Roland Hieber
2023-08-14 16:37   ` Robert Schwebel
2023-06-23 12:47 ` [DistroKit] [PATCH 09/14] v7a: kernel: enable features necessary for RAUC Roland Hieber
2023-08-14 16:37   ` Robert Schwebel
2023-08-15  8:47     ` Robert Schwebel
2023-08-25 11:06       ` Roland Hieber
2023-06-23 12:47 ` [DistroKit] [PATCH 10/14] rauc: add initial support Roland Hieber
2023-08-14 16:37   ` Robert Schwebel
2023-06-23 12:47 ` [DistroKit] [PATCH 11/14] v7a: enable RAUC bundle creation Roland Hieber
2023-08-14 16:37   ` Robert Schwebel
2023-06-23 12:47 ` [DistroKit] [PATCH 12/14] image-rauc: fork config from PTXdist 2023.04.0 Roland Hieber
2023-08-14 16:38   ` Robert Schwebel
2023-06-23 12:47 ` [DistroKit] [PATCH 13/14] image-rauc: use ext4 rootfs instead of tar.gz Roland Hieber
2023-08-14 16:38   ` Robert Schwebel
2023-08-15  8:14     ` Robert Schwebel
2023-08-15  8:18       ` Robert Schwebel
2023-08-25 11:04         ` Roland Hieber
2023-06-23 12:47 ` [DistroKit] [PATCH 14/14] v7a: run: start with barebox by default Roland Hieber
2023-08-14 16:38   ` Robert Schwebel
2023-06-23 12:49 ` [DistroKit] [PATCH v4 00/14] v7a: add redundant update support via RAUC Roland Hieber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZNpYGbxVz1LB73HX@pengutronix.de \
    --to=r.schwebel@pengutronix.de \
    --cc=distrokit@pengutronix.de \
    --cc=rhi@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox