From c901644942ddf153ef3e2dac6a38a9bd772e15dc Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Sun, 11 Aug 2019 16:53:22 +0800
Subject: [PATCH] update 3rdparity build shell script

---
 3rdparty/curl/build.sh            |    3 
 3rdparty/dnsmasq/build.sh         |    3 
 3rdparty/opencv/build.sh          |    4 
 3rdparty/libressl/build.sh        |    3 
 3rdparty/ntpdate/build.sh         |    3 
 3rdparty/iptables/build.sh        |    3 
 3rdparty/zbar/build.sh            |   16 +++-
 3rdparty/tree/build.sh            |    3 
 3rdparty/ethtool/build.sh         |    3 
 3rdparty/libevent/build.sh        |    3 
 3rdparty/imageMagick/build.sh     |    3 
 3rdparty/openssl/build.sh         |    2 
 3rdparty/vsftpd/build.sh          |    4 
 3rdparty/mosquitto/build.sh       |    3 
 3rdparty/file/build.sh            |    3 
 3rdparty/busybox/build.sh         |   69 +++++++++++++---
 3rdparty/sqlite/build.sh          |    3 
 3rdparty/libpng/build.sh          |    3 
 3rdparty/openssh/openssl/build.sh |    2 
 3rdparty/zlib/build.sh            |    3 
 3rdparty/fbgrab/build.sh          |    3 
 3rdparty/openssh/zlib/build.sh    |    2 
 3rdparty/qt/build_QT5.sh          |    4 
 3rdparty/openssh/build.sh         |    3 
 3rdparty/dhcpd/build.sh           |    3 
 3rdparty/iconv/build.sh           |    4 
 3rdparty/qt/tslib/build.sh        |    2 
 3rdparty/stunnel/build.sh         |    3 
 3rdparty/ffmpeg/build.sh          |    3 
 3rdparty/dropbear/build.sh        |    3 
 3rdparty/libconfig/build.sh       |    3 
 3rdparty/lrzsz/build.sh           |    3 
 3rdparty/appweb/build.sh          |   24 ++++-
 33 files changed, 142 insertions(+), 57 deletions(-)

diff --git a/3rdparty/appweb/build.sh b/3rdparty/appweb/build.sh
index 1e6844c..3a91d6b 100755
--- a/3rdparty/appweb/build.sh
+++ b/3rdparty/appweb/build.sh
@@ -10,11 +10,15 @@
 PRJ_PATH=`pwd`
 PREFIX_PATH=`pwd`/appweb
 
+TFTP_PATH=/tftp
+
 mkdir -p $PREFIX_PATH/{bin,modules}
 
 LYFTP_SRC=ftp://master.iot-yun.club/src/
 
-CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi-
+CROSSTOOL=/opt/buildroot/cortex-a5/bin/arm-linux-
+
+TARBALL=appweb_cortexa5.tar.bz2
 
 function msg_banner()
 {
@@ -64,6 +68,7 @@
     PACK_SUFIX=tar.bz2
 
     if [ -f ${PREFIX_PATH}/modules/libphp5.so  ] ; then
+        msg_banner "$SRC_NAME already compile and installed"
         return 0;
     fi
 
@@ -114,6 +119,7 @@
     PACK_SUFIX=-0-src.tgz
 
     if [ -f ${PREFIX_PATH}/bin/appweb ] ; then
+        msg_banner "$SRC_NAME already compiled"
         return 0;
     fi
 
@@ -147,9 +153,14 @@
 
 function install_appweb()
 {
-    msg_banner "Start install webserver appweb "
-
     cd ${PRJ_PATH}
+
+    if [ -f ${TARBALL} ] ; then
+        msg_banner "$SRC_NAME already installed"
+        return 0;
+    fi
+
+    msg_banner "Start install webserver appweb "
 
     # install web page
     rm -rf $PREFIX_PATH/web
@@ -172,8 +183,11 @@
     chmod 755 run.sh 
     mv run.sh $PREFIX_PATH/
 
-    tar -czf appweb_cortexa8.tar.gz `basename $PREFIX_PATH`
-    ls -l appweb_cortexa8.tar.gz 
+    tar -cjf ${TARBALL} `basename $PREFIX_PATH`
+
+    if [ -d $TFTP_PATH -a -w $TFTP_PATH ] ; then
+        cp ${TARBALL} $TFTP_PATH
+    fi
 }
 
 
diff --git a/3rdparty/busybox/build.sh b/3rdparty/busybox/build.sh
index 8a02c7f..c2b8045 100755
--- a/3rdparty/busybox/build.sh
+++ b/3rdparty/busybox/build.sh
@@ -6,29 +6,70 @@
 
 LYFTP_SRC=ftp://master.iot-yun.club/src/
 
-CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi-
+CROSSTOOL=/opt/buildroot/cortex-a5/bin/arm-linux-
 
-SRC_NAME=busybox-1.31.0
-PACK_SUFIX=tar.bz2
+
 
 JOBS=`cat /proc/cpuinfo  |  grep processor | wc -l`
 
-if [ ! -d $SRC_NAME ] ; then
-    if [ ! -f $SRC_NAME.${PACK_SUFIX} ] ; then
-        wget ${LYFTP_SRC}/${SRC_NAME}.${PACK_SUFIX}
+function msg_banner()
+{
+    echo ""
+    echo "+-----------------------------------------------------------------------"
+    echo "|  $1 "
+    echo "+-----------------------------------------------------------------------"
+    echo ""
+}
+
+function check_result()
+{
+    if [ $? != 0 ] ; then
+       echo ""
+       echo "+-----------------------------------------------------------------------"
+       echo "|  $1 "
+       echo "+-----------------------------------------------------------------------"
+       echo ""
+       exit ;
+    fi
+}
+
+
+function compile_busybox()
+{
+    SRC_NAME=busybox-1.31.0
+    PACK_SUFIX=tar.bz2
+
+    if [ -f $SRC_NAME/busybox ] ; then 
+        msg_banner "$SRC_NAME already compile and installed" 
+        return 0; 
+    fi 
+
+    msg_banner "start download and compile $SRC_NAME " 
+
+    if [ ! -d $SRC_NAME ] ; then
+        if [ ! -f $SRC_NAME.${PACK_SUFIX} ] ; then
+           wget ${LYFTP_SRC}/${SRC_NAME}.${PACK_SUFIX}
+           check_result "ERROR: download ${SRC_NAME} failure"
+        fi
+
+        tar -xjf $SRC_NAME.${PACK_SUFIX}
     fi
 
-    tar -xjf $SRC_NAME.${PACK_SUFIX}
-fi
+    cp config/${SRC_NAME}.config $SRC_NAME/.config
 
-cp config/${SRC_NAME}.config $SRC_NAME/.config
+    cd $SRC_NAME
 
-cd $SRC_NAME
+    sed -i "s|^CONFIG_CROSS_COMPILER_PREFIX.*|CONFIG_CROSS_COMPILER_PREFIX=\"${CROSSTOOL}\"|g" .config 
+    sed -i "s|^CONFIG_PREFIX.*|CONFIG_PREFIX=\"$ROOTFS_PATH\"|g" .config
 
-sed -i "s|^CONFIG_CROSS_COMPILER_PREFIX.*|CONFIG_CROSS_COMPILER_PREFIX=\"${CROSSTOOL}\"|g" .config
-sed -i "s|^CONFIG_PREFIX.*|CONFIG_PREFIX=\"$ROOTFS_PATH\"|g" .config
+    make 
+    #make uninstall && sudo make install
+}
 
-make 
-#make uninstall && sudo make install
+
+compile_busybox
+
+
+
 
 
diff --git a/3rdparty/curl/build.sh b/3rdparty/curl/build.sh
index 9262c36..d1a3e9b 100755
--- a/3rdparty/curl/build.sh
+++ b/3rdparty/curl/build.sh
@@ -11,7 +11,7 @@
 
 LYFTP_SRC=ftp://master.iot-yun.club/src/
 
-CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi-
+CROSSTOOL=/opt/buildroot/cortex-a5/bin/arm-linux-
 
 function msg_banner()
 {
@@ -61,6 +61,7 @@
     PACK_SUFIX=tar.bz2
 
     if [ -f ${PREFIX_PATH}/bin/curl ] ; then
+        msg_banner "$SRC_NAME already compile and installed"
         return 0;
     fi
 
diff --git a/3rdparty/dhcpd/build.sh b/3rdparty/dhcpd/build.sh
index 0af81a5..8c3b75b 100755
--- a/3rdparty/dhcpd/build.sh
+++ b/3rdparty/dhcpd/build.sh
@@ -11,7 +11,7 @@
 
 LYFTP_SRC=ftp://master.iot-yun.club/src/
 
-CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi-
+CROSSTOOL=/opt/buildroot/cortex-a5/bin/arm-linux-
 
 function msg_banner()
 {
@@ -61,6 +61,7 @@
     PACK_SUFIX=tar.gz
 
     if [ -f ${PREFIX_PATH}/${IMG_NAME} ] ; then
+        msg_banner "$SRC_NAME already compile and installed"
         return 0;
     fi
 
diff --git a/3rdparty/dnsmasq/build.sh b/3rdparty/dnsmasq/build.sh
index afb4ed1..373c68b 100755
--- a/3rdparty/dnsmasq/build.sh
+++ b/3rdparty/dnsmasq/build.sh
@@ -11,7 +11,7 @@
 
 LYFTP_SRC=ftp://master.iot-yun.club/src/
 
-CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi-
+CROSSTOOL=/opt/buildroot/cortex-a5/bin/arm-linux-
 
 function msg_banner()
 {
@@ -60,6 +60,7 @@
     PACK_SUFIX=tar.gz
 
     if [ -f ${PREFIX_PATH}/dnsmasq ] ; then
+        msg_banner "$SRC_NAME already compile and installed"
         return 0;
     fi
 
diff --git a/3rdparty/dropbear/build.sh b/3rdparty/dropbear/build.sh
index 4707aaa..8dc108c 100755
--- a/3rdparty/dropbear/build.sh
+++ b/3rdparty/dropbear/build.sh
@@ -11,7 +11,7 @@
 
 LYFTP_SRC=ftp://master.iot-yun.club/src/
 
-CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi-
+CROSSTOOL=/opt/buildroot/cortex-a5/bin/arm-linux-
 
 function msg_banner()
 {
@@ -71,6 +71,7 @@
     PACK_SUFIX=tar.bz2
 
     if [ -f ${PREFIX_PATH}/bin/dropbear ] ; then
+        msg_banner "$SRC_NAME already compile and installed"
         return 0;
     fi
 
diff --git a/3rdparty/ethtool/build.sh b/3rdparty/ethtool/build.sh
index ad7b3d5..efb15e4 100755
--- a/3rdparty/ethtool/build.sh
+++ b/3rdparty/ethtool/build.sh
@@ -11,7 +11,7 @@
 
 LYFTP_SRC=ftp://master.iot-yun.club/src/
 
-CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi-
+CROSSTOOL=/opt/buildroot/cortex-a5/bin/arm-linux-
 
 function msg_banner()
 {
@@ -60,6 +60,7 @@
     PACK_SUFIX=tar.gz
 
     if [ -f ${PREFIX_PATH}/ethtool ] ; then
+        msg_banner "$SRC_NAME already compile and installed"
         return 0;
     fi
 
diff --git a/3rdparty/fbgrab/build.sh b/3rdparty/fbgrab/build.sh
index bcb37bc..05894e1 100755
--- a/3rdparty/fbgrab/build.sh
+++ b/3rdparty/fbgrab/build.sh
@@ -12,7 +12,7 @@
 
 LYFTP_SRC=ftp://master.iot-yun.club/src/
 
-CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi-
+CROSSTOOL=/opt/buildroot/cortex-a5/bin/arm-linux-
 
 function msg_banner()
 {
@@ -62,6 +62,7 @@
     PACK_SUFIX=tar.gz
 
     if [ -f ${PREFIX_PATH}/bin/${IMG_NAME} ] ; then
+        msg_banner "$SRC_NAME already compile and installed"
         return 0;
     fi
 
diff --git a/3rdparty/ffmpeg/build.sh b/3rdparty/ffmpeg/build.sh
index a7de813..f089e49 100755
--- a/3rdparty/ffmpeg/build.sh
+++ b/3rdparty/ffmpeg/build.sh
@@ -11,7 +11,7 @@
 
 LYFTP_SRC=ftp://master.iot-yun.club/src/
 
-CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi-
+CROSSTOOL=/opt/buildroot/cortex-a5/bin/arm-linux-
 
 function msg_banner()
 {
@@ -61,6 +61,7 @@
     IMG_NAME=ffmpeg
 
     if [ -f ${PREFIX_PATH}/${IMG_NAME} ] ; then
+        msg_banner "$SRC_NAME already compile and installed"
         return 0;
     fi
 
diff --git a/3rdparty/file/build.sh b/3rdparty/file/build.sh
index 27566d5..9e5d810 100755
--- a/3rdparty/file/build.sh
+++ b/3rdparty/file/build.sh
@@ -11,7 +11,7 @@
 
 LYFTP_SRC=ftp://master.iot-yun.club/src/
 
-CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi-
+CROSSTOOL=/opt/buildroot/cortex-a5/bin/arm-linux-
 
 function msg_banner()
 {
@@ -61,6 +61,7 @@
     PACK_SUFIX=tar.gz
 
     if [ -f ${PREFIX_PATH}/file ] ; then
+        msg_banner "$SRC_NAME already compile and installed"
         return 0;
     fi
 
diff --git a/3rdparty/iconv/build.sh b/3rdparty/iconv/build.sh
index 99fc8e4..fd79cc7 100755
--- a/3rdparty/iconv/build.sh
+++ b/3rdparty/iconv/build.sh
@@ -10,7 +10,7 @@
 PROJ_PATH=`pwd`/../
 INST_PATH=${PROJ_PATH}/install
 
-CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi-
+CROSSTOOL=/opt/buildroot/cortex-a5/bin/arm-linux-
 
 LYFTP_SRC=ftp://master.iot-yun.club/src/
 
@@ -62,7 +62,7 @@
     PACK_SUFIX=tar.gz
 
     if [ -f ${INST_PATH}/lib/libiconv.so ] ; then
-        msg_banner "Already cross compile $SRC_NAME "
+        msg_banner "$SRC_NAME already compile and installed"
         return 0;
     fi
 
diff --git a/3rdparty/imageMagick/build.sh b/3rdparty/imageMagick/build.sh
index d373af6..ecb7121 100755
--- a/3rdparty/imageMagick/build.sh
+++ b/3rdparty/imageMagick/build.sh
@@ -11,7 +11,7 @@
 
 LYFTP_SRC=ftp://master.iot-yun.club/src/
 
-CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi-
+CROSSTOOL=/opt/buildroot/cortex-a5/bin/arm-linux-
 
 function msg_banner()
 {
@@ -61,6 +61,7 @@
     PACK_SUFIX=tar.gz
 
     if [ -f $PREFIX_PATH/lib/libMagickCore-6.Q16.a ] ; then
+        msg_banner "$SRC_NAME already compile and installed"
         return 0;
     fi
 
diff --git a/3rdparty/iptables/build.sh b/3rdparty/iptables/build.sh
index 9dd5c37..75493fd 100755
--- a/3rdparty/iptables/build.sh
+++ b/3rdparty/iptables/build.sh
@@ -11,7 +11,7 @@
 
 LYFTP_SRC=ftp://master.iot-yun.club/src/
 
-CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi-
+CROSSTOOL=/opt/buildroot/cortex-a5/bin/arm-linux-
 
 function msg_banner()
 {
@@ -61,6 +61,7 @@
     IMG_NAME=iptables
 
     if [ -f ${PREFIX_PATH}/${IMG_NAME} ] ; then
+        msg_banner "$SRC_NAME already compile and installed"
         return 0;
     fi
 
diff --git a/3rdparty/libconfig/build.sh b/3rdparty/libconfig/build.sh
index 9ab42b5..2d2d636 100755
--- a/3rdparty/libconfig/build.sh
+++ b/3rdparty/libconfig/build.sh
@@ -11,7 +11,7 @@
 
 LYFTP_SRC=ftp://master.iot-yun.club/src/
 
-CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi-
+CROSSTOOL=/opt/buildroot/cortex-a5/bin/arm-linux-
 
 function msg_banner()
 {
@@ -61,6 +61,7 @@
     PACK_SUFIX=tar.gz
 
     if [ -f ${PREFIX_PATH}/lib/libconfig.so ] ; then
+        msg_banner "$SRC_NAME already compile and installed"
         return 0;
     fi
 
diff --git a/3rdparty/libevent/build.sh b/3rdparty/libevent/build.sh
index 252ec3f..53f2070 100755
--- a/3rdparty/libevent/build.sh
+++ b/3rdparty/libevent/build.sh
@@ -11,7 +11,7 @@
 
 LYFTP_SRC=ftp://master.iot-yun.club/src/
 
-CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi-
+CROSSTOOL=/opt/buildroot/cortex-a5/bin/arm-linux-
 
 function msg_banner()
 {
@@ -61,6 +61,7 @@
     PACK_SUFIX=tar.gz
 
     if [ -f ${PREFIX_PATH}/lib/libevent.so ] ; then
+        msg_banner "$SRC_NAME already compile and installed"
         return 0;
     fi
 
diff --git a/3rdparty/libpng/build.sh b/3rdparty/libpng/build.sh
index 2eb9e68..fb47bd8 100755
--- a/3rdparty/libpng/build.sh
+++ b/3rdparty/libpng/build.sh
@@ -12,7 +12,7 @@
 
 LYFTP_SRC=ftp://master.iot-yun.club/src/
 
-CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi-
+CROSSTOOL=/opt/buildroot/cortex-a5/bin/arm-linux-
 
 function msg_banner()
 {
@@ -62,6 +62,7 @@
     PACK_SUFIX=tar.gz
 
     if [ -f ${PREFIX_PATH}/lib/libpng.a ] ; then
+        msg_banner "$SRC_NAME already compile and installed"
         return 0;
     fi
 
diff --git a/3rdparty/libressl/build.sh b/3rdparty/libressl/build.sh
index aac5b5c..68b8388 100755
--- a/3rdparty/libressl/build.sh
+++ b/3rdparty/libressl/build.sh
@@ -11,7 +11,7 @@
 
 LYFTP_SRC=ftp://master.iot-yun.club/src/
 
-CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi-
+CROSSTOOL=/opt/buildroot/cortex-a5/bin/arm-linux-
 
 function msg_banner()
 {
@@ -60,6 +60,7 @@
     PACK_SUFIX=tar.gz 
 
     if [ -f ${PREFIX_PATH}/lib/libcrypto.a ] ; then 
+        msg_banner "$SRC_NAME already compile and installed"
         return 0;
     fi  
     
diff --git a/3rdparty/lrzsz/build.sh b/3rdparty/lrzsz/build.sh
index 9e7bf9d..2f65223 100755
--- a/3rdparty/lrzsz/build.sh
+++ b/3rdparty/lrzsz/build.sh
@@ -12,7 +12,7 @@
 
 LYFTP_SRC=ftp://master.iot-yun.club/src/
 
-CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi-
+CROSSTOOL=/opt/buildroot/cortex-a5/bin/arm-linux-
 
 function msg_banner()
 {
@@ -62,6 +62,7 @@
     IMG_NAME=sz
 
     if [ -f ${PRJ_PATH}/${IMG_NAME} ] ; then
+        msg_banner "$SRC_NAME already compile and installed"
         return 0;
     fi
 
diff --git a/3rdparty/mosquitto/build.sh b/3rdparty/mosquitto/build.sh
index ebaa65d..b4b1609 100755
--- a/3rdparty/mosquitto/build.sh
+++ b/3rdparty/mosquitto/build.sh
@@ -11,7 +11,7 @@
 
 LYFTP_SRC=ftp://master.iot-yun.club/src/
 
-CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- 
+CROSSTOOL=/opt/buildroot/cortex-a5/bin/arm-linux-
 
 function msg_banner()
 {
@@ -62,6 +62,7 @@
     PACK_SUFIX=tar.gz
 
     if [ -f ${PREFIX_PATH}/bin/mosquitto ] ; then
+        msg_banner "$SRC_NAME already compile and installed"
         return 0;
     fi
 
diff --git a/3rdparty/ntpdate/build.sh b/3rdparty/ntpdate/build.sh
index 9b1dc2a..72aa9b6 100755
--- a/3rdparty/ntpdate/build.sh
+++ b/3rdparty/ntpdate/build.sh
@@ -11,7 +11,7 @@
 
 LYFTP_SRC=ftp://master.iot-yun.club/src/
 
-CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi-
+CROSSTOOL=/opt/buildroot/cortex-a5/bin/arm-linux-
 
 function msg_banner()
 {
@@ -61,6 +61,7 @@
     PACK_SUFIX=tar.gz
 
     if [ -f ${PREFIX_PATH}/bin/ntpdate ] ; then
+        msg_banner "$SRC_NAME already compile and installed"
         return 0;
     fi
 
diff --git a/3rdparty/opencv/build.sh b/3rdparty/opencv/build.sh
index 7b28789..cb8b529 100755
--- a/3rdparty/opencv/build.sh
+++ b/3rdparty/opencv/build.sh
@@ -6,7 +6,7 @@
 
 LYFTP_SRC=ftp://master.iot-yun.club/src/
 
-CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi-
+CROSSTOOL=/opt/buildroot/cortex-a5/bin/arm-linux-
 
 TOOLCHAIN=cortexa7.toolchain.cmake
 
@@ -41,7 +41,7 @@
 
     if [ -f ${PREFIX_PATH}/lib/libopencv_core.so ] ; then
         msg_banner "$SRC_NAME already compile and installed"
-#        return 0;
+        return 0;
     fi
 
     msg_banner "Start cross compile $SRC_NAME "
diff --git a/3rdparty/openssh/build.sh b/3rdparty/openssh/build.sh
index 43a546a..5afe706 100755
--- a/3rdparty/openssh/build.sh
+++ b/3rdparty/openssh/build.sh
@@ -13,7 +13,7 @@
 
 LYFTP_SRC=ftp://master.iot-yun.club/src/
 
-CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi-
+CROSSTOOL=/opt/buildroot/cortex-a5/bin/arm-linux-
 
 function msg_banner()
 {
@@ -72,6 +72,7 @@
     PACK_SUFIX=tar.gz
 
     if [ -f ${PREFIX_PATH}/sbin/sshd ] ; then
+        msg_banner "$SRC_NAME already compile and installed"
         return 0;
     fi
 
diff --git a/3rdparty/openssh/openssl/build.sh b/3rdparty/openssh/openssl/build.sh
index 17fe1d0..4f6d8dc 100755
--- a/3rdparty/openssh/openssl/build.sh
+++ b/3rdparty/openssh/openssl/build.sh
@@ -11,7 +11,7 @@
 
 LYFTP_SRC=ftp://master.iot-yun.club/src/
 
-CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi-
+CROSSTOOL=/opt/buildroot/cortex-a5/bin/arm-linux-
 
 function msg_banner()
 {
diff --git a/3rdparty/openssh/zlib/build.sh b/3rdparty/openssh/zlib/build.sh
index 3db8762..d679bf6 100755
--- a/3rdparty/openssh/zlib/build.sh
+++ b/3rdparty/openssh/zlib/build.sh
@@ -11,7 +11,7 @@
 
 LYFTP_SRC=ftp://master.iot-yun.club/src/
 
-CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi-
+CROSSTOOL=/opt/buildroot/cortex-a5/bin/arm-linux-
 
 function msg_banner()
 {
diff --git a/3rdparty/openssl/build.sh b/3rdparty/openssl/build.sh
index b9a551b..3028abb 100755
--- a/3rdparty/openssl/build.sh
+++ b/3rdparty/openssl/build.sh
@@ -11,7 +11,7 @@
 
 LYFTP_SRC=ftp://master.iot-yun.club/src/
 
-CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi-
+CROSSTOOL=/opt/buildroot/cortex-a5/bin/arm-linux-
 
 function msg_banner()
 {
diff --git a/3rdparty/qt/build_QT5.sh b/3rdparty/qt/build_QT5.sh
index 05cb528..36c8ac9 100755
--- a/3rdparty/qt/build_QT5.sh
+++ b/3rdparty/qt/build_QT5.sh
@@ -20,7 +20,7 @@
 
 LYFTP_SRC=ftp://master.iot-yun.club/src/
 
-CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi-
+CROSSTOOL=/opt/buildroot/cortex-a5/bin/arm-linux-
 
 
 function msg_banner()
@@ -53,7 +53,7 @@
 
     #rm -rf ${QT_INST_PATH}/lib/libQt5Gui.so
     if [ -f ${QT_INST_PATH}/lib/libQt5Gui.so ] ; then
-        msg_banner "Already cross compile $SRC_NAME "
+        msg_banner "$SRC_NAME already compile and installed"
         return 0;
     fi
 
diff --git a/3rdparty/qt/tslib/build.sh b/3rdparty/qt/tslib/build.sh
index 4e8fd58..526c9f0 100755
--- a/3rdparty/qt/tslib/build.sh
+++ b/3rdparty/qt/tslib/build.sh
@@ -10,7 +10,7 @@
 PROJ_PATH=`pwd`/..
 INST_PATH=${PROJ_PATH}/../install
 
-CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi-
+CROSSTOOL=/opt/buildroot/cortex-a5/bin/arm-linux-
 LYFTP_SRC=ftp://master.iot-yun.club/src/
 
 function msg_banner()
diff --git a/3rdparty/sqlite/build.sh b/3rdparty/sqlite/build.sh
index 77454ba..c315926 100755
--- a/3rdparty/sqlite/build.sh
+++ b/3rdparty/sqlite/build.sh
@@ -11,7 +11,7 @@
 
 LYFTP_SRC=ftp://master.iot-yun.club/src/
 
-CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi-
+CROSSTOOL=/opt/buildroot/cortex-a5/bin/arm-linux-
 
 function msg_banner()
 {
@@ -61,6 +61,7 @@
     PACK_SUFIX=tar.gz
 
     if [ -f ${PREFIX_PATH}/bin/sqlite3 ] ; then
+        msg_banner "$SRC_NAME already compile and installed"
         return 0;
     fi
 
diff --git a/3rdparty/stunnel/build.sh b/3rdparty/stunnel/build.sh
index 05877df..12624ae 100755
--- a/3rdparty/stunnel/build.sh
+++ b/3rdparty/stunnel/build.sh
@@ -11,7 +11,7 @@
 
 LYFTP_SRC=ftp://master.iot-yun.club/src/
 
-CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi-
+CROSSTOOL=/opt/buildroot/cortex-a5/bin/arm-linux-
 
 function msg_banner()
 {
@@ -62,6 +62,7 @@
     PACK_SUFIX=tar.gz
 
     if [ -f ${PREFIX_PATH}/bin/stunnel ] ; then
+        msg_banner "$SRC_NAME already compile and installed"
         return 0;
     fi
 
diff --git a/3rdparty/tree/build.sh b/3rdparty/tree/build.sh
index e16a50d..e849053 100755
--- a/3rdparty/tree/build.sh
+++ b/3rdparty/tree/build.sh
@@ -11,7 +11,7 @@
 
 LYFTP_SRC=ftp://master.iot-yun.club/src/
 
-CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi-
+CROSSTOOL=/opt/buildroot/cortex-a5/bin/arm-linux-
 
 function msg_banner()
 {
@@ -60,6 +60,7 @@
     PACK_SUFIX=tgz
 
     if [ -f ${PREFIX_PATH}/tree ] ; then
+        msg_banner "$SRC_NAME already compile and installed"
         return 0;
     fi
 
diff --git a/3rdparty/vsftpd/build.sh b/3rdparty/vsftpd/build.sh
index 3d3d998..a9ae1fc 100755
--- a/3rdparty/vsftpd/build.sh
+++ b/3rdparty/vsftpd/build.sh
@@ -11,7 +11,7 @@
 
 LYFTP_SRC=ftp://master.iot-yun.club/src/
 
-CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi-
+CROSSTOOL=/opt/buildroot/cortex-a5/bin/arm-linux-
 
 function msg_banner()
 {
@@ -62,7 +62,7 @@
     PACK_SUFIX=tar.gz
 
     if [ -f ${PREFIX_PATH}/bin/vsftpd ] ; then
-        echo "$SRC_NAME already compile and installed"
+        msg_banner "$SRC_NAME already compile and installed"
         return 0;
     fi
 
diff --git a/3rdparty/zbar/build.sh b/3rdparty/zbar/build.sh
index f16d794..4f7a62f 100755
--- a/3rdparty/zbar/build.sh
+++ b/3rdparty/zbar/build.sh
@@ -11,7 +11,7 @@
 
 LYFTP_SRC=ftp://master.iot-yun.club/src/
 
-CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi-
+CROSSTOOL=/opt/buildroot/cortex-a5/bin/arm-linux-
 
 function msg_banner()
 {
@@ -62,7 +62,7 @@
     PACK_SUFIX=tar.bz2
 
     if [ -f ${PREFIX_PATH}/bin/zbarcam ] ; then
-        echo "$SRC_NAME already compile and installed"
+        msg_banner "$SRC_NAME already compile and installed"
         return 0;
     fi
 
@@ -83,12 +83,17 @@
 
     autoreconf --install
 
+    sed -i -e "s|-Wno-parentheses -Werror|-Wno-parentheses|g" configure
+
     CFLAGS="-DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16" \
     ./configure --host=arm-linux --enable-static --enable-shared --prefix=$PREFIX_PATH \
     --without-gtk --without-python --without-qt --without-x --without-java  \
     --with-imagemagick=${PREFIX_PATH}/ --without-graphicsmagick \
     MAGICK_CFLAGS=-I${PREFIX_PATH}//include/ImageMagick-6 \
-    MAGICK_LIBS="-L${PREFIX_PATH}/lib -lMagickWand-6.Q16 -lMagickCore-6.Q16 -lm -lz -L`pwd`/zbar/.libs/ -lzbar "
+    MAGICK_LIBS="-L${PREFIX_PATH}/lib -lMagickWand-6.Q16 -lMagickCore-6.Q16 -lm -lz -L`pwd`/zbar/.libs/ -lzbar" 
+    #LIBS="-liconv"
+
+    sed -i -e "s|^LIBS = -lpthread.*|LIBS = -lpthread -liconv|g" Makefile
 
      mkdir -p ./doc/man/ 
      touch ./doc/man/zbarimg.1 
@@ -98,10 +103,13 @@
     cd -
 }
 
-cd ../zlib 
+cd ../iconv
     ./build.sh 
 cd -
 
+cd ../zlib 
+    ./build.sh 
+cd -
 
 cd ../imageMagick
     ./build.sh 
diff --git a/3rdparty/zlib/build.sh b/3rdparty/zlib/build.sh
index 3db8762..bc06b5b 100755
--- a/3rdparty/zlib/build.sh
+++ b/3rdparty/zlib/build.sh
@@ -11,7 +11,7 @@
 
 LYFTP_SRC=ftp://master.iot-yun.club/src/
 
-CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi-
+CROSSTOOL=/opt/buildroot/cortex-a5/bin/arm-linux-
 
 function msg_banner()
 {
@@ -61,6 +61,7 @@
     PACK_SUFIX=tar.gz
 
     if [ -f ${PREFIX_PATH}/lib/libz.a ] ; then
+        msg_banner "$SRC_NAME already compile and installed"
         return 0;
     fi
 

--
Gitblit v1.9.1