From d0a7b8df9c730b3052521498eecc9a67a34a5ccc Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Mon, 21 May 2018 21:56:23 +1000 Subject: [PATCH] [module] added 'test' to Makefile to simplify development testing --- module/Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/module/Makefile b/module/Makefile index 9a81ed3c..b92d5c81 100644 --- a/module/Makefile +++ b/module/Makefile @@ -1,7 +1,15 @@ obj-m += kvmfr.o +USER := $(shell whoami) all: make -C /lib/modules/$(shell uname -r)/build/ M=$(PWD) modules clean: make -C /lib/modules/$(shell uname -r)/build/ M=$(PWD) clean + +test: all + grep -q '^uio' /proc/modules || sudo modprobe uio + grep -q '^kvmfr' /proc/modules && sudo rmmod kvmfr || true + sudo insmod ./kvmfr.ko + sudo chown $(USER) /dev/uio0 + ../client/bin/looking-glass-client -f /dev/uio0 -L 128