utils: add start, stop commands
These scripts issue the proper commands via the /sys interface to start and stop the EVL core. Signed-off-by: Philippe Gerum <rpm@xenomai.org>
This commit is contained in:
parent
eb605ec762
commit
50d5fb12eb
|
@ -11,6 +11,8 @@ COMMANDS = evl
|
|||
HELPER_SCRIPTS = \
|
||||
evl-gdb \
|
||||
evl-help \
|
||||
evl-start \
|
||||
evl-stop \
|
||||
evl-test \
|
||||
evl-trace \
|
||||
trace.evl \
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
#! /bin/sh
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
if test \! -w $EVL_SYSDIR/evl/control/state; then
|
||||
echo >&2 "no EVL core in kernel"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
usage() {
|
||||
echo >&2 "usage: $(basename $1)"
|
||||
}
|
||||
|
||||
args=$(getopt -n $(basename $0) '@' "$@")
|
||||
if [ $? -ne 0 ]; then
|
||||
usage $0
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set -- $args
|
||||
for opt
|
||||
do
|
||||
case "$opt" in
|
||||
-@) echo "start EVL core"
|
||||
exit 0;;
|
||||
esac
|
||||
done
|
||||
|
||||
echo start > $EVL_SYSDIR/evl/control/state
|
||||
|
||||
exit 0
|
|
@ -0,0 +1,30 @@
|
|||
#! /bin/sh
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
if test \! -w $EVL_SYSDIR/evl/control/state; then
|
||||
echo >&2 "no EVL core in kernel"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
usage() {
|
||||
echo >&2 "usage: $(basename $1)"
|
||||
}
|
||||
|
||||
args=$(getopt -n $(basename $0) '@' "$@")
|
||||
if [ $? -ne 0 ]; then
|
||||
usage $0
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set -- $args
|
||||
for opt
|
||||
do
|
||||
case "$opt" in
|
||||
-@) echo "stop EVL core"
|
||||
exit 0;;
|
||||
esac
|
||||
done
|
||||
|
||||
echo stop > $EVL_SYSDIR/evl/control/state
|
||||
|
||||
exit 0
|
Loading…
Reference in New Issue