From f5c410fa665c00af46b6d0177742523020e28d18 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 25 Sep 2009 13:13:42 +0000 Subject: 2009-09-25 Joel Sherrill * .cvsignore, Makefile: Rename most qemu scripts to match the BSP name. qemu-leon2 not renamed since we prefer tsim for it. * pc386.in, qemuppc.in, uC5282.in: New files. * qemu-ppc.in, qemu-rtems.in, qemu-uc5282.in: Removed. --- sim-scripts/.cvsignore | 6 +-- sim-scripts/ChangeLog | 7 +++ sim-scripts/Makefile | 14 +++--- sim-scripts/pc386.in | 114 +++++++++++++++++++++++++++++++++++++++++++++ sim-scripts/qemu-ppc.in | 44 ----------------- sim-scripts/qemu-rtems.in | 114 --------------------------------------------- sim-scripts/qemu-uc5282.in | 41 ---------------- sim-scripts/qemuppc.in | 44 +++++++++++++++++ sim-scripts/uC5282.in | 41 ++++++++++++++++ 9 files changed, 216 insertions(+), 209 deletions(-) create mode 100644 sim-scripts/pc386.in delete mode 100644 sim-scripts/qemu-ppc.in delete mode 100644 sim-scripts/qemu-rtems.in delete mode 100644 sim-scripts/qemu-uc5282.in create mode 100644 sim-scripts/qemuppc.in create mode 100644 sim-scripts/uC5282.in (limited to 'sim-scripts') diff --git a/sim-scripts/.cvsignore b/sim-scripts/.cvsignore index ca3ad64..44eea9c 100644 --- a/sim-scripts/.cvsignore +++ b/sim-scripts/.cvsignore @@ -33,12 +33,11 @@ m32csim m32csim-gdb m32rsim m32rsim-gdb +pc386 psim psim-gdb qemu-leon2 -qemu-ppc -qemu-rtems -qemu-uc5282 +qemuppc rtl22xx rtl22xx-gdb simsh @@ -47,4 +46,5 @@ sis sis-gdb smdk2410 smdk2410-gdb +uC5282 usleep diff --git a/sim-scripts/ChangeLog b/sim-scripts/ChangeLog index 86f6620..41c4005 100644 --- a/sim-scripts/ChangeLog +++ b/sim-scripts/ChangeLog @@ -1,3 +1,10 @@ +2009-09-25 Joel Sherrill + + * .cvsignore, Makefile: Rename most qemu scripts to match the BSP name. + qemu-leon2 not renamed since we prefer tsim for it. + * pc386.in, qemuppc.in, uC5282.in: New files. + * qemu-ppc.in, qemu-rtems.in, qemu-uc5282.in: Removed. + 2009-09-24 Joel Sherrill * .cvsignore, Makefile, qemu-uc5282.in: Add script to run qemu-ppc diff --git a/sim-scripts/Makefile b/sim-scripts/Makefile index fe09780..80f8596 100644 --- a/sim-scripts/Makefile +++ b/sim-scripts/Makefile @@ -8,7 +8,7 @@ SKYEYE_SCRIPTS=ant5206 bf537Stamp csb337 csb350 csb360 edb7312 ezkit533 \ gumstix rtl22xx smdk2410 leon2-skyeye TSIM_SCRIPTS=erc32 leon2 leon3 -QEMU_SCRIPTS=qemu-rtems qemu-ppc qemu-leon2 qemu-uc5282 +QEMU_SCRIPTS=pc386 qemuppc qemu-leon2 uC5282 OTHER_SCRIPTS=avrtest GENERATED_SCRIPTS=\ ${GDBSIM_SCRIPTS} $(GDBSIM_SCRIPTS:%=%-gdb) \ @@ -31,17 +31,17 @@ usleep: usleep.c $(CC) -o $@ $< ### QEMU BSPs -qemu-rtems: gdb-sim-run.in qemu-rtems.in - ./mkrun no i386 i386 qemu-rtems +pc386: gdb-sim-run.in pc386.in + ./mkrun no i386 i386 pc386 -qemu-ppc: gdb-sim-run.in qemu-ppc.in - ./mkrun no PowerPC powerpc qemu-ppc +qemuppc: gdb-sim-run.in qemuppc.in + ./mkrun no PowerPC powerpc qemuppc qemu-leon2: gdb-sim-run.in qemu-leon2.in ./mkrun no SPARC sparc qemu-leon2 -qemu-uc5282: gdb-sim-run.in qemu-uc5282.in - ./mkrun no M68K-Coldfire m68k qemu-uc5282 +uC5282: gdb-sim-run.in uC5282.in + ./mkrun no M68K-Coldfire m68k uC5282 ### Skyeye Simulator BSPs ant5206: gdb-sim-run.in gdb-sim.in ant5206.in diff --git a/sim-scripts/pc386.in b/sim-scripts/pc386.in new file mode 100644 index 0000000..37724d1 --- /dev/null +++ b/sim-scripts/pc386.in @@ -0,0 +1,114 @@ +# +# i386/qemu Support +# +# $Id$ +# + +bspUsesGDBSimulator="no" +runBSP=${HOME}/qemu-coverage/install/bin/qemu +if [ ! -r ${runBSP} ] ; then + runBSP=qemu +fi +bspNeedsDos2Unix="yes" +bspNeedsTraceConversion="yes" +bspRunsFailRandomly="yes" + +# Set the defaults based upon arguments given and do some error checking +if [ X${QEMUDIR} == X ] ; then + QEMUDIR=${HOME}/qemu +fi +if [ ! -d ${QEMUDIR} ] ; then + fatal Base directory ${QEMUDIR} does not exist or is not a directory +fi + +if [ X${hd0Dir} == X ] ; then + hd0Dir=${QEMUDIR}/hd +fi +if [ ! -d ${hd0Dir} ] ; then + fatal VFAT directory ${hd0Dir} does not exist or is not a directory +fi + +if [ X${fd0Image} == X ] ; then + fd0Image=${QEMUDIR}/pc386_fda +fi +if [ ! -e ${fd0Image} ] ; then + fatal Boot floppy ${fd0Image} does not exist or is not a file +fi + +if [ ${verbose} == "yes" ] ; then + echo "QEMU Working Directory: " ${qemudir} + echo "QEMU VFAT HD Directory: " ${hd0Dir} + echo "QEMU Boot Floppy File : " ${fd0Image} +fi + +runARGS() +{ + file ${1} | grep "Netboot image" >/dev/null 2>&1 + if [ $? -eq 0 ] ; then + echo "INCORRECT FORMAT -- ${1}" + echo "MUST BE ELF -- look at using the .exe" + exit 1 + fi + + cp ${1} ${hd0Dir}/test.exe + + if [ ${coverage} = yes ] ; then + rm -f trace ${1}.tra + COVERAGE_ARG="-trace ${1}.tra" + fi + + # can also redirect to file with file:log/"`basename ${1} .exe` + SERIAL_ARG="stdio" + echo "-m 8 -boot a -fda ${fd0Image} -hda fat:${hd0Dir} ${COVERAGE_ARG} \ + -monitor null -nographic -serial ${SERIAL_ARG} --no-reboot" +} + +checkBSPFaults() +{ + for pattern in \ + "FAULTY THREAD WILL BE DELETED" \ + "Error code pushed by processor itself" + do + grep "${pattern}" ${logfile} + if [ $? -eq 0 ] ; then + return 1 + fi + done + + return 0 +} + +bspCheckRunWasOK() +{ + tname=`get_tname $testname` + + logfile=${logdir}/${tname} + + # sometimes the log file indicates the test did not run + length=`grep -v "QEMU acceleration layer" ${logfile} | wc -c` + if [ ${length} -eq 0 ] ; then + echo 1 + else + echo 0 + fi +} + +bspLimit() +{ + case ${1} in + *base_sp*) limit=5 ;; + *stackchk*)limit=5 ;; + *fatal*) limit=5 ;; + *psxtime*) limit=180 ;; + *cpuuse*) limit=30 ;; + *) limit=60 ;; + esac + echo ${limit} +} + +convertTraceToCoverageMap() +{ + trace_converter -l 100000 -h 200000 -f QEMU ${1}.tra ${1}.cov + +} +bspGeneratesDeviceTree="no" diff --git a/sim-scripts/qemu-ppc.in b/sim-scripts/qemu-ppc.in deleted file mode 100644 index 9c1e75e..0000000 --- a/sim-scripts/qemu-ppc.in +++ /dev/null @@ -1,44 +0,0 @@ -# -# m68k/uc5282 Qemu Support -# -# $Id$ -# - -bspUsesGDBSimulator="no" -# bspGeneratesGDBCommands="yes" -# bspSupportsGDBServerMode="yes" -if [ -r ${HOME}/qemu-coverage/install/bin/qemu-system-ppc ] ; then - runBSP=${HOME}/qemu-coverage/install/bin/qemu-system-ppc -else - runBSP=qemu-system-ppc -fi -bspNeedsDos2Unix="yes" - -runARGS() -{ - if [ ${coverage} = yes ] ; then - COVERAGE_ARG="-trace ${1}.tra" - fi - - echo "-nographic -M prep -boot n -no-reboot ${COVERAGE_ARG} \ - -L `pwd` -bios ${1}" -} - -checkBSPFaults() -{ - return 0 -} - -bspLimit() -{ - testname=$1 - case ${tname} in - *stackchk*)limit=5 ;; - *fatal*) limit=1 ;; - *psxtime*) limit=270 ;; - *) limit=60 ;; - esac - echo ${limit} -} - -bspGeneratesDeviceTree="no" diff --git a/sim-scripts/qemu-rtems.in b/sim-scripts/qemu-rtems.in deleted file mode 100644 index 37724d1..0000000 --- a/sim-scripts/qemu-rtems.in +++ /dev/null @@ -1,114 +0,0 @@ -# -# i386/qemu Support -# -# $Id$ -# - -bspUsesGDBSimulator="no" -runBSP=${HOME}/qemu-coverage/install/bin/qemu -if [ ! -r ${runBSP} ] ; then - runBSP=qemu -fi -bspNeedsDos2Unix="yes" -bspNeedsTraceConversion="yes" -bspRunsFailRandomly="yes" - -# Set the defaults based upon arguments given and do some error checking -if [ X${QEMUDIR} == X ] ; then - QEMUDIR=${HOME}/qemu -fi -if [ ! -d ${QEMUDIR} ] ; then - fatal Base directory ${QEMUDIR} does not exist or is not a directory -fi - -if [ X${hd0Dir} == X ] ; then - hd0Dir=${QEMUDIR}/hd -fi -if [ ! -d ${hd0Dir} ] ; then - fatal VFAT directory ${hd0Dir} does not exist or is not a directory -fi - -if [ X${fd0Image} == X ] ; then - fd0Image=${QEMUDIR}/pc386_fda -fi -if [ ! -e ${fd0Image} ] ; then - fatal Boot floppy ${fd0Image} does not exist or is not a file -fi - -if [ ${verbose} == "yes" ] ; then - echo "QEMU Working Directory: " ${qemudir} - echo "QEMU VFAT HD Directory: " ${hd0Dir} - echo "QEMU Boot Floppy File : " ${fd0Image} -fi - -runARGS() -{ - file ${1} | grep "Netboot image" >/dev/null 2>&1 - if [ $? -eq 0 ] ; then - echo "INCORRECT FORMAT -- ${1}" - echo "MUST BE ELF -- look at using the .exe" - exit 1 - fi - - cp ${1} ${hd0Dir}/test.exe - - if [ ${coverage} = yes ] ; then - rm -f trace ${1}.tra - COVERAGE_ARG="-trace ${1}.tra" - fi - - # can also redirect to file with file:log/"`basename ${1} .exe` - SERIAL_ARG="stdio" - echo "-m 8 -boot a -fda ${fd0Image} -hda fat:${hd0Dir} ${COVERAGE_ARG} \ - -monitor null -nographic -serial ${SERIAL_ARG} --no-reboot" -} - -checkBSPFaults() -{ - for pattern in \ - "FAULTY THREAD WILL BE DELETED" \ - "Error code pushed by processor itself" - do - grep "${pattern}" ${logfile} - if [ $? -eq 0 ] ; then - return 1 - fi - done - - return 0 -} - -bspCheckRunWasOK() -{ - tname=`get_tname $testname` - - logfile=${logdir}/${tname} - - # sometimes the log file indicates the test did not run - length=`grep -v "QEMU acceleration layer" ${logfile} | wc -c` - if [ ${length} -eq 0 ] ; then - echo 1 - else - echo 0 - fi -} - -bspLimit() -{ - case ${1} in - *base_sp*) limit=5 ;; - *stackchk*)limit=5 ;; - *fatal*) limit=5 ;; - *psxtime*) limit=180 ;; - *cpuuse*) limit=30 ;; - *) limit=60 ;; - esac - echo ${limit} -} - -convertTraceToCoverageMap() -{ - trace_converter -l 100000 -h 200000 -f QEMU ${1}.tra ${1}.cov - -} -bspGeneratesDeviceTree="no" diff --git a/sim-scripts/qemu-uc5282.in b/sim-scripts/qemu-uc5282.in deleted file mode 100644 index 405fec1..0000000 --- a/sim-scripts/qemu-uc5282.in +++ /dev/null @@ -1,41 +0,0 @@ -# -# m68k/uc5282 Qemu Support -# -# $Id$ -# - -bspUsesGDBSimulator="no" -# bspGeneratesGDBCommands="yes" -# bspSupportsGDBServerMode="yes" - -if [ -r ${HOME}/qemu-coverage/install-0.11.0-rc1/bin/qemu-system-m68k ] ; then - runBSP=${HOME}/qemu-coverage/install-0.11.0-rc1/bin/qemu-system-m68k -else - runBSP=qemu-system-m68k -fi - -bspNeedsDos2Unix="yes" - -runARGS() -{ - echo "-M uc5282 -nographic -kernel ${1}" -} - -checkBSPFaults() -{ - return 0 -} - -bspLimit() -{ - testname=$1 - case ${tname} in - *stackchk*)limit=5 ;; - *fatal*) limit=1 ;; - *psxtime*) limit=270 ;; - *) limit=60 ;; - esac - echo ${limit} -} - -bspGeneratesDeviceTree="no" diff --git a/sim-scripts/qemuppc.in b/sim-scripts/qemuppc.in new file mode 100644 index 0000000..9c1e75e --- /dev/null +++ b/sim-scripts/qemuppc.in @@ -0,0 +1,44 @@ +# +# m68k/uc5282 Qemu Support +# +# $Id$ +# + +bspUsesGDBSimulator="no" +# bspGeneratesGDBCommands="yes" +# bspSupportsGDBServerMode="yes" +if [ -r ${HOME}/qemu-coverage/install/bin/qemu-system-ppc ] ; then + runBSP=${HOME}/qemu-coverage/install/bin/qemu-system-ppc +else + runBSP=qemu-system-ppc +fi +bspNeedsDos2Unix="yes" + +runARGS() +{ + if [ ${coverage} = yes ] ; then + COVERAGE_ARG="-trace ${1}.tra" + fi + + echo "-nographic -M prep -boot n -no-reboot ${COVERAGE_ARG} \ + -L `pwd` -bios ${1}" +} + +checkBSPFaults() +{ + return 0 +} + +bspLimit() +{ + testname=$1 + case ${tname} in + *stackchk*)limit=5 ;; + *fatal*) limit=1 ;; + *psxtime*) limit=270 ;; + *) limit=60 ;; + esac + echo ${limit} +} + +bspGeneratesDeviceTree="no" diff --git a/sim-scripts/uC5282.in b/sim-scripts/uC5282.in new file mode 100644 index 0000000..405fec1 --- /dev/null +++ b/sim-scripts/uC5282.in @@ -0,0 +1,41 @@ +# +# m68k/uc5282 Qemu Support +# +# $Id$ +# + +bspUsesGDBSimulator="no" +# bspGeneratesGDBCommands="yes" +# bspSupportsGDBServerMode="yes" + +if [ -r ${HOME}/qemu-coverage/install-0.11.0-rc1/bin/qemu-system-m68k ] ; then + runBSP=${HOME}/qemu-coverage/install-0.11.0-rc1/bin/qemu-system-m68k +else + runBSP=qemu-system-m68k +fi + +bspNeedsDos2Unix="yes" + +runARGS() +{ + echo "-M uc5282 -nographic -kernel ${1}" +} + +checkBSPFaults() +{ + return 0 +} + +bspLimit() +{ + testname=$1 + case ${tname} in + *stackchk*)limit=5 ;; + *fatal*) limit=1 ;; + *psxtime*) limit=270 ;; + *) limit=60 ;; + esac + echo ${limit} +} + +bspGeneratesDeviceTree="no" -- cgit v1.2.3