From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] mx28: Saving env vars on MMC
Date: Fri, 25 Nov 2011 08:12:55 +0100 [thread overview]
Message-ID: <4ECF3FF7.40502@denx.de> (raw)
In-Reply-To: <CAOMZO5Df-2zax51y4W4LmRVztcUAzmiwgR_FekdtcDqXyoHt_A@mail.gmail.com>
On 25/11/2011 03:05, Fabio Estevam wrote:
> Hi,
>
> I am trying to save environment variables on a SD card of a MX28EVK board.
>
> 'save' command reports no errors, but if I reboot the board then the
> board no longer boots.
>
> In order to recover the boot, I need to reformat the SD card and
> reflash the u-boot.sd image.
>
> I am trying the following configuration taken from FSL U-boot:
>
> /*
> * MMC Driver
> */
> #define CONFIG_ENV_IS_IN_MMC
> #define CONFIG_ENV_OFFSET 0x400
I do not know the details, but this offset is very low and it seems
taken from other i.MX (MX5). This can overwrite your U-Boot. The
write_env() function in env_mmc.c converts the offset in a block number,
and this means you are writing at the block #2.
Because 1 Block=512 byte, can you try to move the offset to a very high
block ?
> #define CONFIG_ENV_SIZE 0x20000 - 0x400
This seems too much...
Stefano
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
next prev parent reply other threads:[~2011-11-25 7:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-25 2:05 [U-Boot] mx28: Saving env vars on MMC Fabio Estevam
2011-11-25 7:12 ` Stefano Babic [this message]
2011-11-25 8:13 ` Marek Vasut
2011-11-25 13:20 ` Fabio Estevam
2011-11-25 13:42 ` Marek Vasut
2011-11-25 14:30 ` Marek Vasut
2011-11-25 15:06 ` Fabio Estevam
2011-11-25 15:13 ` Marek Vasut
2011-11-26 21:33 ` Fabio Estevam
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=4ECF3FF7.40502@denx.de \
--to=sbabic@denx.de \
--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.