<div dir="ltr"><div dir="ltr"><br></div><div>Hello, everyone! </div><div><br></div><div dir="ltr">First of all, Apologies for the little delay in response. I was actually a little stuck with assignments in classes. <div><br></div><div>Thank you so much, Chris, for such a nice explanation and detailed review. It cleared a lot of things even for me. </div><div>I have tried to respond to further suggestions and feedback below. </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Aug 24, 2020 at 6:25 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 23/8/20 8:08 am, Mritunjay Sharma wrote:<br>
> [Good news and Update]: <br>
> <br>
> Thank you so much Chris! Your advice to search for macros using --trace solved<br>
> the problem of hard coding!<br>
> It took two complete days to figure out this beautiful thing but it is every<br>
> worth it. <br>
<br>
Well done, that looks like time worth spending given the results. The --trace is<br>
not the most pleasant of output but it has all the detail.<br></blockquote><div><br></div><div>Thanks a lot :)</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>
> Now the user has to just enter the below command and it will make things work: <br>
> <br>
> `../source-builder/sb-builder --with-rtems-bsp="xilinx_zynq_a9_qemu"<br>
> --log=log_epics epics-7-1 --trace --prefix=$HOME/development/rtems/5-arm`<br>
> <br>
> Note: prefix will depend on the user. <br>
> <br>
> What made this possible? Your suggestion and the changes in code mentioned below:<br>
> <br>
> ```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>
Great.<br></blockquote><div><br></div><div>Thanks. </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>
> #<br>
> # EPICS Version<br>
> #<br>
> diff --git a/source-builder/config/epics-7-1.cfg<br>
> 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/" rel="noreferrer" target="_blank">https://epics.mpg.de/</a><br>
> <br>
> %{build_build_flags}<br>
> <br>
> - %{__make} PREFIX=%{_prefix} RTEMS_BASE=$HOME/development/rtems/5-arm<br>
> 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<br>
> --with-rtems-bsp<br>
> + #<br>
> + %{__make} PREFIX=%{_prefix} RTEMS_BASE=%{_exec_prefix}<br>
> RTEMS_VERSION=%{rtems_version}<br>
> <br>
> cd ${build_top}<br>
> <br>
> @@ -50,6 +53,5 @@ URL: <a href="https://epics.mpg.de/" rel="noreferrer" target="_blank">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}<br>
> RTEMS_BASE=$HOME/development/rtems/5-arm RTEMS_VERSION=5<br>
> CROSS_COMPILER_TARGET_ARCHS=RTEMS-xilinx_zynq_a9_qemu<br>
> -<br>
> + %{__make} DESTDIR=$SB_BUILD_ROOT PREFIX=%{_prefix} RTEMS_BASE=%{_exec_prefix}<br>
> RTEMS_VERSION=%{rtems_version}<br>
<br>
Nice, this is along the lines of what I had hope at the start was possible.<br>
<br>
> cd ${build_top}<br>
> ```<br>
> <br>
> These couple of changes made this build successful using RSB recipe. The only<br>
> problem remains <br>
> is that a warning of 'no hash found' is coming, even though I have added it. <br>
<br>
The config hash is for epics-%{epics_version}.tar.gz and %source is using<br>
--rsb-file=epics-base-%{epics_version}.tar.gz. The names do not match. Is<br>
--rsb-file needed? This is only added if the download file is some generated<br>
name and not what we expect.<br>
<br>
> The above changes can be found pushed<br>
> here: <a href="https://github.com/RTEMS/rtems-source-builder/commit/a505877157f63f6ae17906276b3ffcb699ed1297" rel="noreferrer" target="_blank">https://github.com/RTEMS/rtems-source-builder/commit/a505877157f63f6ae17906276b3ffcb699ed1297</a><br>
<br>
Can you please create a suitable patch against the RSB master repo?<br></blockquote><div><br></div><div>Done. I have just sent, please do review. </div><div>Modified the patch to remove warning and made a change to ask for rtems-bsp and host from the terminal.</div><div>There's one problem although, while building using:<br></div><div>`./source-builder/sb-set-builder --with-rtems-bsp="xilinx_zynq_a9_qemu" --log=log_epics epics/epics-base --trace --prefix=$HOME/development/rtems/5-arm --host=arm-rtems5 </div><div>`</div><div>The EPICS is building perfectly fine but the Buildset fails with the following error:</div><div><br></div><div>`cleaning: epics-base-7.0-arm-rtems5-1</div>error: copying tree (4): /home/mritunjay/development/rtems/src/rsb/rtems/build/tmp/epics-base-7.0-arm-rtems5-1-1000 -> /home/mritunjay/development/rtems/src/rsb/rtems/build/tmp/sb-1000/epics/epics-base: [Errno 2] No such file or directory: '/home/mritunjay/development/rtems/src/rsb/rtems/build/tmp/epics-base-7.0-arm-rtems5-1-1000'<br>Build Set: Time 0:02:57.099708<br>Build FAILED<br><div>`</div><div>I am not sure what it is and it was not encountered earlier? </div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Has your blog been kept updated?<br></blockquote><div><br></div><div>Yes, I am submitting my final report blog today which will have the updates. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> Please do give feedback and suggest improvements so that the recipe can become<br>
> mergeable. <br>
<br>
I think it is time to expand the user base and to look at merging the script<br>
into the RSB's master repo.<br>
<br>
The next problem to solve is the EPICS's `make runtests`. This is gong to be<br>
hard because it is a meeting of 2 different approaches and I suspect it will<br>
require insight and imagination to find a workable solution.<br>
<br>
A test run like `make runtest` is complicated to wrap because the test framework<br>
in EPICS may be needed to support the tests. I do not think you can simply copy<br>
and run a single executable. This is understandable and fine however it means<br>
the way to invoke the tests for a specific RTEMS target needs to be embedded in<br>
to EPICS and this may conflict with the RSB's ability to build EPICS for a range<br>
of BSPs that EPICS has no direct support for. I am not asking you add the<br>
support to EPICS, rather can we interface to EPICS so we can wrap and control<br>
the pieces we need.<br>
<br>
RTEMS has the `rtems-run` command. It is a way to run an executable on a target.<br>
The `rtems-test` command internally wraps the `rtems-run` command to run an<br>
RTEMS kernel test executable. The RTEMS User manual has more detail.<br>
<br>
Is it possible to provide EPICS with a command, make variable or something that<br>
lets us control how an EPICS test executable is executed? If we can join an<br>
EPICS test run with `rtems-run` we make available the same hardware and process<br>
we use to test the RTEMS kernel to EPICS<br>
<br>
I am not sure `rtems-run` as it stands will work as EPICS may be running a<br>
number of networked executables. I have no idea about this or any insight into<br>
what EPICS is doing here so please have a look and report back.<br>
<br>
Another piece of work is to have the RSB script point to EPCIS master repo. This<br>
will mean working with Heinz to get changes in his repo into the upsream EPICS repo.<br>
<br></blockquote><div><br></div><div>Have noted all these suggestions and will be starting a thread soon in relation to them.</div><div><br></div><div>Thanks</div><div>Mritunjay Sharma </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Chris<br>
</blockquote></div></div>