sync
if lsmod | grep "rtai_spdrv_lxrt">/dev/null ; then
    rmmod rtai_spdrv_lxrt
fi
if lsmod | grep "rtai_spdrv">/dev/null ; then
    rmmod rtai_spdrv
fi
if lsmod | grep "rtai_lxrt">/dev/null ; then
    rmmod rtai_lxrt
fi
if lsmod | grep "rtai_sched">/dev/null ; then
    rmmod rtai_sched
fi
if lsmod | grep "rt_mem_mgr">/dev/null ; then
    rmmod rt_mem_mgr
fi
if lsmod | grep "rtai">/dev/null ; then
    rmmod rtai
fi
sync
insmod rtai
#insmod rt_mem_mgr
insmod rtai_sched
insmod rtai_lxrt
./freeports
insmod ../rtai_spdrv.o
insmod ../rtai_spdrv_lxrt.o
./hello_world2_lxrt
sync
rmmod rtai_spdrv_lxrt
rmmod rtai_spdrv
rmmod rtai_lxrt
rmmod rtai_sched
#rmmod rt_mem_mgr
rmmod rtai
