* [U-Boot] CONFIG_ENV_IS_EMBEDDED problems
@ 2011-01-29 12:58 Michael Schwingen
2011-02-15 9:11 ` Mike Frysinger
0 siblings, 1 reply; 2+ messages in thread
From: Michael Schwingen @ 2011-01-29 12:58 UTC (permalink / raw)
To: u-boot
Hi,
I am wondering how CONFIG_ENV_IS_EMBEDDED is supposed to work.
As far as I understand the code, it is set automatically by
environment.h in case the environment is in a sector in NOR flash that
overlaps with the u-boot code.
However, I see two problems:
- CONFIG_ENV_IS_EMBEDDED does not end up in autoconf.mk - however, it
is used in common/Makefile. This does not cause problems as long as
CONFIG_ENV_IS_IN_FLASH is also set, but the switch in the Makefile is
either useless or broken.
- include/common.h also contains #ifdef CONFIG_ENV_IS_EMBEDDED without
including environment.h, so that the definitions inside that block are
never reached.
Which of these is in error?
I think we could include environment.h from config.h - that would fix
all the problems, however that would mean environment.h ends up as a
dependency practically everywhere, which sounds bad.
cu
Michael
^ permalink raw reply [flat|nested] 2+ messages in thread
* [U-Boot] CONFIG_ENV_IS_EMBEDDED problems
2011-01-29 12:58 [U-Boot] CONFIG_ENV_IS_EMBEDDED problems Michael Schwingen
@ 2011-02-15 9:11 ` Mike Frysinger
0 siblings, 0 replies; 2+ messages in thread
From: Mike Frysinger @ 2011-02-15 9:11 UTC (permalink / raw)
To: u-boot
On Saturday, January 29, 2011 07:58:37 Michael Schwingen wrote:
> I am wondering how CONFIG_ENV_IS_EMBEDDED is supposed to work.
the embedded env stuff is kind of a mess. anyone will to waste/spend time on
cleaning it up would be nice.
> As far as I understand the code, it is set automatically by
> environment.h in case the environment is in a sector in NOR flash that
> overlaps with the u-boot code.
historically, i think that's what the code attempted to do.
> However, I see two problems:
> - CONFIG_ENV_IS_EMBEDDED does not end up in autoconf.mk - however, it
> is used in common/Makefile. This does not cause problems as long as
> CONFIG_ENV_IS_IN_FLASH is also set, but the switch in the Makefile is
> either useless or broken.
well, the former cant really show up if the latter isnt defined
> - include/common.h also contains #ifdef CONFIG_ENV_IS_EMBEDDED without
> including environment.h, so that the definitions inside that block are
> never reached.
common.h has historically been a dumping ground for crap. relocating that
malloc-specific code to a better header would probably be a good idea.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110215/50e4878b/attachment.pgp
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-02-15 9:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-29 12:58 [U-Boot] CONFIG_ENV_IS_EMBEDDED problems Michael Schwingen
2011-02-15 9:11 ` Mike Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox