libbsd.txt "test runner" realview_pbx_a9_qemu

Chris Johns chrisj at rtems.org
Fri Jun 19 06:02:55 UTC 2015


On 19/06/2015 3:46 pm, Gene Smith wrote:
> On 06/18/2015 02:02 AM, Chris Johns wrote:
> 
> I may revisit the vde method but for now I just tried the latest libbsd
> with the tcpdump added. I have been using the Makefile build system but
> it now fails with the git pull.

I try to maintain it but I do not run it so I need feedback and patches.

> So I tried the waf build and it builds
> with no apparent errors. However, it didn't seem to include the
> NET_CFG_... constants (at least README.waf doesn't mention them). 

It should. You can also provide an out of source file using
--net-test-config=. Running 'waf --help' provides available options.

The file is the standard config.inc format.

> So I debugged the Makefile.
> 
> It appears there are three things wrong with the Makefile.
> 
> 1) Everywhere the string "-D_U_=__attribute__((unused))" appears in the
> rules it needs to be quoted. It appears in almost every rule so there
> are maybe 100s of them. (I used single quotes, FWIW.)

Ok.

> 2) Everywhere sting "freebsd/usr.sbin/tcpdump/tcpdump-D__FreeBSD__=1"
> appears it needs have a space inserted:
> "freebsd/usr.sbin/tcpdump/tcpdump -D__FreeBSD__=1"
> Quotes aren't required. Again, there a many of these.

Hmm ok.

> 3) Several include paths need to be added:
> COMMON_FLAGS += -Ifreebsd/contrib/libpcap
> COMMON_FLAGS += -Irtemsbsd/sys
> COMMON_FLAGS += -Ifreebsd/usr.sbin/tcpdump/tcpdump
> COMMON_FLAGS += -Ifreebsd/contrib/tcpdump
> COMMON_FLAGS +=
> -Ibuild/arm-rtems4.11-realview_pbx_a9_qemu/testsuite/include
> (The last one contains the bsp name so probably needs to be more
> general, but seems to work ok as an ad hoc fix.)

Here I stopped updating the support and I have little interest in adding
what is needed. Basically the makefile generator (makefile.py) needs to
be taught how to add local module specific include. The addition of
libpcap and tcpdump required local module specific headers and I did not
want to pollute the system wide include space.

> With these Makefile fixes, the libbsd builds again & everything works
> like before. But when I added the shell() code as you suggested above,
> initial ping and the shell work but when I run tcpdump from the rtems
> shell, the "guest" becomes unresponsive: ping to the rtems guest no
> longer responds and tcpdump in rtems shell prints nothing (except for
> the standard tcpdump introductory message). Is tcpdump actually working
> for you and printing packet info?

It is for me. I get a dump of packets as they arrive.

> Since the Makefile is deprecated, you may not want to fix it.

Yeah kind of not willing too.

> I
> understand that. However, can you provide information on how the
> information in config.inc can be applied in waf, primarily the
> NET_CFG_... network parameters. (The file and NET_CFG_... items appear
> in wscript but don't understand if they have an effect.)

Try the option. Also be careful mixing a Makefile builds and waf builds.
There could complex interaction between the files each uses and generate
which may be interacting. I suspect is waf is picking up the in source
tree Makefile generated files.

Chris


More information about the users mailing list