From 32ad5888c3b424b8e276f1dc7a32dc50061a62b0 Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Wed, 28 Feb 2024 20:11:25 +0800
Subject: [PATCH] Build:IGKBoard-All: Update build.sh

---
 images/build.sh                            |    5 ++++-
 yocto/build.sh                             |    3 ++-
 images/patches/config-igkboard-imx8mp.txt  |    0 
 images/patches/config-igkboard-imx6ull.txt |    0 
 4 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/images/build.sh b/images/build.sh
index f3f088b..42b5e46 100755
--- a/images/build.sh
+++ b/images/build.sh
@@ -23,7 +23,6 @@
 
 # shell script will exit once get command error
 set -e
-set -u
 
 #+-------------------------+
 #| Shell script functions  |
@@ -213,8 +212,12 @@
 
     pr_info "start install linux kernel images"
     mount -t vfat /dev/mapper/${LOOP_DEV}p1 ${MNT_POINT}
+    cp -rf $PRJ_PATH/patches/config-${BOARD}.txt ${MNT_POINT}/config.txt
     cp -rf $KERNEL_BINPATH/$KERNEL_IMAGE ${MNT_POINT}/
     cp -rf $KERNEL_BINPATH/${BOARD}.dtb ${MNT_POINT}/
+    if [ -d $KERNEL_BINPATH/overlays ] ; then
+        cp -rf $KERNEL_BINPATH/overlays ${MNT_POINT}/
+    fi
 
     sync && umount ${MNT_POINT}
 
diff --git a/yocto/meta-igkboard/recipes-bsp/u-boot/files/config-igkboard-imx6ull.txt b/images/patches/config-igkboard-imx6ull.txt
similarity index 100%
rename from yocto/meta-igkboard/recipes-bsp/u-boot/files/config-igkboard-imx6ull.txt
rename to images/patches/config-igkboard-imx6ull.txt
diff --git a/yocto/meta-igkboard/recipes-bsp/u-boot/files/config-igkboard-imx8mp.txt b/images/patches/config-igkboard-imx8mp.txt
similarity index 100%
rename from yocto/meta-igkboard/recipes-bsp/u-boot/files/config-igkboard-imx8mp.txt
rename to images/patches/config-igkboard-imx8mp.txt
diff --git a/yocto/build.sh b/yocto/build.sh
index d9443ce..f6b01b4 100755
--- a/yocto/build.sh
+++ b/yocto/build.sh
@@ -7,7 +7,7 @@
 PRJ_PATH=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)
 
 # top project absolute path
-TOP_PATH=$(realpath $PRJ_PATH/..)
+TOP_PATH=$PRJ_PATH/..
 
 # prefix install path
 PRFX_PATH=$PRJ_PATH/install
@@ -157,6 +157,7 @@
     BSP_VER=`echo $BSP_VER | sed 's/imx/lf/'`
     cp $TOP_PATH/bootloader/patches/${BOARD}/uboot-imx-${BSP_VER}.patch $PRJ_PATH/$YCT_META/recipes-bsp/u-boot/files/
     cp $TOP_PATH/kernel/patches/${BOARD}/linux-imx-${BSP_VER}.patch $PRJ_PATH/$YCT_META/recipes-kernel/linux/files/
+    cp $TOP_PATH/images/patches/config-*.txt $PRJ_PATH/$YCT_META/recipes-bsp/u-boot/files/
 
     if [ ! -e $YCT_PATH/sources/$YCT_META ] ; then
         ln -s $PRJ_PATH/$YCT_META $YCT_PATH/sources/$YCT_META

--
Gitblit v1.9.1