2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 <2021> 2022 2023 2024 2025 | Index | 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 <2021> 2022 2023 2024 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: rtems IMFS support/compatibility |
From: | "Siddons, David via Core-talk" <core-talk at aps.anl.gov> |
To: | Michael Davidsaver <mdavidsaver at gmail.com>, EPICS core-talk <core-talk at aps.anl.gov> |
Date: | Sun, 13 Jun 2021 23:02:35 +0000 |
Hi Michael,
At the same time Eric was working with the uC5282, I was working on the uC5272, a very similar board. Eric sent me the attached shell script to build the composite image, and I used it successfully for my project. The uC5282 / uC5272 had a very simple bootloader
which basically loaded the code and jumped to a start.
Pete.
From: Michael Davidsaver <mdavidsaver at gmail.com>
Sent: Sunday, June 13, 2021 2:58 PM To: EPICS core-talk <core-talk at aps.anl.gov> Cc: Siddons, David <siddons at bnl.gov> Subject: rtems IMFS support/compatibility 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. 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://urldefense.com/v3/__https://lists.rtems.org/pipermail/users/2010-March/055394.html__;!!P4SdNyxKAPE!U6VAZxrAeNU1ltIFOQ4OVGtETAw5w-CLeKbpFrwWxmOwDLoUlylnQyJqrpasmP8$ |
Attachment:
make-tarball.sh
Description: make-tarball.sh