12 ! test `uname -s` = "Linux" && {
13 echo `uname -s` is not Linux
17 case `uname -r | cut -d. -f1,2` in
18 2.6) kms
=ko
; syms
=/proc
/kallsyms
;;
19 2.4) kms
=o
; syms
=/proc
/ksyms
;;
20 *) echo "unknown kernel version"; exit 1;;
25 test -e "build/itc.$kms" && kmod
=build
/itc.
$kms
26 test -z "$kmod" && test -e "mod/itc.$kms" && kmod
=mod
/itc.
$kms
27 test -e "$apc" || apc
="build/apc"
29 echo "APC is not found in usual places"
34 echo "Kernel module does not exist"
40 func
=$
(awk '/default_idle$/ {print "0x" $1}' $syms)
41 args
="idle_func=$func"
49 if ! test -c $dev; then
50 echo "ITC kernel module is not running. Will try to load $kmod."
51 su
-c "insmod $kmod $args"
54 if ! test -r $dev; then
55 echo "ITC is not readable. Will try to change mode."
60 echo "apc should be running now"