Skip to content
Snippets Groups Projects
Commit 0f23c902 authored by Keith Thorne's avatar Keith Thorne
Browse files

update driver Makefiles to install in extra so they are not inadvertently...

update driver Makefiles to install in extra so they are not inadvertently deleted, and to remove old /dev version when updating

git-svn-id: https://redoubt.ligo-wa.caltech.edu/svn/advLigoRTS/trunk@3339 6dcd42c9-f523-4c6d-aada-af552506706e
parent 751bf6a7
No related branches found
No related tags found
No related merge requests found
......@@ -20,7 +20,7 @@ PWD := $(shell pwd)
CC := gcc -Wall -g
TARGET := mbuf.ko
INSTDIR := /lib/modules/$(KVER)/kernel/drivers/$(MODULENAME)
INSTDIR := /lib/modules/$(KVER)/extra
ifeq ($(KERNELRELEASE),)
#all: $(MODULENAME)_test
......@@ -40,9 +40,13 @@ install:
#remove all old versions of the driver
find $(INSTALL_MOD_PATH)/lib/modules/$(KVER) -name $(TARGET) -exec rm -f {} \; || true
find $(INSTALL_MOD_PATH)/lib/modules/$(KVER) -name $(TARGET).gz -exec rm -f {} \; || true
#Install the new driver
install -D -m 644 $(TARGET) $(INSTALL_MOD_PATH)$(INSTDIR)/$(TARGET)
/sbin/depmod -a || true
/sbin/modprobe $(MODULENAME)
if [ -e /dev/$(MODULENAME) ] ; then \
rm -f /dev/$(MODULENAME) ; \
fi
mknod /dev/$(MODULENAME) c `grep $(MODULENAME) /proc/devices|awk '{print $$1}'` 0
chown controls /dev/$(MODULENAME)
......
......@@ -20,7 +20,7 @@ PWD := $(shell pwd)
CC := gcc -Wall -g
TARGET := symmetricom.ko
INSTDIR := /lib/modules/$(KVER)/kernel/drivers/$(MODULENAME)
INSTDIR := /lib/modules/$(KVER)/extra
ifeq ($(KERNELRELEASE),)
#all: $(MODULENAME)_test
......@@ -40,9 +40,13 @@ install:
#remove all old versions of the driver
find $(INSTALL_MOD_PATH)/lib/modules/$(KVER) -name $(TARGET) -exec rm -f {} \; || true
find $(INSTALL_MOD_PATH)/lib/modules/$(KVER) -name $(TARGET).gz -exec rm -f {} \; || true
# Install new driver
install -D -m 644 $(TARGET) $(INSTALL_MOD_PATH)$(INSTDIR)/$(TARGET)
/sbin/depmod -a || true
/sbin/modprobe $(MODULENAME)
if [ -e /dev/$(MODULENAME) ] ; then \
rm -f /dev/$(MODULENAME) ; \
fi
mknod /dev/$(MODULENAME) c `grep $(MODULENAME) /proc/devices|awk '{print $$1}'` 0
chown controls /dev/$(MODULENAME)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment