EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Linux host problems
From: Andrew Johnson <[email protected]>
To: Peregrine McGehee <[email protected]>
Cc: Maren Purves <[email protected]>, [email protected]
Date: Fri, 10 Jun 2005 13:55:01 -0500
Peregrine McGehee wrote:
Hi Maren,

What sort of boot problems are you seeing when you use
a Linux host?

- we still boot our iocs (vxWorks) from a solaris machine, even if we
don't use solaris for much else anymore (booting from a Linux
host isn't reliable/working)

I can't speak for Maren, but I do know that there was a problem with the standard vxWorks bootRom code's use of FTP.


There are two TCP sockets involved in an FTP file transfer, a command socket and a data socket, and the bootRom doesn't actually close its data socket before sending "QUIT" through the command socket, which is apparently not legal according to the official FTP spec.

Prior to Solaris 9, the Sun version of ftpd didn't mind which order you did those operations in, but other ftpd implementations don't like it. Sun switched to a different ftpd in Solaris 9, and we found we couldn't boot any of our IOCs after that particular OS upgrade until we reverted the ftpd back to the Solaris 8 binary (which runs perfectly well under Solaris 9). They also broke their tftp server, but the Red Hat Linux one works perfectly well so I just switched to using that instead.

My guess is that JACH are hitting the same problem when trying to boot from Linux. There is a fix to the bootRom code (see the patch below), but you have to reprogram all your IOC bootroms to the patched version to be able to use it. An alternative would be to look for a different, more lenient implementation of ftpd.

- Andrew

This patch modifies the <tornado>/target/config/all/bootConfig.c file:

Index: bootConfig.c
===================================================================
RCS file: /home/phoebus/TORNADO5/cvsroot/config/all/bootConfig.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- bootConfig.c        12 Mar 2003 22:53:28 -0000      1.2
+++ bootConfig.c        22 Jan 2004 21:18:42 -0000      1.3
@@ -2492,11 +2492,11 @@

        while ((read (fd, command, sizeof (command))) > 0);
+       close (fd);

        if (bootFtp)
            (void) ftpCommand (errFd, "QUIT",0,0,0,0,0,0);
        }

-    close (fd);
     close (errFd);
     return (OK);

@@ -2510,5 +2510,6 @@

        while ((read (fd, command, sizeof (command))) > 0);
+       close (fd);

        if (bootFtp)
            {
@@ -2520,6 +2521,7 @@
        {
        char buf [100];
        int errBytesRecv = fioRead (errFd, buf, sizeof (buf));
+       close (fd);

        if (errBytesRecv > 0)
            {
@@ -2530,7 +2532,6 @@
            }
        }

-    close (fd);
     close (errFd);

return (ERROR);


-- Podiabombastic: The tendency to shoot oneself in the foot.

References:
Linux host problems Peregrine McGehee

Navigate by Date:
Prev: RE: RTEMS on Diamond Systems Prometheus/ EPICS IOC on eCos Jeff Hill
Next: Re: Open source Real-time Oss / open source OS Till Straumann
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Linux host problems Peregrine McGehee
Next: Re: epics on ecos Kate Feng
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·