From 86063e8b34368bab47956834efd6536259cd9baf Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Thu, 22 Feb 2024 12:49:59 +0800
Subject: [PATCH] Build:IGKBoard-All: Update build.sh

---
 images/build.sh     |    6 ++++--
 kernel/build.sh     |    8 ++++----
 yocto/build.sh      |    2 +-
 bootloader/build.sh |    2 +-
 4 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/bootloader/build.sh b/bootloader/build.sh
index 2c0736a..90be466 100755
--- a/bootloader/build.sh
+++ b/bootloader/build.sh
@@ -160,7 +160,7 @@
 
             # Download source code packet
             if [ ! -s $TARBALL_PATH/$src.tar.xz ] ; then
-                wget $BSP_URL/bsp/$BSP_VER/$src.tar.xz -P $TARBALL_PATH
+                wget $BSP_URL/imx/bsp/$BSP_VER/$src.tar.xz -P $TARBALL_PATH
             fi
 
             # decompress source code packet
diff --git a/images/build.sh b/images/build.sh
index e51ee5d..f3f088b 100755
--- a/images/build.sh
+++ b/images/build.sh
@@ -105,6 +105,7 @@
     export KERNEL_BINPATH=$TOP_PATH/kernel/install/
     export ROOTFS_YCTPATH=$TOP_PATH/yocto/install/
     export IMAGE_NAME=${DIS_TYPE}-${DIS_VER}-${BSP_VER}.img
+    export KERNEL_IMAGE=Image
 
     if [[ $BOARD =~ mx8ulp ]] || [[ $BOARD =~ mx8mq ]] || [[ $BOARD =~ mx8mm ]] ; then
         export UBOOT_OFFSET_SECTOR=66
@@ -112,6 +113,7 @@
         export UBOOT_OFFSET_SECTOR=64
     elif [[ $BOARD =~ mx6 ]] || [[ $BOARD =~ mx7 ]] ; then
         export UBOOT_OFFSET_SECTOR=2
+        export KERNEL_IMAGE=zImage
     fi
 }
 
@@ -158,7 +160,7 @@
 
         # Download source code packet
         if [ ! -s $TARBALL_PATH/$tarball ] ; then
-            wget $BSP_URL/${BOARD}/rootfs/$tarball -P $TARBALL_PATH
+            wget $BSP_URL/imx/${BOARD}/rootfs/$tarball -P $TARBALL_PATH
         fi
 
         # decompress source code packet
@@ -211,7 +213,7 @@
 
     pr_info "start install linux kernel images"
     mount -t vfat /dev/mapper/${LOOP_DEV}p1 ${MNT_POINT}
-    cp -rf $KERNEL_BINPATH/Image       ${MNT_POINT}/
+    cp -rf $KERNEL_BINPATH/$KERNEL_IMAGE ${MNT_POINT}/
     cp -rf $KERNEL_BINPATH/${BOARD}.dtb ${MNT_POINT}/
 
     sync && umount ${MNT_POINT}
diff --git a/kernel/build.sh b/kernel/build.sh
index dbf6078..7314a8b 100755
--- a/kernel/build.sh
+++ b/kernel/build.sh
@@ -122,7 +122,7 @@
 
             # Download source code packet
             if [ ! -s $TARBALL_PATH/$KER_SRC.tar.xz ] ; then
-                wget $BSP_URL/bsp/$BSP_VER/$KER_SRC.tar.xz -P $TARBALL_PATH
+                wget $BSP_URL/imx/bsp/$BSP_VER/$KER_SRC.tar.xz -P $TARBALL_PATH
             fi
 
             # decompress source code packet
@@ -130,15 +130,15 @@
         fi
     fi
 
-    pr_info "Start build linux kernel source code"
-
     cd $KER_PATH
 
     if [ ! -s arch/$ARCH/configs/$defconfig -a -s $patch_file ] ; then
-        pr_warn "do patch for $KER_PATH now..."
+        pr_warn "do patch for $KER_SRC now..."
         patch -p1 < $patch_file
     fi
 
+    pr_warn "start build $KER_SRC"
+
     if [ ! -s .config ] ; then
         make ${defconfig}
     fi
diff --git a/yocto/build.sh b/yocto/build.sh
index 5fe395a..d9443ce 100755
--- a/yocto/build.sh
+++ b/yocto/build.sh
@@ -136,7 +136,7 @@
 
             # Download source code packet
             if [ ! -s $TARBALL_PATH/$YCT_SRC.tar.xz ] ; then
-                wget $BSP_URL/bsp/$BSP_VER/$YCT_SRC.tar.xz -P $TARBALL_PATH
+                wget $BSP_URL/imx/bsp/$BSP_VER/$YCT_SRC.tar.xz -P $TARBALL_PATH
             fi
 
             # decompress source code packet

--
Gitblit v1.9.1