public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] How to enable diag_printf at Redboot
@ 2007-07-06 18:32 Tales Toledo
  2007-07-06 19:12 ` Sergei Gavrikov
  0 siblings, 1 reply; 12+ messages in thread
From: Tales Toledo @ 2007-07-06 18:32 UTC (permalink / raw)
  To: ecos-discuss

Hi,

I would like to enable all diag_printf messages at Redboot.
How can I do this?
Which cdl option should I have to enable to make it works?

Thx,
TT

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [ECOS] How to enable diag_printf at Redboot
  2007-07-06 18:32 [ECOS] How to enable diag_printf at Redboot Tales Toledo
@ 2007-07-06 19:12 ` Sergei Gavrikov
  2007-07-06 19:37   ` Tales Toledo
  0 siblings, 1 reply; 12+ messages in thread
From: Sergei Gavrikov @ 2007-07-06 19:12 UTC (permalink / raw)
  To: Tales Toledo; +Cc: ecos-discuss

On Fri, Jul 06, 2007 at 03:32:01PM -0300, Tales Toledo wrote:
> Hi,
> 
> I would like to enable all diag_printf messages at Redboot.
> How can I do this?
> Which cdl option should I have to enable to make it works?

There are a lot of debug messages in RedBoot. That depends on packages
are used to build RedBoot (RedBoot is a closely target related stuff).
You can see that, U.T.S.L.

find $ECOS_REPOSITORY/redboot/current/src | xargs grep DEBUG

You can meet ZM_DEBUG, DEBUG_TCP, etc., etc., etc.

but it seems, that more suitable way is to look at any CYGDBG_REDBOOT_*
options in your `ecos.ecc' is prepared to build RedBoot

ecosconfig new <target> redboot
ecosconfig import <redboot_{ROM|RAM|ROMRAM}.ecm>
grep CYGDBG_REDBOOT ecos.ecc

Sergei

> 
> Thx,
> TT
> 
> -- 
> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [ECOS] How to enable diag_printf at Redboot
  2007-07-06 19:12 ` Sergei Gavrikov
@ 2007-07-06 19:37   ` Tales Toledo
  2007-07-06 21:14     ` Sergei Gavrikov
  0 siblings, 1 reply; 12+ messages in thread
From: Tales Toledo @ 2007-07-06 19:37 UTC (permalink / raw)
  To: Sergei Gavrikov; +Cc: ecos-discuss

On 7/6/07, Sergei Gavrikov <w3sg@softhome.net> wrote:
> On Fri, Jul 06, 2007 at 03:32:01PM -0300, Tales Toledo wrote:
> > Hi,
> >
> > I would like to enable all diag_printf messages at Redboot.
> > How can I do this?
> > Which cdl option should I have to enable to make it works?
>
> There are a lot of debug messages in RedBoot. That depends on packages
> are used to build RedBoot (RedBoot is a closely target related stuff).
> You can see that, U.T.S.L.
>
> find $ECOS_REPOSITORY/redboot/current/src | xargs grep DEBUG
>
> You can meet ZM_DEBUG, DEBUG_TCP, etc., etc., etc.
>
> but it seems, that more suitable way is to look at any CYGDBG_REDBOOT_*
> options in your `ecos.ecc' is prepared to build RedBoot
>

I enable CYGDBG_REDBOOT_NET_DEBUG that is the most important for me
right now. Unfortunately  I am having some problems with flash
configuration at boot that override it with 0.
I can't see any messages until now...

Thx anyway,
TT

> ecosconfig new <target> redboot
> ecosconfig import <redboot_{ROM|RAM|ROMRAM}.ecm>
> grep CYGDBG_REDBOOT ecos.ecc
>
> Sergei
>
> >
> > Thx,
> > TT
> >
> > --
> > Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> > and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
>

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [ECOS] How to enable diag_printf at Redboot
  2007-07-06 19:37   ` Tales Toledo
@ 2007-07-06 21:14     ` Sergei Gavrikov
  2007-07-09 15:45       ` Tales Toledo
  0 siblings, 1 reply; 12+ messages in thread
From: Sergei Gavrikov @ 2007-07-06 21:14 UTC (permalink / raw)
  To: Tales Toledo; +Cc: ecos-discuss

On Fri, Jul 06, 2007 at 04:37:47PM -0300, Tales Toledo wrote:
> On 7/6/07, Sergei Gavrikov <w3sg@softhome.net> wrote:
> >On Fri, Jul 06, 2007 at 03:32:01PM -0300, Tales Toledo wrote:
> >> Hi,
> >>
> >> I would like to enable all diag_printf messages at Redboot.
> >> How can I do this?
> >> Which cdl option should I have to enable to make it works?
> >
> >There are a lot of debug messages in RedBoot. That depends on packages
> >are used to build RedBoot (RedBoot is a closely target related stuff).
> >You can see that, U.T.S.L.
> >
> >find $ECOS_REPOSITORY/redboot/current/src | xargs grep DEBUG
> >
> >You can meet ZM_DEBUG, DEBUG_TCP, etc., etc., etc.
> >
> >but it seems, that more suitable way is to look at any CYGDBG_REDBOOT_*
> >options in your `ecos.ecc' is prepared to build RedBoot
> >
> 
> I enable CYGDBG_REDBOOT_NET_DEBUG that is the most important for me
> right now. Unfortunately  I am having some problems with flash
> configuration at boot that override it with 0.
> I can't see any messages until now...
 
Ah, I did pass your vis-a-vis dialog with Gary. I'm seeing now what is
your issue. That is a flash config issue, isn't that? I look at some
RedBoot options/semaphores and found this one

cdl_option CYGSEM_REDBOOT_FLASH_CONFIG_READONLY_FALLBACK {user_value 1};

Perhaps, some fail(s) protected itself by such a way? But, you told that
fconfig copy in RAM is good. Did you tried to change the default flash
config block number (cdl_option CYGNUM_REDBOOT_FLASH_CONFIG_BLOCK) ?

Execuse me that my useless suggest about DEBUG* options. I would play
with a set of the CYG*REDBOOT*FLASH*CONFIG defaults at the end: editing
`ecos.ecc' and re-building RedBoot. But that can take your whole weekend.

Regards,

Sergei


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [ECOS] How to enable diag_printf at Redboot
  2007-07-06 21:14     ` Sergei Gavrikov
@ 2007-07-09 15:45       ` Tales Toledo
  2007-07-09 17:29         ` Sergei Gavrikov
  0 siblings, 1 reply; 12+ messages in thread
From: Tales Toledo @ 2007-07-09 15:45 UTC (permalink / raw)
  To: Sergei Gavrikov; +Cc: ecos-discuss

On 7/6/07, Sergei Gavrikov <w3sg@softhome.net> wrote:
> On Fri, Jul 06, 2007 at 04:37:47PM -0300, Tales Toledo wrote:
> > On 7/6/07, Sergei Gavrikov <w3sg@softhome.net> wrote:
> > >On Fri, Jul 06, 2007 at 03:32:01PM -0300, Tales Toledo wrote:
> > >> Hi,
> > >>
> > >> I would like to enable all diag_printf messages at Redboot.
> > >> How can I do this?
> > >> Which cdl option should I have to enable to make it works?
> > >
> > >There are a lot of debug messages in RedBoot. That depends on packages
> > >are used to build RedBoot (RedBoot is a closely target related stuff).
> > >You can see that, U.T.S.L.
> > >
> > >find $ECOS_REPOSITORY/redboot/current/src | xargs grep DEBUG
> > >
> > >You can meet ZM_DEBUG, DEBUG_TCP, etc., etc., etc.
> > >
> > >but it seems, that more suitable way is to look at any CYGDBG_REDBOOT_*
> > >options in your `ecos.ecc' is prepared to build RedBoot
> > >
> >
> > I enable CYGDBG_REDBOOT_NET_DEBUG that is the most important for me
> > right now. Unfortunately  I am having some problems with flash
> > configuration at boot that override it with 0.
> > I can't see any messages until now...
>
> Ah, I did pass your vis-a-vis dialog with Gary. I'm seeing now what is
> your issue. That is a flash config issue, isn't that? I look at some
> RedBoot options/semaphores and found this one
>
> cdl_option CYGSEM_REDBOOT_FLASH_CONFIG_READONLY_FALLBACK {user_value 1};

Yes, I believe it could be a flash config problem. I have tried it but
with no success. I am still having the same behavior. The flash was
written (I'm sure because i can dump and see the ip address
server/mask/gateway) but seems that Redboot don't    take this
configuration from flash at boot up.

>
> Perhaps, some fail(s) protected itself by such a way? But, you told that
> fconfig copy in RAM is good. Did you tried to change the default flash
> config block number (cdl_option CYGNUM_REDBOOT_FLASH_CONFIG_BLOCK) ?

I also change it. Should I see the differences at fis list command? I
choose -4 as example and the Redboot config remains at 0x407FF000. It
should be at 0x407FA000. Did i understand the cdl_option right?

>
> Execuse me that my useless suggest about DEBUG* options. I would play
> with a set of the CYG*REDBOOT*FLASH*CONFIG defaults at the end: editing
> `ecos.ecc' and re-building RedBoot. But that can take your whole weekend.
>
Any help is welcome. No excuses, only thanks.

> Regards,
>
> Sergei
>
>

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [ECOS] How to enable diag_printf at Redboot
  2007-07-09 15:45       ` Tales Toledo
@ 2007-07-09 17:29         ` Sergei Gavrikov
  2007-07-09 19:11           ` Tales Toledo
  0 siblings, 1 reply; 12+ messages in thread
From: Sergei Gavrikov @ 2007-07-09 17:29 UTC (permalink / raw)
  To: Tales Toledo; +Cc: ecos-discuss

On Mon, Jul 09, 2007 at 12:45:16PM -0300, Tales Toledo wrote:
> On 7/6/07, Sergei Gavrikov <w3sg@softhome.net> wrote:
> >On Fri, Jul 06, 2007 at 04:37:47PM -0300, Tales Toledo wrote:
> >> On 7/6/07, Sergei Gavrikov <w3sg@softhome.net> wrote:
> >> >On Fri, Jul 06, 2007 at 03:32:01PM -0300, Tales Toledo wrote:
> >> >> Hi,
> >> >>
> >> >> I would like to enable all diag_printf messages at Redboot.
> >> >> How can I do this?
> >> >> Which cdl option should I have to enable to make it works?
> >> >
> >> >There are a lot of debug messages in RedBoot. That depends on packages
> >> >are used to build RedBoot (RedBoot is a closely target related stuff).
> >> >You can see that, U.T.S.L.
> >> >
> >> >find $ECOS_REPOSITORY/redboot/current/src | xargs grep DEBUG
> >> >
> >> >You can meet ZM_DEBUG, DEBUG_TCP, etc., etc., etc.
> >> >
> >> >but it seems, that more suitable way is to look at any CYGDBG_REDBOOT_*
> >> >options in your `ecos.ecc' is prepared to build RedBoot
> >> >
> >>
> >> I enable CYGDBG_REDBOOT_NET_DEBUG that is the most important for me
> >> right now. Unfortunately  I am having some problems with flash
> >> configuration at boot that override it with 0.
> >> I can't see any messages until now...
> >
> >Ah, I did pass your vis-a-vis dialog with Gary. I'm seeing now what is
> >your issue. That is a flash config issue, isn't that? I look at some
> >RedBoot options/semaphores and found this one
> >
> >cdl_option CYGSEM_REDBOOT_FLASH_CONFIG_READONLY_FALLBACK {user_value 1};
> 
> Yes, I believe it could be a flash config problem. I have tried it but
> with no success. I am still having the same behavior. The flash was
> written (I'm sure because i can dump and see the ip address
> server/mask/gateway) but seems that Redboot don't    take this
> configuration from flash at boot up.
> 
> >
> >Perhaps, some fail(s) protected itself by such a way? But, you told that
> >fconfig copy in RAM is good. Did you tried to change the default flash
> >config block number (cdl_option CYGNUM_REDBOOT_FLASH_CONFIG_BLOCK) ?
> 
> I also change it. Should I see the differences at fis list command? I
> choose -4 as example and the Redboot config remains at 0x407FF000. It
> should be at 0x407FA000. Did i understand the cdl_option right?

That has an effect, if this option is turnned off:

cdl_option CYGSEM_REDBOOT_FLASH_COMBINED_FIS_AND_CONFIG {user_falue 0};
                                                         ^^^^^^^^^^^^
So, try such an import before make

...
cat <<_EOF | ecosconfig import /dev/stdin
cdl_option CYGSEM_REDBOOT_FLASH_COMBINED_FIS_AND_CONFIG {user_value 0};
cdl_option CYGNUM_REDBOOT_FLASH_CONFIG_BLOCK {user_value -4};
_EOF

Then fulfil `fconf -i', `fis init -f' as you do it as well and compare
the `fis list' results. I get the expected changes on my target.


Sergei

> >
> >Execuse me that my useless suggest about DEBUG* options. I would play
> >with a set of the CYG*REDBOOT*FLASH*CONFIG defaults at the end: editing
> >`ecos.ecc' and re-building RedBoot. But that can take your whole weekend.
> >
> Any help is welcome. No excuses, only thanks.
> 
> >Regards,
> >
> >Sergei
> >
> >

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [ECOS] How to enable diag_printf at Redboot
  2007-07-09 17:29         ` Sergei Gavrikov
@ 2007-07-09 19:11           ` Tales Toledo
  2007-07-09 21:48             ` Sergei Gavrikov
  0 siblings, 1 reply; 12+ messages in thread
From: Tales Toledo @ 2007-07-09 19:11 UTC (permalink / raw)
  To: Sergei Gavrikov; +Cc: ecos-discuss

On 7/9/07, Sergei Gavrikov <w3sg@softhome.net> wrote:
> On Mon, Jul 09, 2007 at 12:45:16PM -0300, Tales Toledo wrote:
> > On 7/6/07, Sergei Gavrikov <w3sg@softhome.net> wrote:
> > >On Fri, Jul 06, 2007 at 04:37:47PM -0300, Tales Toledo wrote:
> > >> On 7/6/07, Sergei Gavrikov <w3sg@softhome.net> wrote:
> > >> >On Fri, Jul 06, 2007 at 03:32:01PM -0300, Tales Toledo wrote:
> > >> >> Hi,
> > >> >>
> > >> >> I would like to enable all diag_printf messages at Redboot.
> > >> >> How can I do this?
> > >> >> Which cdl option should I have to enable to make it works?
> > >> >
> > >> >There are a lot of debug messages in RedBoot. That depends on packages
> > >> >are used to build RedBoot (RedBoot is a closely target related stuff).
> > >> >You can see that, U.T.S.L.
> > >> >
> > >> >find $ECOS_REPOSITORY/redboot/current/src | xargs grep DEBUG
> > >> >
> > >> >You can meet ZM_DEBUG, DEBUG_TCP, etc., etc., etc.
> > >> >
> > >> >but it seems, that more suitable way is to look at any CYGDBG_REDBOOT_*
> > >> >options in your `ecos.ecc' is prepared to build RedBoot
> > >> >
> > >>
> > >> I enable CYGDBG_REDBOOT_NET_DEBUG that is the most important for me
> > >> right now. Unfortunately  I am having some problems with flash
> > >> configuration at boot that override it with 0.
> > >> I can't see any messages until now...
> > >
> > >Ah, I did pass your vis-a-vis dialog with Gary. I'm seeing now what is
> > >your issue. That is a flash config issue, isn't that? I look at some
> > >RedBoot options/semaphores and found this one
> > >
> > >cdl_option CYGSEM_REDBOOT_FLASH_CONFIG_READONLY_FALLBACK {user_value 1};
> >
> > Yes, I believe it could be a flash config problem. I have tried it but
> > with no success. I am still having the same behavior. The flash was
> > written (I'm sure because i can dump and see the ip address
> > server/mask/gateway) but seems that Redboot don't    take this
> > configuration from flash at boot up.
> >
> > >
> > >Perhaps, some fail(s) protected itself by such a way? But, you told that
> > >fconfig copy in RAM is good. Did you tried to change the default flash
> > >config block number (cdl_option CYGNUM_REDBOOT_FLASH_CONFIG_BLOCK) ?
> >
> > I also change it. Should I see the differences at fis list command? I
> > choose -4 as example and the Redboot config remains at 0x407FF000. It
> > should be at 0x407FA000. Did i understand the cdl_option right?
>
> That has an effect, if this option is turnned off:
>
> cdl_option CYGSEM_REDBOOT_FLASH_COMBINED_FIS_AND_CONFIG {user_falue 0};
>                                                          ^^^^^^^^^^^^
> So, try such an import before make
>
You were right. I was using
CYGSEM_REDBOOT_FLASH_COMBINED_FIS_AND_CONFIG {user_value 1};.

> ...
> cat <<_EOF | ecosconfig import /dev/stdin
> cdl_option CYGSEM_REDBOOT_FLASH_COMBINED_FIS_AND_CONFIG {user_value 0};
> cdl_option CYGNUM_REDBOOT_FLASH_CONFIG_BLOCK {user_value -4};
> _EOF
>
> Then fulfil `fconf -i', `fis init -f' as you do it as well and compare
> the `fis list' results. I get the expected changes on my target.
>
With cdl_option CYGNUM_REDBOOT_FLASH_CONFIG_BLOCK {user_value -3}; I got
RedBoot> fis list
Name              FLASH addr  Mem addr    Length      Entry point
RedBoot           0x40000000  0x40000000  0x00030000  0x00000000
RedBoot config    0x407D0000  0x407D0000  0x00001000  0x00000000
FIS directory     0x407F0000  0x407F0000  0x00010000  0x00000000

It works BUT... the problem is still present. Redboot doesn't seem to
read boot configuration from flash.

This is an excerpt from RedBoot> dump -b 0x407d0000 -l 0x1000

407D0240: 0C 62 6F 6F 74 5F 73 63  72 69 70 74 5F 74 69 6D  |.boot_script_tim|
407D0250: 65 6F 75 74 00 62 6F 6F  74 5F 73 63 72 69 70 74  |eout.boot_script|
407D0260: 00 00 00 00 00 01 06 01  00 62 6F 6F 74 70 00 00  |.........bootp..|
407D0270: 00 00 00 05 14 00 06 62  6F 6F 74 70 5F 6D 79 5F  |.......bootp_my_|
407D0280: 67 61 74 65 77 61 79 5F  69 70 00 62 6F 6F 74 70  |gateway_ip.bootp|
407D0290: 00 C0 A8 01 01 05 0C 00  06 62 6F 6F 74 70 5F 6D  |.........bootp_m|
407D02A0: 79 5F 69 70 00 62 6F 6F  74 70 00 C0 A8 01 64 05  |y_ip.bootp....d.|
407D02B0: 11 00 06 62 6F 6F 74 70  5F 6D 79 5F 69 70 5F 6D  |...bootp_my_ip_m|
407D02C0: 61 73 6B 00 62 6F 6F 74  70 00 FF FF FF 00 05 10  |ask.bootp.......|
407D02D0: 01 00 62 6F 6F 74 70 5F  73 65 72 76 65 72 5F 69  |..bootp_server_i|
407D02E0: 70 00 C0 A8 01 01 03 0B  01 00 64 6E 73 5F 64 6F  |p.........dns_do|
407D02F0: 6D 61 69 6E 00 7C 71 43  A6 7C 92 43 A6 7C B3 43  |main.|qC.|.C.|.C|
407D0300: A6 7C 80 00 26 38 A0 00  00 54 A5 D1 BE 3C 60 00  |.|..&8...T...<`.|
407D0310: 00 60 63 30 00 7C 63 28  2E 7C A8 02 A6 7C 68 03  |.`c0.|c(.|...|h.|
407D0320: A6 38 60 00 00 4E 80 00  20 60 00 00 00 60 00 00  |.8`..N.. `...`..|

As you can see, as reference, the local IP address (192.168.1.100 =>
C0 A8 01 64) and mask (255.255.255.0 => FF FF FF 00) are written
there. I believe other parameters like bootp = false should also be
written... I don't know where I must look to find out the problem.

>
> Sergei
>
> > >
> > >Execuse me that my useless suggest about DEBUG* options. I would play
> > >with a set of the CYG*REDBOOT*FLASH*CONFIG defaults at the end: editing
> > >`ecos.ecc' and re-building RedBoot. But that can take your whole weekend.
> > >
> > Any help is welcome. No excuses, only thanks.
> >
> > >Regards,
> > >
> > >Sergei
> > >
> > >
>

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [ECOS] How to enable diag_printf at Redboot
  2007-07-09 19:11           ` Tales Toledo
@ 2007-07-09 21:48             ` Sergei Gavrikov
  2007-07-10 19:24               ` Tales Toledo
  0 siblings, 1 reply; 12+ messages in thread
From: Sergei Gavrikov @ 2007-07-09 21:48 UTC (permalink / raw)
  To: Tales Toledo; +Cc: ecos-discuss

On Mon, Jul 09, 2007 at 04:11:52PM -0300, Tales Toledo wrote:
> On 7/9/07, Sergei Gavrikov <w3sg@softhome.net> wrote:
> >On Mon, Jul 09, 2007 at 12:45:16PM -0300, Tales Toledo wrote:
> >> On 7/6/07, Sergei Gavrikov <w3sg@softhome.net> wrote:
> >> >On Fri, Jul 06, 2007 at 04:37:47PM -0300, Tales Toledo wrote:
> >> >> On 7/6/07, Sergei Gavrikov <w3sg@softhome.net> wrote:
> >> >> >On Fri, Jul 06, 2007 at 03:32:01PM -0300, Tales Toledo wrote:
> >> >> >> Hi,
> >> >> >>
> >> >> >> I would like to enable all diag_printf messages at Redboot.
> >> >> >> How can I do this?
> >> >> >> Which cdl option should I have to enable to make it works?
> >> >> >
> >> >> >There are a lot of debug messages in RedBoot. That depends on 
> >packages
> >> >> >are used to build RedBoot (RedBoot is a closely target related 
> >stuff).
> >> >> >You can see that, U.T.S.L.
> >> >> >
> >> >> >find $ECOS_REPOSITORY/redboot/current/src | xargs grep DEBUG
> >> >> >
> >> >> >You can meet ZM_DEBUG, DEBUG_TCP, etc., etc., etc.
> >> >> >
> >> >> >but it seems, that more suitable way is to look at any 
> >CYGDBG_REDBOOT_*
> >> >> >options in your `ecos.ecc' is prepared to build RedBoot
> >> >> >
> >> >>
> >> >> I enable CYGDBG_REDBOOT_NET_DEBUG that is the most important for me
> >> >> right now. Unfortunately  I am having some problems with flash
> >> >> configuration at boot that override it with 0.
> >> >> I can't see any messages until now...
> >> >
> >> >Ah, I did pass your vis-a-vis dialog with Gary. I'm seeing now what is
> >> >your issue. That is a flash config issue, isn't that? I look at some
> >> >RedBoot options/semaphores and found this one
> >> >
> >> >cdl_option CYGSEM_REDBOOT_FLASH_CONFIG_READONLY_FALLBACK {user_value 1};
> >>
> >> Yes, I believe it could be a flash config problem. I have tried it but
> >> with no success. I am still having the same behavior. The flash was
> >> written (I'm sure because i can dump and see the ip address
> >> server/mask/gateway) but seems that Redboot don't    take this
> >> configuration from flash at boot up.
> >>
> >> >
> >> >Perhaps, some fail(s) protected itself by such a way? But, you told that
> >> >fconfig copy in RAM is good. Did you tried to change the default flash
> >> >config block number (cdl_option CYGNUM_REDBOOT_FLASH_CONFIG_BLOCK) ?
> >>
> >> I also change it. Should I see the differences at fis list command? I
> >> choose -4 as example and the Redboot config remains at 0x407FF000. It
> >> should be at 0x407FA000. Did i understand the cdl_option right?
> >
> >That has an effect, if this option is turnned off:
> >
> >cdl_option CYGSEM_REDBOOT_FLASH_COMBINED_FIS_AND_CONFIG {user_falue 0};
> >                                                         ^^^^^^^^^^^^
> >So, try such an import before make
> >
> You were right. I was using
> CYGSEM_REDBOOT_FLASH_COMBINED_FIS_AND_CONFIG {user_value 1};.
> 
> >...
> >cat <<_EOF | ecosconfig import /dev/stdin
> >cdl_option CYGSEM_REDBOOT_FLASH_COMBINED_FIS_AND_CONFIG {user_value 0};
> >cdl_option CYGNUM_REDBOOT_FLASH_CONFIG_BLOCK {user_value -4};
> >_EOF
> >
> >Then fulfil `fconf -i', `fis init -f' as you do it as well and compare
> >the `fis list' results. I get the expected changes on my target.
> >
> With cdl_option CYGNUM_REDBOOT_FLASH_CONFIG_BLOCK {user_value -3}; I got
> RedBoot> fis list
> Name              FLASH addr  Mem addr    Length      Entry point
> RedBoot           0x40000000  0x40000000  0x00030000  0x00000000
> RedBoot config    0x407D0000  0x407D0000  0x00001000  0x00000000
> FIS directory     0x407F0000  0x407F0000  0x00010000  0x00000000
> 
> It works BUT... the problem is still present. Redboot doesn't seem to
> read boot configuration from flash.

I again did review your previous RedBoot dumps. You known/sure that is
1) RAM copy of `fconfig' is correct, 2) Written flash copy of `fconfig'
seems or is correct too, there are a valid human readable chunks at the
least, 3) you don't see the BAD magic values in your dumps (0x0BADFACE
or 0xDEADDEAD). 4) You did disable a caching. Is it right? But you get
these lines on every reboot:

**Warning** FLASH configuration checksum error or invalid key
"Use 'fconfig -i' to [re]initialize database

That stop point is placed here (you saw): fconfig.c:load_flash_config().

    if ((flash_crc(config) != config->cksum) ||
        (config->key1 != CONFIG_KEY1)|| (config->key2 != CONFIG_KEY2)) {

and, if you sure that you don't meet that magic cookies in your dumps,
therefore, it's needed look at flash_crc(), isn't it?

There is a stone in that proc, this is REDBOOT_FLASH_REVERSE_BYTEORDER
(look on the flash_crc(), please). And I wonder about your settings in
your ecos.ecc too. I believe that cyg_crc32 calculates all okay :) but
what do you think about those lines:

    if (swabbed)
        conf_endian_fixup(conf);

it's possible that is wrong set of the REDBOOT_FLASH_REVERSE_BYTEORDER
value is your issue. Check that, please. Insert your own additional diag
prints into flash_crc to print direct and endian fixed values. And use
RedBoot's `cksum' command to calculate the check sums for RAM fconfig
copy and FLASH fconfig copy.


Sergei


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [ECOS] How to enable diag_printf at Redboot
  2007-07-09 21:48             ` Sergei Gavrikov
@ 2007-07-10 19:24               ` Tales Toledo
  2007-07-10 22:04                 ` Sergei Gavrikov
  0 siblings, 1 reply; 12+ messages in thread
From: Tales Toledo @ 2007-07-10 19:24 UTC (permalink / raw)
  To: Sergei Gavrikov; +Cc: ecos-discuss

On 7/9/07, Sergei Gavrikov <w3sg@softhome.net> wrote:
> On Mon, Jul 09, 2007 at 04:11:52PM -0300, Tales Toledo wrote:
> > On 7/9/07, Sergei Gavrikov <w3sg@softhome.net> wrote:
> > >On Mon, Jul 09, 2007 at 12:45:16PM -0300, Tales Toledo wrote:
> > >> On 7/6/07, Sergei Gavrikov <w3sg@softhome.net> wrote:
> > >> >On Fri, Jul 06, 2007 at 04:37:47PM -0300, Tales Toledo wrote:
> > >> >> On 7/6/07, Sergei Gavrikov <w3sg@softhome.net> wrote:
> > >> >> >On Fri, Jul 06, 2007 at 03:32:01PM -0300, Tales Toledo wrote:
> > >> >> >> Hi,
> > >> >> >>
> > >> >> >> I would like to enable all diag_printf messages at Redboot.
> > >> >> >> How can I do this?
> > >> >> >> Which cdl option should I have to enable to make it works?
> > >> >> >
> > >> >> >There are a lot of debug messages in RedBoot. That depends on
> > >packages
> > >> >> >are used to build RedBoot (RedBoot is a closely target related
> > >stuff).
> > >> >> >You can see that, U.T.S.L.
> > >> >> >
> > >> >> >find $ECOS_REPOSITORY/redboot/current/src | xargs grep DEBUG
> > >> >> >
> > >> >> >You can meet ZM_DEBUG, DEBUG_TCP, etc., etc., etc.
> > >> >> >
> > >> >> >but it seems, that more suitable way is to look at any
> > >CYGDBG_REDBOOT_*
> > >> >> >options in your `ecos.ecc' is prepared to build RedBoot
> > >> >> >
> > >> >>
> > >> >> I enable CYGDBG_REDBOOT_NET_DEBUG that is the most important for me
> > >> >> right now. Unfortunately  I am having some problems with flash
> > >> >> configuration at boot that override it with 0.
> > >> >> I can't see any messages until now...
> > >> >
> > >> >Ah, I did pass your vis-a-vis dialog with Gary. I'm seeing now what is
> > >> >your issue. That is a flash config issue, isn't that? I look at some
> > >> >RedBoot options/semaphores and found this one
> > >> >
> > >> >cdl_option CYGSEM_REDBOOT_FLASH_CONFIG_READONLY_FALLBACK {user_value 1};
> > >>
> > >> Yes, I believe it could be a flash config problem. I have tried it but
> > >> with no success. I am still having the same behavior. The flash was
> > >> written (I'm sure because i can dump and see the ip address
> > >> server/mask/gateway) but seems that Redboot don't    take this
> > >> configuration from flash at boot up.
> > >>
> > >> >
> > >> >Perhaps, some fail(s) protected itself by such a way? But, you told that
> > >> >fconfig copy in RAM is good. Did you tried to change the default flash
> > >> >config block number (cdl_option CYGNUM_REDBOOT_FLASH_CONFIG_BLOCK) ?
> > >>
> > >> I also change it. Should I see the differences at fis list command? I
> > >> choose -4 as example and the Redboot config remains at 0x407FF000. It
> > >> should be at 0x407FA000. Did i understand the cdl_option right?
> > >
> > >That has an effect, if this option is turnned off:
> > >
> > >cdl_option CYGSEM_REDBOOT_FLASH_COMBINED_FIS_AND_CONFIG {user_falue 0};
> > >                                                         ^^^^^^^^^^^^
> > >So, try such an import before make
> > >
> > You were right. I was using
> > CYGSEM_REDBOOT_FLASH_COMBINED_FIS_AND_CONFIG {user_value 1};.
> >
> > >...
> > >cat <<_EOF | ecosconfig import /dev/stdin
> > >cdl_option CYGSEM_REDBOOT_FLASH_COMBINED_FIS_AND_CONFIG {user_value 0};
> > >cdl_option CYGNUM_REDBOOT_FLASH_CONFIG_BLOCK {user_value -4};
> > >_EOF
> > >
> > >Then fulfil `fconf -i', `fis init -f' as you do it as well and compare
> > >the `fis list' results. I get the expected changes on my target.
> > >
> > With cdl_option CYGNUM_REDBOOT_FLASH_CONFIG_BLOCK {user_value -3}; I got
> > RedBoot> fis list
> > Name              FLASH addr  Mem addr    Length      Entry point
> > RedBoot           0x40000000  0x40000000  0x00030000  0x00000000
> > RedBoot config    0x407D0000  0x407D0000  0x00001000  0x00000000
> > FIS directory     0x407F0000  0x407F0000  0x00010000  0x00000000
> >
> > It works BUT... the problem is still present. Redboot doesn't seem to
> > read boot configuration from flash.
>
> I again did review your previous RedBoot dumps. You known/sure that is
> 1) RAM copy of `fconfig' is correct, 2) Written flash copy of `fconfig'
> seems or is correct too, there are a valid human readable chunks at the
> least,

Just checking ... 1) and 2) Ok. You can see as follow
RedBoot> fconfig -i
Initialize non-volatile configuration - continue (y/n)? y
Run script at boot: false
Use BOOTP for network configuration: false
Gateway IP address: 192.168.1.1
Local IP address: 192.168.1.100
Local IP address mask: 255.255.255.0
Default server IP address: 192.168.1.1
DNS domain name: <Not a string: 0x1FE32F5>
DNS server IP address: 192.168.1.1
Network hardware address [MAC]: 0x7C:0x71:0x43:0xA6:0x7C:0x92
GDB connection port: 9000
Force console for special debug messages: false
Network debug at boot time: false
Update RedBoot non-volatile configuration - continue (y/n)? y
... Erase from 0x407d0000-0x407d1000: .
... Program from 0x01fe3000-0x01fe4000 at 0x407d0000: .
RedBoot> ck
RedBoot> cksum
usage: cksum -b <addr> -l <length>
RedBoot> cksum -b 0x01fe3000 -l 0x1000
POSIX cksum = 2836439824 4096 (0xa910a310 0x00001000)
RedBoot> cksum -b 0x407d0000 -l 0x1000
POSIX cksum = 2836439824 4096 (0xa910a310 0x00001000)
RedBoot>

>3) you don't see the BAD magic values in your dumps (0x0BADFACE
> or 0xDEADDEAD).

RedBoot> dump -b 0x407d0000 -l 0x1000
407D0000: 00 00 10 00 0B AD FA CE  01 0C 01 00 62 6F 6F 74  |............boot|
407D0010: 5F 73 63 72 69 70 74 00  00 00 00 00 04 11 01 0C  |_script.........|
407D0020: 62 6F 6F 74 5F 73 63 72  69 70 74 5F 64 61 74 61  |boot_script_data|
407D0030: 00 62 6F 6F 74 5F 73 63  72 69 70 74 00 00 00 00  |.boot_script....|

I can see 0x0BADFACE... I miss this point, what is wrong with that?

>4) You did disable a caching. Is it right? But you get
> these lines on every reboot:

If I disable caching with "Redboot>cache off" my console stays to slow
and loose some characters every time I type ;-( . This is the next
step. Why did it happen?

>
> **Warning** FLASH configuration checksum error or invalid key
> "Use 'fconfig -i' to [re]initialize database
>
> That stop point is placed here (you saw): fconfig.c:load_flash_config().
>
>     if ((flash_crc(config) != config->cksum) ||
>         (config->key1 != CONFIG_KEY1)|| (config->key2 != CONFIG_KEY2)) {
>
> and, if you sure that you don't meet that magic cookies in your dumps,
> therefore, it's needed look at flash_crc(), isn't it?
>
> There is a stone in that proc, this is REDBOOT_FLASH_REVERSE_BYTEORDER
> (look on the flash_crc(), please). And I wonder about your settings in
> your ecos.ecc too. I believe that cyg_crc32 calculates all okay :) but
> what do you think about those lines:
>
>     if (swabbed)
>         conf_endian_fixup(conf);
>
> it's possible that is wrong set of the REDBOOT_FLASH_REVERSE_BYTEORDER
> value is your issue. Check that, please. Insert your own additional diag
> prints into flash_crc to print direct and endian fixed values. And use
> RedBoot's `cksum' command to calculate the check sums for RAM fconfig
> copy and FLASH fconfig copy.
>
I will check this but I think it can't be wrong since my environment
is based on viper that works fine for all.

>
> Sergei
>
>

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [ECOS] How to enable diag_printf at Redboot
  2007-07-10 19:24               ` Tales Toledo
@ 2007-07-10 22:04                 ` Sergei Gavrikov
  2007-07-12 21:00                   ` Tales Toledo
  0 siblings, 1 reply; 12+ messages in thread
From: Sergei Gavrikov @ 2007-07-10 22:04 UTC (permalink / raw)
  To: Tales Toledo; +Cc: ecos-discuss

Execuse me a double post, I have a doubts about e-mail delivery.

On Tue, Jul 10, 2007 at 04:23:59PM -0300, Tales Toledo wrote:
> On 7/9/07, Sergei Gavrikov <w3sg@softhome.net> wrote:
> >I again did review your previous RedBoot dumps. You known/sure that is
> >1) RAM copy of `fconfig' is correct, 2) Written flash copy of `fconfig'
> >seems or is correct too, there are a valid human readable chunks at the
> >least,
> 
> Just checking ... 1) and 2) Ok. You can see as follow
> RedBoot> fconfig -i
> Initialize non-volatile configuration - continue (y/n)? y
> Run script at boot: false
> Use BOOTP for network configuration: false
> Gateway IP address: 192.168.1.1
> Local IP address: 192.168.1.100
> Local IP address mask: 255.255.255.0
> Default server IP address: 192.168.1.1
> DNS domain name: <Not a string: 0x1FE32F5>
> DNS server IP address: 192.168.1.1
> Network hardware address [MAC]: 0x7C:0x71:0x43:0xA6:0x7C:0x92
> GDB connection port: 9000
> Force console for special debug messages: false
> Network debug at boot time: false
> Update RedBoot non-volatile configuration - continue (y/n)? y
> ... Erase from 0x407d0000-0x407d1000: .
> ... Program from 0x01fe3000-0x01fe4000 at 0x407d0000: .
> RedBoot> ck
> RedBoot> cksum
> usage: cksum -b <addr> -l <length>
> RedBoot> cksum -b 0x01fe3000 -l 0x1000
> POSIX cksum = 2836439824 4096 (0xa910a310 0x00001000)
> RedBoot> cksum -b 0x407d0000 -l 0x1000
> POSIX cksum = 2836439824 4096 (0xa910a310 0x00001000)
> RedBoot>
> 
> >3) you don't see the BAD magic values in your dumps (0x0BADFACE
> >or 0xDEADDEAD).
> 
> RedBoot> dump -b 0x407d0000 -l 0x1000
> 407D0000: 00 00 10 00 0B AD FA CE  01 0C 01 00 62 6F 6F 74  
> |............boot|
> 407D0010: 5F 73 63 72 69 70 74 00  00 00 00 00 04 11 01 0C  
> |_script.........|
> 407D0020: 62 6F 6F 74 5F 73 63 72  69 70 74 5F 64 61 74 61  
> |boot_script_data|
> 407D0030: 00 62 6F 6F 74 5F 73 63  72 69 70 74 00 00 00 00  
> |.boot_script....|
> 
> I can see 0x0BADFACE... I miss this point, what is wrong with that?

It seems I thought itself :-), you have to see both those keys, because
the RedBoot config is (flash_config.h)

struct _config {
    unsigned long len;
    unsigned long key1;
    unsigned char config_data[MAX_CONFIG_DATA-(4*4)];
    unsigned long key2;
    unsigned long cksum;
};

I did try to say what that point checks just 3 things: CRC, KEY1
(0x0BADFACE) and KEY2 (0xDEADDEAD):

    if ((flash_crc(config) != config->cksum) ||
        (config->key1 != CONFIG_KEY1)|| (config->key2 != CONFIG_KEY2)) {
        diag_printf("**Warning** FLASH configuration checksum error or invalid key\n");
        diag_printf("Use 'fconfig -i' to [re]initialize database\n");
        config_init();
        return;
    }

Check what that KEY2/CRC is present at the end of 4K area. You believe
that CRC is okay. So, this is the last point. Try to build a minimalist
RedBoot, i.e.  which supports serial and Flash devices only. That
reduces a size of RedBoot and rebuild-time. That will be to have a few
config options. I wonder it's possible 'fconfig' issue won't be occur...
So, try to remove NET stuff from RedBoot:

ecosconfig new <your target> redboot
ecosconfig import <your ecm file>
ecoscongig remove CYGPKG_DEVS_ETH_POWERPC_FEC
...
ecosconfig resolve
make

Well, I don't know your target stuff, so, look on top your own ecos.ecc
file to know which NET* related packages (Eth I/O drivers, DNS client,
etc.) you can remove, and try to build such a minimal RedBoot image.

Will you get 'fconfig' warning with the minimalist RedBoot? If you
will... I have no more ideas, sorry :-(.


  Sergei


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [ECOS] How to enable diag_printf at Redboot
  2007-07-10 22:04                 ` Sergei Gavrikov
@ 2007-07-12 21:00                   ` Tales Toledo
  2007-07-12 21:37                     ` Sergei Gavrikov
  0 siblings, 1 reply; 12+ messages in thread
From: Tales Toledo @ 2007-07-12 21:00 UTC (permalink / raw)
  To: Sergei Gavrikov; +Cc: ecos-discuss

On 7/10/07, Sergei Gavrikov <w3sg@softhome.net> wrote:
> Execuse me a double post, I have a doubts about e-mail delivery.
>
> On Tue, Jul 10, 2007 at 04:23:59PM -0300, Tales Toledo wrote:
> > On 7/9/07, Sergei Gavrikov <w3sg@softhome.net> wrote:
> > >I again did review your previous RedBoot dumps. You known/sure that is
> > >1) RAM copy of `fconfig' is correct, 2) Written flash copy of `fconfig'
> > >seems or is correct too, there are a valid human readable chunks at the
> > >least,
> >
> > Just checking ... 1) and 2) Ok. You can see as follow
> > RedBoot> fconfig -i
> > Initialize non-volatile configuration - continue (y/n)? y
> > Run script at boot: false
> > Use BOOTP for network configuration: false
> > Gateway IP address: 192.168.1.1
> > Local IP address: 192.168.1.100
> > Local IP address mask: 255.255.255.0
> > Default server IP address: 192.168.1.1
> > DNS domain name: <Not a string: 0x1FE32F5>
> > DNS server IP address: 192.168.1.1
> > Network hardware address [MAC]: 0x7C:0x71:0x43:0xA6:0x7C:0x92
> > GDB connection port: 9000
> > Force console for special debug messages: false
> > Network debug at boot time: false
> > Update RedBoot non-volatile configuration - continue (y/n)? y
> > ... Erase from 0x407d0000-0x407d1000: .
> > ... Program from 0x01fe3000-0x01fe4000 at 0x407d0000: .
> > RedBoot> ck
> > RedBoot> cksum
> > usage: cksum -b <addr> -l <length>
> > RedBoot> cksum -b 0x01fe3000 -l 0x1000
> > POSIX cksum = 2836439824 4096 (0xa910a310 0x00001000)
> > RedBoot> cksum -b 0x407d0000 -l 0x1000
> > POSIX cksum = 2836439824 4096 (0xa910a310 0x00001000)
> > RedBoot>
> >
> > >3) you don't see the BAD magic values in your dumps (0x0BADFACE
> > >or 0xDEADDEAD).
> >
> > RedBoot> dump -b 0x407d0000 -l 0x1000
> > 407D0000: 00 00 10 00 0B AD FA CE  01 0C 01 00 62 6F 6F 74
> > |............boot|
> > 407D0010: 5F 73 63 72 69 70 74 00  00 00 00 00 04 11 01 0C
> > |_script.........|
> > 407D0020: 62 6F 6F 74 5F 73 63 72  69 70 74 5F 64 61 74 61
> > |boot_script_data|
> > 407D0030: 00 62 6F 6F 74 5F 73 63  72 69 70 74 00 00 00 00
> > |.boot_script....|
> >
> > I can see 0x0BADFACE... I miss this point, what is wrong with that?
>
> It seems I thought itself :-), you have to see both those keys, because
> the RedBoot config is (flash_config.h)
>
> struct _config {
>     unsigned long len;
>     unsigned long key1;
>     unsigned char config_data[MAX_CONFIG_DATA-(4*4)];
>     unsigned long key2;
>     unsigned long cksum;
> };
>
> I did try to say what that point checks just 3 things: CRC, KEY1
> (0x0BADFACE) and KEY2 (0xDEADDEAD):
>
>     if ((flash_crc(config) != config->cksum) ||
>         (config->key1 != CONFIG_KEY1)|| (config->key2 != CONFIG_KEY2)) {
>         diag_printf("**Warning** FLASH configuration checksum error or invalid key\n");
>         diag_printf("Use 'fconfig -i' to [re]initialize database\n");
>         config_init();
>         return;
>     }
>

This is my printf result just before the if test
config->key1 = 0xbadface, config->key2 = 0xffffffff, config->cksum =
0xffffffff, flash_crc = 0x706de31e

As you see I don't get config->key2 and config->cksum with the right values.

> Check what that KEY2/CRC is present at the end of 4K area.

I can't find it. I don´t have any KEY2 at 4K area.

>You believe that CRC is okay. So, this is the last point. Try to
build a minimalist
> RedBoot, i.e.  which supports serial and Flash devices only. That
> reduces a size of RedBoot and rebuild-time. That will be to have a few
> config options. I wonder it's possible 'fconfig' issue won't be occur...
> So, try to remove NET stuff from RedBoot:

After investigate more and more I think I have a problem with sectors
configuration in flash. I read am29xxxxx_parts.inl and the support for
the part number I have in my board (S29GL064MR3) doesn't look fine.
The sectors seems to be wrong since it is just TOP boot and not
top/bottom as described there. I will try to do some changes tomorrow.

>
> ecosconfig new <your target> redboot
> ecosconfig import <your ecm file>
> ecoscongig remove CYGPKG_DEVS_ETH_POWERPC_FEC
> ...
> ecosconfig resolve
> make
>
> Well, I don't know your target stuff, so, look on top your own ecos.ecc
> file to know which NET* related packages (Eth I/O drivers, DNS client,
> etc.) you can remove, and try to build such a minimal RedBoot image.
>
> Will you get 'fconfig' warning with the minimalist RedBoot? If you
> will... I have no more ideas, sorry :-(.
>
I hope don't get at this point ;-)
>
>   Sergei
>
>

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [ECOS] How to enable diag_printf at Redboot
  2007-07-12 21:00                   ` Tales Toledo
@ 2007-07-12 21:37                     ` Sergei Gavrikov
  0 siblings, 0 replies; 12+ messages in thread
From: Sergei Gavrikov @ 2007-07-12 21:37 UTC (permalink / raw)
  To: Tales Toledo; +Cc: ecos-discuss

On Thu, Jul 12, 2007 at 06:00:33PM -0300, Tales Toledo wrote:
> On 7/10/07, Sergei Gavrikov <w3sg@softhome.net> wrote:
> >Execuse me a double post, I have a doubts about e-mail delivery.
> >
> >On Tue, Jul 10, 2007 at 04:23:59PM -0300, Tales Toledo wrote:
> >> On 7/9/07, Sergei Gavrikov <w3sg@softhome.net> wrote:
> >> >I again did review your previous RedBoot dumps. You known/sure that is
> >> >1) RAM copy of `fconfig' is correct, 2) Written flash copy of `fconfig'
> >> >seems or is correct too, there are a valid human readable chunks at the
> >> >least,
> >>
> >> Just checking ... 1) and 2) Ok. You can see as follow
> >> RedBoot> fconfig -i
> >> Initialize non-volatile configuration - continue (y/n)? y
> >> Run script at boot: false
> >> Use BOOTP for network configuration: false
> >> Gateway IP address: 192.168.1.1
> >> Local IP address: 192.168.1.100
> >> Local IP address mask: 255.255.255.0
> >> Default server IP address: 192.168.1.1
> >> DNS domain name: <Not a string: 0x1FE32F5>
> >> DNS server IP address: 192.168.1.1
> >> Network hardware address [MAC]: 0x7C:0x71:0x43:0xA6:0x7C:0x92
> >> GDB connection port: 9000
> >> Force console for special debug messages: false
> >> Network debug at boot time: false
> >> Update RedBoot non-volatile configuration - continue (y/n)? y
> >> ... Erase from 0x407d0000-0x407d1000: .
> >> ... Program from 0x01fe3000-0x01fe4000 at 0x407d0000: .
> >> RedBoot> ck
> >> RedBoot> cksum
> >> usage: cksum -b <addr> -l <length>
> >> RedBoot> cksum -b 0x01fe3000 -l 0x1000
> >> POSIX cksum = 2836439824 4096 (0xa910a310 0x00001000)
> >> RedBoot> cksum -b 0x407d0000 -l 0x1000
> >> POSIX cksum = 2836439824 4096 (0xa910a310 0x00001000)
> >> RedBoot>
> >>
> >> >3) you don't see the BAD magic values in your dumps (0x0BADFACE
> >> >or 0xDEADDEAD).
> >>
> >> RedBoot> dump -b 0x407d0000 -l 0x1000
> >> 407D0000: 00 00 10 00 0B AD FA CE  01 0C 01 00 62 6F 6F 74
> >> |............boot|
> >> 407D0010: 5F 73 63 72 69 70 74 00  00 00 00 00 04 11 01 0C
> >> |_script.........|
> >> 407D0020: 62 6F 6F 74 5F 73 63 72  69 70 74 5F 64 61 74 61
> >> |boot_script_data|
> >> 407D0030: 00 62 6F 6F 74 5F 73 63  72 69 70 74 00 00 00 00
> >> |.boot_script....|
> >>
> >> I can see 0x0BADFACE... I miss this point, what is wrong with that?
> >
> >It seems I thought itself :-), you have to see both those keys, because
> >the RedBoot config is (flash_config.h)
> >
> >struct _config {
> >    unsigned long len;
> >    unsigned long key1;
> >    unsigned char config_data[MAX_CONFIG_DATA-(4*4)];
> >    unsigned long key2;
> >    unsigned long cksum;
> >};
> >
> >I did try to say what that point checks just 3 things: CRC, KEY1
> >(0x0BADFACE) and KEY2 (0xDEADDEAD):
> >
> >    if ((flash_crc(config) != config->cksum) ||
> >        (config->key1 != CONFIG_KEY1)|| (config->key2 != CONFIG_KEY2)) {
> >        diag_printf("**Warning** FLASH configuration checksum error or 
> >        invalid key\n");
> >        diag_printf("Use 'fconfig -i' to [re]initialize database\n");
> >        config_init();
> >        return;
> >    }
> >
> 
> This is my printf result just before the if test
> config->key1 = 0xbadface, config->key2 = 0xffffffff, config->cksum =
> 0xffffffff, flash_crc = 0x706de31e
> 
> As you see I don't get config->key2 and config->cksum with the right values.
> 
> >Check what that KEY2/CRC is present at the end of 4K area.
> 
> I can't find it. I don´t have any KEY2 at 4K area.
> 
> >You believe that CRC is okay. So, this is the last point. Try to
> build a minimalist
> >RedBoot, i.e.  which supports serial and Flash devices only. That
> >reduces a size of RedBoot and rebuild-time. That will be to have a few
> >config options. I wonder it's possible 'fconfig' issue won't be occur...
> >So, try to remove NET stuff from RedBoot:
> 
> After investigate more and more I think I have a problem with sectors
> configuration in flash. I read am29xxxxx_parts.inl and the support for
> the part number I have in my board (S29GL064MR3) doesn't look fine.
> The sectors seems to be wrong since it is just TOP boot and not
> top/bottom as described there. I will try to do some changes tomorrow.

I had a thought about top/bottom issue, but, you told what you have a
standard target... I think, it will be it. Well, you should fix a parts
description according datasheet.

I have yet another mad idea: try to use _positive_ number for the
CYGNUM_REDBOOT_FLASH_CONFIG_BLOCK option, i.e.  try to swap flash config
holder:

# Which block of flash to use
# Which block of flash should hold the configuration 
# information. Positive numbers are absolute block numbers. 
# Negative block numbers count backwards from the last block.
# eg 2 means block 2, -2 means the last but one block.
#
cdl_option CYGNUM_REDBOOT_FLASH_CONFIG_BLOCK {
...

I wonder what the values: KEY1, KEY2, CRC you will get? It seems this
won't be a right way to fix a problem, but who knows.


Sergei


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2007-07-12 21:37 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-06 18:32 [ECOS] How to enable diag_printf at Redboot Tales Toledo
2007-07-06 19:12 ` Sergei Gavrikov
2007-07-06 19:37   ` Tales Toledo
2007-07-06 21:14     ` Sergei Gavrikov
2007-07-09 15:45       ` Tales Toledo
2007-07-09 17:29         ` Sergei Gavrikov
2007-07-09 19:11           ` Tales Toledo
2007-07-09 21:48             ` Sergei Gavrikov
2007-07-10 19:24               ` Tales Toledo
2007-07-10 22:04                 ` Sergei Gavrikov
2007-07-12 21:00                   ` Tales Toledo
2007-07-12 21:37                     ` Sergei Gavrikov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).