diff --git a/Makefile b/Makefile index f470449..a0d8f2a 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ ifeq ($(JOBS),) endif all: info driver install_local_output -.PHONY: info driver install_local_output install_prepare clean_driver clean_output clean +.PHONY: info driver install_local_output install_addons install_prepare clean_driver clean_output clean info: @echo $(BUILD_LOG_START) @@ -65,7 +65,12 @@ clean_driver: install_prepare: mkdir -p ./output/rootfs/$(DIR_TARGET_KO) -install_local_output: install_prepare driver +install_addons: install_prepare + @if [ -d addons/ko ]; then \ + cp -rf addons/ko/* ./output/rootfs/$(DIR_TARGET_KO); \ + fi + +install_local_output: install_addons install_prepare driver @echo $(BUILD_LOG_START) find ./linux -name "*.ko" | xargs -i cp -f {} ./output/rootfs/$(DIR_TARGET_KO) cp -f ./linux/kernel_module/driver_load.sh ./output/rootfs/$(DIR_TARGET_KO) diff --git a/addons/ko/insmod.sh b/addons/ko/insmod.sh new file mode 100755 index 0000000..cd67832 --- /dev/null +++ b/addons/ko/insmod.sh @@ -0,0 +1,5 @@ +#!/bin/sh +KERNEL_VER=$(uname -r) +BASE_PATH=/lib/modules/${KERNEL_VER}/extra + +insmod $BASE_PATH/vc8000.ko diff --git a/addons/ko/rmmod.sh b/addons/ko/rmmod.sh new file mode 100755 index 0000000..7b55b5b --- /dev/null +++ b/addons/ko/rmmod.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +rmmod vc8000