From b496e59dce657c8ba18f004e46bd52e2bf031c9e Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Fri, 31 May 2024 15:26:02 +0800
Subject: [PATCH] Build:IGKBoard-All: Update driver build shell script

---
 drivers/igkboard-imx8mp/build.sh |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/igkboard-imx8mp/build.sh b/drivers/igkboard-imx8mp/build.sh
index 4d67847..0ff7d71 100755
--- a/drivers/igkboard-imx8mp/build.sh
+++ b/drivers/igkboard-imx8mp/build.sh
@@ -95,7 +95,8 @@
     export DRV_PATH=$TOP_PATH/kernel/install
 
     export KER_VER=`echo $BSP_VER|awk -F"-" '{print $2}'`
-    export KER_MOD=`ls -d $DRV_PATH/lib/modules/${KER_VER}* | head -n 1`
+    export KER_MODPATH=`ls -d $DRV_PATH/lib/modules/${KER_VER}* | head -n 1`
+    export KER_MODNAME=`basename ${KER_MODPATH}`
 
     export JOBS=`cat /proc/cpuinfo | grep processor | wc -l`
 
@@ -155,14 +156,14 @@
 
     sed -i "s|^KVER.*|KVER ?= $KER_VER|g" Makefile
     sed -i "s|^KSRC.*|KSRC := ${KER_PATH}|g" Makefile
-    sed -i "s|^MODDESTDIR.*|MODDESTDIR := ${KER_MOD}/extra/|g" Makefile
+    sed -i "s|^MODDESTDIR.*|MODDESTDIR := ${KER_MODPATH}/extra/|g" Makefile
     sed -i "s|^FIRMWAREDIR.*|FIRMWAREDIR := ${DRV_PATH}/lib/firmware/|g" Makefile
 	sed -i '/depmod -a .*/d' Makefile
 
     pr_warn "start build $SRC USB WiFi driver"
     make -j ${JOBS}
 	make install
-    depmod -a -b ${DRV_PATH}/ ${KER_MOD}
+    depmod -a -b ${DRV_PATH}/ ${KER_MODNAME}
 }
 
 

--
Gitblit v1.9.1