From 5f20547d454eda23ad5db4900a48bc28747d1359 Mon Sep 17 00:00:00 2001 From: guowenxue <guowenxue@gmail.com> Date: Sun, 11 Aug 2019 11:18:05 +0800 Subject: [PATCH] update build shell script to format --- 3rdparty/busybox/build.sh | 26 ++++++++++++++------------ 1 files changed, 14 insertions(+), 12 deletions(-) diff --git a/3rdparty/busybox/build.sh b/3rdparty/busybox/build.sh index 723c649..8a02c7f 100755 --- a/3rdparty/busybox/build.sh +++ b/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 -- Gitblit v1.9.1