From c35ac6f2aad2ebe9d7cb5ca461822f0635af3798 Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Mon, 23 Sep 2019 00:28:38 +0800
Subject: [PATCH] update setup_env.sh shell script, add install libssl-dev for dtc

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

diff --git a/linux-bsp/build.sh b/linux-bsp/build.sh
index e505f78..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"
@@ -82,15 +80,18 @@
     SRC_DIR=$1
 
     if [ ! -d ${SRC_DIR} ] ; then
-	    show_banner "|       start decmpress $SRC_DIR packet       |"
+	    show_banner "|       start decompress $SRC_DIR packet     |"
         tar -xJf ${PACK_PATH}/${SRC_DIR}.tar.xz 
         cd ${SRC_DIR}
 
         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