From: Joakim Tjernlund <joakim.tjernlund@transmode.se>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] dtb in env sector - was: (Try 2) Please pull ...
Date: Tue, 3 Apr 2007 20:53:57 +0200 [thread overview]
Message-ID: <002a01c77621$6f985100$020120ac@Jocke> (raw)
In-Reply-To: <20070403152455.25B80352676@atlas.denx.de>
> -----Original Message-----
> From: wd at denx.de [mailto:wd at denx.de]
> Sent: den 3 april 2007 17:25
> To: Jerry Van Baren
> Cc: joakim.tjernlund at transmode.se; u-boot-users at lists.sourceforge.net
> Subject: Re: [U-Boot-Users] dtb in env sector - was: (Try 2)
> Please pull ...
>
> In message <461262CD.7000309@smiths-aerospace.com> you wrote:
> >
> > Actually, it is much worse than that: currently when you do
> a "saveenv"
> > it will wipe out the fdt blob because it doesn't know that
> the blob is
> > in the same sector.
>
> No, it doesn't; see "common/env_flash.c":
>
> #if defined(CFG_ENV_SECT_SIZE) && (CFG_ENV_SECT_SIZE > CFG_ENV_SIZE)
> ...
> /* copy old contents to temporary buffer */
> ...
> /* copy current environment to temporary buffer */
> ...
> flash_sect_protect(OFF,...);
> ...
> flash_sect_erase();
> ...
> flash_write();
> ...
>
> > I'm thinking that we want to store the blob immediately
> after the env
> > variable storage _reserved area_ as a #define option (as a
> new #define
> > option? part of the CONFIG_OF_LIBFDT define?) and enhance the env
>
> You mean at CFG_ENV_ADDR+CFG_ENV_SIZE ?
>
> > save/restore to do the blob too. This would get us the
> redundancy and
> > we can cover it with a new (preferred?) or existing env CRC
> (not good?).
>
> Not good.
>
> > > yes, but it would be handy to just say "use the dtb in my spare
> > > env space", especially if you use rendundant env. so the right
> > > one is selected.
>
> I consider this bad design. The environment is one thing, and the dtb
> is a different thing. You are mixing two unrelated things here, which
> causes interdependencies that can cause a lot of trouble.
They are not so different or unrelated, but I don't propose to integrate
them. I think of it as 2 things that needs storage and they should be able
to share an erase block. Redundant env. aside, these two items don't
need to know about oneother. Adding redundant env. makes it a little
bit harder but should be solvable.
I see 2 benefits with this shared storage:
1) less flash space is wasted, 1 (or 2 if you want redundancy)
erase blocks can be saved.
2) existing boards in can add a dtb without repartioning its
flash space, you can even upgrade eq. in the field.
Regards
Jocke
next prev parent reply other threads:[~2007-04-03 18:53 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-31 17:43 [U-Boot-Users] (Try 2) Please pull branch fdt-cmd from u-boot-fdt.git Jerry Van Baren
2007-03-31 18:20 ` Wolfgang Denk
2007-03-31 18:48 ` Jerry Van Baren
2007-04-03 23:50 ` Wolfgang Denk
2007-04-04 10:16 ` Jerry Van Baren
2007-04-04 12:22 ` [U-Boot-Users] Warning for mpc8360emds users: " Jerry Van Baren
2007-04-04 15:46 ` Timur Tabi
2007-04-04 16:17 ` Jerry Van Baren
2007-04-04 22:46 ` Wolfgang Denk
2007-04-05 3:08 ` Jerry Van Baren
2007-04-05 8:06 ` Wolfgang Denk
2007-04-05 11:00 ` Jerry Van Baren
2007-04-05 18:02 ` Bruce_Leonard at selinc.com
2007-04-05 18:12 ` Jerry Van Baren
2007-04-05 18:40 ` Bruce_Leonard at selinc.com
2007-04-06 21:57 ` Timur Tabi
2007-04-06 22:39 ` Jerry Van Baren
2007-04-07 0:15 ` Wolfgang Denk
2007-04-07 1:29 ` Jerry Van Baren
2007-03-31 18:27 ` [U-Boot-Users] (Try 2) Please pull branch " Jerry Van Baren
2007-04-04 0:21 ` Wolfgang Denk
2007-04-03 9:39 ` Joakim Tjernlund
2007-04-03 10:34 ` Jerry Van Baren
2007-04-03 11:37 ` Joakim Tjernlund
2007-04-03 12:06 ` Jerry Van Baren
2007-04-03 12:59 ` [U-Boot-Users] dtb in env sector - was: (Try 2) Please pull Wolfgang Denk
2007-04-03 14:04 ` Joakim Tjernlund
2007-04-03 14:21 ` Jerry Van Baren
2007-04-03 14:36 ` Martin Krause
2007-04-03 15:14 ` Joakim Tjernlund
2007-04-03 15:17 ` Jerry Van Baren
2007-04-03 15:24 ` Wolfgang Denk
2007-04-03 18:53 ` Joakim Tjernlund [this message]
2007-04-03 12:53 ` Wolfgang Denk
2007-04-03 12:49 ` Wolfgang Denk
2007-04-03 13:58 ` Joakim Tjernlund
2007-04-03 15:18 ` Wolfgang Denk
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='002a01c77621$6f985100$020120ac@Jocke' \
--to=joakim.tjernlund@transmode.se \
--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