mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: David Jander <david@protonic.nl>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] arm: boards: Add support for Protonic PRTPUK board
Date: Thu, 14 Aug 2025 15:23:00 +0200	[thread overview]
Message-ID: <20250814152300.4189e792@erd003.prtnl> (raw)
In-Reply-To: <aJ3H5z8f_ePriB-T@pengutronix.de>


Dear Sascha,

On Thu, 14 Aug 2025 13:26:31 +0200
Sascha Hauer <s.hauer@pengutronix.de> wrote:

> Hi David,
> 
> On Wed, Aug 13, 2025 at 09:01:49AM +0200, David Jander wrote:
> > PRTPUK is a credit-card sized ISOBUS virtual terminal, based on the
> > Rockchip RK3576 SoC, that features a CAN interface and a 100/1000Base-T1
> > interface for HS-ISOBUS (HSI), as well as a USB-C port for connecting to a
> > touch-screen monitor.
> > 
> > +&sdhci {
> > +	no-sd;
> > +
> > +	partitions {
> > +		compatible = "barebox,fixed-partitions";
> > +		#address-cells = <2>;
> > +		#size-cells = <2>;
> > +
> > +		/* eMMC reserved 8MiB for barebox (2 copies?), env and state */
> > +		environment_emmc: partition@7b0000 {
> > +			label = "barebox-environment";
> > +			reg = <0x0 0x7b0000 0x0 0x10000>;
> > +		};
> > +
> > +		/* eMMC state after barebox and environment */
> > +		state_backend_emmc: partition@7c0000 {
> > +			label = "state";
> > +			reg = <0x0 0x7c0000 0x0 0x40000>;
> > +		};
> > +	};  
> 
> We are trying to get away from hardcoding partitions outside the GPT in
> the device tree and I think we are there.
> 
> A partition with the type UUID PARTITION_BAREBOX_ENVIRONMENT_GUID will be
> used as environment partition automatically.
> 
> A partition with the type UUID BAREBOX_STATE_PARTITION_GUID will be used
> as state partition provided the state node points to the device
> containing this partition.
> 
> We also have a parted command to create/modify partitions and for
> further convenience a createnv command which will create a barebox
> environment partition in case you haven't built a full partition image
> from a BSP.
> 
> It would be great if you could test this and eventually switch over to
> it.

This was copied over from MECSBC. I didn't know things had changed since.

I agree it is much better to have all storage areas indexed by a GPT, but it
will mean that we will need to change every instance of identifying a
partition from number-based indexes to UUID or labels. And of course there are
a lot more partitions that will have to be included for completeness,
specially on Rockchip platforms. See here:

https://opensource.rock-chips.com/wiki_Partitions

This looks like a big mess, but I suppose we should at leas have loader1
(which is the whole of barebox, TF-A and optee). "U-Boot ENV" would be
replaced by barebox environment, and loader2 and trust would disappear.
On the MECSBC platform we started to use the Vendor Storage partition for
storing serial number and MAC address, so unless there is a better place for
these, we'd continue adhering to the Rockchip standard... for lack of a better
standard.

I'll try to come up with a partition layout that includes everything,
including the GUID's you mentioned above. Thanks.

Best regards,

-- 
David Jander



      reply	other threads:[~2025-08-14 14:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-13  7:01 David Jander
2025-08-13  7:28 ` David Jander
2025-08-13  8:17   ` Ahmad Fatoum
2025-08-14 11:26 ` Sascha Hauer
2025-08-14 13:23   ` David Jander [this message]

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=20250814152300.4189e792@erd003.prtnl \
    --to=david@protonic.nl \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@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