<div dir="ltr">[Good news and Update]: <div><br></div><div>Thank you so much Chris! Your advice to search for macros using --trace solved the problem of hard coding!</div><div>It took two complete days to figure out this beautiful thing but it is every worth it. </div><div><br></div><div>Now the user has to just enter the below command and it will make things work: </div><div><br></div><div>`../source-builder/sb-builder --with-rtems-bsp="xilinx_zynq_a9_qemu" --log=log_epics epics-7-1  --trace --prefix=$HOME/development/rtems/5-arm`<br></div><div><br></div><div>Note: prefix will depend on the user. </div><div><br></div><div>What made this possible? Your suggestion and the changes in code mentioned below:</div><div><br></div><div>```diff --git a/rtems/config/epics/epics-7-1.cfg b/rtems/config/epics/epics-7-1.cfg<br>index aeb39a9..4b20f82 100644<br>--- a/rtems/config/epics/epics-7-1.cfg<br>+++ b/rtems/config/epics/epics-7-1.cfg<br>@@ -6,6 +6,8 @@<br>  %define release 1<br> %endif<br> <br>+%include %{_configdir}/rtems-bsp.cfg<br>+<br> #<br> # EPICS Version<br> #<br>diff --git a/source-builder/config/epics-7-1.cfg b/source-builder/config/epics-7-1.cfg<br>index a9581a2..a47aecb 100644<br>--- a/source-builder/config/epics-7-1.cfg<br>+++ b/source-builder/config/epics-7-1.cfg<br>@@ -40,7 +40,10 @@ URL:     <a href="https://epics.mpg.de/">https://epics.mpg.de/</a><br> <br>   %{build_build_flags}<br> <br>-  %{__make} PREFIX=%{_prefix} RTEMS_BASE=$HOME/development/rtems/5-arm RTEMS_VERSION=5 CROSS_COMPILER_TARGET_ARCHS=RTEMS-xilinx_zynq_a9_qemu<br>+  #<br>+  # Using macros to dynamically path to RTEMS_BASE and RTEMS_VERSION using --with-rtems-bsp<br>+  #<br>+  %{__make} PREFIX=%{_prefix} RTEMS_BASE=%{_exec_prefix} RTEMS_VERSION=%{rtems_version}<br> <br>   cd ${build_top}<br> <br>@@ -50,6 +53,5 @@ URL:       <a href="https://epics.mpg.de/">https://epics.mpg.de/</a><br>   rm -rf $SB_BUILD_ROOT<br> <br>   cd ${source_dir_epics}<br>-  %{__make} DESTDIR=$SB_BUILD_ROOT PREFIX=%{_prefix} RTEMS_BASE=$HOME/development/rtems/5-arm RTEMS_VERSION=5 CROSS_COMPILER_TARGET_ARCHS=RTEMS-xilinx_zynq_a9_qemu<br>-<br>+  %{__make} DESTDIR=$SB_BUILD_ROOT PREFIX=%{_prefix} RTEMS_BASE=%{_exec_prefix} RTEMS_VERSION=%{rtems_version}<br>   cd ${build_top}<br></div><div>```</div><div><br></div><div>These couple of changes made this build successful using RSB recipe. The only problem remains </div><div>is that a warning of 'no hash found' is coming, even though I have added it. </div><div><br></div><div>The above changes can be found pushed here: <a href="https://github.com/RTEMS/rtems-source-builder/commit/a505877157f63f6ae17906276b3ffcb699ed1297">https://github.com/RTEMS/rtems-source-builder/commit/a505877157f63f6ae17906276b3ffcb699ed1297</a></div><div><br></div><div>Please do give feedback and suggest improvements so that the recipe can become mergeable. </div><div><br></div><div>Thanks</div><div>Mritunjay Sharma</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Aug 20, 2020 at 8:51 AM Chris Johns <<a href="mailto:chrisj@rtems.org">chrisj@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 20/8/20 8:09 am, Mritunjay Sharma wrote:<br>
> [UPDATE]: Finally modified the RSB recipes to make them work with make utility<br>
> and EPICS was built successfully.<br>
<br>
Great you have had some success but there is a lot more work before it is usable.<br>
<br>
> iff --git a/source-builder/config/epics-7-1.cfg b/source-builder/config/epics-7-1.cfg<br>
> index f51c6582..a9581a2e 100644<br>
> --- a/source-builder/config/epics-7-1.cfg<br>
> +++ b/source-builder/config/epics-7-1.cfg<br>
> @@ -21,7 +21,6 @@ URL:          <a href="https://epics.mpg.de/" rel="noreferrer" target="_blank">https://epics.mpg.de/</a><br>
>  #<br>
>  %source set epics --rsb-file=epics-base-%{epics_version}.tar.gz <a href="https://gitlab.fhi.mpg.de/junkes/epics-base/-/archive/%%7Bepics_version%7D/epics-base-%%7Bepics_version%7D.tar.gz" rel="noreferrer" target="_blank">https://gitlab.fhi.mpg.de/junkes/epics-base/-/archive/%{epics_version}/epics-base-%{epics_version}.tar.gz</a><br>
>  <br>
> -<br>
>  #<br>
>  # Prepare the source code.<br>
>  #<br>
> @@ -31,20 +30,9 @@ URL:         <a href="https://epics.mpg.de/" rel="noreferrer" target="_blank">https://epics.mpg.de/</a><br>
>    source_dir_epics="epics-base-%{epics_version}"<br>
>  <br>
>    %source setup epics -q -n epics-base-%{epics_version}<br>
> -#<br>
> -# Changing the RTEMS Version in epics-base/configure/os/CONFIG_SITE.Common.RTEMS<br>
> -#<br>
> -sed -i 's/RTEMS_VERSION = .*/RTEMS_VERSION = 5/g' configure/os/CONFIG_SITE.Common.RTEMS<br>
> -<br>
> -#<br>
> -# Changing the RTEMS Base in epics-base/configure/os/CONFIG_SITE.Common.RTEMS<br>
> -#<br>
> -sed -i "s/^RTEMS_BASE .*/RTEMS_BASE = \/home\/mritunjay\/development\/rtems\/\$\(RTEMS_VERSION\)\-arm/g" configure/os/CONFIG_SITE.Common.RTEMS<br>
>  <br>
>    cd ${build_top}<br>
>  <br>
> -<br>
> -<br>
>  %build<br>
>    build_top=$(pwd)<br>
>  <br>
> @@ -52,7 +40,7 @@ sed -i "s/^RTEMS_BASE .*/RTEMS_BASE = \/home\/mritunjay\/development\/rtems\/\$\<br>
>  <br>
>    %{build_build_flags}<br>
>  <br>
> -  %{__make} PREFIX=%{_prefix}<br>
> +  %{__make} PREFIX=%{_prefix} RTEMS_BASE=$HOME/development/rtems/5-arm RTEMS_VERSION=5 CROSS_COMPILER_TARGET_ARCHS=RTEMS-xilinx_zynq_a9_qemu<br>
>  <br>
>    cd ${build_top}<br>
>  <br>
> @@ -62,6 +50,6 @@ sed -i "s/^RTEMS_BASE .*/RTEMS_BASE = \/home\/mritunjay\/development\/rtems\/\$\<br>
>    rm -rf $SB_BUILD_ROOT<br>
>  <br>
>    cd ${source_dir_epics}<br>
> -  %{__make} DESTDIR=$SB_BUILD_ROOT PREFIX=%{_prefix} install<br>
> +  %{__make} DESTDIR=$SB_BUILD_ROOT PREFIX=%{_prefix} RTEMS_BASE=$HOME/development/rtems/5-arm RTEMS_VERSION=5 CROSS_COMPILER_TARGET_ARCHS=RTEMS-xilinx_zynq_a9_qemu<br>
<br>
Mritunjay, can you see what is wrong here? Lets have a look ...<br>
<br>
$ stat $HOME/development/rtems/5-arm<br>
stat: /home/chris/development/rtems/5-arm: stat: No such file or directory<br>
<br>
This will not work for me and it will not work for an RSB vertical stack build.<br>
This last requirement is important.<br>
<br>
You cannot hard code values. The RSB provides the RTEMS version, BSP details and<br>
paths as RSB macro variables. Please review these by using the --trace option<br>
and log file and please ask if you have any questions.<br>
<br>
Chris<br>
</blockquote></div>