Browse Source

Linux_SDK_V1.0.2

thead_admin 1 year ago
parent
commit
c04751c734
3 changed files with 15 additions and 2 deletions
  1. 7 2
      Makefile
  2. 5 0
      addons/ko/insmod.sh
  3. 3 0
      addons/ko/rmmod.sh

+ 7 - 2
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)

+ 5 - 0
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

+ 3 - 0
addons/ko/rmmod.sh

@@ -0,0 +1,3 @@
+#!/bin/sh
+
+rmmod vc8000