From 69d0972fa8b82065a67566b74ecae8585d9c68c1 Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Tue, 27 Aug 2019 00:55:11 +0800
Subject: [PATCH] update linux-bsp build shell script, fix u-boot update crosstool bug

---
 linux-bsp/build.sh |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/linux-bsp/build.sh b/linux-bsp/build.sh
index ed31d90..9c7df3e 100755
--- a/linux-bsp/build.sh
+++ b/linux-bsp/build.sh
@@ -27,8 +27,6 @@
 
 target=
 
-set -e
-
 function show_help()
 {
 	printf "Usage: $1 [system/bootloader/kernel/rootfs/clean]\n\n"
@@ -89,8 +87,11 @@
         if [ -f ${PATCH_PATH}/${SRC_DIR}-${PATCH_SUFIX} ] ; then 
             show_banner "|            patch for ${SRC_DIR}             |"
 
-            # update cross compiler
-            sed -i -e "s|^+CROSSTOOL=.*|+CROSSTOOL=${CROSSTOOL}|g" ${PATCH_PATH}/${SRC_DIR}-${PATCH_SUFIX}
+            # Only u-boot not update cross compiler
+            echo ${SRC_DIR} | grep "u-boot" > /dev/null
+            if [ $? != 0 ] ; then
+                sed -i -e "s|^+CROSSTOOL=.*|+CROSSTOOL=${CROSSTOOL}|g" ${PATCH_PATH}/${SRC_DIR}-${PATCH_SUFIX}
+            fi
 
             patch -p1 < ${PATCH_PATH}/${SRC_DIR}-${PATCH_SUFIX}
         fi

--
Gitblit v1.9.1