public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Quentin Schulz <foss+uboot@0leil.net>
Cc: Joe Hershberger <joe.hershberger@ni.com>,
	Klaus Goger <klaus.goger@theobroma-systems.com>,
	Simon Glass <sjg@chromium.org>,
	Philipp Tomsich <philipp.tomsich@vrull.eu>,
	Kever Yang <kever.yang@rock-chips.com>,
	u-boot@lists.denx.de, Heiko Stuebner <heiko@sntech.de>,
	Quentin Schulz <quentin.schulz@theobroma-systems.com>
Subject: Re: [PATCH 6/6] rockchip: ringneck-px30: fix modified boot_targets detection
Date: Thu, 9 Nov 2023 16:28:09 -0500	[thread overview]
Message-ID: <20231109212809.GO6601@bill-the-cat> (raw)
In-Reply-To: <20231108-env_default_theobroma-v1-6-cb493bfdeffd@theobroma-systems.com>

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

On Wed, Nov 08, 2023 at 03:20:35PM +0100, Quentin Schulz wrote:

> From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
> 
> U-Boot proper automatically modifies boot_targets to swap the order in
> which MMC storage media are used for standard boot based on which MMC
> storage medium was used to load U-Boot proper. This is however only done
> if the user has not changed it manually, therefore a check between the
> default and current value is done.
> 
> This used to work fine until the migration to standard boot where
> boot_targets value size in the default environment went above the 32
> characters that env_get_default function can return, thus resulting in a
> truncated variable.
> 
> Therefore the check between default and current value would always fail.
> 
> By using the newly added env_get_default_into function, a buffer of
> the appropriate size can be allocated on the stack to get the whole
> value of boot_targets in the default environment and thus fixing the
> check.
> 
> Cc: Quentin Schulz <foss+uboot@0leil.net>
> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
> ---
>  board/theobroma-systems/ringneck_px30/ringneck-px30.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)

This looks like what the puma-rk3399 is doing in 5/6. Can we have this
in a more common location? Or would there be a downside to that?

-- 
Tom

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

  parent reply	other threads:[~2023-11-09 21:28 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-08 14:20 [PATCH 0/6] rockchip: puma-rk3399/ringneck-px30: fix check against value in default environment variable Quentin Schulz
2023-11-08 14:20 ` [PATCH 1/6] env: allow to copy value from default environment into a buffer Quentin Schulz
2023-11-09  3:33   ` Kever Yang
2023-11-09 21:22   ` Tom Rini
2023-11-08 14:20 ` [PATCH 2/6] env: migrate env_get_default to call env_get_default_into Quentin Schulz
2023-11-09  3:33   ` Kever Yang
2023-11-09 21:24   ` Tom Rini
2023-11-08 14:20 ` [PATCH 3/6] rockchip: puma-rk3399: only declare functions in U-Boot proper Quentin Schulz
2023-11-09  3:33   ` Kever Yang
2023-11-09 21:26   ` Tom Rini
2023-11-08 14:20 ` [PATCH 4/6] rockchip: ringneck-px30: " Quentin Schulz
2023-11-09  3:33   ` Kever Yang
2023-11-09 21:26   ` Tom Rini
2023-11-08 14:20 ` [PATCH 5/6] rockchip: puma-rk3399: fix modified boot_targets detection Quentin Schulz
2023-11-09  3:34   ` Kever Yang
2023-11-08 14:20 ` [PATCH 6/6] rockchip: ringneck-px30: " Quentin Schulz
2023-11-09  3:34   ` Kever Yang
2023-11-09 21:28   ` Tom Rini [this message]
2023-11-10 10:53     ` Quentin Schulz

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=20231109212809.GO6601@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=foss+uboot@0leil.net \
    --cc=heiko@sntech.de \
    --cc=joe.hershberger@ni.com \
    --cc=kever.yang@rock-chips.com \
    --cc=klaus.goger@theobroma-systems.com \
    --cc=philipp.tomsich@vrull.eu \
    --cc=quentin.schulz@theobroma-systems.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.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