[scripts] add smp option to do-qemuarm and do-qemux86

This commit is contained in:
Travis Geiselbrecht
2016-02-14 11:37:46 -08:00
parent 6e4165431f
commit b220b29165
2 changed files with 10 additions and 4 deletions

View File

@@ -4,6 +4,7 @@ function HELP {
echo "help:"
echo "-6 x86-64"
echo "-m <memory in MB>"
echo "-s <number of cpus>"
echo "-h for help"
echo "all arguments after -- are passed to qemu directly"
exit 1
@@ -11,13 +12,15 @@ function HELP {
DO_64BIT=0
MEMSIZE=512
SMP=1
SUDO=""
MAKE_VARS=""
while getopts bdhm:cMnt6 FLAG; do
while getopts bdhm:cMnt6s: FLAG; do
case $FLAG in
6) DO_64BIT=1;;
m) MEMSIZE=$OPTARG;;
s) SMP=$OPTARG;;
h) HELP;;
\?)
echo unrecognized option
@@ -35,7 +38,7 @@ else
PROJECT="pc-x86-test"
fi
ARGS=" -m $MEMSIZE -kernel build-${PROJECT}/lk.elf -nographic"
ARGS=" -m $MEMSIZE -smp $SMP -kernel build-${PROJECT}/lk.elf -nographic"
make $MAKE_VARS $PROJECT -j4 &&
echo $SUDO $QEMU $ARGS $@ &&