All of lore.kernel.org
 help / color / mirror / Atom feed
From: Niklas Cassel via buildroot <buildroot@buildroot.org>
To: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Niklas Cassel via buildroot <buildroot@buildroot.org>,
	Niklas Cassel <cassel@kernel.org>,
	Damien Le Moal <dlemoal@kernel.org>,
	Kilian Zinnecker <kilian.zinnecker@mail.de>
Subject: Re: [Buildroot] [PATCH v3 4/4] configs/rock5b: enable uboot-env on the SD card
Date: Wed, 23 Oct 2024 18:35:00 +0000	[thread overview]
Message-ID: <ZxlB1N_gyS4wEhXL@ryzen> (raw)
In-Reply-To: <20241022225040.09c4ca7c@windsurf>

Hello Thomas,

On Tue, Oct 22, 2024 at 10:50:40PM +0200, Thomas Petazzoni wrote:
> Hello Niklas,
> 
> On Wed, 16 Oct 2024 15:24:43 +0200
> Niklas Cassel via buildroot <buildroot@buildroot.org> wrote:
> 
> > +	partition uboot-env {
> > +		offset = 16M
> > +		size = 64K
> > +	}
> > +
> >  	partition rootfs {
> >  		partition-type-uuid = root-arm64
> >  		image = "rootfs.ext2"
> > +		bootable = true
> >  	}
> >  }
> > diff --git a/board/radxa/rock5b/u-boot.fragment b/board/radxa/rock5b/u-boot.fragment
> > new file mode 100644
> > index 0000000000..e332bc0c79
> > --- /dev/null
> > +++ b/board/radxa/rock5b/u-boot.fragment
> > @@ -0,0 +1,5 @@
> > +CONFIG_SYS_MMC_ENV_DEV=1
> > +CONFIG_ENV_SIZE=0x10000
> > +CONFIG_ENV_OFFSET=0x1000000
> 
> Hardcoding an offset isn't super nice. Could you try using
> CONFIG_SYS_MMC_ENV_PART instead? It isn't clear to me how it interacts
> CONFIG_ENV_OFFSET.

I can't use CONFIG_SYS_MMC_ENV_PART.

If you read the Kconfig help text:
"""
MMC hardware partition device number on the platform where the
environment is stored.  Note that this is not related to any software
defined partition table but instead if we are in the user area, which is
partition 0 or the first boot partition, which is 1 or some other defined
partition.
"""

So CONFIG_SYS_MMC_ENV_PART is about specifying a MMC specific hwpartition,
which is different from a GPT partition (which is usually stored in a MMC
"user area" hwpartition).

I sent a v4 of this patch that uses the uboot feature which automatically
loads the u-boot environment from a GPT partition which has the
"u-boot-env" GPT partition type GUID instead:
https://lore.kernel.org/buildroot/20241023182509.2808544-1-niklas.cassel@wdc.com/


Kind regards,
Niklas
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2024-10-23 18:35 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-16 13:24 [Buildroot] [PATCH v3 0/4] rock5b improvements Niklas Cassel via buildroot
2024-10-16 13:24 ` [Buildroot] [PATCH v3 1/4] configs/rock5b: update to linux 6.11.3 Niklas Cassel via buildroot
2024-10-22 20:46   ` Thomas Petazzoni via buildroot
2024-10-22 21:08     ` Niklas Cassel via buildroot
2024-10-22 21:10       ` Niklas Cassel via buildroot
2024-10-22 21:14       ` Thomas Petazzoni via buildroot
2024-10-23 18:31   ` Kilian Zinnecker via buildroot
2024-10-16 13:24 ` [Buildroot] [PATCH v3 2/4] configs/rock5b: update to uboot 2024.10 Niklas Cassel via buildroot
2024-10-22 20:46   ` Thomas Petazzoni via buildroot
2024-10-16 13:24 ` [Buildroot] [PATCH v3 3/4] configs/rock5b: use the arm64 rootfs partition-type-uuid Niklas Cassel via buildroot
2024-10-22 20:49   ` Thomas Petazzoni via buildroot
2024-10-22 21:50     ` Niklas Cassel via buildroot
2024-10-23 16:19       ` Thomas Petazzoni via buildroot
2024-10-23 20:07         ` Niklas Cassel via buildroot
2024-10-16 13:24 ` [Buildroot] [PATCH v3 4/4] configs/rock5b: enable uboot-env on the SD card Niklas Cassel via buildroot
2024-10-22 20:50   ` Thomas Petazzoni via buildroot
2024-10-23 18:35     ` Niklas Cassel via buildroot [this message]
2024-10-23 19:13       ` Thomas Petazzoni via buildroot

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=ZxlB1N_gyS4wEhXL@ryzen \
    --to=buildroot@buildroot.org \
    --cc=Niklas.Cassel@wdc.com \
    --cc=cassel@kernel.org \
    --cc=dlemoal@kernel.org \
    --cc=kilian.zinnecker@mail.de \
    --cc=thomas.petazzoni@bootlin.com \
    /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 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.