3rdparty/appweb/build.sh
@@ -12,9 +12,9 @@ mkdir -p $PREFIX_PATH/{bin,modules} if [ -z $CROSSTOOL ] ; then CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- fi LYFTP_SRC=ftp://master.iot-yun.club/src/ CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- function msg_banner() { @@ -70,7 +70,8 @@ msg_banner "Start cross compile $SRC_NAME " if [ ! -f ${SRC_NAME}.${PACK_SUFIX} ] ; then wget http://museum.php.net/php5/${SRC_NAME}.${PACK_SUFIX} #wget http://museum.php.net/php5/${SRC_NAME}.${PACK_SUFIX} wget $LYFTP_SRC/$SRC_NAME.$PACK_SUFIX check_result "ERROR: download ${SRC_NAME} failure" fi @@ -119,7 +120,8 @@ msg_banner "Start cross compile $SRC_NAME " if [ ! -f ${SRC_NAME}${PACK_SUFIX} ] ; then wget https://embedthis.com/software/${SRC_NAME}${PACK_SUFIX} #wget https://embedthis.com/software/${SRC_NAME}${PACK_SUFIX} wget $LYFTP_SRC/${SRC_NAME}${PACK_SUFIX} check_result "ERROR: download ${SRC_NAME} failure" fi 3rdparty/busybox/build.sh
@@ -2,31 +2,33 @@ set -e CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- ROOTFS_PATH=`pwd`/../../linux-bsp/rootfs/ APP_SRC=busybox-1.31.0 PACK_SUFFIX=tar.bz2 LYFTP_SRC=ftp://master.iot-yun.club/src/ CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- SRC_NAME=busybox-1.31.0 PACK_SUFIX=tar.bz2 JOBS=`cat /proc/cpuinfo | grep processor | wc -l` if [ ! -d $APP_SRC ] ; then if [ ! -f $APP_SRC.${PACK_SUFFIX} ] ; then wget ftp://master.iot-yun.club/src/$APP_SRC.${PACK_SUFFIX} if [ ! -d $SRC_NAME ] ; then if [ ! -f $SRC_NAME.${PACK_SUFIX} ] ; then wget ${LYFTP_SRC}/${SRC_NAME}.${PACK_SUFIX} fi tar -xjf $APP_SRC.${PACK_SUFFIX} tar -xjf $SRC_NAME.${PACK_SUFIX} fi cp config/${SRC_NAME}.config $SRC_NAME/.config cp config/${APP_SRC}.config $APP_SRC/.config cd $APP_SRC 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 make && make uninstall && sudo make install make #make uninstall && sudo make install 3rdparty/curl/build.sh
@@ -11,9 +11,7 @@ LYFTP_SRC=ftp://master.iot-yun.club/src/ if [ -z $CROSSTOOL ] ; then CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- fi CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- function msg_banner() { @@ -60,7 +58,7 @@ function compile_curl() { SRC_NAME=curl-7.65.3 PACK_SUFIX=tar.gz PACK_SUFIX=tar.bz2 if [ -f ${PREFIX_PATH}/bin/curl ] ; then return 0; @@ -73,7 +71,7 @@ check_result "ERROR: download ${SRC_NAME} failure" fi tar -xzf ${SRC_NAME}.${PACK_SUFIX} tar -xjf ${SRC_NAME}.${PACK_SUFIX} cd ${SRC_NAME} msg_banner "Start cross compile $SRC_NAME " 3rdparty/dhcpd/build.sh
@@ -9,9 +9,9 @@ PREFIX_PATH=`pwd`/../install/bin if [ -z $CROSSTOOL ] ; then CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- fi LYFTP_SRC=ftp://master.iot-yun.club/src/ CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- function msg_banner() { @@ -67,7 +67,8 @@ msg_banner "Start cross compile $SRC_NAME " if [ ! -f ${SRC_NAME}.${PACK_SUFIX} ] ; then wget ftp://ftp.isc.org/isc/dhcp/${SRC_NAME}.${PACK_SUFIX} #wget ftp://ftp.isc.org/isc/dhcp/${SRC_NAME}.${PACK_SUFIX} wget $LYFTP_SRC/$SRC_NAME.$PACK_SUFIX check_result "ERROR: download ${SRC_NAME} failure" fi 3rdparty/dnsmasq/build.sh
@@ -9,9 +9,9 @@ PREFIX_PATH=`pwd`/../install/bin if [ -z $CROSSTOOL ] ; then CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- fi LYFTP_SRC=ftp://master.iot-yun.club/src/ CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- function msg_banner() { @@ -65,7 +65,8 @@ msg_banner "Start donwload $SRC_NAME " if [ ! -f ${SRC_NAME}.${PACK_SUFIX} ] ; then wget http://www.thekelleys.org.uk/dnsmasq/${SRC_NAME}.${PACK_SUFIX} #wget http://www.thekelleys.org.uk/dnsmasq/${SRC_NAME}.${PACK_SUFIX} wget $LYFTP_SRC/$SRC_NAME.$PACK_SUFIX check_result "ERROR: download ${SRC_NAME} failure" fi 3rdparty/dropbear/build.sh
@@ -9,9 +9,9 @@ PREFIX_PATH=`pwd`/../install/ if [ -z $CROSSTOOL ] ; then CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- fi LYFTP_SRC=ftp://master.iot-yun.club/src/ CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- function msg_banner() { @@ -76,7 +76,8 @@ msg_banner "Start donwload $SRC_NAME " if [ ! -f ${SRC_NAME}.${PACK_SUFIX} ] ; then wget http://matt.ucc.asn.au/dropbear/releases/${SRC_NAME}.${PACK_SUFIX} #wget http://matt.ucc.asn.au/dropbear/releases/${SRC_NAME}.${PACK_SUFIX} wget $LYFTP_SRC/$SRC_NAME.$PACK_SUFIX check_result "ERROR: download ${SRC_NAME} failure" fi 3rdparty/ethtool/build.sh
@@ -11,9 +11,7 @@ LYFTP_SRC=ftp://master.iot-yun.club/src/ if [ -z $CROSSTOOL ] ; then CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- fi CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- function msg_banner() { 3rdparty/fbgrab/build.sh
@@ -12,9 +12,7 @@ LYFTP_SRC=ftp://master.iot-yun.club/src/ if [ -z $CROSSTOOL ] ; then CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- fi CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- function msg_banner() { 3rdparty/ffmpeg/build.sh
@@ -11,9 +11,7 @@ LYFTP_SRC=ftp://master.iot-yun.club/src/ if [ -z $CROSSTOOL ] ; then CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- fi CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- function msg_banner() { @@ -85,9 +83,9 @@ check_result "ERROR: compile ${SRC_NAME} failure" ${STRIP} ${IMG_NAME} ${STRIP} ffserver cp ${IMG_NAME} ${PREFIX_PATH} cp ffserver ${PREFIX_PATH} #${STRIP} ffserver #cp ${IMG_NAME} ${PREFIX_PATH} #cp ffserver ${PREFIX_PATH} cd - } 3rdparty/file/build.sh
@@ -11,9 +11,7 @@ LYFTP_SRC=ftp://master.iot-yun.club/src/ if [ -z $CROSSTOOL ] ; then CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- fi CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- function msg_banner() { @@ -62,7 +60,7 @@ SRC_NAME=file-5.04 PACK_SUFIX=tar.gz if [ -f ${PREFIX_PATH}/ethtool ] ; then if [ -f ${PREFIX_PATH}/file ] ; then return 0; fi 3rdparty/imageMagick/build.sh
New file @@ -0,0 +1,96 @@ #!/bin/bash #+-------------------------------------------------------------------------------------------- #|Description: This shell script used download and compile imageMagick for ARM #| Author: GuoWenxue <guowenxue@gmail.com> #| ChangeLog: #| 1, Initialize 1.0.0 on 2011.04.12 #+-------------------------------------------------------------------------------------------- PREFIX_PATH=`pwd`/../install/ LYFTP_SRC=ftp://master.iot-yun.club/src/ CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- function msg_banner() { echo "" echo "+-----------------------------------------------------------------------" echo "| $1 " echo "+-----------------------------------------------------------------------" echo "" } function check_result() { if [ $? != 0 ] ; then echo "" echo "+-----------------------------------------------------------------------" echo "| $1 " echo "+-----------------------------------------------------------------------" echo "" exit ; fi } function export_cross() { # export cross toolchain export CC=${CROSSTOOL}gcc export AS=${CROSSTOOL}as export AR=${CROSSTOOL}ar export LD=${CROSSTOOL}ld export NM=${CROSSTOOL}nm export RANLIB=${CROSSTOOL}ranlib export OBJDUMP=${CROSSTOOL}objdump export STRIP=${CROSSTOOL}strip # export cross configure export CONFIG_CROSS=" --build=i686-pc-linux --host=arm-linux " # Clear LDFLAGS and CFLAGS export LDFLAGS= export CFLAGS= } function compile_imageMagick() { SRC_NAME=ImageMagick6-6.9.4-0 PACK_SUFIX=tar.gz if [ -f $PREFIX_PATH/lib/libMagickCore-6.Q16.a ] ; then return 0; fi msg_banner "Start cross compile $SRC_NAME " if [ ! -f ${SRC_NAME}.${PACK_SUFIX} ] ; then wget ${LYFTP_SRC}/${SRC_NAME}.${PACK_SUFIX} check_result "ERROR: download ${SRC_NAME} failure" fi tar -xzf ${SRC_NAME}.${PACK_SUFIX} cd ${SRC_NAME} CFLAGS="-I${PREFIX_PATH}/include -DMAGICKCORE_QUANTUM_DEPTH=16" LDFLAGS=-L${PREFIX_PATH}/lib \ ./configure --host=arm-linux --enable-static --disable-shared --prefix=$PREFIX_PATH \ --without-magick-plus-plus --without-perl --without-x --without-dps --without-xml \ --without-pango --without-freetype --without-png check_result "ERROR: configure ${SRC_NAME} failure" make && make install check_result "ERROR: compile ${SRC_NAME} failure" cd - } export_cross compile_imageMagick 3rdparty/iptables/build.sh
@@ -9,9 +9,9 @@ PREFIX_PATH=`pwd`/../install/bin if [ -z $CROSSTOOL ] ; then CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- fi LYFTP_SRC=ftp://master.iot-yun.club/src/ CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- function msg_banner() { @@ -67,7 +67,8 @@ msg_banner "Start cross compile $SRC_NAME " if [ ! -f ${SRC_NAME}.${PACK_SUFIX} ] ; then wget http://www.netfilter.org/projects/iptables/files/${SRC_NAME}.${PACK_SUFIX} #wget http://www.netfilter.org/projects/iptables/files/${SRC_NAME}.${PACK_SUFIX} wget $LYFTP_SRC/$SRC_NAME.$PACK_SUFIX check_result "ERROR: download ${SRC_NAME} failure" fi 3rdparty/libconfig/build.sh
@@ -11,9 +11,7 @@ LYFTP_SRC=ftp://master.iot-yun.club/src/ if [ -z $CROSSTOOL ] ; then CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- fi CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- function msg_banner() { 3rdparty/libevent/build.sh
@@ -11,9 +11,7 @@ LYFTP_SRC=ftp://master.iot-yun.club/src/ if [ -z $CROSSTOOL ] ; then CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- fi CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- function msg_banner() { 3rdparty/libpng/build.sh
@@ -12,9 +12,7 @@ LYFTP_SRC=ftp://master.iot-yun.club/src/ if [ -z $CROSSTOOL ] ; then CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- fi CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- function msg_banner() { 3rdparty/libressl/build.sh
New file @@ -0,0 +1,94 @@ #!/bin/bash #+-------------------------------------------------------------------------------------------- #|Description: This shell script used download and compile libressl for ARM #| Author: GuoWenxue <guowenxue@gmail.com> #| ChangeLog: #| 1, Initialize 1.0.0 on 2011.04.12 #+-------------------------------------------------------------------------------------------- PREFIX_PATH=`pwd`/../install LYFTP_SRC=ftp://master.iot-yun.club/src/ CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- function msg_banner() { echo "" echo "+-----------------------------------------------------------------------" echo "| $1 " echo "+-----------------------------------------------------------------------" echo "" } function check_result() { if [ $? != 0 ] ; then echo "" echo "+-----------------------------------------------------------------------" echo "| $1 " echo "+-----------------------------------------------------------------------" echo "" exit ; fi } function export_cross() { # export cross toolchain export CC=${CROSSTOOL}gcc export AS=${CROSSTOOL}as export AR=${CROSSTOOL}ar export LD=${CROSSTOOL}ld export NM=${CROSSTOOL}nm export RANLIB=${CROSSTOOL}ranlib export OBJDUMP=${CROSSTOOL}objdump export STRIP=${CROSSTOOL}strip # export cross configure export CONFIG_CROSS=" --build=i686-pc-linux --host=arm-linux " # Clear LDFLAGS and CFLAGS export LDFLAGS= export CFLAGS= } function compile_libressl() { SRC_NAME=libressl-2.9.2 PACK_SUFIX=tar.gz if [ -f ${PREFIX_PATH}/lib/libcrypto.a ] ; then return 0; fi msg_banner "Start cross compile $SRC_NAME " if [ ! -f ${SRC_NAME}.${PACK_SUFIX} ] ; then #wget https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/${SRC_NAME}.${PACK_SUFIX} wget ${LYFTP_SRC}/${SRC_NAME}.${PACK_SUFIX} check_result "ERROR: download ${SRC_NAME} failure" fi tar -xzf ${SRC_NAME}.${PACK_SUFIX} cd ${SRC_NAME} touch * export CFLAGS=-fPIC #./configure ${CONFIG_CROSS} --prefix=${PREFIX_PATH} --with-pic --disable-shared --enable-static LIBS="-lpthread" ./configure ${CONFIG_CROSS} --prefix=${PREFIX_PATH} --with-pic LIBS="-lpthread" make && make install check_result "ERROR: compile ${SRC_NAME} failure" cd - } printf "\nWARRNING: libressl is a candidate of openssl, so don't compile it if openssl enabled\n\n" exit; export_cross compile_libressl 3rdparty/lrzsz/build.sh
@@ -10,6 +10,8 @@ PRJ_PATH=`pwd` PREFIX_PATH=`pwd`/../install LYFTP_SRC=ftp://master.iot-yun.club/src/ CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- function msg_banner() @@ -66,7 +68,8 @@ msg_banner "Start cross compile $SRC_NAME " if [ ! -f ${SRC_NAME}.${PACK_SUFIX} ] ; then wget http://www.ohse.de/uwe/releases/${SRC_NAME}.${PACK_SUFIX} #wget http://www.ohse.de/uwe/releases/${SRC_NAME}.${PACK_SUFIX} wget $LYFTP_SRC/$SRC_NAME.$PACK_SUFIX check_result "ERROR: download ${SRC_NAME} failure" fi 3rdparty/mosquitto/build.sh
@@ -11,9 +11,7 @@ LYFTP_SRC=ftp://master.iot-yun.club/src/ if [ -z $CROSSTOOL ] ; then CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- fi CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- function msg_banner() { 3rdparty/ntpdate/build.sh
@@ -11,9 +11,7 @@ LYFTP_SRC=ftp://master.iot-yun.club/src/ if [ -z $CROSSTOOL ] ; then CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- fi CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- function msg_banner() { @@ -68,8 +66,8 @@ msg_banner "Start donwload $SRC_NAME " if [ ! -f ${SRC_NAME}.${PACK_SUFIX} ] ; then wget https://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/${SRC_NAME}.${PACK_SUFIX} #wget ${LYFTP_SRC}/${SRC_NAME}.${PACK_SUFIX} #wget https://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/${SRC_NAME}.${PACK_SUFIX} wget ${LYFTP_SRC}/${SRC_NAME}.${PACK_SUFIX} check_result "ERROR: download ${SRC_NAME} failure" fi 3rdparty/opencv/build.sh
@@ -4,13 +4,17 @@ OPENCV_SRC=opencv-3.4.6 LYFTP_SRC=ftp://master.iot-yun.club/src/ CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- TOOLCHAIN=cortexa7.toolchain.cmake JOBS=`cat /proc/cpuinfo | grep processor | wc -l` if [ ! -d $OPENCV_SRC ] ; then if [ ! -f $OPENCV_SRC.zip ] ; then wget ftp://master.iot-yun.club/src/$OPENCV_SRC.zip wget $LYFTP_SRC/$OPENCV_SRC.zip fi unzip $OPENCV_SRC.zip @@ -22,7 +26,7 @@ cat >platforms/linux/${TOOLCHAIN} <<EOF set(GCC_COMPILER_VERSION "" CACHE STRING "GCC Compiler version") set(GNU_MACHINE "/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi" CACHE STRING "GNU compiler triple") set(GNU_MACHINE "${CROSSTOOL%*-}" CACHE STRING "GNU compiler triple") include("\${CMAKE_CURRENT_LIST_DIR}/arm.toolchain.cmake") EOF 3rdparty/openssh/build.sh
@@ -13,10 +13,7 @@ LYFTP_SRC=ftp://master.iot-yun.club/src/ if [ -z $CROSSTOOL ] ; then CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- # CROSSTOOL=/opt/rpi/arm-bcm2708/arm-linux-gnueabihf/bin/arm-linux- fi CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- function msg_banner() { 3rdparty/openssh/openssl/build.sh
@@ -11,10 +11,7 @@ LYFTP_SRC=ftp://master.iot-yun.club/src/ if [ -z $CROSSTOOL ] ; then CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- #CROSSTOOL=/opt/rpi/arm-bcm2708/arm-linux-gnueabihf/bin/arm-linux- fi CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- function msg_banner() { 3rdparty/openssh/zlib/build.sh
@@ -11,10 +11,7 @@ LYFTP_SRC=ftp://master.iot-yun.club/src/ if [ -z $CROSSTOOL ] ; then CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- #CROSSTOOL=/opt/rpi/arm-bcm2708/arm-linux-gnueabihf/bin/arm-linux- fi CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- function msg_banner() { 3rdparty/openssl/build.sh
@@ -11,9 +11,7 @@ LYFTP_SRC=ftp://master.iot-yun.club/src/ if [ -z $CROSSTOOL ] ; then CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- fi CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- function msg_banner() { 3rdparty/pppd/build.sh
@@ -11,9 +11,7 @@ LYFTP_SRC=ftp://master.iot-yun.club/src/ if [ -z $CROSSTOOL ] ; then CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- fi CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- function msg_banner() { @@ -61,7 +59,7 @@ SRC_NAME=ppp-2.4.7 PACK_SUFIX=tar.gz if [ -f ${PREFIX_PATH}/ethtool ] ; then if [ -f ${PREFIX_PATH}/pppd ] ; then return 0; fi 3rdparty/qt/build_QT5.sh
@@ -18,9 +18,10 @@ QT_INST_PATH=/apps/QT5.9_A8 LYFTP_SRC=ftp://master.iot-yun.club/src/ CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- LYFTP_SRC=ftp://master.iot-yun.club/src/ function msg_banner() { 3rdparty/sqlite/build.sh
@@ -11,9 +11,7 @@ LYFTP_SRC=ftp://master.iot-yun.club/src/ if [ -z $CROSSTOOL ] ; then CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- fi CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- function msg_banner() { 3rdparty/stunnel/build.sh
@@ -11,9 +11,7 @@ LYFTP_SRC=ftp://master.iot-yun.club/src/ if [ -z $CROSSTOOL ] ; then CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- fi CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- function msg_banner() { @@ -70,8 +68,8 @@ msg_banner "Start cross compile $SRC_NAME " if [ ! -f ${SRC_NAME}.${PACK_SUFIX} ] ; then wget http://www.usenix.org.uk/mirrors/stunnel/${SRC_NAME}.${PACK_SUFIX} #wget ${LYFTP_SRC}/${SRC_NAME}.${PACK_SUFIX} #wget http://www.usenix.org.uk/mirrors/stunnel/${SRC_NAME}.${PACK_SUFIX} wget ${LYFTP_SRC}/${SRC_NAME}.${PACK_SUFIX} check_result "ERROR: download ${SRC_NAME} failure" fi 3rdparty/tree/build.sh
@@ -11,9 +11,7 @@ LYFTP_SRC=ftp://master.iot-yun.club/src/ if [ -z $CROSSTOOL ] ; then CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- fi CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- function msg_banner() { @@ -61,7 +59,7 @@ SRC_NAME=tree-1.8.0 PACK_SUFIX=tgz if [ -f ${PREFIX_PATH}/ethtool ] ; then if [ -f ${PREFIX_PATH}/tree ] ; then return 0; fi 3rdparty/vsftpd/build.sh
@@ -11,9 +11,7 @@ LYFTP_SRC=ftp://master.iot-yun.club/src/ if [ -z $CROSSTOOL ] ; then CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- fi CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- function msg_banner() { 3rdparty/zbar/build.sh
@@ -1,221 +1,115 @@ #!/bin/bash #+-------------------------------------------------------------------------------------------- #|Description: This is shell script used to download a zbarapplication #| and cross compile it. #|Description: This shell script used download and compile zbar for ARM #| Author: GuoWenxue <guowenxue@gmail.com> #| ChangeLog: #| 1, Initialize 1.0.0 on 2011.12.26 #| 1, Initialize 1.0.0 on 2018.08.16 #+-------------------------------------------------------------------------------------------- set -e PRJ_PATH=`pwd` APP_NAME=zbar-latest APP_PACK=$APP_NAME.tar.bz2 INST_PATH=$PRJ_PATH/../install CROSS=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- PREFIX_PATH=`pwd`/../install/ LYFTP_SRC=ftp://master.iot-yun.club/src/ # arg1 is the packet download address # arg2 is the download packet rename name function download_packet() CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- function msg_banner() { if [ $# -lt 1 ] ; then echo "ERROR: $0 without argument for packet download address" exit; echo "" echo "+-----------------------------------------------------------------------" echo "| $1 " echo "+-----------------------------------------------------------------------" echo "" } function check_result() { if [ $? != 0 ] ; then echo "" echo "+-----------------------------------------------------------------------" echo "| $1 " echo "+-----------------------------------------------------------------------" echo "" exit ; fi } rename=0 function export_cross() { # export cross toolchain export CC=${CROSSTOOL}gcc export CXX=${CROSSTOOL}g++ export AS=${CROSSTOOL}as export AR=${CROSSTOOL}ar export LD=${CROSSTOOL}ld export NM=${CROSSTOOL}nm export RANLIB=${CROSSTOOL}ranlib export OBJDUMP=${CROSSTOOL}objdump export STRIP=${CROSSTOOL}strip dl_addr=$1 dl_file=`basename $dl_addr` # export cross configure export CONFIG_CROSS=" --build=i686-pc-linux --host=arm-linux " if [ $# -ge 2 ] ; then pack=$2 rename=1 else pack=$dl_file fi # Clear LDFLAGS and CFLAGS export LDFLAGS= export CFLAGS= } if [ -s $pack ] ; then echo "INFO: $pack already exist, skip download it" function compile_zbar() { SRC_NAME=zbar-latest PACK_SUFIX=tar.bz2 if [ -f ${PREFIX_PATH}/bin/zbarcam ] ; then echo "$SRC_NAME already compile and installed" return 0; fi echo "INFO: Start to download packet $pack now" wget $dl_addr msg_banner "Start cross compile $SRC_NAME " if [ $? != 0 ] ; then echo "ERROR: Download $pack failure, exit now..." exit; fi echo "INFO: Download $pack ok!" if [ ! -f ${SRC_NAME}.${PACK_SUFIX} ] ; then wget ${LYFTP_SRC}/${SRC_NAME}.${PACK_SUFIX} if [ $rename != 0 ] ; then mv $dl_file $pack check_result "ERROR: download ${SRC_NAME} failure" fi return 0; tar -xjf ${SRC_NAME}.${PACK_SUFIX} cd ${SRC_NAME} git checkout 8edfa5f8c4d11a54 && rm -rf * && git checkout . autoreconf --install 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 " mkdir -p ./doc/man/ touch ./doc/man/zbarimg.1 touch ./doc/man/zbarcam.1 make all && make install cd - } function decompress_packet() ( echo "+---------------------------------------------+" echo "| Decompress $1 now" echo "+---------------------------------------------+" rv=0; ftype=`file "$1"` case "$ftype" in "$1: Zip archive"*) unzip "$1" ;; "$1: gzip compressed"*) if [ 0 != `expr "$1" : ".*.tar.*" ` ] ; then tar -xzf $1 else gzip -d "$1" fi ;; "$1: bzip2 compressed"*) if [ 0 != `expr "$1" : ".*.tar.*" ` ] ; then tar -xjf $1 else bunzip2 "$1" fi ;; "$1: POSIX tar archive"*) tar -xf "$1" ;; "$1: LZMA compressed data, streamed"*) xz -d $1 && tar -xf `ls *.tar` ;; *) rv=1; echo "$1 is unknow compress format";; esac if [ $rv != 0 ] ; then echo "ERROR: Decompress $1 failure, exit now..." exit 1; fi return $rv; ) export CC=${CROSS}gcc export CXX=${CROSS}g++ export AR=${CROSS}ar export AS=${CROSS}as export LD=${CROSS}ld export NM=${CROSS}nm export RANLIB=${CROSS}ranlib export STRIP=${CROSS}strip if [ -d $INST_PATH ] ; then echo "INFO: $APP_NAME already cross compiled, exit now ..." #exit; fi LIB_ZLIB=zlib-1.2.11 PACK_ZLIB=$LIB_ZLIB.tar.gz if [ ! -f $INST_PATH/lib/libz.so ] ; then download_packet ${LYFTP_SRC}/${PACK_ZLIB} if [ ! -d $LIB_ZLIB ] ; then decompress_packet $PACK_ZLIB if [ $? != 0 ] ; then exit 1; fi fi echo "+------------------------------------------------------------------+" echo "| Build $LIB_ZLIB for $ARCH " echo "| Crosstool: $CROSS" echo "+------------------------------------------------------------------+" cd $LIB_ZLIB ./configure --prefix=$INST_PATH make && make install cd - else echo "+------------------------------------------------------------------+" echo "| $LIB_ZLIB already ready " echo "+------------------------------------------------------------------+" fi LIB_IMGIC=ImageMagick6-6.9.4-0 PACK_IMGIC=$LIB_IMGIC.tar.gz if [ ! -f $INST_PATH/lib/libMagickCore-6.Q16.a ] ; then download_packet ${LYFTP_SRC}/${PACK_IMGIC} if [ ! -d $LIB_IMGIC ] ; then decompress_packet $PACK_IMGIC if [ $? != 0 ] ; then exit 1; fi fi echo "+------------------------------------------------------------------+" echo "| Build $LIB_IMGIC for $ARCH " echo "| Crosstool: $CROSS" echo "+------------------------------------------------------------------+" cd $LIB_IMGIC CFLAGS="-I${INST_PATH}/include -DMAGICKCORE_QUANTUM_DEPTH=16" LDFLAGS=-L${INST_PATH}/lib \ ./configure --host=arm-linux --enable-static --disable-shared --prefix=$INST_PATH \ --without-magick-plus-plus --without-perl --without-x --without-dps --without-xml \ --without-pango --without-freetype --without-png make && make install cd - else echo "+------------------------------------------------------------------+" echo "| $LIB_IMGIC already ready " echo "+------------------------------------------------------------------+" fi # Download source code packet download_packet ${LYFTP_SRC}/zbar-latest.tar.bz2 # Decompress source code packet if [ ! -d $APP_NAME ] ; then decompress_packet $APP_PACK if [ $? != 0 ] ; then exit 1; fi fi echo "+------------------------------------------------------------------+" echo "| Build $APP_NAME for $ARCH " echo "| Crosstool: $CROSS" echo "+------------------------------------------------------------------+" cd $APP_NAME git checkout 8edfa5f8c4d11a54 && rm -rf * && git checkout . autoreconf --install CFLAGS="-DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16" \ ./configure --host=arm-linux --enable-static --enable-shared --prefix=$INST_PATH \ --without-gtk --without-python --without-qt --without-x --without-java \ --with-imagemagick=${INST_PATH}/ --without-graphicsmagick \ MAGICK_CFLAGS=-I${INST_PATH}//include/ImageMagick-6 MAGICK_LIBS="-L${INST_PATH}/lib -lMagickWand-6.Q16 -lMagickCore-6.Q16 -lm -lz -L`pwd`/zbar/.libs/ -lzbar " mkdir -p ./doc/man/ touch ./doc/man/zbarimg.1 touch ./doc/man/zbarcam.1 make all && make install cd ../zlib ./build.sh cd - cd ../imageMagick ./build.sh cd - export_cross compile_zbar 3rdparty/zlib/build.sh
@@ -11,9 +11,7 @@ LYFTP_SRC=ftp://master.iot-yun.club/src/ if [ -z $CROSSTOOL ] ; then CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- fi CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi- function msg_banner() {