#! /bin/sh # if the module is not already built for this kernel version # and if the source tree for this kernel version is available, # build & save/store the module; PFX="hpilo_try_build" REV=`uname -r` if [ -f /usr/builds/hpilof-modules/$REV/hpilof.ko ]; then echo "$PFX: already have hpilof.ko for kernel version $REV" exit 0 fi if [ ! -d /usr/builds/linsrc/linux-$REV/ ]; then echo "$PFX: error: cannot build hpilof.ko, no kernel source tree version $REV" # exit 0: don't want entire test plan to stop here; exit 0 fi if [ ! -d /usr/builds/hpilof-8.0.0-144.OB ]; then echo "$PFX: error: missing hpilof source tree" # exit 0: don't want entire test plan to stop here; exit 0 fi cd /usr/builds/hpilof-8.0.0-144.OB rm -f *.o *.ko *.mod.c Module.* modules.* make -C /usr/builds/linsrc/linux-$REV M=$PWD ##sts=$? if [ -f hpilof.ko ]; then mkdir /usr/builds/hpilof-modules/$REV/ cp -a hpilof.ko /usr/builds/hpilof-modules/$REV/ fi