<div dir="ltr"><div dir="ltr">I cancelled the earlier message because the log file size was very big<div>and could not be posted in the devel list.</div><div><br></div><div>[UPDATE]: Applying PATCH for RTEMS-pc386 support to EPICS and <br>making other changes in code worked and EPICS7 was successfully built <br>and installed using the RSB recipe. <br><br>Tha changes that made it work: <br><br>-------------------------------------------------<br>diff --git a/rtems/config/epics/epics-7-1.cfg b/rtems/config/epics/epics-7-1.cfg<br>new file mode 100644<br>index 00000000..ed1f768b<br>--- /dev/null<br>+++ b/rtems/config/epics/epics-7-1.cfg<br>@@ -0,0 +1,28 @@<br>+#<br>+# EPICS 3afec267ab08568ea454789e562450b00feea5c0<br>+#<br>+<br>+%if %{release} == %{nil}<br>+ %define release 1<br>+%endif<br>+<br>+#%include %{_configdir}/rtems-bsp.cfg<br>+<br>+#<br>+# EPICS Version<br>+#<br>+%define epics_version 3afec267ab08568ea454789e562450b00feea5c0<br>+<br>+#%hash sha512 epics-%{ntp_version}.tar.gz 8d76fc7e92b2ea6dd5031e6030a7aba4ff6fb3e19d3bc0153852509861be5d0960e70604814163caedb81f8315a451d78371f99634a50b55cfe1cbd2c69e3046<br>+<br>+#<br>+# Patch for RTEMS support.<br>+#<br>+%patch add epics -p1 file:///home/mritunjay/development/rtems/src/rsb_GSoC/rtems/patches/0001-Added-Support-for-RTEMS-pc386.patch<br>+ <br>+#%hash  sha512 rtems-ntp-4.2.6p5.diff 257223d207d0b77cde2b9d7add22e3b9d657b58998411d2e20d0b1adf36910be21f1277386c54c34f5d9616fccd29f721d007295708047ea7ae0270a00be25a0<br>+<br>+#<br>+# EPICS Build configuration<br>+#<br>+%include %{_configdir}/epics-7-1.cfg<br>diff --git a/rtems/config/epics/epics-base.bset b/rtems/config/epics/epics-base.bset<br>new file mode 100644<br>index 00000000..550daad0<br>--- /dev/null<br>+++ b/rtems/config/epics/epics-base.bset<br>@@ -0,0 +1,26 @@<br>+#<br>+# Build set for EPICS<br>+#<br>+<br>+%define release 1<br>+<br>+#<br>+# RTEMS Version<br>+#<br>+%define rtems_version 5<br>+<br>+#<br>+# The RTEMS URL paths.<br>+#<br>+%include rtems-urls.bset<br>+<br>+#<br>+# The RTEMS Package defines<br>+#<br>+%include rtems-package.bset<br>+<br>+<br>+#<br>+# Build EPICS.<br>+#<br>+epics/epics-7-1.cfg<br>\ No newline at end of file<br>diff --git a/source-builder/config/epics-7-1.cfg b/source-builder/config/epics-7-1.cfg<br>index ea25f284..b18f62bd 100644<br>--- a/source-builder/config/epics-7-1.cfg<br>+++ b/source-builder/config/epics-7-1.cfg<br>@@ -31,6 +31,7 @@ URL:          <a href="https://epics.mpg.de/">https://epics.mpg.de/</a><br>   source_dir_epics="epicsBaseOwnPlayground-%{epics_version}"<br> <br>   %source setup epics -q -n epicsBaseOwnPlayground-%{epics_version}<br>+  %patch setup epics -p1<br> <br>   cd ${build_top}<br> <br>@@ -43,10 +44,7 @@ URL:      <a href="https://epics.mpg.de/">https://epics.mpg.de/</a><br> <br>   %{__make} PREFIX=%{_prefix}<br> <br>-  ./configure \<br>-    --prefix=%{_prefix}<br>-<br>-  %{__make} %{?_smp_mflags}<br>+  #%{__make} %{?_smp_mflags}<br> <br>   cd ${build_top}<br>----------------------------------------------------------------------<br><br>The changes can also be looked here: <a href="https://github.com/RTEMS/rtems-source-builder/compare/master...mritunjaysharma394:epics-support?expand=1">https://github.com/RTEMS/rtems-source-builder/compare/master...mritunjaysharma394:epics-support?expand=1</a><br></div><div><br class="gmail-Apple-interchange-newline"><br><div><br></div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 21, 2020 at 10:23 PM Gedare Bloom <<a href="mailto:gedare@rtems.org">gedare@rtems.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, Jul 21, 2020 at 10:42 AM Mritunjay Sharma<br>
<<a href="mailto:mritunjaysharma394@gmail.com" target="_blank">mritunjaysharma394@gmail.com</a>> wrote:<br>
><br>
> [UPDATE]: The error was actually a mismatch of names which was fixed with the following<br>
> changes:<br>
> -----------------------------------------------<br>
><br>
> diff --git a/source-builder/config/epics-7-1.cfg b/source-builder/config/epics-7-1.cfg<br>
> index fe1fb458..ea25f284 100644<br>
> --- a/source-builder/config/epics-7-1.cfg<br>
> +++ b/source-builder/config/epics-7-1.cfg<br>
> @@ -10,7 +10,7 @@<br>
><br>
>  %define epics_version 3afec267ab08568ea454789e562450b00feea5c0<br>
><br>
> -Name:      epics-%{epics_version}-%{_host}-%{release}<br>
> +Name:      epicsBaseOwnPlayground-%{epics_version}-%{_host}-%{release}<br>
>  Summary:   EPICS v%{epics_version} for target %{_target} on host %{_host}<br>
>  Version:   %{epics_version}<br>
>  Release:   %{release}<br>
> @@ -19,7 +19,8 @@ URL:  <a href="https://epics.mpg.de/" rel="noreferrer" target="_blank">https://epics.mpg.de/</a><br>
>  #<br>
>  # Source<br>
>  #<br>
> -%source set epics --rsb-file=epics-%{epics_version}.zip <a href="https://github.com/hjunkes/epicsBaseOwnPlayground/archive/%%7Bepics_version%7D.zip" rel="noreferrer" target="_blank">https://github.com/hjunkes/epicsBaseOwnPlayground/archive/%{epics_version}.zip</a><br>
> +%source set epics --rsb-file=epicsBaseOwnPlayground-%{epics_version}.tar.gz <a href="https://github.com/hjunkes/epicsBaseOwnPlayground/archive/%%7Bepics_version%7D.tar.gz" rel="noreferrer" target="_blank">https://github.com/hjunkes/epicsBaseOwnPlayground/archive/%{epics_version}.tar.gz</a><br>
> +<br>
><br>
>  #<br>
>  # Prepare the source code.<br>
> @@ -27,25 +28,20 @@ URL:  <a href="https://epics.mpg.de/" rel="noreferrer" target="_blank">https://epics.mpg.de/</a><br>
>  %prep<br>
>    build_top=$(pwd)<br>
><br>
> -  source_dir_epics="epics-%{epics_version}"<br>
> +  source_dir_epics="epicsBaseOwnPlayground-%{epics_version}"<br>
><br>
> -  %source setup epics -q -n epics-%{epics_version}<br>
> +  %source setup epics -q -n epicsBaseOwnPlayground-%{epics_version}<br>
><br>
<br>
We will eventually want this to work from the upstream EPICS.<br></blockquote><div><br></div><div>Yes, I think we need to discuss it with Heinz when he is available.  </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<br>
>    cd ${build_top}<br>
><br>
>  %build<br>
>    build_top=$(pwd)<br>
><br>
> -<br>
> -<br>
> -  %{build_directory}<br>
> -<br>
> -  mkdir -p ${build_dir}<br>
> -  cd ${build_dir}<br>
> +  cd ${source_dir_epics}<br>
><br>
> -  %{host_build_flags}<br>
> +  %{build_build_flags}<br>
><br>
> -  #cd ${source_dir_epics}<br>
> +  %{__make} PREFIX=%{_prefix}<br>
><br>
>    ./configure \<br>
>      --prefix=%{_prefix}<br>
><br>
><br>
> ------------------------------<br>
><br>
> After this, I ran the command<br>
><br>
> `../source-builder/sb-builder --prefix=/home/mritunjay/development  --log=log_epics epics-7-1 --trace`<br>
><br>
> again. The error that has come now was expected because the changes I made in epicsBaseOwnPlayground/configure file<br>
><br>
> were done manually and here it has to be done through a script. The changes that I did manually were;<br>
>><br>
>> in epics-base/configure/CONFIG_SITE<br>
>> set<br>
>> CROSS_COMPILER_TARGET_ARCHS=<br>
><br>
>    What I entered:<br>
>    CROSS_COMPILER_TARGET_ARCHS=  RTEMS-pc386-qemu<br>
>><br>
>> e.g. RTEMS-pc386<br>
>> or RTEMS-xilinx_zynq_a9_qemu<br>
>><br>
>> in epics-base/configure/os there must be a file for the target used,<br>
>> e.g.<br>
>> CONFIG.Common.RTEMS-xilinx_zynq_a9_qemu<br>
>> or<br>
>> CONFIG.Common.RTEMS-pc386<br>
><br>
> Checked.  CONFIG.Common.RTEMS-pc386 was there<br>
>><br>
>><br>
>> Then you have to set in configure/os/CONFIG_SITE.Common.RTEMS<br>
>> where to find RTEMS:<br>
>><br>
>> # Where to find RTEMS<br>
>> #<br>
>> # APS:<br>
>> #RTEMS_VERSION = 4.10.2<br>
>> #RTEMS_BASE = /usr/local/vw/rtems/rtems-$(RTEMS_VERSION)<br>
><br>
><br>
> In my system, I entered this:<br>
> #FHI<br>
> RTEMS_VERSION = 5<br>
> RTEMS_BASE = /home/mritunjay/development/rtems/$(RTEMS_VERSION)<br>
><br>
> I have a doubt on how to implement the above changes in the `source-builder/config/epics-7-1.cfg` to make it work.<br>
><br>
> Do we have to write a patch? And what will be the best way to do it?<br>
><br>
<br>
This is a good question. These configuration changes need to be<br>
populated somehow based on the target being built. If this is only<br>
doable by writing files directly, then we'll probably need a way to<br>
apply patches for each different target. This seems unwieldy, so<br>
further thought should be considered on how to configure EPICS based<br>
on the RTEMS BSP build.<br>
<br>
You can start with a manually-created patch file, but eventually we<br>
need something that can be used across different BSPs / architectures.<br></blockquote><div><br></div>The manually-created patch file has worked. <br>Now, what can be done to make it work across different BSPs / architectures?<br>Will writing similar patches for each architecture should be our way?<br>And I guess in the #FHI section as well we have to do something so that user <br>can add the path interactively where the user's BSP are installed? <br>Would you like to give any other feedback/suggestions? <br><br></div><div class="gmail_quote">Thanks<br><div>Mritunjay </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> The latest error looks somewhat like this which is because I have to change the configurations in epics directory.<br>
><br>
> The question is how to accomplish it through the script.<br>
><br>
> ../../configure/os/CONFIG.Common.RTEMS:36: /Users/junkes/MVME6100/RTEMS/rtems-5/powerpc-rtems5/beatnik/Makefile.inc: No such file or directory<br>
><br>
><br>
><br>
> Thanks<br>
><br>
> Mritunjay<br>
><br>
><br>
><br>
> On Tue, Jul 21, 2020 at 4:09 AM Mritunjay Sharma <<a href="mailto:mritunjaysharma394@gmail.com" target="_blank">mritunjaysharma394@gmail.com</a>> wrote:<br>
>><br>
>> Hello all,<br>
>><br>
>> I went through the <a href="https://docs.rtems.org/branches/master/user/rsb/index.html" rel="noreferrer" target="_blank">https://docs.rtems.org/branches/master/user/rsb/index.html</a><br>
>> and started writing a recipe for building EPICS 7.<br>
>><br>
>> The code is based on a very raw idea just now and<br>
>> so was expected to give errors.<br>
>><br>
>> The code can be found here: <a href="https://github.com/mritunjaysharma394/rtems-source-builder/blob/epics-support/source-builder/config/epics-7-1.cfg" rel="noreferrer" target="_blank">https://github.com/mritunjaysharma394/rtems-source-builder/blob/epics-support/source-builder/config/epics-7-1.cfg</a><br>
>><br>
>> After this, just to check, what errors it might gave,<br>
>> I ran the following command:<br>
>><br>
>> ../source-builder/sb-builder --prefix=/home/mritunjay/development      --log=log_epics epics-7-1 --trace<br>
>><br>
>> This gave me the following error:<br>
>><br>
>> `+ cd epics-3afec267ab08568ea454789e562450b00feea5c0<br>
>> /home/mritunjay/development/rtems/src/rsb_GSoC/rtems/build/epics-3afec267ab08568ea454789e562450b00feea5c0-x86_64-linux-gnu-1/do-build: 90: cd: can't cd to epics-3afec267ab08568ea454789e562450b00feea5c0<br>
>> shell cmd failed: /bin/sh -ex  /home/mritunjay/development/rtems/src/rsb_GSoC/rtems/build/epics-3afec267ab08568ea454789e562450b00feea5c0-x86_64-linux-gnu-1/do-build<br>
>> error: building epics-3afec267ab08568ea454789e562450b00feea5c0-x86_64-linux-gnu-1`<br>
>><br>
>> I think there seems to be some problem with naming the directory.<br>
>> I request you all to kindly help with the error as well as please check the code<br>
>> to see if I am on the right path.<br>
>> I am attaching the log and trace file as well.<br>
>><br>
>> Thanks,<br>
>> Mritunjay<br>
>><br>
>><br>
</blockquote></div></div>