20 # suns can't echo -n, and Mac OS X can't echo "x\c"
21 # assume argument has no doublequotes
22 awk 'BEGIN { printf("'"$*"'"); }' </dev
/null
26 # Find the address of the kernel readline function,
27 # which the kernel monitor uses to read commands interactively.
28 brkaddr
=`grep 'readline$' obj/kern/kernel.sym | sed -e's/ .*$//g'`
29 #echo "brkaddr $brkaddr"
31 # Run Bochs, setting a breakpoint at readline(),
32 # and feeding in appropriate commands to run, then quit.
33 t0
=`date +%s.%N 2>/dev/null`
35 # The sleeps are necessary in some Bochs to
36 # make it parse each line separately. Sleeping
37 # here sure beats waiting for the timeout.
38 echo vbreak
0x8:0x
$brkaddr
41 # EOF will do just fine to quit.
45 bochs
-q 'display_library: nogui' \
46 'parport1: enabled=1, file="bochs.out"'
49 t1
=`date +%s.%N 2>/dev/null`
50 time=`echo "scale=1; ($t1-$t0)/1" | sed 's/.N/.0/g' | bc 2>/dev/null`
61 echo_n
"Page directory: "
62 if grep "check_boot_pgdir() succeeded!" bochs.out
>/dev
/null
64 score
=`expr 20 + $score`
70 echo_n
"Page management: "
71 if grep "page_check() succeeded!" bochs.out
>/dev
/null
73 score
=`expr 30 + $score`
79 echo "Score: $score/50"
81 if [ $score -lt 50 ]; then