SAMA5D4 Xplained Ultra Board BSP
guowenxue
2019-08-11 c901644942ddf153ef3e2dac6a38a9bd772e15dc
3rdparty/busybox/build.sh
@@ -6,16 +6,50 @@
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-
JOBS=`cat /proc/cpuinfo  |  grep processor | wc -l`
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
JOBS=`cat /proc/cpuinfo  |  grep processor | wc -l`
    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}
@@ -30,5 +64,12 @@
make 
#make uninstall && sudo make install
}
compile_busybox