mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 23:23:13 +00:00
2008-12-04 Joel Sherrill <joel.sherrill@OARcorp.com>
* psim-bottom, psim-gdb-bottom, psim-shared, psim-top.in: Add ability to force psim configuration to include System V IPC devices even when the test does not appear to be multiprocessing. This is used by some RTEMS application developers for system simulation and could be used to simulate a framebuffer if a UNIX process mirrored the buffer.
This commit is contained in:
@@ -1,3 +1,11 @@
|
|||||||
|
2008-12-04 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||||
|
|
||||||
|
* psim-bottom, psim-gdb-bottom, psim-shared, psim-top.in: Add ability
|
||||||
|
to force psim configuration to include System V IPC devices even when
|
||||||
|
the test does not appear to be multiprocessing. This is used by some
|
||||||
|
RTEMS application developers for system simulation and could be used
|
||||||
|
to simulate a framebuffer if a UNIX process mirrored the buffer.
|
||||||
|
|
||||||
2008-09-08 Joel Sherrill <joel.sherrill@oarcorp.com>
|
2008-09-08 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
* runtest-bottom: Work on .exe and .ralf files.
|
* runtest-bottom: Work on .exe and .ralf files.
|
||||||
|
|||||||
@@ -6,17 +6,16 @@
|
|||||||
|
|
||||||
verbose=""
|
verbose=""
|
||||||
limit="0"
|
limit="0"
|
||||||
|
use_sysv_ipc="auto"
|
||||||
|
|
||||||
## TODO: may want command line ability to turn on some psim tracing
|
## TODO: may want command line ability to turn on some psim tracing
|
||||||
while getopts vl: OPT
|
while getopts vsl: OPT
|
||||||
do
|
do
|
||||||
case "$OPT" in
|
case "$OPT" in
|
||||||
v)
|
v) verbose="yes";;
|
||||||
verbose="yes";;
|
l) limit="$OPTARG";;
|
||||||
l)
|
s) use_sysv_ipc="yes";;
|
||||||
limit="$OPTARG";;
|
*) fatal;;
|
||||||
*)
|
|
||||||
fatal;;
|
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
shiftcount=`expr $OPTIND - 1`
|
shiftcount=`expr $OPTIND - 1`
|
||||||
|
|||||||
@@ -1,6 +1,14 @@
|
|||||||
|
|
||||||
## TODO: may want command line ability to turn on some psim tracing
|
## TODO: may want command line ability to turn on some psim tracing
|
||||||
|
|
||||||
|
# Recognize special argument to force System V IPC support on
|
||||||
|
if [ X${1} = "X-psim_sysv" ] ; then
|
||||||
|
use_sysv_ipc="yes"
|
||||||
|
shift
|
||||||
|
else
|
||||||
|
use_sysv_ipc="auto"
|
||||||
|
fi
|
||||||
|
|
||||||
## Generate the GDB Command Script
|
## Generate the GDB Command Script
|
||||||
gen_gdb_script()
|
gen_gdb_script()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,22 +4,31 @@ TREE_FILE=psim_tree.${LOGNAME}
|
|||||||
### Generate the PSIM device tree based upon the type of application being run
|
### Generate the PSIM device tree based upon the type of application being run
|
||||||
gen_device_tree()
|
gen_device_tree()
|
||||||
{
|
{
|
||||||
case ${1} in
|
enable_sys_ipc="yes"
|
||||||
*mp*)
|
|
||||||
if [ X${RTEMS_SHM_SEMAPHORE_KEY} = X -o X${RTEMS_SHM_KEY} = X ] ; then
|
|
||||||
fatal RTEMS_SHM_SEMAPHORE_KEY and/or RTEMS_SHM_KEY not set
|
|
||||||
fi
|
|
||||||
|
|
||||||
use_sysv_devices=yes
|
if [ ${use_sys_ipc} = "yes" ] ; then
|
||||||
case ${1} in
|
enable_sysv_ipc="yes"
|
||||||
*node1*) value=1 ;;
|
value=-1 # for now assume we are slave in this mode
|
||||||
*) value=-1 ;;
|
else
|
||||||
esac
|
case ${1} in
|
||||||
;;
|
*mp*)
|
||||||
*)
|
enable_sysv_devices="yes"
|
||||||
use_sysv_devices=no
|
case ${1} in
|
||||||
;;
|
*node1*) value=1 ;;
|
||||||
esac
|
*) value=-1 ;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
enable_sysv_devices="no"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ${enable_sysv_devices} = "yes" ] ; then
|
||||||
|
if [ X${RTEMS_SHM_SEMAPHORE_KEY} = X -o X${RTEMS_SHM_KEY} = X ] ; then
|
||||||
|
fatal RTEMS_SHM_SEMAPHORE_KEY and/or RTEMS_SHM_KEY not set
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
#
|
#
|
||||||
@@ -46,7 +55,7 @@ cat <<EOF
|
|||||||
/nvram@0x0c080000/timezone -3600
|
/nvram@0x0c080000/timezone -3600
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
if [ ${use_sysv_devices} = yes ] ; then
|
if [ ${enable_sysv_devices} = yes ] ; then
|
||||||
echo "##### System V IPC (Semaphore) 0x0c100010 for 12"
|
echo "##### System V IPC (Semaphore) 0x0c100010 for 12"
|
||||||
echo "/sem@0x0c100010/reg 0x0c100010 12"
|
echo "/sem@0x0c100010/reg 0x0c100010 12"
|
||||||
echo "/sem@0x0c100010/key ${RTEMS_SHM_SEMAPHORE_KEY}"
|
echo "/sem@0x0c100010/key ${RTEMS_SHM_SEMAPHORE_KEY}"
|
||||||
@@ -57,6 +66,7 @@ EOF
|
|||||||
echo "/shm@0x0c110000/key ${RTEMS_SHM_KEY}"
|
echo "/shm@0x0c110000/key ${RTEMS_SHM_KEY}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
### run the specified test with the time limit
|
### run the specified test with the time limit
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ progname=${0##*/} # fast basename hack for ksh, bash
|
|||||||
USAGE=\
|
USAGE=\
|
||||||
"usage: $progname [ -opts ] test [ test ... ]
|
"usage: $progname [ -opts ] test [ test ... ]
|
||||||
-v -- verbose
|
-v -- verbose
|
||||||
|
-s -- force System V IPC support on (default=auto)
|
||||||
-l limit -- specify time limit (default is 'no limit')
|
-l limit -- specify time limit (default is 'no limit')
|
||||||
"
|
"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user