Changeset 5a6d25fc in rtems


Ignore:
Timestamp:
Sep 11, 2009, 10:42:00 PM (10 years ago)
Author:
Till Straumann <strauman@…>
Branches:
4.10, 4.11, master
Children:
a1e516f
Parents:
507d382
Message:

2009-09-11 Till Straumann <Till.Straumann@…>

  • psim-top.in, psim-bottom: Added support for options -d (print device tree and exit), -h (usage info) and -n (enable NIC support).
  • psim-gdb-bottom: Added support for options -s (force sysv IPC), -h (usage info) and -n (enable NIC support). Allow user to override GDB variable from environment.
  • psim-shared: cat NIC properties into device file if the user had specified '-n'.
  • runtest-top.in: removed unsupported options -o, -d from usage info.
Location:
c/src/lib/libbsp/powerpc/psim/tools
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/psim/tools/ChangeLog

    r507d382 r5a6d25fc  
     12009-09-11      Till Straumann <Till.Straumann@TU-Berlin.de>
     2
     3        * psim-top.in, psim-bottom: Added support for options
     4        -d (print device tree and exit), -h (usage info) and
     5        -n (enable NIC support).
     6
     7        * psim-gdb-bottom: Added support for options -s (force sysv IPC),
     8        -h (usage info) and -n (enable NIC support).
     9        Allow user to override GDB variable from environment.
     10
     11        * psim-shared: cat NIC properties into device file if the
     12        user had specified '-n'.
     13
     14        * runtest-top.in: removed unsupported options -o, -d from
     15        usage info.
     16
    1172009-04-14      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
    218
  • c/src/lib/libbsp/powerpc/psim/tools/psim-bottom

    r507d382 r5a6d25fc  
    88limit="0"
    99use_sysv_ipc="auto"
     10device_tree_only=""
     11enable_if_sim=""
    1012
    1113## TODO: may want command line ability to turn on some psim tracing
    12 while getopts vsl: OPT
     14while getopts vhsdnl: OPT
    1315do
    1416    case "$OPT" in
    1517        v) verbose="yes";;
    16         l) limit="$OPTARG";;
    17         s) use_sysv_ipc="yes";;
    18         *) fatal;;
     18        h) echo "$USAGE"; exit 0;;
     19        l) limit="$OPTARG";;
     20        s) use_sysv_ipc="yes";;
     21        d) device_tree_only="yes";;
     22        n) enable_if_sim="yes";;
     23        *) fatal;;
    1924    esac
    2025done
     
    2833fi
    2934
     35if [ X${device_tree_only} = Xyes ] ; then
     36        gen_device_tree ${1} > "`basename ${1} .exe`".device
     37        exit $?
     38fi
     39
    3040if [ X${RUN} = X ] ; then
    3141  RUN=${rtemsTarget}-run
  • c/src/lib/libbsp/powerpc/psim/tools/psim-gdb-bottom

    r507d382 r5a6d25fc  
     1progname=${0##*/} # fast basename hack for ksh, bash
    12
    2 ## TODO: may want command line ability to turn on some psim tracing
     3USAGE=\
     4"usage: $progname [ -opts ] [prog]
     5        -s  -- force System V IPC support on (default=auto)
     6        -n  -- enable NIC support ***REQUIRES PATCHED GDB/PSIM***
     7        -h  -- this message
     8"
    39
    410# Recognize special argument to force System V IPC support on
    511use_sysv_ipc="auto"
     12enable_if_sim=""
     13
     14## TODO: may want command line ability to turn on some psim tracing
     15while getopts snh OPT
     16do
     17        case "$OPT" in
     18        s) use_sysv_ipc="yes";;
     19        n) enable_if_sim="yes";;
     20        h) echo "$USAGE"; exit 0;;
     21        *) echo "unknown option"; echo "$USAGE"; exit 0;;
     22        esac
     23done
     24shiftcount=`expr $OPTIND - 1`
     25shift $shiftcount
     26
     27args=$*
     28
    629if [ X${1} = "X-psim_sysv" ] ; then
    730  use_sysv_ipc="yes"
     
    2144}
    2245
    23 GDB=${rtemsTarget}-gdb
     46if [ X${GDB} = X ] ; then
     47        GDB=${rtemsTarget}-gdb
     48fi
    2449
    2550gen_device_tree ${1} >${TREE_FILE}
  • c/src/lib/libbsp/powerpc/psim/tools/psim-shared

    r507d382 r5a6d25fc  
    4545  fi
    4646
    47 cat <<EOF
     47  cat <<EOF
    4848#
    4949#  Device Tree for PSIM
     
    7676# interupt out -> CPU's interrupt pin
    7777/opic@0x0c130000 > intr0 int /cpus/cpu@0
     78EOF
    7879
    79 ##### ETHTAP @ 0x0c100020 for 0x40
    80 ##
    81 ## NOTE 'ethtap' currently (200902) requires psim to
    82 ##      be patched -- also, it is only supported on
    83 ##      a linux host.
    84 ##      the 'ethtap' device transfers data from/to the
    85 ##      simulated network interface to/from a 'ethertap'
    86 ##      interface on the linux host (consult tun/tap
    87 ##      device documentation).
    88 ##      A very useful tool is 'tunctl' which allows for
    89 ##      configuring user-accessible, persistent 'tap'
    90 ##      devices so that psim may be executed w/o special
    91 ##      (root) privileges.
     80  if [ X${enable_if_sim} = Xyes ] ; then
     81    cat <<EOF
     82
     83#### ETHTAP @ 0x0c100020 for 0x40
    9284#
    93 #/ethtap@0x0c100020/reg           0x0c100020 0x40
    94 ## route interrupt to open-pic
    95 #/ethtap@0x0c100020               > 0 irq0 /opic@0x0c130000
    96 ## 'tun' device on host
    97 #/ethtap@0x0c100020/tun-device    "/dev/net/tun"
    98 ## name of 'tap' device to use
    99 #/ethtap@0x0c100020/tap-ifname    "tap0"
    100 ## ethernet address of simulated IF
    101 #/ethtap@0x0c100020/hw-address    "00:00:00:22:11:00"
    102 ## generate CRC and append to received packet before
    103 ## handing over to the simulation. This is mostly for
    104 ## debugging the rtems device driver. If unsure, leave 'false'.
    105 #/ethtap@0x0c100020/enable-crc    false
     85# NOTE 'ethtap' currently (200902) requires psim to
     86#      be patched -- also, it is only supported on
     87#      a linux host.
     88#      the 'ethtap' device transfers data from/to the
     89#      simulated network interface to/from a 'ethertap'
     90#      interface on the linux host (consult tun/tap
     91#      device documentation).
     92#      A very useful tool is 'tunctl' which allows for
     93#      configuring user-accessible, persistent 'tap'
     94#      devices so that psim may be executed w/o special
     95#      (root) privileges.
     96
     97/ethtap@0x0c100020/reg           0x0c100020 0x40
     98# route interrupt to open-pic
     99/ethtap@0x0c100020               > 0 irq0 /opic@0x0c130000
     100# 'tun' device on host
     101/ethtap@0x0c100020/tun-device    "/dev/net/tun"
     102# name of 'tap' device to use
     103/ethtap@0x0c100020/tap-ifname    "tap0"
     104# ethernet address of simulated IF
     105/ethtap@0x0c100020/hw-address    "00:00:00:22:11:00"
     106# generate CRC and append to received packet before
     107# handing over to the simulation. This is mostly for
     108# debugging the rtems device driver. If unsure, leave 'false'.
     109/ethtap@0x0c100020/enable-crc    false
    106110EOF
     111  fi
    107112
    108113  if [ ${enable_sysv_devices} = yes ] ; then
  • c/src/lib/libbsp/powerpc/psim/tools/psim-top.in

    r507d382 r5a6d25fc  
    2121USAGE=\
    2222"usage: $progname [ -opts ] test [ test ... ]
    23         -v         -- verbose
    24         -s         -- force System V IPC support on (default=auto)
    25         -l limit   -- specify time limit (default is 'no limit')
     23        -v         -- verbose
     24        -h         -- this message
     25        -s         -- force System V IPC support on (default=auto)
     26        -l limit   -- specify time limit (default is 'no limit')
     27        -d         -- generate device tree as 'test'.device and exit
     28        -n         -- enable NIC support ***REQUIRES PATCHED PSIM***
    2629"
    2730
  • c/src/lib/libbsp/powerpc/psim/tools/runtest-top.in

    r507d382 r5a6d25fc  
    2424USAGE=\
    2525"usage: $progname [ -opts ] test [ test ... ]
    26         -o options  -- specify options to be passed to simulator
    27         -v          -- verbose
    28         -d          -- generate device tree file (as 'test'.device) and exit
    29         -l logdir   -- specify log directory (default is 'logdir')
     26        -v          -- verbose
     27        -l logdir   -- specify log directory (default is 'logdir')
    3028
    3129  Specify test as 'test' or 'test.exe'.
Note: See TracChangeset for help on using the changeset viewer.