Re: [U-Boot] [PATCH] fw_env.h: added a few missing defines

2012-01-05 Thread Wolfgang Denk
Dear Frans Meulenbroeks,

In message <1325512063-15583-1-git-send-email-fransmeulenbro...@gmail.com> you 
wrote:
> The README file lists 4 defined that were not actually present in the .h
> file but that were needed to get things working with settings compiled in.
> They are
> Added these to the .h file
> (the values above are the ones from the README file)
> 
> Signed-off-by: Frans Meulenbroeks 
> ---
> Noticed this was not applied and still pending in my git tree
> Couldn't find a trace that I actually posted it so here it is (possibly again)
> 
>  tools/env/fw_env.h |4 
>  1 files changed, 4 insertions(+), 0 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
I've been programming for (35-9=) 24 years myself,  and  I  find  the
best way to learn a new language is to *read* every example snippet I
can find, with a reference book close by. Eventually, the *rhythm* of
the language starts pounding in my head... and my fluency is close at
hand. That's how I learned Perl, and now I'm one of the drummers. :-)
 -- Randal L. Schwartz in <8cvi6p2tir@gadget.cscaper.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] fw_env.h: added a few missing defines

2012-01-02 Thread Frans Meulenbroeks
The README file lists 4 defined that were not actually present in the .h
file but that were needed to get things working with settings compiled in.
They are
Added these to the .h file
(the values above are the ones from the README file)

Signed-off-by: Frans Meulenbroeks 
---
Noticed this was not applied and still pending in my git tree
Couldn't find a trace that I actually posted it so here it is (possibly again)

 tools/env/fw_env.h |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/tools/env/fw_env.h b/tools/env/fw_env.h
index 9258c79..2dcb373 100644
--- a/tools/env/fw_env.h
+++ b/tools/env/fw_env.h
@@ -34,8 +34,12 @@
 #define DEVICE2_NAME  "/dev/mtd2"
 #define DEVICE1_OFFSET0x
 #define ENV1_SIZE 0x4000
+#define DEVICE1_ESIZE 0x4000
+#define DEVICE1_ENVSECTORS 2
 #define DEVICE2_OFFSET0x
 #define ENV2_SIZE 0x4000
+#define DEVICE2_ESIZE 0x4000
+#define DEVICE2_ENVSECTORS 2
 
 #define CONFIG_BAUDRATE115200
 #define CONFIG_BOOTDELAY   5   /* autoboot after 5 seconds */
-- 
1.7.0.4

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] fw_env.h: added a few missing defines

2011-12-02 Thread Andreas Bießmann
Dear Frans,

Am 02.12.2011 09:24, schrieb Frans Meulenbroeks:
> 
> 
> 2011/12/1 Andreas Bießmann  >
> 
> Dear Frans Meulenbroeks,
> 
> Am 01.12.2011 14:30, schrieb Frans Meulenbroeks:
> > The README file lists 4 defined that were not actually present in
> the .h
> > file but that were needed to get things working with settings
> compiled in.
> > They are
> > Added these to the .h file
> > (the values above are the ones from the README file)
> >
> > Signed-off-by: Frans Meulenbroeks  >
> 
> I tend to NAK this.
> 
> > ---
> >  tools/env/fw_env.h |4 
> >  1 files changed, 4 insertions(+), 0 deletions(-)
> >
> > diff --git a/tools/env/fw_env.h b/tools/env/fw_env.h
> > index 9258c79..2dcb373 100644
> > --- a/tools/env/fw_env.h
> > +++ b/tools/env/fw_env.h
> > @@ -34,8 +34,12 @@
> >  #define DEVICE2_NAME  "/dev/mtd2"
> >  #define DEVICE1_OFFSET0x
> >  #define ENV1_SIZE 0x4000
> > +#define DEVICE1_ESIZE 0x4000
> > +#define DEVICE1_ENVSECTORS 2
> 
> This change will overwrite the settings done by ENV1_SIZE ... and none
> of the settings match my boards needs ;)
> 
> I would appreciate you test my patch
> http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/106972/focus=112948
> or http://patchwork.ozlabs.org/patch/120372/
> 
> I guess you could fulfil your requirements with that patch too.
> 
> best regards
> 
> 
> Hi Andreas, all
> 
> I have no particular preference to your patch, and I am not 100% sure
> about the overwriting of ENV1_ESIZE.
> Actually my understanding is that ENV1_SIZE specifies the size of the
> environment and DEVICE1_ESIZE is the size of a sector (but I may be
> wrong here)

Well, I shortly overflow the code and saw around line 1240 in fw_env.c
the envdevices[0] values set by ENV1_SIZE are overwritten by
DEVICE1_ESIZE. But you are right, ENVx_SIZE is size of environment,
DEVICEx_SIZE is erase-size. Current code assumes erase-size == env-size
with one sector. Beside that fw_printenv requires /etc/fw_env.config by
default.

> What I noticed was that there is a difference with what is specified in
> the tools/env/README file and what is in tools/env/fw_env.h
> 
> For my project I wanted to have the settings into the program and avoid
> the file in /etc, hence I followed the README and bumped into the fact
> that these two were missing. I've added them to make them compliant with
> the README.

We do need compiled in parameters too, but I found it cumbersome to
change the code in repository to have correct parameters for my board.
Cause everyone need to patch the default configuration I found it easy
to provide a generic way to inject a specific configuration.
The http://patchwork.ozlabs.org/patch/120372/ is about three month old
but no one cares. Therefore the pointer to that patch ...

> For my board of course the values were not correct either, so I patched
> these locally, then tested my work and found it to work.
> As it stands this could probably be replaced with your patch; can't test
> that now as we are in the usual end-of-year stress to complete some
> projects.  Yet an alternate solution could be to update the README file.

I guess this would be best.

best regards

Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] fw_env.h: added a few missing defines

2011-12-02 Thread Frans Meulenbroeks
2011/12/1 Andreas Bießmann 

> Dear Frans Meulenbroeks,
>
> Am 01.12.2011 14:30, schrieb Frans Meulenbroeks:
> > The README file lists 4 defined that were not actually present in the .h
> > file but that were needed to get things working with settings compiled
> in.
> > They are
> > Added these to the .h file
> > (the values above are the ones from the README file)
> >
> > Signed-off-by: Frans Meulenbroeks 
>
> I tend to NAK this.
>
> > ---
> >  tools/env/fw_env.h |4 
> >  1 files changed, 4 insertions(+), 0 deletions(-)
> >
> > diff --git a/tools/env/fw_env.h b/tools/env/fw_env.h
> > index 9258c79..2dcb373 100644
> > --- a/tools/env/fw_env.h
> > +++ b/tools/env/fw_env.h
> > @@ -34,8 +34,12 @@
> >  #define DEVICE2_NAME  "/dev/mtd2"
> >  #define DEVICE1_OFFSET0x
> >  #define ENV1_SIZE 0x4000
> > +#define DEVICE1_ESIZE 0x4000
> > +#define DEVICE1_ENVSECTORS 2
>
> This change will overwrite the settings done by ENV1_SIZE ... and none
> of the settings match my boards needs ;)
>
> I would appreciate you test my patch
> http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/106972/focus=112948
> or http://patchwork.ozlabs.org/patch/120372/
>
> I guess you could fulfil your requirements with that patch too.
>
> best regards
>

Hi Andreas, all

I have no particular preference to your patch, and I am not 100% sure about
the overwriting of ENV1_ESIZE.
Actually my understanding is that ENV1_SIZE specifies the size of the
environment and DEVICE1_ESIZE is the size of a sector (but I may be wrong
here)

What I noticed was that there is a difference with what is specified in the
tools/env/README file and what is in tools/env/fw_env.h

For my project I wanted to have the settings into the program and avoid the
file in /etc, hence I followed the README and bumped into the fact that
these two were missing. I've added them to make them compliant with the
README.

For my board of course the values were not correct either, so I patched
these locally, then tested my work and found it to work.
As it stands this could probably be replaced with your patch; can't test
that now as we are in the usual end-of-year stress to complete some
projects.  Yet an alternate solution could be to update the README file.

Best regards, Frans

PS (please keep me cc-ed, I've unsubscribed from the list a while ago due
to information overload because of being on too many lists)
(or talk to me on irc: eFfeM)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] fw_env.h: added a few missing defines

2011-12-01 Thread Andreas Bießmann
Dear Frans Meulenbroeks,

Am 01.12.2011 14:30, schrieb Frans Meulenbroeks:
> The README file lists 4 defined that were not actually present in the .h
> file but that were needed to get things working with settings compiled in.
> They are
> Added these to the .h file
> (the values above are the ones from the README file)
> 
> Signed-off-by: Frans Meulenbroeks 

I tend to NAK this.

> ---
>  tools/env/fw_env.h |4 
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/tools/env/fw_env.h b/tools/env/fw_env.h
> index 9258c79..2dcb373 100644
> --- a/tools/env/fw_env.h
> +++ b/tools/env/fw_env.h
> @@ -34,8 +34,12 @@
>  #define DEVICE2_NAME  "/dev/mtd2"
>  #define DEVICE1_OFFSET0x
>  #define ENV1_SIZE 0x4000
> +#define DEVICE1_ESIZE 0x4000
> +#define DEVICE1_ENVSECTORS 2

This change will overwrite the settings done by ENV1_SIZE ... and none
of the settings match my boards needs ;)

I would appreciate you test my patch
http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/106972/focus=112948
or http://patchwork.ozlabs.org/patch/120372/

I guess you could fulfil your requirements with that patch too.

best regards

Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] fw_env.h: added a few missing defines

2011-12-01 Thread Frans Meulenbroeks
The README file lists 4 defined that were not actually present in the .h
file but that were needed to get things working with settings compiled in.
They are
Added these to the .h file
(the values above are the ones from the README file)

Signed-off-by: Frans Meulenbroeks 
---
 tools/env/fw_env.h |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/tools/env/fw_env.h b/tools/env/fw_env.h
index 9258c79..2dcb373 100644
--- a/tools/env/fw_env.h
+++ b/tools/env/fw_env.h
@@ -34,8 +34,12 @@
 #define DEVICE2_NAME  "/dev/mtd2"
 #define DEVICE1_OFFSET0x
 #define ENV1_SIZE 0x4000
+#define DEVICE1_ESIZE 0x4000
+#define DEVICE1_ENVSECTORS 2
 #define DEVICE2_OFFSET0x
 #define ENV2_SIZE 0x4000
+#define DEVICE2_ESIZE 0x4000
+#define DEVICE2_ENVSECTORS 2
 
 #define CONFIG_BAUDRATE115200
 #define CONFIG_BOOTDELAY   5   /* autoboot after 5 seconds */
-- 
1.7.0.4

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot