From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] status of patch to store environment to mmc/sd
Date: Thu, 09 Sep 2010 15:35:08 +0200 [thread overview]
Message-ID: <4C88E28C.7080508@denx.de> (raw)
In-Reply-To: <4C88DF18.7090909@emk-elektronik.de>
Reinhard Meyer wrote:
> Dear Stefano Babic,
Hi Reinhard,
> Just looking at the patch I see that it writes the env to fixed blocks
> on the SD/MMC card. This will work of course. BUT usually (IMHO) such
> cards are used with partitions/filesystems.
Not always. In the specific case reported by Amit, the mx.51 processor
can boot from a SD card, that must not contain partitions at least for
the early sectors, where it is supposed there is the u-boot's code.
Usage of partitions is not forbidden, however. The partitions must only
start after the space required by u-boot and (as supported by the patch
in question) by the environment.
> How do you make sure the
> blocks don't overwrite files or don't get overwritten by files?
Writing a correct partition table: the first partition must start after
u-boot code and environment, used as raw-blocks. There is then no
possibility for files to overwrite the environment or the code.
> One can, of course, prepare the card with a small partition spanning
> the env blocks.
As I said, it is not required to have a partition for the environment,
because this is read only as raw-block. It is only required to skip the
first blocks (or the block set in the config file).
>
> Should the env not be saved in a file? Which is probably a bit beyond
> possibility to read when not yet relocated...
Reading the environment from a file should be in a separate patch and
made much more general ;-)
It is not related to a specific storage. We could have a filesystem even
on other storages (SPI-Flash, NAND, HD...) and "reading from file"
should IMHO hide the underlying storage media.
Best regards,
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:[~2010-09-09 13:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-07 11:29 [U-Boot] status of patch to store environment to mmc/sd Amit Kucheria
2010-09-09 12:26 ` Amit Kucheria
2010-09-09 13:03 ` Stefano Babic
2010-09-09 13:20 ` Reinhard Meyer
2010-09-09 13:35 ` Stefano Babic [this message]
2010-09-10 7:49 ` Amit Kucheria
2010-09-10 11:13 ` Wolfgang Denk
2010-09-16 19:36 ` Ghorai, Sukumar
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=4C88E28C.7080508@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox