From 0f5e0f412256b7402a6595e0ac9005a7905f0045 Mon Sep 17 00:00:00 2001 From: thead_admin Date: Tue, 22 Nov 2022 15:43:59 +0800 Subject: [PATCH] Linux_SDK_V1.0.2 --- Makefile | 9 +++++++-- addons/ko/insmod.sh | 5 +++++ addons/ko/rmmod.sh | 3 +++ linux/subsys_driver/hantro_vcmd.c | 6 +++--- 4 files changed, 18 insertions(+), 5 deletions(-) create mode 100755 addons/ko/insmod.sh create mode 100755 addons/ko/rmmod.sh diff --git a/Makefile b/Makefile index 9d4e1dc..3c580db 100644 --- a/Makefile +++ b/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) diff --git a/addons/ko/insmod.sh b/addons/ko/insmod.sh new file mode 100755 index 0000000..77c9364 --- /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/hantrodec.ko diff --git a/addons/ko/rmmod.sh b/addons/ko/rmmod.sh new file mode 100755 index 0000000..60e80e5 --- /dev/null +++ b/addons/ko/rmmod.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +rmmod hantrodec diff --git a/linux/subsys_driver/hantro_vcmd.c b/linux/subsys_driver/hantro_vcmd.c index 977357a..51578ed 100644 --- a/linux/subsys_driver/hantro_vcmd.c +++ b/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;