public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: dbrazeau <dbrazeau1024@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Duplicate environment variables in RAM?!?
Date: Wed, 1 Sep 2010 14:08:23 -0700 (PDT)	[thread overview]
Message-ID: <29592447.post@talk.nabble.com> (raw)
In-Reply-To: <29588954.post@talk.nabble.com>


So I figured out what my issue was.  I was defining CONFIG_IPADDR in my
config .h file and also added ipaddr=xxx.xxx.xxx.xxx to my defined
environment variables list in the config .h file.  I did not realize that
the ipaddr environment variabe (along with others) are added in the variable
list in the env_common.c file.  As a result I was starting out with
duplicate variables before every setting 'ipaddr'.


dbrazeau wrote:
> 
> For some variables, for example "ipaddr",  when I try to change them using
> "setenv" it does not update the current "ipaddr" variable in RAM it
> creates a new one and append it to the end of the variable list.  As a
> result I end up having two "ipaddr" variables in RAM, one with the
> original value and one with the new value at the end of the list.  If I
> try to set the variable a second time it deletes the first instance (the
> original) and adds the second new one to the end of the variable list.
> 
> This may be a little confusing so here is an abbreviated example. The
> '.....' represent the rest of the variables in the list.
> 
> Original list of variables
> ---------------------
> .......
> ipaddr=10.0.5.2
> .......
> ---------------------
> 
> =>setenv ipaddr 10.0.16.4
> Now the variables look like this
> ---------------------
> .......
> ipaddr=10.0.5.2
> .......
> ipaddr=10.0.16.4
> ---------------------
> 
> =>setenv ipaddr 10.0.28.7
> And now the variables look like this
> ---------------------
> .......
> .......
> ipaddr=10.0.16.4
> ipaddr=10.0.28.7
> ---------------------
> 
> Is this the intended behavior?  I am running an older version (U-Boot
> 1.3.4) so maybe this has been fixed. If this is the case could you point
> me to the version that it is fixed in.
> 
> Thanks.
> 

-- 
View this message in context: http://old.nabble.com/Duplicate-environment-variables-in-RAM-%21--tp29588954p29592447.html
Sent from the Uboot - Users mailing list archive at Nabble.com.

      reply	other threads:[~2010-09-01 21:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-01  0:26 [U-Boot] Duplicate environment variables in RAM?!? dbrazeau
2010-09-01 21:08 ` dbrazeau [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=29592447.post@talk.nabble.com \
    --to=dbrazeau1024@gmail.com \
    --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