From: Michael Walle <mwalle@kernel.org>
To: Javier Viguera <javier.viguera@digi.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>,
Tom Rini <trini@konsulko.com>,
Quentin Schulz <quentin.schulz@cherry.de>,
u-boot@lists.denx.de
Subject: Re: [PATCH v2] env: mmc: fix offsets relative to the end of the partition
Date: Tue, 10 Jun 2025 09:04:27 +0200 [thread overview]
Message-ID: <07fdd0078b39313a8dc388561369791f@kernel.org> (raw)
In-Reply-To: <273f9e01-2362-48a7-9a22-ac7912b197fc@digi.com>
Hi Javier,
>> According to the help text, you can set negative offsets to indicated
>> that the offset is relative to the end of the parition. But kconfig
>> doesn't let you specify negative hex values. I think this fell through
>> the cracks when converting the symbol from a '#define' to a kconfig
>> option.
>
> Not sure with u-boot upstream master, but with a downstream NXP-based
> tree (version v2024.04) I think it just works with something like:
>
> ccimx91-dvk_defconfig:CONFIG_ENV_OFFSET=0xFFFFFFFFFFFFC000
> ccimx91-dvk_defconfig:CONFIG_ENV_OFFSET_REDUND=0xFFFFFFFFFFFFC000
> ccimx93-dvk_defconfig:CONFIG_ENV_OFFSET=0xFFFFFFFFFFFFC000
> ccimx93-dvk_defconfig:CONFIG_ENV_OFFSET_REDUND=0xFFFFFFFFFFFFC000
Yeah, but I wouldn't call that very user friendly if you have to
convert the offset the two's complement representation yourself.
> After all, the symbol gets translated to a signed s64 variable.
Also I've just noticed, that env/sf.c uses ulong to store ENV_OFFSET.
-michael
next prev parent reply other threads:[~2025-06-10 7:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-05 7:46 [PATCH v2] env: mmc: fix offsets relative to the end of the partition Michael Walle
2025-06-06 9:45 ` Quentin Schulz
2025-06-06 10:49 ` Andrew Goodbody
2025-06-06 12:43 ` Michael Walle
2025-06-06 12:34 ` Javier Viguera
2025-06-10 7:04 ` Michael Walle [this message]
2025-07-02 8:57 ` Peng Fan
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=07fdd0078b39313a8dc388561369791f@kernel.org \
--to=mwalle@kernel.org \
--cc=javier.viguera@digi.com \
--cc=joe.hershberger@ni.com \
--cc=quentin.schulz@cherry.de \
--cc=trini@konsulko.com \
--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 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.