This is the mail archive of the ecos-devel@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Default for BOOTP in redboot [Sec=Unclassified]


Peter:

The logic seems clear to me. Please correct me if I am wrong.

Suppose that you want to boot from flash, what you do is to define the top
level macro CYGSEM_REDBOOT_DEFAULT_NO_BOOTP (This is done manually? I think
that there should be a configuration mechanism). Then:

1. Line 95: The macro won't be redefined to be 0;
2. Line 684: "use_bootp" will be assigned value "false";
3. Line 703: condition evaluated to be true, so the block (boot from flash
procedure)is entered, and IP address is got from flash;
4. Line 758: condition evaluated to be false, so the block (bootp procedure)
is not entered.


Carl

-----Original Message-----
From: Peter Jansen [mailto:peter.jansen@aad.gov.au] 
Sent: Thursday, January 04, 2007 4:06 PM
To: ecos-devel@ecos.sourceware.org
Subject: Default for BOOTP in redboot [Sec=Unclassified]

Hi,

I have some confusion on how to configure redboot not to try and find a 
BOOTP server by default. I'm using redboot to boot a Technologic Systems 
TS7260 with a ARM processor.

The logic in

packages/redboot/current/src/net/net_io.c

Does not seem quite correct.

The start of this file line 95 has

#ifndef CYGSEM_REDBOOT_DEFAULT_NO_BOOTP
#define CYGSEM_REDBOOT_DEFAULT_NO_BOOTP 0
#endif

So the macro CYGSEM_REDBOOT_DEFAULT_NO_BOOTP will always be defined.

then on line 684 we have

#ifdef CYGSEM_REDBOOT_DEFAULT_NO_BOOTP
     use_bootp = false;
#else
     use_bootp = true;
#endif

So however the macro CYGSEM_REDBOOT_DEFAULT_NO_BOOTP is set the variable 
use_bootp will always be false.

then we have on line 703

     if (!use_bootp) {
         flash_get_IP("bootp_my_ip", &__local_ip_addr);

So if use_bootp is false we set the IP address for the bootp_my_ip address.

Then we have line 758

     // Initialize the network [if present]
     if (use_bootp) {
         if (__bootp_find_local_ip(&my_bootp_info) == 0) {
             have_net = true;

Which seems ok, should the line 684 be #if not #ifdef ?

Thanks,


-- 
Peter Jansen
Antarctic Division


___________________________________________________________________________

    Australian Government Antarctic Division - Commonwealth of Australia
IMPORTANT: This transmission is intended for the addressee only. If you are
not the
intended recipient, you are notified that use or dissemination of this
communication is
strictly prohibited by Commonwealth law. If you have received this
transmission in error,
please notify the sender immediately by e-mail or by telephoning +61 3 6232
3209 and
DELETE the message.
        Visit our web site at http://www.aad.gov.au/
___________________________________________________________________________


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]