Skip to content
Snippets Groups Projects
Commit 2bf183d3 authored by Erik von Reis's avatar Erik von Reis
Browse files

rtcds: added orthagonal commandline flags for choosing kernel or user space...

rtcds: added orthagonal commandline flags for choosing kernel or user space model building.  Default is user space, but can be changed by setting USE_KERNEL_MODELS to true.
parent 0e7a09b3
No related branches found
No related tags found
1 merge request!150Update rtcds with user-space model flags
...@@ -4,6 +4,16 @@ log() { ...@@ -4,6 +4,16 @@ log() {
echo "$@" >&2 echo "$@" >&2
} }
USE_KERNEL_MODELS=${USE_KERNEL_MODELS:-false}
if $USE_KERNEL_MODELS ; then
log "Build kernel-mode models by default"
else
log "Build user mode models by default"
USERLAND_FLAG=0
NOKERNELSPACE_FLAG=0
fi
# capture all command line flags as variables # capture all command line flags as variables
params="" params=""
ccmd="" ccmd=""
...@@ -17,6 +27,14 @@ while (( "$#" )); do ...@@ -17,6 +27,14 @@ while (( "$#" )); do
USERLAND_FLAG=0 USERLAND_FLAG=0
shift shift
;; ;;
--no-user-space|--no-userland)
USERLAND_FLAG=''
shift
;;
--kernel-space)
NOKERNELSPACE_FLAG=''
shift
;;
--no-kernel-space) --no-kernel-space)
NOKERNELSPACE_FLAG=0 NOKERNELSPACE_FLAG=0
shift shift
...@@ -415,11 +433,20 @@ global_status() { ...@@ -415,11 +433,20 @@ global_status() {
usage() { usage() {
if $USE_KERNEL_MODELS ; then
local udefault=""
local kdefault=" (default)"
else
local udefault=" (default)"
local kdefault=""
fi
if $ALLOW_MODEL_ENABLE ; then if $ALLOW_MODEL_ENABLE ; then
local enable_usage="enable <sys>...|--all enable system start at boot local enable_usage="
" enable <sys>...|--all enable system start at boot"
else else
local enable_usage="" local enable_usage="
"
fi fi
echo "Usage: $(basename $0) <command> [options] [args] echo "Usage: $(basename $0) <command> [options] [args]
...@@ -428,28 +455,30 @@ Advanced LIGO Real Time System control interface. ...@@ -428,28 +455,30 @@ Advanced LIGO Real Time System control interface.
Available commands: Available commands:
build|make <sys>...|--all build system build|make <sys>...|--all build system
--user-space|--userland build model in userland (user space) --user-space|--userland build model in userland $udefault
--no-kernel-space do not build kernel space model --no-user-space|--no-userland do not build model in userland $kdefault
install <sys>...|--all install system --kernel-space build model in kernel space $kdefault
--no-kernel-space do not build model in kernel space $udefault
list|ls list systems for host install <sys>...|--all install system
${enable_usage}disable <sys>...|--all disable system start at boot list|ls list systems for host
start <sys>...|--all start systems ${enable_usage}
restart <sys>...|--all restart running systems disable <sys>...|--all disable system start at boot
stop|kill <sys>...|--all stop running systems start <sys>...|--all start systems
restart <sys>...|--all restart running systems
status [<sys>] show status for system services stop|kill <sys>...|--all stop running systems
log show logs for system services status [<sys>] show status for system services
-f follow logs
blog <sys> show last build log for system log show logs for system services
-i print log paths -f follow logs
lsmod list loaded RTS kernel modules blog <sys> show last build log for system
env print system environment info -i print log paths
version|--version|-v print version lsmod list loaded RTS kernel modules
help|--help|-h this help env print system environment info
version|--version|-v print version
help|--help|-h this help
" "
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment