From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2348 invoked by alias); 9 Jul 2007 21:48:04 -0000 Received: (qmail 2340 invoked by uid 22791); 9 Jul 2007 21:48:04 -0000 X-Spam-Check-By: sourceware.org Received: from stelecom.gomel.by (HELO stelecom.gomel.by) (82.209.213.61) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 09 Jul 2007 21:48:01 +0000 Received: from localhost (localhost [127.0.0.1]) by stelecom.gomel.by (Postfix) with ESMTP id 59C33B01DEF9; Tue, 10 Jul 2007 00:47:58 +0300 (EEST) Received: from stelecom.gomel.by ([127.0.0.1]) by localhost (stelecom.gomel.by [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 09601-17; Tue, 10 Jul 2007 00:47:56 +0300 (EEST) Received: from localhost (unknown [82.209.209.196]) by stelecom.gomel.by (Postfix) with ESMTP id 9FECFB01DEEA; Tue, 10 Jul 2007 00:47:55 +0300 (EEST) Date: Mon, 09 Jul 2007 21:48:00 -0000 From: Sergei Gavrikov To: Tales Toledo Cc: ecos-discuss@ecos.sourceware.org Message-ID: <20070709214653.GA16045@ubuntu> References: <2308fb0f0707061132x678e5b47t772bf866104090a7@mail.gmail.com> <20070706191055.GA10570@ubuntu> <2308fb0f0707061237k630fdea4y7e3c148aa213f16c@mail.gmail.com> <20070706211314.GA12393@ubuntu> <2308fb0f0707090845i122a5131v7a307e3969b79ed7@mail.gmail.com> <20070709172751.GA10396@ubuntu> <2308fb0f0707091211w2c6b0fb0xc1f4354e0eda9b65@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2308fb0f0707091211w2c6b0fb0xc1f4354e0eda9b65@mail.gmail.com> User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] How to enable diag_printf at Redboot X-SW-Source: 2007-07/txt/msg00086.txt.bz2 On Mon, Jul 09, 2007 at 04:11:52PM -0300, Tales Toledo wrote: > On 7/9/07, Sergei Gavrikov wrote: > >On Mon, Jul 09, 2007 at 12:45:16PM -0300, Tales Toledo wrote: > >> On 7/6/07, Sergei Gavrikov wrote: > >> >On Fri, Jul 06, 2007 at 04:37:47PM -0300, Tales Toledo wrote: > >> >> On 7/6/07, Sergei Gavrikov 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