Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion docs/src/man/man9/hm2_eth.9.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@ IO boards, with HostMot2 firmware.

== SYNOPSIS

*loadrt hm2_eth* [**config=**"__str__[,__str__...]"] [**board_ip=**__ip__[,__ip__...] ] [**board_mac=**__mac__[,__mac__...] ] [**firewall=**__auto|iptables|nft|none__]
*loadrt hm2_eth* [**config=**"__str__[,__str__...]"] [**board_ip=**__ip__[,__ip__...] ] [**board_rtnet=**__posix|evl__[,__posix|evl__...] ] [**board_mac=**__mac__[,__mac__...] ] [**firewall=**__auto|iptables|nft|none__]

*config* [default: ""]::
HostMot2 config strings, described in the hostmot2(9) manpage.
*board_ip* [default: ""]::
The IP address of the board(s), separated by commas.
As shipped, the board address is 192.168.1.121.
*board_rtnet* [default: posix]::
The real time ethernet implementation of the board(s), separated by
commas. Use *posix* for PREEMT_RT. Use *evl* if you are running a
Xenomai4 EVL kernel and have a supported network card.
*firewall* [default: auto]::
Selects the firewall backend used to isolate the dedicated interface.
By default hm2_eth installs the rules itself; rtapi_app raises
Expand Down Expand Up @@ -124,6 +128,8 @@ hm2___<BoardType>__.__<BoardNum>__.packet-error-level (s32, out)::
The error level is always in the range from 0 to packet-error-limit, inclusive.
hm2___<BoardType>__.__<BoardNum>__.packet-error-exceeded (bit, out)::
This pin is TRUE when the current error level is equal to the maximum, and FALSE at other times.
hm2___<BoardType>__.__<BoardNum>__.packet-error-total (u32, io)::
This pin shows the total package error count.

== PARAMETERS

Expand All @@ -150,6 +156,16 @@ hm2___<BoardType>__.__<BoardNum>__.packet-read-timeout (s32, rw)::
Setting this value too low can cause spurious read errors.
Setting it too high can cause realtime delay errors.

== FUNCTIONS

hm2_eth.realtime-init::
Realtime initialization function. This function initializes the realtime
ethernet for *evl*. With *posix*, this function is not needed.
It needs to be called once at startup using:
....
initf hm2_eth.realtime-init servo-thread
....

== NOTES

hm2_eth installs firewall rules to control the network interface while
Expand Down
10 changes: 7 additions & 3 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,11 @@ hm2_pci-objs := \
$(MATHSTUB)
hm2_eth-objs := \
hal/drivers/mesa-hostmot2/hm2_eth.o \
$(MATHSTUB)
hal/drivers/mesa-hostmot2/hm2_eth_net_posix.o
ifeq ($(CONFIG_USPACE_XENOMAI_EVL),y)
hm2_eth-objs += hal/drivers/mesa-hostmot2/hm2_eth_net_evl.o
endif
hm2_eth-objs += $(MATHSTUB)
hm2_spi-objs := \
hal/drivers/mesa-hostmot2/hm2_spi.o \
hal/drivers/mesa-hostmot2/llio_info.o \
Expand Down Expand Up @@ -1286,7 +1290,7 @@ modules: $(patsubst %.o,../rtlib/%.so,$(obj-m))
$(Q)objdump -w -j .rtapi_export -t objects/$*.tmp \
| awk 'BEGIN{print "{ global :"} /rtapi_exported_/{printf("%s;\n", substr($$6,16))} END{print "local : * ; };"}' \
> objects/$*.ver
$(Q)$(CC) -shared -Bsymbolic -Wl,--version-script,objects/$*.ver -o $@ $^ -lm $(LDFLAGS)
$(Q)$(CC) -shared -Bsymbolic -Wl,--version-script,objects/$*.ver -o $@ $^ -lm $(XENOMAI_EVL_LDFLAGS) $(LDFLAGS)
$(Q)chmod -x $@

RTFLAGS += -fno-strict-aliasing -fwrapv
Expand All @@ -1297,7 +1301,7 @@ $(sort $(filter-out objects/rtemc/tp/cruckig/%,$(RTOBJS))) : objects/rt%.o : %.c
@rm -f $@
@mkdir -p $(dir $@)
$(Q)$(CC) -c $(OPT) $(DEBUG) $(EXTRA_DEBUG) -DRTAPI \
$(EXTRA_CFLAGS) \
$(EXTRA_CFLAGS) $(XENOMAI_EVL_CFLAGS) \
-MP -MD -MF "${@:.o=.d}" -MT "$@" \
$< -o $@

Expand Down
2 changes: 1 addition & 1 deletion src/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ if test "$RTS" = uspace || test -z "$RTS" -a "$RTAI_CONFIG" = "none" ; then
CONFIG_USPACE_XENOMAI_EVL=y
XENOMAI_EVL_CFLAGS=
XENOMAI_EVL_LDFLAGS=-levl
AC_DEFINE([USPACE_XENOMAI_EVL], [], [Define if uspace realtime should optionally support Xenomai-evl])
AC_DEFINE([USPACE_XENOMAI_EVL], [], [Define if uspace realtime should optionally support Xenomai EVL])
fi

AC_SUBST([CONFIG_USPACE_XENOMAI_EVL])
Expand Down
Loading
Loading