Browse Source

Linux_SDK_V1.0.2

thead_admin 1 year ago
parent
commit
0f5e0f4122
4 changed files with 18 additions and 5 deletions
  1. 7 2
      Makefile
  2. 5 0
      addons/ko/insmod.sh
  3. 3 0
      addons/ko/rmmod.sh
  4. 3 3
      linux/subsys_driver/hantro_vcmd.c

+ 7 - 2
Makefile

@@ -22,7 +22,7 @@ ifeq ($(JOBS),)
 endif
 
 all:    driver install_local_output
-.PHONY: driver install_local_output install_prepare clean_driver clean_output clean
+.PHONY: driver install_local_output install_addons install_prepare clean_driver clean_output clean
 
 info:
 	@echo $(BUILD_LOG_START)
@@ -54,7 +54,12 @@ clean_driver:
 install_prepare:
 	mkdir -p ./output/rootfs/$(DIR_TARGET_KO)
 
-install_local_output: driver install_prepare
+install_addons: install_prepare
+	@if [ -d addons/ko ]; then                                 \
+	    cp -rf addons/ko/* ./output/rootfs/$(DIR_TARGET_KO); \
+	fi
+
+install_local_output: driver install_prepare install_addons
 	@echo $(BUILD_LOG_START)
 	find ./linux -name "*.ko" | xargs -i cp -f {} ./output/rootfs/$(DIR_TARGET_KO)
 	cp -f ./linux/subsys_driver/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/hantrodec.ko

+ 3 - 0
addons/ko/rmmod.sh

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

+ 3 - 3
linux/subsys_driver/hantro_vcmd.c

@@ -1942,7 +1942,7 @@ static unsigned int wait_cmdbuf_ready(struct file *filp,u16 cmdbuf_id,u32 *irq_s
         return -ERESTARTSYS;
     }
 
-    pr_info("filp=%p, VCMD Wait    CMDBUF [%d]\n", (void *)filp, cmdbuf_id);
+    pr_debug("filp=%p, VCMD Wait    CMDBUF [%d]\n", (void *)filp, cmdbuf_id);
     return 0;
   } else {
     if (check_mc_cmdbuf_irq(filp, cmdbuf_obj, irq_status_ret))
@@ -3142,7 +3142,7 @@ int hantrovcmd_init(struct platform_device *pdev)
   result = vcmd_init(pdev);
   if(result)
      goto err;
-  
+
   for (i = 0; i< total_vcmd_core_num; i++)
   {
     pr_info("vcmd: module init - vcmdcore[%d] addr =0x%llx\n",i,
@@ -3369,7 +3369,7 @@ void hantrovcmd_cleanup(struct platform_device *pdev)
     if (g_cmdbuf_obj_pool) {
       vfree(g_cmdbuf_obj_pool);
       g_cmdbuf_obj_pool = NULL;
-    } 
+    }
     if (g_cmdbuf_node_pool) {
       vfree(g_cmdbuf_node_pool);
       g_cmdbuf_node_pool = NULL;