[GSoC 2020]: Weekly thread update

Mritunjay Sharma mritunjaysharma394 at gmail.com
Wed Jul 15 03:57:21 UTC 2020

On Wed, Jul 15, 2020 at 5:33 AM Chris Johns <chrisj at rtems.org> wrote:

> On 15/7/20 4:30 am, Mritunjay Sharma wrote:
> > Hello everyone,
> >
> > Pardon my mistake for that long thread. From now on the daily updates
> will be
> > given on a thread that will end every week.
> Thank you :)
> > 1) I studied about https://github.com/RTEMS/rtems-libbsd
> > 2) Tried to fix the error that I reported yesterday:
> >
> > ```
> Why cut the compile command line used to build this file out of the
> message? The
> compiler command is important because it lets us see what paths are being
> used
> and I think there may be a problem with them.
> > ../posix/rtems_init.c:38:10: fatal error: rtems/bsd/bsd.h: No such file
> or directory
> >  #include <rtems/bsd/bsd.h>
> >           ^~~~~~~~~~~~~~~~~
> I cannot duplicate this because I am not sure what the sequence of
> commands are
> you used to get to here. I am sorry if I missed it in a previous post.
> The error indicates a set up issue. It normally means the networking
> software
> (rtems-libbsd) has not been installed into a prefix path EPICS looks in.

I am posting the entire command set further ahead in the email which will
make things
easier to understand.

> > compilation terminated.
> > make[4]: ***
> >
> [/home/mritunjay/development/EPICS/epics-playground/configure/RULES_BUILD:235:
> > rtems_init.o] Error 1
> > make[4]: Leaving directory
> >
> '/home/mritunjay/development/EPICS/epics-playground/modules/libcom/RTEMS/O.RTEMS-pc386'
> > make[3]: ***
> >
> [/home/mritunjay/development/EPICS/epics-playground/configure/RULES_ARCHS:58:
> > install.RTEMS-pc386] Error 2
> > make[3]: Leaving directory
> > '/home/mritunjay/development/EPICS/epics-playground/modules/libcom/RTEMS'
> > make[2]: ***
> >
> [/home/mritunjay/development/EPICS/epics-playground/configure/RULES_DIRS:84:
> > RTEMS.install] Error 2
> > make[2]: Leaving directory
> > '/home/mritunjay/development/EPICS/epics-playground/modules/libcom'
> > make[1]: *** [../configure/RULES_DIRS:84: libcom.install] Error 2
> > make[1]: Leaving directory
> > '/home/mritunjay/development/EPICS/epics-playground/modules'
> > make: *** [configure/RULES_DIRS:84: modules.install] Error 2
> >
> > ```
> >
> > I am still not successful even though I tried to search for it.
> I doubt there will be anything to search for. You are solving the problem
> and
> creating the first info to be searched. We need to debug the problem.
> > On the advice of Heinz, I have already built EPICS 7 with RTEMS4.10
> > by hand and am on the verge of doing the same for EPICS7 with RTEMS5
> > for pc-386.
> I am sorry I do not understand what "on the verge of doing the same" means.

I am sorry for the misunderstanding. It means that after these bugs are
resolved with this
discussion I will successfully be able to build EPICS7 with RTEMS5

> > However, I will like to request all my mentors to help me set the goals
> > for this week and where should I begin next?
> Could you please update your blog with the exact command sequences you are
> using
> to build EPICS7 for RTEMS 4.10 and EPICS7 for RTEMS 5 for a PC?

While I will be updating the commands in the blog, I am posting the same
here for easier reference:

Building EPICS7 for RTEMS4.10 with pc-386:

In order to do that, I made the directory

i) $HOME/development/rtems/
ii) I extracted rtems-4.10 from here
iii)I created another directory rtems/src
iv)Inside src, I cloned rsb and moved to 4.10 branch.
v) After performing checks, I entered to rsb/rtems and used this command:
--prefix=/home/mritunjay/development/rtems/4.10 4.10/rtems-i386'.
vi) Now the directory structure under $HOME/development/rtems/ looked like:
      | rtems-4.10
      | 4.10
      | src/rsb
      | kernel/pc386
I also used this command: "export
vi) Then I went to rtems/rtems-4.10 and used this command:
"./bootstrap -c &&
vi) After this I went insid directory $HOME/development/rtems/kernel/pc-386
vii) Inside pc-386, I used the following command:
--target=i386-rtems4.10 --enable-posix  --enable-rtemsbsp=pc386
--enable-tests=samples --prefix=$HOME/development/rtems/4.10 --enable-cxx"
viii) Then I entered the make command which ran successfully and the make
install was also successful.

So all the errors were resolved and I moved on to build EPICS now for RTEMS
I also used this command:
Location of epics-base in my system is as follows:

After this, I followed the tutorial Heinz sent to build EPICS for
rtems-4.10 for pc-386 which is:

> Very roughly:
> git clone —recursive epics-base
> in epics-base/configure/CONFIG_SITE
> set
   What I entered:

> e.g. RTEMS-pc386
> or RTEMS-xilinx_zynq_a9_qemu
> in epics-base/configure/os there must be a file for the target used,
> e.g.
> CONFIG.Common.RTEMS-xilinx_zynq_a9_qemu
> or
> CONFIG.Common.RTEMS-pc386
Checked.  CONFIG.Common.RTEMS-pc386 was there

> Then you have to set in configure/os/CONFIG_SITE.Common.RTEMS
> where to find RTEMS:
> # Where to find RTEMS
> #
> # APS:
> #RTEMS_VERSION = 4.10.2
> #RTEMS_BASE = /usr/local/vw/rtems/rtems-$(RTEMS_VERSION)

In my system, I entered this:
RTEMS_BASE = /home/mritunjay/development/rtems/$(RTEMS_VERSION)

I followed the above instructions and used the 'make' command.
It was successful for RTEMS 4.10 and EPICS 7.

I was following almost the same set of commands and steps for RTEMS5 as
well with changes
in RTEMS source and the prefix such that the directory structure under
$HOME/development/rtems/ looked like:
      | rtems-5 (source from git set in `5` branch)
      | 5 (prefix)
      | src/rsb (switched to `5` branch)
      | kernels-5/pc386

I used this command inside kernels-5/pc386:

`$HOME/development/rtems/rtems-5/configure --target=i386-rtems5
--enable-rtemsbsp=pc386 --enable-tests=samples
--prefix=$HOME/development/rtems/5 --enable-cxx --enable-networking
The make and make install was successful here.

After this, I used a different epics-base (The one I downloaded from
Heinz's playground)
and made corresponding changes in the file for RTEMS5 as described above in
the tutorial sent by Heinz.
When I ran `make` inside the `playground` epics-base, I got the error that
I mentioned.

> Have you run EPIRC7 for 4.10 in qemu? If so did the network come up and
> work?

Yes, I ran EPICS7 for 4.10 in qemu. I  ran the EPICS test suites for RTEMS
in QEMU using the
following command:

```qemu-system-i386 -no-reboot -m 128 -boot n -serial stdio  -net nic -net

The QEMU emulator successfully opened then and it showed that all the tests
I am attaching the screenshot as well.

> Have you run the rtems-libbsd test executables in qemu?

I am not sure if I have done this. Can you please tell what can be the
command for it?


> Thanks
> Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20200715/84dba957/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot from 2020-07-05 02-26-55.png
Type: image/png
Size: 14248 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/devel/attachments/20200715/84dba957/attachment-0001.png>

More information about the devel mailing list