-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from chon-group/solving_Issue_2
Adopting DKMS solving [#2]
- Loading branch information
Showing
11 changed files
with
175 additions
and
337 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,10 @@ | ||
#!/bin/bash | ||
/opt/chonos-embMAS/lib/SerialPortEmulator/virtualbot install | ||
MODULE_NAME="virtualbot" | ||
MODULE_FILE="/etc/modules" | ||
|
||
if grep -q "^$MODULE_NAME$" "$MODULE_FILE"; then | ||
/opt/chonos-embMAS/lib/SerialPortEmulator/virtualbot uninstall | ||
/opt/chonos-embMAS/lib/SerialPortEmulator/virtualbot install | ||
else | ||
/opt/chonos-embMAS/lib/SerialPortEmulator/virtualbot install | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../usr/src/virtualbot-1.0 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
#! /bin/sh | ||
DIR="/opt/chonos-embMAS/lib/SerialPortEmulator/driver/" | ||
MODULE_NAME="virtualbot" | ||
MODULE_FILE="/etc/modules" | ||
|
||
if [ "$1" = "start" ]; then | ||
modprobe virtualbot | ||
modprobe $MODULE_NAME | ||
elif [ "$1" = "stop" ]; then | ||
modprobe -r virtualbot | ||
modprobe -r $MODULE_NAME | ||
elif [ "$1" = "install" ]; then | ||
cd $DIR | ||
make clean all | ||
make modules_install | ||
make install | ||
echo virtualbot >> /etc/modules | ||
dkms add -m $MODULE_NAME -v 1.0 | ||
dkms build -m $MODULE_NAME -v 1.0 | ||
dkms install -m $MODULE_NAME -v 1.0 | ||
modprobe $MODULE_NAME | ||
echo $MODULE_NAME >> $MODULE_FILE | ||
elif [ "$1" = "uninstall" ]; then | ||
cd $DIR | ||
modprobe -r virtualbot | ||
make uninstall | ||
make clean | ||
cat /etc/modules | grep -v virtualbot > /tmp/modules | ||
mv /tmp/modules /etc/modules | ||
modprobe -r $MODULE_NAME | ||
dkms uninstall -m $MODULE_NAME -v 1.0 | ||
dkms remove -m $MODULE_NAME -v 1.0 | ||
cat $MODULE_FILE | grep -v $MODULE_NAME > /tmp/modules | ||
mv /tmp/modules $MODULE_FILE | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
KDIR ?= /lib/modules/`uname -r`/build | ||
MODULE_NAME = virtualbot | ||
|
||
obj-m := $(MODULE_NAME).o | ||
|
||
$(MODULE_NAME)-y := src/virtualbot_main.o | ||
|
||
ccflags-y := -I$(src)/include -DDEBUG | ||
|
||
.PHONY: all clean install uninstall | ||
|
||
all: | ||
$(MAKE) -C $(KDIR) M=$$PWD modules | ||
|
||
clean: | ||
$(MAKE) -C $(KDIR) M=$$PWD clean | ||
|
||
install: | ||
$(MAKE) -C $(KDIR) M=$$PWD modules_install | ||
depmod -A | ||
|
||
uninstall: | ||
rm -f /lib/modules/$(shell uname -r)/kernel/drivers/$(MODULE_NAME)/$(MODULE_NAME).ko | ||
modprobe -r $(MODULE_NAME) | ||
depmod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
PACKAGE_NAME="virtualbot" | ||
PACKAGE_VERSION="1.0" | ||
BUILT_MODULE_NAME[0]="virtualbot" | ||
DEST_MODULE_LOCATION[0]="/kernel/drivers/virtualbot" | ||
AUTOINSTALL="yes" |
File renamed without changes.
Oops, something went wrong.