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-imx6ull/build.sh |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/igkboard-imx6ull/build.sh b/drivers/igkboard-imx6ull/build.sh
index 09c9fa0..964f5fe 100755
--- a/drivers/igkboard-imx6ull/build.sh
+++ b/drivers/igkboard-imx6ull/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`
 
@@ -167,8 +168,8 @@
     pr_warn "start build $SRC USB WiFi driver"
     make -j ${JOBS} modules
 
-    cp rtl8188fu.ko ${KER_MOD}/extra/
-    depmod -a -b ${DRV_PATH}/ ${KER_MOD}
+    cp rtl8188fu.ko ${KER_MODPATH}/extra/
+    depmod -a -b ${DRV_PATH}/ ${KER_MODNAME}
 
     mkdir -p ${DRV_PATH}/lib/firmware/rtlwifi/
     cp firmware/rtl8188fufw.bin ${DRV_PATH}/lib/firmware/rtlwifi/
@@ -207,14 +208,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