EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: rtems IMFS support/compatibility
From: Gedare Bloom via Core-talk <core-talk at aps.anl.gov>
To: Michael Davidsaver <mdavidsaver at gmail.com>
Cc: EPICS core-talk <core-talk at aps.anl.gov>, "Siddons, David" <siddons at bnl.gov>
Date: Tue, 15 Jun 2021 08:17:37 -0600
On Sun, Jun 13, 2021 at 12:59 PM Michael Davidsaver via Core-talk
<core-talk at aps.anl.gov> wrote:
>
> Possible usage of IMFS came up in a recent tech-talk thread[1].  I tried again to make
> use of the logic in initialize_local_filesystem() from rtems_init.c, and this time was
> successful.  Although with some caveats.
>
> As far as I can tell, only the uC5282 target provides special symbols _DownloadLocation,
> _FlashBase, and _FlashSize.  I found a archived mail from Eric Norum [2] which gives a
> hint about how he meant this to be used
>
> > I do this for my standalone EPICS applications by concatenating the tar file at the end of the bootstrap flash. ...
>
> I couldn't figure out how to make use of this logic as is with pc386 (QEMU).  By changing
> the pointer gymnastics to something simpler I was able to load a tar containing an st.cmd
> and a .dbd file.  (see attached)
>
> I don't think the idea of concatenating an FS image to an ELF executable or .boot file
> can be generalized though.
>
> Linking a tar into an executable can be generalized, but means an executable for each
> IOC instance, which seems kind of awkward.
>
Yes, this is done for some basic testing and examples, e.g.,
https://git.rtems.org/rtems-examples/tree/file_io/crc

The support is pulled in for a waf-built application by:
https://git.rtems.org/rtems_waf/tree/rootfs.py

It's not too hard to get it working with a makefile either. But the
limitations are there as you say.

>
>
> The use of rtems_tarfs_load() also carries a couple of surprises.
>
> 1. The 'tar_size' argument is actually not a size, but an upper bound address.
>
> 2. Missing directories are not created automatically, and files in them are silently ignored.
>
> eg. "tar -cf image.tar dbd/foo.dbd st.cmd" results in a tar with only two REGTYPE
> entries, and no DIRTYPE entry.  "tar -xf" will automatically create "dbd/", but
> rtems_tarfs_load() does not.  Further, "foo.dbd" is then ignored without error.
> It took me awhile to figure out what was going on...
>
> This can be worked around by "tar -cf image.tar dbd st.cmd", or more explicitly
> "tar --no-recursion -cf image.tar dbd dbd/foo.dbd st.cmd", to include an DIRTYPE
> entry for "dbd".  (without necessarily including all of its contents.)
>
>
> [1] https://epics.anl.gov/tech-talk/2021/msg01192.php
>
> [2] https://lists.rtems.org/pipermail/users/2010-March/055394.html
>

References:
rtems IMFS support/compatibility Michael Davidsaver via Core-talk

Navigate by Date:
Prev: Re: rtems IMFS support/compatibility Siddons, David via Core-talk
Next: [Bug 1932033] [NEW] base EPICS compilation misses convertRelease.pl Jerzy Tarasiuk via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
Navigate by Thread:
Prev: Re: rtems IMFS support/compatibility Siddons, David via Core-talk
Next: [Bug 1932033] [NEW] base EPICS compilation misses convertRelease.pl Jerzy Tarasiuk via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
ANJ, 15 Jun 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·