public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Re: 回复: [ECOS] Re: Re: [ECOS]  store mac  address
       [not found] <58892.8601.qm@web92003.mail.cnb.yahoo.com>
@ 2007-04-20 12:45 ` Mark Salter
  2007-08-10  8:05   ` [ECOS] " 越 王
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Salter @ 2007-04-20 12:45 UTC (permalink / raw)
  To: 越 王; +Cc: ecos-discuss

On Fri, 2007-04-20 at 15:04 +0800, 越 王 wrote:
> > > I want to use the redboot command set_npe_mac to
> > set a
> > > new mac address,then what do I need to do?
> > 
> > set_npe_mac is used when there is an eeprom.
> > If you are storing the mac in flash, use fconfig to
> > set the mac.
> > 
> > --Mark
> > 
> The fconfig cmd doesn't have the option to set npe's
> mac address.
> Perhaps it is because when I configure the redboot use
> the ixdp425 for my template.And at grg board, the cmd
> fconfig has this option.
> 
> Since both two boards share the same file fconfig.c.
> Maybe I can config some packages or options to store
> the mac in flash, just like grg did it? How can I do
> it?
> 
> If it does, the mac will stored in redboot config
> area.But what is address it stored exactly?
> 

In devs/eth/arm/grg/npe/<version>/include/*.inl, you will see something
like:

#if defined(CYGPKG_REDBOOT) && defined(CYGPKG_REDBOOT_FLASH) && \
    defined(CYGSEM_REDBOOT_FLASH_CONFIG) &&
defined(CYGPKG_REDBOOT_NETWORKING)

#define CYGSEM_NPE_REDBOOT_HOLDS_ESA 1
#define CYGDAT_ETH0_DEFAULT_ESA {0x00, 0x03, 0x47, 0xdf, 0x32, 0xa8}
#define CYGDAT_ETH1_DEFAULT_ESA {0x00, 0x03, 0x47, 0xdf, 0x32, 0xaa}
#endif

It is the defining of CYGSEM_NPE_REDBOOT_HOLDS_ESA which causes RedBoot
to create an fconfig option to hold the mac address.

--Mark



-- 
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] 2+ messages in thread

* [ECOS] Re:ECOS] Re: Re: [ECOS] store mac  address
  2007-04-20 12:45 ` [ECOS] Re: 回复: [ECOS] Re: Re: [ECOS] store mac address Mark Salter
@ 2007-08-10  8:05   ` 越 王
  0 siblings, 0 replies; 2+ messages in thread
From: 越 王 @ 2007-08-10  8:05 UTC (permalink / raw)
  To: Mark Salter; +Cc: ecos-discuss

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=gb2312, Size: 3058 bytes --]

Hi Mark and ecosers,
    Some days ago,Mark told me try to use codes below
to store mac address to flash, in ixp425 board.
    And it worked,but I still have 3 questions.
    1  When I use "fconfig -i" to set mac address,and
reset my board the first time,the cmd "fconfig -l"
tell me the two macs were set successfully.But after
taht I reset my board several times,and found my
eth0's mac was still right while the eth1's mac was
changed into default value {0x00, 0x03, 0x47,0xdf,
0x32, 0xaa}.
    It is so strange that the redboot.bin was still
only one file.When first time set eth1's mac was
successfully and it can not changed itself.Since the
flash was non-volatile memery, when use fconfig write
it and reset several times without use fconfig -i cmd,
the mac should be stored always.  
   2  I can't change default net device from eth0 into
eth1.When I used the cmd "fconfig -i" to set this
option and reset the board, it said the default net
device was still eth0. 
   3  I want to read the codes about mac stored in
ixdp425 board and grg board.Which file can tell me how
the grg board store mac in flash? And which file can
tell me how ixdp425 board store mac in eeprom?
 
   Thank you!
                                      

--- Mark Salter <msalter@redhat.com>дµÀ:

> On Fri, 2007-04-20 at 15:04 +0800, Ô½ Íõ wrote:
> > > > I want to use the redboot command set_npe_mac
> to
> > > set a
> > > > new mac address,then what do I need to do?
> > > 
> > > set_npe_mac is used when there is an eeprom.
> > > If you are storing the mac in flash, use fconfig
> to
> > > set the mac.
> > > 
> > > --Mark
> > > 
> > The fconfig cmd doesn't have the option to set
> npe's
> > mac address.
> > Perhaps it is because when I configure the redboot
> use
> > the ixdp425 for my template.And at grg board, the
> cmd
> > fconfig has this option.
> > 
> > Since both two boards share the same file
> fconfig.c.
> > Maybe I can config some packages or options to
> store
> > the mac in flash, just like grg did it? How can I
> do
> > it?
> > 
> > If it does, the mac will stored in redboot config
> > area.But what is address it stored exactly?
> > 
> 
> In devs/eth/arm/grg/npe/<version>/include/*.inl, you
> will see something
> like:
> 
> #if defined(CYGPKG_REDBOOT) &&
> defined(CYGPKG_REDBOOT_FLASH) && \
>     defined(CYGSEM_REDBOOT_FLASH_CONFIG) &&
> defined(CYGPKG_REDBOOT_NETWORKING)
> 
> #define CYGSEM_NPE_REDBOOT_HOLDS_ESA 1
> #define CYGDAT_ETH0_DEFAULT_ESA {0x00, 0x03, 0x47,
> 0xdf, 0x32, 0xa8}
> #define CYGDAT_ETH1_DEFAULT_ESA {0x00, 0x03, 0x47,
> 0xdf, 0x32, 0xaa}
> #endif
> 
> It is the defining of CYGSEM_NPE_REDBOOT_HOLDS_ESA
> which causes RedBoot
> to create an fconfig option to hold the mac address.
> 
> --Mark
> 
> 
> 



      ___________________________________________________________ 
ÇÀ×¢ÑÅ»¢Ãâ·ÑÓÊÏä3.5GÈÝÁ¿£¬20M¸½¼þ£¡ 
http://cn.mail.yahoo.com


-- 
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] 2+ messages in thread

end of thread, other threads:[~2007-08-10  8:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <58892.8601.qm@web92003.mail.cnb.yahoo.com>
2007-04-20 12:45 ` [ECOS] Re: 回复: [ECOS] Re: Re: [ECOS] store mac address Mark Salter
2007-08-10  8:05   ` [ECOS] " 越 王

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).