From: Tom Rini <trini@konsulko.com>
To: Fabio Estevam <festevam@gmail.com>
Cc: sbabic@denx.de, uboot-imx@nxp.com, u-boot@lists.denx.de,
Fabio Estevam <festevam@denx.de>
Subject: Re: [PATCH 1/2] mx6sabresd: Fix U-Boot corruption after saving the environment
Date: Fri, 2 Feb 2024 08:51:28 -0500 [thread overview]
Message-ID: <20240202135128.GA1152441@bill-the-cat> (raw)
In-Reply-To: <20240202014849.4022787-1-festevam@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1038 bytes --]
On Thu, Feb 01, 2024 at 10:48:48PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <festevam@denx.de>
>
> U-Boot binary has grown in such a way that it goes beyond the reserved
> area for the environment variables.
>
> Running "saveenv" and rebooting the board causes U-Boot to hang because
> of this overlap.
>
> Fix this problem by increasing the CONFIG_ENV_OFFSET.
>
> Also, to prevent this same problem to happen in the future, use
> CONFIG_BOARD_SIZE_LIMIT, which can detect the overlap in build-time.
>
> CONFIG_BOARD_SIZE_LIMIT is calculated as follows:
>
> CONFIG_BOARD_SIZE_LIMIT = CONFIG_ENV_OFFSET - u-boot-img.dtb offset
> CONFIG_BOARD_SIZE_LIMIT = 0xd000 - 69 * 1024
> CONFIG_BOARD_SIZE_LIMIT = 781312
>
> Signed-off-by: Fabio Estevam <festevam@denx.de>
> ---
> configs/mx6sabresd_defconfig | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
I don't like when we have to move the environment like this, can we trim
things down instead? Perhaps LTO?
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
prev parent reply other threads:[~2024-02-02 13:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-02 1:48 [PATCH 1/2] mx6sabresd: Fix U-Boot corruption after saving the environment Fabio Estevam
2024-02-02 1:48 ` [PATCH 2/2] mx6sabresd: Convert to watchdog driver model Fabio Estevam
2024-02-02 13:51 ` Tom Rini [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=20240202135128.GA1152441@bill-the-cat \
--to=trini@konsulko.com \
--cc=festevam@denx.de \
--cc=festevam@gmail.com \
--cc=sbabic@denx.de \
--cc=u-boot@lists.denx.de \
--cc=uboot-imx@nxp.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox